]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: marvell: update abilities and advertising when switching to SGMII
authorRobert Hancock <robert.hancock@calian.com>
Wed, 27 Apr 2022 19:39:28 +0000 (13:39 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 May 2022 11:03:09 +0000 (12:03 +0100)
commit156ef3d74cf9b2bbf5ea4758264157e00fb5c59c
tree8719bfedf3df6998406278127925eac0eedd64dc
parent717150e12b0bc38ab6551fdf76655ac07bbfe42a
net: phy: marvell: update abilities and advertising when switching to SGMII

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: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell.c