linux/drivers/net/ethernet/marvell
Russell King d14e078f23 net: marvell: mvpp2: only reprogram what is necessary on mac_config
mac_config() can be called at any point, and the expected behaviour
from MAC drivers is to only reprogram when necessary - and certainly
avoid taking the link down on every call.

Unfortunately, mvpp2 does exactly that - it takes the link down, and
reprograms everything, and then releases the forced-link down.

This is bad, it can cause the link to bounce:

- SFP detects signal, disables LOS indication.
- SFP code calls into phylink, calling phylink_sfp_link_up() which
  triggers a resolve.
- phylink_resolve() calls phylink_get_mac_state() and finds the MAC
  reporting link up.
- phylink wants to configure the pause mode on the MAC, so calls
  phylink_mac_config()
- mvpp2 takes the link down temporarily, generating a MAC link down
  event followed by another MAC link event.
- phylink calls mac_link_up() and then processes the MAC link down
  event.
- phylink_resolve() gets called again, registers the link down, and
  calls mach_link_down() before re-running itself.
- phylink_resolve() starts again at step 3 above.  This sequence
  repeats.

GMAC versions prior to mvpp2 do not require the link to be taken down
except when certain link properties (eg, switching between SGMII and
1000base-X mode, or enabling/disabling in-band negotiation) are
changed.  Implement this for mvpp2.

Tested-by: Sven Auhagen <sven.auhagen@voleatech.de>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-08 23:08:39 -08:00
..
mvpp2 net: marvell: mvpp2: only reprogram what is necessary on mac_config 2019-02-08 23:08:39 -08:00
octeontx2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-16 05:13:36 +12:00
Kconfig octeontx2-af: Add Marvell OcteonTX2 RVU AF driver 2018-10-10 10:06:01 -07:00
Makefile octeontx2-af: Add Marvell OcteonTX2 RVU AF driver 2018-10-10 10:06:01 -07:00
mv643xx_eth.c net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
mvmdio.c drivers: net: Remove device_node checks with of_mdiobus_register() 2018-05-16 14:20:36 -04:00
mvneta_bm.c net: mvneta: remove data pointer usage from device_node structure 2018-07-28 22:12:55 -07:00
mvneta_bm.h net: mvneta: Allocate page for the descriptor 2018-07-28 22:12:55 -07:00
mvneta.c net: marvell: neta: add comphy support 2019-02-07 18:10:26 -08:00
pxa168_eth.c cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
skge.c skge: potential memory corruption in skge_get_regs() 2019-02-01 10:00:22 -08:00
skge.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sky2.c net: marvell: convert to DEFINE_SHOW_ATTRIBUTE 2018-12-03 17:33:44 -08:00
sky2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00