• Russell King's avatar
    net: sfp: add module start/stop upstream notifications · 74c551ca
    Russell King authored
    When dealing with some copper modules, we can't positively know the
    module capabilities are until we have probed the PHY. Without the full
    capabilities, we may end up failing a module that we could otherwise
    drive with a restricted set of capabilities.
    
    An example of this would be a module with a NBASE-T PHY plugged into
    a host that supports phy interface modes 2500BASE-X and SGMII. The
    PHY supports 10GBASE-R, 5000BASE-X, 2500BASE-X, SGMII interface modes,
    which means a subset of the capabilities are compatible with the host.
    
    However, reading the module EEPROM leads us to believe that the module
    only supports ethtool link mode 10GBASE-T, which is incompatible with
    the host - and thus results in the module being rejected.
    
    This patch adds an extra notification which are triggered after the
    SFP module's PHY probe, and a corresponding notification just before
    the PHY is removed.
    Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    74c551ca
sfp.c 53.7 KB