* [PATCH 2/9] pxa25x_udc: Use disable_irq_nosync() from within irq handlers.
@ 2009-04-16 5:54 Ben Nizette
0 siblings, 0 replies; only message in thread
From: Ben Nizette @ 2009-04-16 5:54 UTC (permalink / raw)
To: Eric Miao, linux; +Cc: linux-kernel
disable_irq() should wait for all running handlers to complete
before returning. As such, if it's used to disable an interrupt
from that interrupt's handler it will deadlock. This replaces
the dangerous instances with the _nosync() variant which doesn't
have this problem.
Signed-off-by: Ben Nizette <bn@niasdigital.com>
---
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 0ce4e28..6ab6f26 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -1382,12 +1382,12 @@ lubbock_vbus_irq(int irq, void *_dev)
switch (irq) {
case LUBBOCK_USB_IRQ:
vbus = 1;
- disable_irq(LUBBOCK_USB_IRQ);
+ disable_irq_nosync(LUBBOCK_USB_IRQ);
enable_irq(LUBBOCK_USB_DISC_IRQ);
break;
case LUBBOCK_USB_DISC_IRQ:
vbus = 0;
- disable_irq(LUBBOCK_USB_DISC_IRQ);
+ disable_irq_nosync(LUBBOCK_USB_DISC_IRQ);
enable_irq(LUBBOCK_USB_IRQ);
break;
default:
--
1.6.0.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-16 5:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 5:54 [PATCH 2/9] pxa25x_udc: Use disable_irq_nosync() from within irq handlers Ben Nizette
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox