When the scsi mass storage device is disconnected, the current urbs queued to hcd driver must be cancelled, otherwise the current urbs are pending at hcd driver and the active urb programmed at host controller will never be completed. The class driver shall dequeue or cancel all the urb request submitted to hcd once the device is disconnected and no longer exits. Signed-off-by: Ravi Babu <ravibabu@xxxxxx> --- drivers/usb/storage/usb.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index e23c30a..a313af6 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -844,6 +844,8 @@ static void quiesce_and_remove_host(struct us_data *us) */ scsi_lock(host); set_bit(US_FLIDX_DISCONNECTING, &us->dflags); + /* stop the current urbs when the device got disconnected */ + usb_stor_stop_transport(us); scsi_unlock(host); wake_up(&us->delay_wait); } -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html