]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: marvell: fix Marvell 88E1512 used in SGMII mode
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 10 Jan 2017 23:13:45 +0000 (23:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jan 2017 15:02:37 +0000 (10:02 -0500)
commit322f1a117e1ad2c61a02d41ea28e380835cfba47
treeb67995c919fc610804329d07db6c72bc7cdda0d7
parentf6d4d5e9c5695f7f5421657fd125e6d8c777365e
net: phy: marvell: fix Marvell 88E1512 used in SGMII mode

When an Marvell 88E1512 PHY is connected to a nic in SGMII mode, the
fiber page is used for the SGMII host-side connection.  The PHY driver
notices that SUPPORTED_FIBRE is set, so it tries reading the fiber page
for the link status, and ends up reading the MAC-side status instead of
the outgoing (copper) link.  This leads to incorrect results reported
via ethtool.

If the PHY is connected via SGMII to the host, ignore the fiber page.
However, continue to allow the existing power management code to
suspend and resume the fiber page.

Fixes: 745a22699761 ("Marvell phy: check link status in case of fiber link.")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell.c