linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2] net: dsa: microchip: fix probe of I2C-connected KSZ8563
@ 2023-01-20 11:09 Ahmad Fatoum
  2023-01-20 14:15 ` Arun.Ramadoss
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2023-01-20 11:09 UTC (permalink / raw)
  To: Jakub Kicinski, Woojung Huh, UNGLinuxDriver, Andrew Lunn,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Oleksij Rempel
  Cc: kernel, ore, Arun.Ramadoss, 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 ID
read back from the hardware:

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

For the KSZ8563, which used ksz_switch_chips[KSZ9893], this was fine
at first, because it indeed shares the same chip id as the KSZ9893.

Commit b44908095612 ("net: dsa: microchip: add separate struct
ksz_chip_data for KSZ8563 chip") started differentiating KSZ9893
compatible chips by consulting the 0x1F register. The resulting breakage
was fixed for the SPI driver in the same commit by introducing the
appropriate ksz_switch_chips[KSZ8563], but not for the I2C driver.

Fix this for I2C-connected KSZ8563 now to get it probing again.

Fixes: b44908095612 ("net: dsa: microchip: add separate struct ksz_chip_data for KSZ8563 chip").
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
v1 -> v2:
  - rewrote commit message and Fixes: to point at correct
    culprit commit introducing regression (Arun)
  - included Andrew's Reviewed-by
---
 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] 4+ messages in thread

* Re: [PATCH net v2] net: dsa: microchip: fix probe of I2C-connected KSZ8563
  2023-01-20 11:09 [PATCH net v2] net: dsa: microchip: fix probe of I2C-connected KSZ8563 Ahmad Fatoum
@ 2023-01-20 14:15 ` Arun.Ramadoss
  2023-01-20 18:12 ` Florian Fainelli
  2023-01-24  5:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Arun.Ramadoss @ 2023-01-20 14:15 UTC (permalink / raw)
  To: olteanv, UNGLinuxDriver, andrew, linux, f.fainelli, kuba,
	a.fatoum, Woojung.Huh, davem
  Cc: netdev, linux-kernel, kernel, pabeni, ore, edumazet

On Fri, 2023-01-20 at 12:09 +0100, Ahmad Fatoum wrote:
> [Some people who received this message don't often get email from
> a.fatoum@pengutronix.de. Learn why this is important at 
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> 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 ID
> read back from the hardware:
> 
>   ksz9477-switch 1-005f: Device tree specifies chip KSZ9893 but found
>   KSZ8563, please fix it!
> 
> For the KSZ8563, which used ksz_switch_chips[KSZ9893], this was fine
> at first, because it indeed shares the same chip id as the KSZ9893.
> 
> Commit b44908095612 ("net: dsa: microchip: add separate struct
> ksz_chip_data for KSZ8563 chip") started differentiating KSZ9893
> compatible chips by consulting the 0x1F register. The resulting
> breakage
> was fixed for the SPI driver in the same commit by introducing the
> appropriate ksz_switch_chips[KSZ8563], but not for the I2C driver.
> 
> Fix this for I2C-connected KSZ8563 now to get it probing again.
> 
> Fixes: b44908095612 ("net: dsa: microchip: add separate struct
> ksz_chip_data for KSZ8563 chip").
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Acked-by: Arun Ramadoss<arun.ramadoss@microchip.com>

> ---
> v1 -> v2:
>   - rewrote commit message and Fixes: to point at correct
>     culprit commit introducing regression (Arun)
>   - included Andrew's Reviewed-by
> ---
>  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	[flat|nested] 4+ messages in thread

* Re: [PATCH net v2] net: dsa: microchip: fix probe of I2C-connected KSZ8563
  2023-01-20 11:09 [PATCH net v2] net: dsa: microchip: fix probe of I2C-connected KSZ8563 Ahmad Fatoum
  2023-01-20 14:15 ` Arun.Ramadoss
@ 2023-01-20 18:12 ` Florian Fainelli
  2023-01-24  5:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2023-01-20 18:12 UTC (permalink / raw)
  To: Ahmad Fatoum, Jakub Kicinski, Woojung Huh, UNGLinuxDriver,
	Andrew Lunn, Vladimir Oltean, David S. Miller, Oleksij Rempel
  Cc: kernel, ore, Arun.Ramadoss, Eric Dumazet, Paolo Abeni, netdev,
	linux-kernel



On 1/20/2023 3:09 AM, Ahmad Fatoum wrote:
> 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 ID
> read back from the hardware:
> 
>    ksz9477-switch 1-005f: Device tree specifies chip KSZ9893 but found
>    KSZ8563, please fix it!
> 
> For the KSZ8563, which used ksz_switch_chips[KSZ9893], this was fine
> at first, because it indeed shares the same chip id as the KSZ9893.
> 
> Commit b44908095612 ("net: dsa: microchip: add separate struct
> ksz_chip_data for KSZ8563 chip") started differentiating KSZ9893
> compatible chips by consulting the 0x1F register. The resulting breakage
> was fixed for the SPI driver in the same commit by introducing the
> appropriate ksz_switch_chips[KSZ8563], but not for the I2C driver.
> 
> Fix this for I2C-connected KSZ8563 now to get it probing again.
> 
> Fixes: b44908095612 ("net: dsa: microchip: add separate struct ksz_chip_data for KSZ8563 chip").
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH net v2] net: dsa: microchip: fix probe of I2C-connected KSZ8563
  2023-01-20 11:09 [PATCH net v2] net: dsa: microchip: fix probe of I2C-connected KSZ8563 Ahmad Fatoum
  2023-01-20 14:15 ` Arun.Ramadoss
  2023-01-20 18:12 ` Florian Fainelli
@ 2023-01-24  5:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-24  5:50 UTC (permalink / raw)
  To: Ahmad Fatoum
  Cc: kuba, woojung.huh, UNGLinuxDriver, andrew, f.fainelli, olteanv,
	davem, linux, kernel, ore, Arun.Ramadoss, edumazet, pabeni,
	netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 20 Jan 2023 12:09:32 +0100 you wrote:
> 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 ID
> read back from the hardware:
> 
>   ksz9477-switch 1-005f: Device tree specifies chip KSZ9893 but found
>   KSZ8563, please fix it!
> 
> [...]

Here is the summary with links:
  - [net,v2] net: dsa: microchip: fix probe of I2C-connected KSZ8563
    https://git.kernel.org/netdev/net/c/360fdc999d92

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-01-24  5:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-20 11:09 [PATCH net v2] net: dsa: microchip: fix probe of I2C-connected KSZ8563 Ahmad Fatoum
2023-01-20 14:15 ` Arun.Ramadoss
2023-01-20 18:12 ` Florian Fainelli
2023-01-24  5:50 ` patchwork-bot+netdevbpf

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