Skip to content

Commit 76f38f1

Browse files
lunndavem330
authored andcommitted
net: dsa: mv88e6xxx: Fix IRQ when loading module
Handle polled interrupts correctly when loading the module. Signed-off-by: Andrew Lunn <[email protected]> Fixes: 294d711 ("net: dsa: mv88e6xxx: Poll when no interrupt defined") Signed-off-by: David S. Miller <[email protected]>
1 parent 3661daa commit 76f38f1

File tree

1 file changed

+11
-8
lines changed
  • drivers/net/dsa/mv88e6xxx

1 file changed

+11
-8
lines changed

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4204,15 +4204,18 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)
42044204
mv88e6xxx_unregister_switch(chip);
42054205
mv88e6xxx_mdios_unregister(chip);
42064206

4207-
if (chip->irq > 0) {
4208-
mv88e6xxx_g1_vtu_prob_irq_free(chip);
4209-
mv88e6xxx_g1_atu_prob_irq_free(chip);
4210-
if (chip->info->g2_irqs > 0)
4211-
mv88e6xxx_g2_irq_free(chip);
4212-
mutex_lock(&chip->reg_lock);
4207+
mv88e6xxx_g1_vtu_prob_irq_free(chip);
4208+
mv88e6xxx_g1_atu_prob_irq_free(chip);
4209+
4210+
if (chip->info->g2_irqs > 0)
4211+
mv88e6xxx_g2_irq_free(chip);
4212+
4213+
mutex_lock(&chip->reg_lock);
4214+
if (chip->irq > 0)
42134215
mv88e6xxx_g1_irq_free(chip);
4214-
mutex_unlock(&chip->reg_lock);
4215-
}
4216+
else
4217+
mv88e6xxx_irq_poll_free(chip);
4218+
mutex_unlock(&chip->reg_lock);
42164219
}
42174220

42184221
static const struct of_device_id mv88e6xxx_of_match[] = {

0 commit comments

Comments
 (0)