Skip to content

Commit 039741a

Browse files
P33Mkwilczynski
authored andcommitted
PCI: brcmstb: Fix broken brcm_pcie_mdio_write() polling
The MDIO_WT_DONE() macro tests bit 31, which is always 0 (== done) as readw_poll_timeout_atomic() does a 16-bit read. Replace with the readl variant. [kwilczynski: commit log] Fixes: ca5dcc7 ("PCI: brcmstb: Replace status loops with read_poll_timeout_atomic()") Link: https://lore.kernel.org/linux-pci/[email protected] Signed-off-by: Jonathan Bell <[email protected]> Signed-off-by: Stefan Wahren <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> Acked-by: Florian Fainelli <[email protected]>
1 parent 6613476 commit 039741a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/controller/pcie-brcmstb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static int brcm_pcie_mdio_write(void __iomem *base, u8 port,
336336
readl(base + PCIE_RC_DL_MDIO_ADDR);
337337
writel(MDIO_DATA_DONE_MASK | wrdata, base + PCIE_RC_DL_MDIO_WR_DATA);
338338

339-
err = readw_poll_timeout_atomic(base + PCIE_RC_DL_MDIO_WR_DATA, data,
339+
err = readl_poll_timeout_atomic(base + PCIE_RC_DL_MDIO_WR_DATA, data,
340340
MDIO_WT_DONE(data), 10, 100);
341341
return err;
342342
}

0 commit comments

Comments
 (0)