net: dsa: mv88e6xxx: Fix interrupt masking on removal
authorAndrew Lunn <andrew@lunn.ch>
Thu, 7 Dec 2017 00:05:56 +0000 (01:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Dec 2017 18:53:05 +0000 (13:53 -0500)
commit3d5fdba1842bdd2eef29364c660558cb4cbb3fe0
tree1577dbd507c39c90a678ea3006178c0b00df1430
parente46772a6946a7d1f3fbbc1415871851d6651f1d4
net: dsa: mv88e6xxx: Fix interrupt masking on removal

When removing the interrupt handling code, we should mask the
generation of interrupts. The code however unmasked all
interrupts. This can then cause a new interrupt. We then get into a
deadlock where the interrupt thread is waiting to run, and the code
continues, trying to remove the interrupt handler, which means waiting
for the thread to complete. On a UP machine this deadlocks.

Fix so we really mask interrupts in the hardware. The same error is
made in the error path when install the interrupt handling code.

Fixes: 3460a5770ce9 ("net: dsa: mv88e6xxx: Mask g1 interrupts and free interrupt")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c