Skip to content

Commit f162afb

Browse files
P33Mpopcornmix
authored andcommitted
PCI: brcmstb: fix broken brcm_pcie_mdio_write() polling
MDIO_WR_DONE() tests bit 31, which is always 0 (==done) as readw_poll_timeout_atomic does a 16-bit read. Replace with the readl variant. Fixes: ca5dcc7 ("PCI: brcmstb: Replace status loops with read_poll_timeout_atomic()") Signed-off-by: Jonathan Bell <[email protected]>
1 parent 5f6cd43 commit f162afb

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
@@ -420,7 +420,7 @@ static int brcm_pcie_mdio_write(void __iomem *base, u8 port,
420420
readl(base + PCIE_RC_DL_MDIO_ADDR);
421421
writel(MDIO_DATA_DONE_MASK | wrdata, base + PCIE_RC_DL_MDIO_WR_DATA);
422422

423-
err = readw_poll_timeout_atomic(base + PCIE_RC_DL_MDIO_WR_DATA, data,
423+
err = readl_poll_timeout_atomic(base + PCIE_RC_DL_MDIO_WR_DATA, data,
424424
MDIO_WT_DONE(data), 10, 100);
425425
return err;
426426
}

0 commit comments

Comments
 (0)