Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76f38f1f authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller
Browse files

net: dsa: mv88e6xxx: Fix IRQ when loading module



Handle polled interrupts correctly when loading the module.

Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Fixes: 294d711e ("net: dsa: mv88e6xxx: Poll when no interrupt defined")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3661daa6
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -4204,16 +4204,19 @@ 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);
	if (chip->irq > 0)
		mv88e6xxx_g1_irq_free(chip);
	else
		mv88e6xxx_irq_poll_free(chip);
	mutex_unlock(&chip->reg_lock);
}
}

static const struct of_device_id mv88e6xxx_of_match[] = {
	{