Skip to contentSkip to conversation

pxa25x_udc: Use disable_irq_nosync() from within irq handlers.

PATCH Applied Ben Nizette 1 participant 1 message Apr 16, 2009 USB

lore
Share & tools
lore
#0 lore raw

PATCH 2/9 pxa25x_udc: Use disable_irq_nosync() from within irq handlers.

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.

---

drivers/usb/gadget/pxa25x_udc.c +2 -2
index 0ce4e28..6ab6f26 100644
@@ -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:
Signature · 1 line
1.6.0.2