Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: phylink: add support for disabling in-band-status for base-x
MediaTek LynxI PCS, 2500Base-X will only work without inband status due to hardware limitation. I understand this patch probably will not get approved as it is now, but perhaps with some pointers in the correct direction to follow, I can change it so it could be. It does however get the result that the rtl8221b on a sfp module functions correctly, with and without (as optical sfp) the phy attached and without using a sfp-quirk/ethtool to disable auto-negotiation. Introduce bool phylink_basex_no_inband(pl), a function similar to bool phylink_phy_no_inband(phy). An option could be to use a function like bool pcs->ops->basex_no_inband(interface), where if the function-pointer is null, it means it is supported. This instead of using the of_device_is_compatible() function. Code changed in phylink_pcs_neg_mode(): When there is no PHY attached, pl->pcs_neg_mode is set to PHYLINK_PCS_NEG_INBAND_DISABLED. link_config is changed: - advertising ETHTOOL_LINK_MODE_Autoneg_BIT cleared - speed set according to interface - duplex to DUPLEX_FULL - pause to MLO_PAUSE_NONE When there is a PHY attached, pl->cur_link_an_mode is set to MLO_AN_PHY. To have the pcs function correctly with the rtl8221b, we need to do the following to the in-band-status. We need to disable it when interface of the pcs is set to 2500base-x, but need it enable it when switched to sgmii. Changes to be committed: modified: drivers/net/phy/phylink.c Signed-off-by: Eric Woudstra <[email protected]>
- Loading branch information