net: dsa: mv88e6xxx: Fix interrupt masking on removal
authorAndrew Lunn <andrew@lunn.ch>
Thu, 7 Dec 2017 00:05:56 +0000 (01:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:08:00 +0000 (11:08 +0100)
commit0ef99ba03888ea4be143d0a9e9b401071d0fcbf8
tree127952a837bc435ec36d693a5928975df46d6b3c
parent74875198a68e352a1e5d55abff956552a50b762d
net: dsa: mv88e6xxx: Fix interrupt masking on removal

[ Upstream commit 3d5fdba1842bdd2eef29364c660558cb4cbb3fe0 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/dsa/mv88e6xxx/chip.c