Skip to content

Commit

Permalink
net: dsa: mv88e6xxx: Fix IRQ when loading module
Browse files Browse the repository at this point in the history
Handle polled interrupts correctly when loading the module.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Fixes: 294d711 ("net: dsa: mv88e6xxx: Poll when no interrupt defined")
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andrew Lunn authored and David S. Miller committed Mar 18, 2018
1 parent 3661daa commit 76f38f1
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions drivers/net/dsa/mv88e6xxx/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -4204,15 +4204,18 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)
mv88e6xxx_unregister_switch(chip);
mv88e6xxx_mdios_unregister(chip);

if (chip->irq > 0) {
mv88e6xxx_g1_vtu_prob_irq_free(chip);
mv88e6xxx_g1_atu_prob_irq_free(chip);
if (chip->info->g2_irqs > 0)
mv88e6xxx_g2_irq_free(chip);
mutex_lock(&chip->reg_lock);
mv88e6xxx_g1_vtu_prob_irq_free(chip);
mv88e6xxx_g1_atu_prob_irq_free(chip);

if (chip->info->g2_irqs > 0)
mv88e6xxx_g2_irq_free(chip);

mutex_lock(&chip->reg_lock);
if (chip->irq > 0)
mv88e6xxx_g1_irq_free(chip);
mutex_unlock(&chip->reg_lock);
}
else
mv88e6xxx_irq_poll_free(chip);
mutex_unlock(&chip->reg_lock);
}

static const struct of_device_id mv88e6xxx_of_match[] = {
Expand Down

0 comments on commit 76f38f1

Please sign in to comment.