net: phylink: use a dedicated helper to parse usgmii control word
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Fri, 9 Jun 2023 08:03:05 +0000 (10:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 14:01:00 +0000 (16:01 +0200)
commit835457c0d608b388d69d26efbe3b8e4ceeb65e62
tree7fc835327f804b5be7aaf766ee73e54ec9feea4d
parentfabf9cb41334705fcce26aee7f96ba4d70b9fd0f
net: phylink: use a dedicated helper to parse usgmii control word

[ Upstream commit 923454c0368b8092e9d05c020f50abca577e7290 ]

Q-USGMII is a derivative of USGMII, that uses a specific formatting for
the control word. The layout is close to the USXGMII control word, but
doesn't support speeds over 1Gbps. Use a dedicated decoding logic for
the USGMII control word, re-using USXGMII definitions but only considering
10/100/1000Mbps speeds

Fixes: 5e61fe157a27 ("net: phy: Introduce QUSGMII PHY mode")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/phylink.c