• Robert Hancock's avatar
    net: phy: marvell: update abilities and advertising when switching to SGMII · 0ed99ecc
    Robert Hancock authored
    With some SFP modules, such as Finisar FCLF8522P2BTL, the PHY hardware
    strapping defaults to 1000BaseX mode, but the kernel prefers to set them
    for SGMII mode. When this happens and the PHY is soft reset, the BMSR
    status register is updated, but this happens after the kernel has already
    read the PHY abilities during probing. This results in support not being
    detected for, and the PHY not advertising support for, 10 and 100 Mbps
    modes, preventing the link from working with a non-gigabit link partner.
    
    When the PHY is being configured for SGMII mode, call genphy_read_abilities
    again in order to re-read the capabilities, and update the advertising
    field accordingly.
    Signed-off-by: default avatarRobert Hancock <robert.hancock@calian.com>
    Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0ed99ecc
marvell.c 86.1 KB