netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Unify C22 and C45 error handling during bus enumeration
@ 2024-02-03 20:52 Andrew Lunn
  2024-02-03 20:52 ` [PATCH net-next 1/2] net: phy: c45 scanning: Don't consider -ENODEV fatal Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrew Lunn @ 2024-02-03 20:52 UTC (permalink / raw)
  To: Heiner Kallweit, Russell King, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Florian Fainelli, Vladimir Oltean
  Cc: netdev, Tim Menninger, Andrew Lunn

When enumerating an MDIO bus, an MDIO bus driver can return -ENODEV to
a C22 read transaction to indicate there is no device at that address
on the bus. Enumeration will then continue with the next address on
the bus.

Modify C44 enumeration so that it also accepts -ENODEV and moves to
the next address on the bus, rather than consider -ENODEV as a fatal
error.

Convert the mv88e6xxx driver to return -ENODEV rather than 0xffff on
read for families which do not support C45 bus transactions. This is
more efficient, since enumeration will scan multiple devices at one
address when 0xffff is returned, where as -EONDEV immediately jumps to
the next address on the bus.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
Andrew Lunn (2):
      net: phy: c45 scanning: Don't consider -ENODEV fatal
      net: dsa: mv88e6xxx: Return -ENODEV when C22/C45 not supported

 drivers/net/dsa/mv88e6xxx/chip.c | 4 ++--
 drivers/net/phy/phy_device.c     | 8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
---
base-commit: d6aa8e0aa605a6baba08220e4a83fa2619a4c4d7
change-id: 20240203-unify-c22-c45-scan-error-handling-8012bb69bbf9

Best regards,
-- 
Andrew Lunn <andrew@lunn.ch>


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

end of thread, other threads:[~2024-02-03 21:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-03 20:52 [PATCH net-next 0/2] Unify C22 and C45 error handling during bus enumeration Andrew Lunn
2024-02-03 20:52 ` [PATCH net-next 1/2] net: phy: c45 scanning: Don't consider -ENODEV fatal Andrew Lunn
2024-02-03 21:40   ` Florian Fainelli
2024-02-03 20:52 ` [PATCH net-next 2/2] net: dsa: mv88e6xxx: Return -ENODEV when C22/C45 not supported Andrew Lunn
2024-02-03 21:07   ` Florian Fainelli
2024-02-03 21:28 ` [PATCH net-next 0/2] Unify C22 and C45 error handling during bus enumeration Russell King (Oracle)

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