Fixed possible device lockup when INTERRUPT_CONTROL_ENDPOINT is enabled and the contr...
[pub/lufa.git] / LUFA / Drivers / USB / LowLevel / USBInterrupt.c
index 43df5f6..1c6d6ca 100644 (file)
@@ -237,10 +237,13 @@ ISR(USB_COM_vect, ISR_BLOCK)
 
        Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
        USB_INT_Disable(USB_INT_RXSTPI);
 
        Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
        USB_INT_Disable(USB_INT_RXSTPI);
-       sei();
 
 
-       USB_USBTask();
+       NONATOMIC_BLOCK(NONATOMIC_FORCEOFF)
+       {
+               USB_Device_ProcessControlRequest();
+       }
 
 
+       Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
        USB_INT_Enable(USB_INT_RXSTPI);
        Endpoint_SelectEndpoint(PrevSelectedEndpoint);
 }
        USB_INT_Enable(USB_INT_RXSTPI);
        Endpoint_SelectEndpoint(PrevSelectedEndpoint);
 }