]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: fix in-band AN link establishment
authorRussell King <rmk+kernel@armlinux.org.uk>
Sun, 19 Jul 2020 11:00:35 +0000 (12:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Jul 2020 01:08:54 +0000 (18:08 -0700)
commit3db137bef544fa1843ddcdf2204f9162450d0212
treea3f4d9b8d616e70d4d0842bda77a75193b15d590
parentd495de83ddab61e675e99f396a42724a45e0eafc
net: dsa: mv88e6xxx: fix in-band AN link establishment

If in-band negotiation or fixed-link modes are specified for a DSA
port, the DSA code will force the link down during initialisation. For
fixed-link mode, this is fine, as phylink will manage the link state.
However, for in-band mode, phylink expects the PCS to detect link,
which will not happen if the link is forced down.

There is a related issue that in in-band mode, the link could come up
while we are making configuration changes, so we should force the link
down prior to reconfiguring the interface mode.

This patch addresses both issues.

Fixes: 0da96bd3f59c ("net: dsa: Down cpu/dsa ports phylink will control")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h