netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: dsa: microchip: fix probe of I2C-connected KSZ8563
@ 2023-01-19 13:10 Ahmad Fatoum
  2023-01-19 13:56 ` Andrew Lunn
  2023-01-20  7:01 ` Arun.Ramadoss
  0 siblings, 2 replies; 9+ messages in thread
From: Ahmad Fatoum @ 2023-01-19 13:10 UTC (permalink / raw)
  To: Jakub Kicinski, Woojung Huh, UNGLinuxDriver, Andrew Lunn,
	Florian Fainelli, Vladimir Oltean, David S. Miller, Arun Ramadoss
  Cc: kernel, Oleksij Rempel, Ahmad Fatoum, Eric Dumazet, Paolo Abeni,
	netdev, linux-kernel

Starting with commit eee16b147121 ("net: dsa: microchip: perform the
compatibility check for dev probed"), the KSZ switch driver now bails
out if it thinks the DT compatible doesn't match the actual chip:

  ksz9477-switch 1-005f: Device tree specifies chip KSZ9893 but found
  KSZ8563, please fix it!

Problem is that the "microchip,ksz8563" compatible is associated
with ksz_switch_chips[KSZ9893]. Same issue also affected the SPI driver
for the same switch chip and was fixed in commit b44908095612
("net: dsa: microchip: add separate struct ksz_chip_data for KSZ8563 chip").

Reuse ksz_switch_chips[KSZ8563] introduced in aforementioned commit
to get I2C-connected KSZ8563 probing again.

Fixes: eee16b147121 ("net: dsa: microchip: perform the compatibility check for dev probed")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/net/dsa/microchip/ksz9477_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/microchip/ksz9477_i2c.c b/drivers/net/dsa/microchip/ksz9477_i2c.c
index c1a633ca1e6d..e315f669ec06 100644
--- a/drivers/net/dsa/microchip/ksz9477_i2c.c
+++ b/drivers/net/dsa/microchip/ksz9477_i2c.c
@@ -104,7 +104,7 @@ static const struct of_device_id ksz9477_dt_ids[] = {
 	},
 	{
 		.compatible = "microchip,ksz8563",
-		.data = &ksz_switch_chips[KSZ9893]
+		.data = &ksz_switch_chips[KSZ8563]
 	},
 	{
 		.compatible = "microchip,ksz9567",
-- 
2.30.2


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

end of thread, other threads:[~2023-01-20 13:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-19 13:10 [PATCH net] net: dsa: microchip: fix probe of I2C-connected KSZ8563 Ahmad Fatoum
2023-01-19 13:56 ` Andrew Lunn
2023-01-20  7:01 ` Arun.Ramadoss
2023-01-20  7:57   ` Ahmad Fatoum
2023-01-20 10:38     ` Arun.Ramadoss
2023-01-20 10:42       ` Ahmad Fatoum
2023-01-20 10:47         ` Arun.Ramadoss
2023-01-20 13:08     ` Andrew Lunn
2023-01-20 13:15       ` Ahmad Fatoum

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).