summaryrefslogtreecommitdiffstats
path: root/drivers/bcma
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-08-27 09:16:20 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-29 10:21:48 +0100
commit7d05de194a7e2e57a710b966707819f1477a3392 (patch)
treee7d6f6a75398f7864f362ae26268ffeb5ae23054 /drivers/bcma
parentb73696ee98b52241fd6cfc1da73c6a8de1d5d800 (diff)
downloadlinux-stable-7d05de194a7e2e57a710b966707819f1477a3392.tar.gz
linux-stable-7d05de194a7e2e57a710b966707819f1477a3392.tar.bz2
linux-stable-7d05de194a7e2e57a710b966707819f1477a3392.zip
bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA
[ Upstream commit 420c20be08a4597404d272ae9793b642401146eb ] An earlier commit re-worked the setting of the bitmask and is now assigning v with some bit flags rather than bitwise or-ing them into v, consequently the earlier bit-settings of v are being lost. Fix this by replacing an assignment with the bitwise or instead. Addresses-Coverity: ("Unused value") Fixes: 2be25cac8402 ("bcma: add constants for PCI and use them") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/bcma')
-rw-r--r--drivers/bcma/driver_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
index f499a469e66d..12b2cc9a3fbe 100644
--- a/drivers/bcma/driver_pci.c
+++ b/drivers/bcma/driver_pci.c
@@ -78,7 +78,7 @@ static u16 bcma_pcie_mdio_read(struct bcma_drv_pci *pc, u16 device, u8 address)
v |= (address << BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD);
}
- v = BCMA_CORE_PCI_MDIODATA_START;
+ v |= BCMA_CORE_PCI_MDIODATA_START;
v |= BCMA_CORE_PCI_MDIODATA_READ;
v |= BCMA_CORE_PCI_MDIODATA_TA;
@@ -121,7 +121,7 @@ static void bcma_pcie_mdio_write(struct bcma_drv_pci *pc, u16 device,
v |= (address << BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD);
}
- v = BCMA_CORE_PCI_MDIODATA_START;
+ v |= BCMA_CORE_PCI_MDIODATA_START;
v |= BCMA_CORE_PCI_MDIODATA_WRITE;
v |= BCMA_CORE_PCI_MDIODATA_TA;
v |= data;