aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-11-20 20:14:16 +0100
committerDavid S. Miller <davem@davemloft.net>2016-11-20 21:16:13 -0500
commit3460a5770ce97d7caeb4b11766c7bb2d74d0d29c (patch)
treecc1b7212e0aaa115f12d42a5a0ae17804e4ff74c
parentnet: dsa: mv88e6xxx: Fix unconditional irq freeing (diff)
downloadlinux-dev-3460a5770ce97d7caeb4b11766c7bb2d74d0d29c.tar.xz
linux-dev-3460a5770ce97d7caeb4b11766c7bb2d74d0d29c.zip
net: dsa: mv88e6xxx: Mask g1 interrupts and free interrupt
Fix the g1 interrupt free code such that is masks any further interrupts, and then releases the interrupt. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index b843052d32bd..8fcef7e0d3ba 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -413,6 +413,13 @@ static const struct irq_domain_ops mv88e6xxx_g1_irq_domain_ops = {
static void mv88e6xxx_g1_irq_free(struct mv88e6xxx_chip *chip)
{
int irq, virq;
+ u16 mask;
+
+ mv88e6xxx_g1_read(chip, GLOBAL_CONTROL, &mask);
+ mask |= GENMASK(chip->g1_irq.nirqs, 0);
+ mv88e6xxx_g1_write(chip, GLOBAL_CONTROL, mask);
+
+ free_irq(chip->irq, chip);
for (irq = 0; irq < 16; irq++) {
virq = irq_find_mapping(chip->g1_irq.domain, irq);