From: Andrew Lunn <andrew@lunn.ch> Date: 2018-03-25 20:57:14
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
Andrew Lunn (2):
net: dsa: mv88e6xxx: Use the DT IRQ trigger mode
net: dsa: mv88e6xxx: Call the common IRQ free code
drivers/net/dsa/mv88e6xxx/chip.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--
2.16.2
From: Andrew Lunn <andrew@lunn.ch> Date: 2018-03-25 20:56:42
By calling request_threaded_irq() with the flag IRQF_TRIGGER_FALLING
we override the trigger mode provided in device tree. And the
interrupt is actually active low, which is what all the current device
tree descriptions use.
Suggested-by: Uwe Kleine-Künig <redacted>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
v2: Fix the ü in Künig
---
drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Andrew Lunn <andrew@lunn.ch> Date: 2018-03-25 20:56:58
When free'ing the polled IRQs, call the common irq free code.
Otherwise the interrupts are left registered, and when we come to load
the driver a second time, we get an Opps.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/chip.c | 2 ++
1 file changed, 2 insertions(+)
Hi Andrew,
On Sun, Mar 25, 2018 at 5:56 PM, Andrew Lunn [off-list ref] wrote:
By calling request_threaded_irq() with the flag IRQF_TRIGGER_FALLING
we override the trigger mode provided in device tree. And the
interrupt is actually active low, which is what all the current device
tree descriptions use.
Suggested-by: Uwe Kleine-Künig <redacted>
From: Andrew Lunn <andrew@lunn.ch> Date: 2018-03-25 21:31:59
On Sun, Mar 25, 2018 at 06:09:11PM -0300, Fabio Estevam wrote:
Hi Andrew,
On Sun, Mar 25, 2018 at 5:56 PM, Andrew Lunn [off-list ref] wrote:
quoted
By calling request_threaded_irq() with the flag IRQF_TRIGGER_FALLING
we override the trigger mode provided in device tree. And the
interrupt is actually active low, which is what all the current device
tree descriptions use.
Suggested-by: Uwe Kleine-Künig <redacted>
The correct is König, not Künig.
Arg!
Well, at least i got my locale working correctly!
Andrew