linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: brcmstb: fix broken brcm_pcie_mdio_write() polling
@ 2024-02-17 13:37 Stefan Wahren
  2024-02-17 17:27 ` Florian Fainelli
  2024-03-09 17:08 ` Krzysztof Wilczyński
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Wahren @ 2024-02-17 13:37 UTC (permalink / raw)
  To: Jim Quinlan, Nicolas Saenz Julienne, Florian Fainelli,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Bjorn Helgaas, Cyril Brulebois
  Cc: bcm-kernel-feedback-list, linux-pci, linux-arm-kernel,
	Jonathan Bell, Stefan Wahren

From: Jonathan Bell <jonathan@raspberrypi.com>

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: ca5dcc76314d ("PCI: brcmstb: Replace status loops with read_poll_timeout_atomic()")
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
---
 drivers/pci/controller/pcie-brcmstb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 618e84402eb50..a7f05e0c4ac51 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -420,7 +420,7 @@ static int brcm_pcie_mdio_write(void __iomem *base, u8 port,
 	readl(base + PCIE_RC_DL_MDIO_ADDR);
 	writel(MDIO_DATA_DONE_MASK | wrdata, base + PCIE_RC_DL_MDIO_WR_DATA);

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-09 17:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-17 13:37 [PATCH] PCI: brcmstb: fix broken brcm_pcie_mdio_write() polling Stefan Wahren
2024-02-17 17:27 ` Florian Fainelli
2024-03-02  9:45   ` Stefan Wahren
2024-03-07 18:59     ` Stefan Wahren
2024-03-09 17:13       ` Krzysztof Wilczyński
2024-03-09 17:08 ` Krzysztof Wilczyński

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).