]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: phylink: add negotiation of in-band capabilities
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 3 Dec 2024 15:31:43 +0000 (15:31 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Dec 2024 03:19:08 +0000 (19:19 -0800)
commit5fd0f1a02e750e2db4038dee60edea669ce5aab1
tree093e6fa35ed1158864111380fcfc4d04990db1c1
parentd4169f0c7665afb8d8adb5e1b1df3db88517d0ad
net: phylink: add negotiation of in-band capabilities

Support for in-band signalling with Serdes links is uncertain. Some
PHYs do not support in-band for e.g. SGMII. Some PCS do not support
in-band for 2500Base-X. Some PCS require in-band for Base-X protocols.

Simply using what is in DT is insufficient when we have hot-pluggable
PHYs e.g. in the form of SFP modules, which may not provide the
in-band signalling.

In order to address this, we have introduced phy_inband_caps() and
pcs_inband_caps() functions to allow phylink to retrieve the
capabilities from each end of the PCS/PHY link. This commit adds code
to resolve whether in-band will be used in the various scenarios that
we have: In-band not being used, PHY present using SGMII or Base-X,
PHY not present. We also deal with no capabilties provided.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1tIUsJ-006IUn-H3@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phylink.c