Skip to content

Commit

Permalink
Merge branch 'dsa-mv88e6xxx-ATU-VTU-irq-fixes'
Browse files Browse the repository at this point in the history
Andrew Lunn says:

====================
ATU and VTU irq fixes

Further testing and code review found two sets of bugs.

Core review found a cut/paste error in the irq setup code.

A board which does not have an interrupt line from the switch to the
SoC, and experiancing an EPROBE_DEFER throw a splat when the ATU irq
was freed but never registered.

v2: Fix typ0 chip->chip->vtu_prob_irq to chip->vtu_prob_irq
    0-day compile testing.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jan 19, 2018
2 parents 7677fd0 + ae14caf commit 85831e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions drivers/net/dsa/mv88e6xxx/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -3999,9 +3999,11 @@ 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);
if (chip->irq > 0)
mv88e6xxx_g1_vtu_prob_irq_free(chip);
out_g1_atu_prob_irq:
mv88e6xxx_g1_atu_prob_irq_free(chip);
if (chip->irq > 0)
mv88e6xxx_g1_atu_prob_irq_free(chip);
out_g2_irq:
if (chip->info->g2_irqs > 0 && chip->irq > 0)
mv88e6xxx_g2_irq_free(chip);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/mv88e6xxx/global1_atu.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ int mv88e6xxx_g1_atu_prob_irq_setup(struct mv88e6xxx_chip *chip)
chip->atu_prob_irq = irq_find_mapping(chip->g1_irq.domain,
MV88E6XXX_G1_STS_IRQ_ATU_PROB);
if (chip->atu_prob_irq < 0)
return chip->device_irq;
return chip->atu_prob_irq;

err = request_threaded_irq(chip->atu_prob_irq, NULL,
mv88e6xxx_g1_atu_prob_irq_thread_fn,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/mv88e6xxx/global1_vtu.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ int mv88e6xxx_g1_vtu_prob_irq_setup(struct mv88e6xxx_chip *chip)
chip->vtu_prob_irq = irq_find_mapping(chip->g1_irq.domain,
MV88E6XXX_G1_STS_IRQ_VTU_PROB);
if (chip->vtu_prob_irq < 0)
return chip->device_irq;
return chip->vtu_prob_irq;

err = request_threaded_irq(chip->vtu_prob_irq, NULL,
mv88e6xxx_g1_vtu_prob_irq_thread_fn,
Expand Down

0 comments on commit 85831e5

Please sign in to comment.