diff options
Diffstat (limited to 'src/drivers/usb/usbio.c')
-rw-r--r-- | src/drivers/usb/usbio.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/usb/usbio.c b/src/drivers/usb/usbio.c index e91416fdc..dfb93dab1 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 ); } |