summaryrefslogtreecommitdiffstats
path: root/src/drivers/usb/usbio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/usb/usbio.c')
-rw-r--r--src/drivers/usb/usbio.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/usb/usbio.c b/src/drivers/usb/usbio.c
index e91416fd..dfb93dab 100644
--- a/src/drivers/usb/usbio.c
+++ b/src/drivers/usb/usbio.c
@@ -972,6 +972,10 @@ static int usbio_endpoint_enqueue ( struct usb_endpoint *ep,
unsigned int fill;
unsigned int index;
+ /* Fail if shutdown is in progress */
+ if ( efi_shutdown_in_progress )
+ return -ECANCELED;
+
/* Fail if transfer ring is full */
fill = ( endpoint->prod - endpoint->cons );
if ( fill >= USBIO_RING_COUNT )
@@ -1026,6 +1030,10 @@ static int usbio_endpoint_stream ( struct usb_endpoint *ep,
*/
static void usbio_endpoint_poll ( struct usbio_endpoint *endpoint ) {
+ /* Do nothing if shutdown is in progress */
+ if ( efi_shutdown_in_progress )
+ return;
+
/* Poll endpoint */
endpoint->op->poll ( endpoint );
}