Commit 4416fcb0 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

fix the usb storage drivers due to interrupt urb no automatic resubmission change to the usb core.

parent 226152ab
...@@ -947,6 +947,7 @@ void usb_stor_abort_transport(struct us_data *us) ...@@ -947,6 +947,7 @@ void usb_stor_abort_transport(struct us_data *us)
void usb_stor_CBI_irq(struct urb *urb) void usb_stor_CBI_irq(struct urb *urb)
{ {
struct us_data *us = (struct us_data *)urb->context; struct us_data *us = (struct us_data *)urb->context;
int status;
US_DEBUGP("USB IRQ received for device on host %d\n", us->host_no); US_DEBUGP("USB IRQ received for device on host %d\n", us->host_no);
US_DEBUGP("-- IRQ data length is %d\n", urb->actual_length); US_DEBUGP("-- IRQ data length is %d\n", urb->actual_length);
...@@ -960,13 +961,13 @@ void usb_stor_CBI_irq(struct urb *urb) ...@@ -960,13 +961,13 @@ void usb_stor_CBI_irq(struct urb *urb)
/* was this a wanted interrupt? */ /* was this a wanted interrupt? */
if (!test_and_clear_bit(US_FLIDX_IP_WANTED, &us->flags)) { if (!test_and_clear_bit(US_FLIDX_IP_WANTED, &us->flags)) {
US_DEBUGP("ERROR: Unwanted interrupt received!\n"); US_DEBUGP("ERROR: Unwanted interrupt received!\n");
return; goto exit;
} }
US_DEBUGP("-- command aborted\n"); US_DEBUGP("-- command aborted\n");
/* wake up the command thread */ /* wake up the command thread */
up(&us->ip_waitq); up(&us->ip_waitq);
return; goto exit;
} }
/* is the device removed? */ /* is the device removed? */
...@@ -988,19 +989,19 @@ void usb_stor_CBI_irq(struct urb *urb) ...@@ -988,19 +989,19 @@ void usb_stor_CBI_irq(struct urb *urb)
/* reject improper IRQs */ /* reject improper IRQs */
if (urb->actual_length != 2) { if (urb->actual_length != 2) {
US_DEBUGP("-- IRQ too short\n"); US_DEBUGP("-- IRQ too short\n");
return; goto exit;
} }
/* was this a command-completion interrupt? */ /* was this a command-completion interrupt? */
if (us->irqbuf[0] && (us->subclass != US_SC_UFI)) { if (us->irqbuf[0] && (us->subclass != US_SC_UFI)) {
US_DEBUGP("-- not a command-completion IRQ\n"); US_DEBUGP("-- not a command-completion IRQ\n");
return; goto exit;
} }
/* was this a wanted interrupt? */ /* was this a wanted interrupt? */
if (!test_and_clear_bit(US_FLIDX_IP_WANTED, &us->flags)) { if (!test_and_clear_bit(US_FLIDX_IP_WANTED, &us->flags)) {
US_DEBUGP("ERROR: Unwanted interrupt received!\n"); US_DEBUGP("ERROR: Unwanted interrupt received!\n");
return; goto exit;
} }
/* copy the valid data */ /* copy the valid data */
...@@ -1009,6 +1010,13 @@ void usb_stor_CBI_irq(struct urb *urb) ...@@ -1009,6 +1010,13 @@ void usb_stor_CBI_irq(struct urb *urb)
/* wake up the command thread */ /* wake up the command thread */
up(&(us->ip_waitq)); up(&(us->ip_waitq));
exit:
/* resubmit the urb */
status = usb_submit_urb (urb, GFP_ATOMIC);
if (status)
err ("%s - usb_submit_urb failed with result %d",
__FUNCTION__, status);
} }
int usb_stor_CBI_transport(Scsi_Cmnd *srb, struct us_data *us) int usb_stor_CBI_transport(Scsi_Cmnd *srb, struct us_data *us)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment