On Wed, Sep 29, 2004 at 05:20:21PM -0400, Alan Stern wrote:
> 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;
>
>
though patch complained:patching file drivers/usb/storage/scsiglue.c Hunk #1 succeeded at 166 (offset -17 lines). But the patch works fine, Thanks! May god bless you all!! -- ---------------- -- Katoob Main Developer, Arabbix Maintainer. Linux registered user #224950 Proud Egyptian GNU/Linux User Group <www.eglug.org> Admin. Life powered by Debian, Homepage: www.foolab.org -- Don't send me any attachment in Micro$oft (.DOC, .PPT) format please Read http://www.fsf.org/philosophy/no-word-attachments.html Preferable attachments: .PDF, .HTML, .TXT Thanx for adding this text to Your signature
signature.asc
Description: Digital signature
