Commit 9259f134 authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 808679e7 71f74ae4
...@@ -425,7 +425,7 @@ static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip) ...@@ -425,7 +425,7 @@ static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip)
err = request_threaded_irq(chip->irq, NULL, err = request_threaded_irq(chip->irq, NULL,
mv88e6xxx_g1_irq_thread_fn, mv88e6xxx_g1_irq_thread_fn,
IRQF_ONESHOT | IRQF_TRIGGER_FALLING, IRQF_ONESHOT,
dev_name(chip->dev), chip); dev_name(chip->dev), chip);
if (err) if (err)
mv88e6xxx_g1_irq_free_common(chip); mv88e6xxx_g1_irq_free_common(chip);
...@@ -467,6 +467,8 @@ static int mv88e6xxx_irq_poll_setup(struct mv88e6xxx_chip *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) 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_cancel_delayed_work_sync(&chip->irq_poll_work);
kthread_destroy_worker(chip->kworker); kthread_destroy_worker(chip->kworker);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment