ChangeSet 1.1455.1.34, 2003/07/16 10:11:48-07:00, [EMAIL PROTECTED]

[PATCH] USB: fix irq urb in hpusbscsi

this fixes the completion handler for the interrupt urb in hpusbscsi.


 drivers/usb/image/hpusbscsi.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


diff -Nru a/drivers/usb/image/hpusbscsi.c b/drivers/usb/image/hpusbscsi.c
--- a/drivers/usb/image/hpusbscsi.c     Thu Jul 17 17:03:46 2003
+++ b/drivers/usb/image/hpusbscsi.c     Thu Jul 17 17:03:46 2003
@@ -306,7 +306,10 @@
        if(unlikely(u->status < 0)) {
                 if (likely(hpusbscsi->state != HP_STATE_FREE))
                         handle_usb_error(hpusbscsi);
-               return;
+               if (u->status == -ECONNRESET || u->status == -ENOENT || u->status == 
-ESHUTDOWN)
+                       return;
+               else
+                       goto resub;
        }
 
        scsi_state = hpusbscsi->scsi_state_byte;
@@ -348,6 +351,8 @@
        TRACE_STATE;
                break;
        }
+resub:
+       usb_submit_urb(u, GFP_ATOMIC);
 }
 
 static void simple_command_callback(struct urb *u, struct pt_regs *regs)
@@ -427,7 +432,7 @@
                                hpusbscsi->state = HP_STATE_WAIT;
                        } else {
                                issue_request_sense(hpusbscsi);
-                       }                       
+                       }
                }
        } else {
                if (likely(hpusbscsi->scallback != NULL))



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to