]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: Don't force link when using in-band-status
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Tue, 24 Nov 2020 04:34:37 +0000 (17:34 +1300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 26 Nov 2020 01:58:06 +0000 (17:58 -0800)
commit3bed9bdde2d83842264e5d01f05a4a9429389105
tree54e8da3943a3d73856dac2c3d419599409e0969e
parenta3561249a327aa12ae9eea13e74c1fb47ab7c16d
net: dsa: mv88e6xxx: Don't force link when using in-band-status

When a port is configured with 'managed = "in-band-status"' switch chips
like the 88E6390 need to propagate the SERDES link state to the MAC
because the link state is not correctly detected. This causes problems
on the 88E6185/88E6097 where the link partner won't see link state
changes because we're forcing the link.

To address this introduce a new device specific op port_sync_link() and
push the logic from mv88e6xxx_mac_link_up() into that. Provide an
implementation for the 88E6185 like devices which doesn't force the
link.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/port.c
drivers/net/dsa/mv88e6xxx/port.h