On Wed, 29 Sep 2004, Mike Anderson wrote:
> So now that this thread and the other thread related to similar
> shutdown issues has grown long is the next step to see if we can get the
> usb queuecommand to return DID_NO_CONNECT in this shutdown case.
Here's a patch. Mohammed, please try it out and tell us how it works. I
just wrote it, so I haven't had a chance to test it myself yet.
Alan Stern
===== drivers/usb/storage/scsiglue.c 1.84 vs edited =====
--- 1.84/drivers/usb/storage/scsiglue.c 2004-09-13 08:11:34 -04:00
+++ edited/drivers/usb/storage/scsiglue.c 2004-09-29 16:08:47 -04:00
@@ -183,6 +183,14 @@
return SCSI_MLQUEUE_HOST_BUSY;
}
+ /* fail the command if we are disconnecting */
+ if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) {
+ US_DEBUGP("Command failed for disconnect\n");
+ srb->result = DID_NO_CONNECT << 16;
+ done(srb);
+ return 0;
+ }
+
srb->scsi_done = done;
us->srb = srb;
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users