diff options
author | David S. Miller <davem@davemloft.net> | 2018-03-25 20:43:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-25 20:43:42 -0400 |
commit | 9259f134a7dd1372ab142b2860994b993db34917 (patch) | |
tree | 1754e16f6142288d0b52bb08bc8787b03fd5c9d2 | |
parent | 808679e7fa8018321ccfb227628175b84d2a5ff9 (diff) | |
parent | 71f74ae48c7fd08ffa0c447dfcea6c7fd3dfefc6 (diff) | |
download | linux-9259f134a7dd1372ab142b2860994b993db34917.tar.bz2 |
Merge branch 'mv88e6xxx-module-reloading'
Andrew Lunn says:
====================
Fixes to allow mv88e6xxx module to be reloaded
As reported by Uwe Kleine-König, the interrupt trigger is first
configured by DT and then reconfigured to edge. This results in a
failure on EPROBE_DEFER, or if the module is unloaded and reloaded.
A second crash happens on module reload due to a missing call to the
common IRQ free code when using polled interrupts.
With these fixes in place, it becomes possible to load and unload the
kernel modules a few times without it crashing.
v2: Fix the ü in Künig a couple of times
v3: But the ü should be an ö!
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index fd78378ad6b1..9a5d786b4885 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -425,7 +425,7 @@ static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip) err = request_threaded_irq(chip->irq, NULL, mv88e6xxx_g1_irq_thread_fn, - IRQF_ONESHOT | IRQF_TRIGGER_FALLING, + IRQF_ONESHOT, dev_name(chip->dev), chip); if (err) mv88e6xxx_g1_irq_free_common(chip); @@ -467,6 +467,8 @@ static int mv88e6xxx_irq_poll_setup(struct mv88e6xxx_chip *chip) static void mv88e6xxx_irq_poll_free(struct mv88e6xxx_chip *chip) { + mv88e6xxx_g1_irq_free_common(chip); + kthread_cancel_delayed_work_sync(&chip->irq_poll_work); kthread_destroy_worker(chip->kworker); } |