net: macb: poll for fixed link state in SGMII mode
authorRobert Hancock <robert.hancock@calian.com>
Thu, 11 Mar 2021 20:18:12 +0000 (14:18 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Mar 2021 00:44:45 +0000 (16:44 -0800)
commit8fab174b78f74f10e4d900fe6da6c9047b0b35b5
tree282d1fe6e9b89ca44417b109ecf7f4d4f804af79
parentc232f81b0a00f01c7dd1f888b806637c0d4b3d68
net: macb: poll for fixed link state in SGMII mode

When using a fixed-link configuration with GEM in SGMII mode, such as
for a chip-to-chip interconnect, the link state was always showing as
established regardless of the actual connectivity state. We can monitor
the pcs_link_state bit in the Network Status register to determine
whether the PCS link state is actually up.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c