]> git.ipfire.org Git - thirdparty/u-boot.git/commit
net: phy: marvell10g: Fix PHY mode bitmap handling
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Thu, 1 Jan 2026 16:51:44 +0000 (17:51 +0100)
committerJerome Forissier <jerome.forissier@arm.com>
Thu, 15 Jan 2026 10:09:28 +0000 (11:09 +0100)
commit2ee6bf4c65d906205aa9e92b96b35cbe75936afc
tree49d24d1fc00d31422acdd00d93c0511f68618c9c
parent7d650e7f90892e3ed1c79bab88955bbbaeb660e4
net: phy: marvell10g: Fix PHY mode bitmap handling

Replace PHY interface mode bitmap handling with comparison test to match
U-Boot PHY subsystem behavior. U-Boot currently implements only single PHY
interface mode for each PHY. Linux currently uses bitmap of PHY interface
modes for each PHY.

The reason why in Linux uses bitmap of supported interface modes is so
that Linux can select the best serdes mode switching behavior for the PHY.

For example if the host only supports 10gbase-r serdes mode, then the PHY
must always talk to the host in 10gbase-r mode, even if the RJ-45 copper
speed was autonegotiated to lower speed (i.e. 1Gbps).

If the host supports both 10gbase-r and sgmii serdes modes, we want the
PHY to switch to sgmii if the RJ-45 speed is 1000/100/10, and to switch
to 10gbase-r if the RJ-45 speed is 10000.

U-Boot does not implement this functionality yet, therefore remove modes
which cannot be currently supported and switch mv_test_bit() to plain
mode comparison.

Fixes: b6fcab0728cb ("net: phy: marvell10g: Adapt Marvell 10G PHY driver from Linux")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
drivers/net/phy/marvell10g.c