diff options
author | Andrew Lunn <andrew@lunn.ch> | 2018-01-14 04:32:44 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-14 20:08:45 +0300 |
commit | 0977644c5005ca2d186b353d7236deca6aa2933e (patch) | |
tree | c7eb19159c66f71e31e8faf618c97b16c545e931 /drivers/net/dsa/mv88e6xxx/chip.c | |
parent | 3743d88ab48afa7fb036bb01cd1f19f8202bc526 (diff) | |
download | linux-0977644c5005ca2d186b353d7236deca6aa2933e.tar.xz |
net: dsa: mv88e6xxx: Decode ATU problem interrupt
When there is a problem with the ATU, an interrupt can be
generated. Trap this interrupt and decode the registers to determine
what the problem was, then log the error.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/chip.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index fc512c98f2f8..97d8bc94cee7 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3976,11 +3976,15 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev) if (err) goto out_g1_irq; } + + err = mv88e6xxx_g1_atu_prob_irq_setup(chip); + if (err) + goto out_g2_irq; } err = mv88e6xxx_mdios_register(chip, np); if (err) - goto out_g2_irq; + goto out_g1_atu_prob_irq; err = mv88e6xxx_register_switch(chip); if (err) @@ -3990,6 +3994,8 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev) out_mdio: mv88e6xxx_mdios_unregister(chip); +out_g1_atu_prob_irq: + mv88e6xxx_g1_atu_prob_irq_free(chip); out_g2_irq: if (chip->info->g2_irqs > 0 && chip->irq > 0) mv88e6xxx_g2_irq_free(chip); @@ -4013,6 +4019,7 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev) mv88e6xxx_mdios_unregister(chip); if (chip->irq > 0) { + mv88e6xxx_g1_atu_prob_irq_free(chip); if (chip->info->g2_irqs > 0) mv88e6xxx_g2_irq_free(chip); mutex_lock(&chip->reg_lock); |