diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2013-04-11 15:52:41 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-11 19:58:39 (GMT) |
commit | 6706c721b22aadffbffec7550b81efedddd05cfb (patch) | |
tree | e763faf21c606750ae874fcd45258744f6fd1116 /drivers/staging/dwc2/core.h | |
parent | 7c360aa7cd6b469671fc2ea7a889516095cd0efe (diff) | |
download | linux-fsl-qoriq-6706c721b22aadffbffec7550b81efedddd05cfb.tar.xz |
staging: dwc2: register common irq handler in dwc2_core_init
Before, this was initialized in pci.c, after the dwc2_hcd_init was
called and the interrupts were enabled. This opened up a small time
window where common interrupts could be triggered, but there was no
handler for them, causing them to keep triggering infinitely and locking
up the machine.
On my RT3052 board this bug could be easily reproduced by hardcoding
the console log level to 8, so that a bunch of debug output from the dwc2
driver was generated inside this time window. This caused the interrupt
lockup to occur almost every time.
By requesting the irq inside dwc2_core_init and by disabling interrupts
before calling dwc2_core_init instead of after, we can be sure the
handler is registered before the interrupts are enabled, which should
close this window.
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dwc2/core.h')
-rw-r--r-- | drivers/staging/dwc2/core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/dwc2/core.h b/drivers/staging/dwc2/core.h index f8ee04b..320ed00 100644 --- a/drivers/staging/dwc2/core.h +++ b/drivers/staging/dwc2/core.h @@ -445,7 +445,7 @@ extern void dwc2_read_packet(struct dwc2_hsotg *hsotg, u8 *dest, u16 bytes); extern void dwc2_flush_tx_fifo(struct dwc2_hsotg *hsotg, const int num); extern void dwc2_flush_rx_fifo(struct dwc2_hsotg *hsotg); -extern int dwc2_core_init(struct dwc2_hsotg *hsotg, bool select_phy); +extern int dwc2_core_init(struct dwc2_hsotg *hsotg, bool select_phy, int irq); extern void dwc2_enable_global_interrupts(struct dwc2_hsotg *hcd); extern void dwc2_disable_global_interrupts(struct dwc2_hsotg *hcd); |