]> asedeno.scripts.mit.edu Git - linux.git/commit
net: marvell: mvpp2: fix lack of link interrupts
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 4 Feb 2019 23:35:59 +0000 (23:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Feb 2019 18:40:28 +0000 (10:40 -0800)
commitbf2fa12593c2bb77c7ab84254ac69af429d6719b
treeb93548c1610caab2814f7e48f98eecc47baa642f
parent4a4cec7257908d3482a22d43f3a9f229d4592f5c
net: marvell: mvpp2: fix lack of link interrupts

Sven Auhagen reports that if he changes a SFP+ module for a SFP module
on the Macchiatobin Single Shot, the link does not come back up.  For
Sven, it is as easy as:

- Insert a SFP+ module connected, and use ping6 to verify link is up.
- Remove SFP+ module
- Insert SFP 1000base-X module use ping6 to verify link is up: Link
  up event did not trigger and the link is down

but that doesn't show the problem for me.  Locally, this has been
reproduced by:

- Boot with no modules.
- Insert SFP+ module, confirm link is up.
- Replace module with 25000base-X module.  Confirm link is up.
- Set remote end down, link is reported as dropped at both ends.
- Set remote end up, link is reported up at remote end, but not local
  end due to lack of link interrupt.

Fix this by setting up both GMAC and XLG interrupts for port 0, but
only unmasking the appropriate interrupt according to the current mode
set in the mac_config() method.  However, only do the mask/unmask
dance when we are really changing the link mode to avoid missing any
link interrupts.

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>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c