linux/drivers/net/ethernet/marvell/mvpp2
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
..
Makefile net: mvpp2: add a debugfs interface for the Header Parser 2018-07-16 00:10:00 -07:00
mvpp2_cls.c net: mvpp2: debugfs: add classifier hit counters 2018-07-16 00:10:01 -07:00
mvpp2_cls.h net: mvpp2: debugfs: add classifier hit counters 2018-07-16 00:10:01 -07:00
mvpp2_debugfs.c net: mvpp2: debugfs: fix incorrect bitwise operator 2018-07-18 10:55:42 -07:00
mvpp2_main.c net: marvell: mvpp2: only reprogram what is necessary on mac_config 2019-02-08 23:08:39 -08:00
mvpp2_prs.c net: mvpp2: debugfs: add hit counter stats for Header Parser entries 2018-07-16 00:10:01 -07:00
mvpp2_prs.h net: mvpp2: debugfs: add hit counter stats for Header Parser entries 2018-07-16 00:10:01 -07:00
mvpp2.h net: mvpp2: Fix affinity hint allocation 2018-10-30 11:34:41 -07:00