]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Merge branch 'net-phy-c22-c45-enumeration'
authorDavid S. Miller <davem@davemloft.net>
Wed, 7 Feb 2024 13:47:07 +0000 (13:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Feb 2024 13:47:07 +0000 (13:47 +0000)
commit1e8f1477aba53fa900f1c318fe675f8f945a4781
tree248220afd188134d8f429004bc3dde7b375a3cef
parent56b93cd358b304b2d1945c0330dffe8f872bc0d3
parent88b3934e3f31e15b40896aa8ebb0a8040d150c1c
Merge branch 'net-phy-c22-c45-enumeration'

From: Andrew Lunn <andrew@lunn.ch>
To: Heiner Kallweit <hkallweit1@gmail.com>,
 Russell King <linux@armlinux.org.uk>,
 "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
 Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
 Florian Fainelli <f.fainelli@gmail.com>,
 Vladimir Oltean <olteanv@gmail.com>
Cc: netdev@vger.kernel.org,
Tim Menninger <tmenninger@purestorage.com>,
 Andrew Lunn <andrew@lunn.ch>

====================
net: Unify C22 and C45 error handling during bus enumeration

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 C45 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>
Signed-off-by: David S. Miller <davem@davemloft.net>