diff options
author | Chris Packham <chris.packham@alliedtelesis.co.nz> | 2020-11-24 05:34:37 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-26 02:58:06 +0100 |
commit | 4efe766290363abc3b6d4f0ba7e48be756621788 (patch) | |
tree | 54e8da3943a3d73856dac2c3d419599409e0969e /drivers/net/dsa/mv88e6xxx/port.h | |
parent | Merge branch 'dt-bindings-net-dsa-microchip-convert-ksz-bindings-to-yaml' (diff) | |
download | linux-4efe766290363abc3b6d4f0ba7e48be756621788.tar.xz linux-4efe766290363abc3b6d4f0ba7e48be756621788.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/port.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/port.h b/drivers/net/dsa/mv88e6xxx/port.h index 44d76ac973f6..500e1d4896ff 100644 --- a/drivers/net/dsa/mv88e6xxx/port.h +++ b/drivers/net/dsa/mv88e6xxx/port.h @@ -298,6 +298,9 @@ int mv88e6390_port_set_rgmii_delay(struct mv88e6xxx_chip *chip, int port, int mv88e6xxx_port_set_link(struct mv88e6xxx_chip *chip, int port, int link); +int mv88e6xxx_port_sync_link(struct mv88e6xxx_chip *chip, int port, unsigned int mode, bool isup); +int mv88e6185_port_sync_link(struct mv88e6xxx_chip *chip, int port, unsigned int mode, bool isup); + int mv88e6065_port_set_speed_duplex(struct mv88e6xxx_chip *chip, int port, int speed, int duplex); int mv88e6185_port_set_speed_duplex(struct mv88e6xxx_chip *chip, int port, |