summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mv88e6xxx/chip.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2018-01-14 02:32:45 +0100
committerDavid S. Miller <davem@davemloft.net>2018-01-14 12:08:45 -0500
commit62eb1162ec3a65f12d0e0c383f4f57de814a5e51 (patch)
tree12d45f39ed5dd01bba2332c61571b7bfa944f2c9 /drivers/net/dsa/mv88e6xxx/chip.c
parent0977644c5005ca2d186b353d7236deca6aa2933e (diff)
downloadlwn-62eb1162ec3a65f12d0e0c383f4f57de814a5e51.tar.gz
lwn-62eb1162ec3a65f12d0e0c383f4f57de814a5e51.zip
net: dsa: mv88e6xxx: Decode VTU problem interrupt
When there is a problem with the VTU, 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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 97d8bc94cee7..54cb00a27408 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -3980,11 +3980,15 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
err = mv88e6xxx_g1_atu_prob_irq_setup(chip);
if (err)
goto out_g2_irq;
+
+ err = mv88e6xxx_g1_vtu_prob_irq_setup(chip);
+ if (err)
+ goto out_g1_atu_prob_irq;
}
err = mv88e6xxx_mdios_register(chip, np);
if (err)
- goto out_g1_atu_prob_irq;
+ goto out_g1_vtu_prob_irq;
err = mv88e6xxx_register_switch(chip);
if (err)
@@ -3994,6 +3998,8 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
out_mdio:
mv88e6xxx_mdios_unregister(chip);
+out_g1_vtu_prob_irq:
+ mv88e6xxx_g1_vtu_prob_irq_free(chip);
out_g1_atu_prob_irq:
mv88e6xxx_g1_atu_prob_irq_free(chip);
out_g2_irq:
@@ -4019,6 +4025,7 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)
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);