[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240324224720.1345309-552-sashal@kernel.org>
Date: Sun, 24 Mar 2024 18:44:37 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Cc: Jonathan Bell <jonathan@...pberrypi.com>,
Stefan Wahren <wahrenst@....net>,
Krzysztof Wilczyński <kwilczynski@...nel.org>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 6.7 551/713] PCI: brcmstb: Fix broken brcm_pcie_mdio_write() polling
From: Jonathan Bell <jonathan@...pberrypi.com>
[ Upstream commit 039741a8d7c9a01c1bc84a5ac5aa770a5e138a30 ]
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: ca5dcc76314d ("PCI: brcmstb: Replace status loops with read_poll_timeout_atomic()")
Link: https://lore.kernel.org/linux-pci/20240217133722.14391-1-wahrenst@gmx.net
Signed-off-by: Jonathan Bell <jonathan@...pberrypi.com>
Signed-off-by: Stefan Wahren <wahrenst@....net>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@...nel.org>
Acked-by: Florian Fainelli <florian.fainelli@...adcom.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
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 f9dd6622fe109..e47a77f943b1e 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -330,7 +330,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;
}
--
2.43.0
Powered by blists - more mailing lists