linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mohammed Sameer <uniball@gmx.net>
To: USB users list <linux-usb-users@lists.sourceforge.net>
Cc: SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: BUG: CD driver sends command during host removal
Date: Sun, 3 Oct 2004 01:57:14 +0200	[thread overview]
Message-ID: <20041002235714.GA2189@uniball> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0409291719170.1700-100000@ida.rowland.org>

[-- Attachment #1: Type: text/plain, Size: 1704 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-10-02 23:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040926082926.GA1944@uniball>
2004-09-27 18:18 ` BUG: CD driver sends command during host removal Alan Stern
2004-09-27 18:51   ` Mohammed Sameer
2004-09-29 16:06   ` Luben Tuikov
2004-09-29 16:55     ` Alan Stern
2004-09-29 17:09       ` Mike Anderson
2004-09-29 18:02       ` Luben Tuikov
2004-09-29 18:09         ` James Bottomley
2004-09-29 18:58           ` Luben Tuikov
2004-09-29 19:39             ` James Bottomley
2004-09-29 19:01         ` Alan Stern
2004-09-29 19:27           ` Mike Anderson
2004-09-29 19:33           ` Luben Tuikov
2004-09-29 19:50           ` James Bottomley
2004-09-29 20:31             ` Mike Anderson
2004-09-29 20:41               ` James Bottomley
2004-09-29 21:07                 ` Mike Anderson
2004-09-29 21:14                   ` James Bottomley
2004-09-29 21:20                     ` Luben Tuikov
2004-09-29 21:26                       ` James Bottomley
2004-09-29 21:20                   ` Alan Stern
2004-10-02 23:57                     ` Mohammed Sameer [this message]
2004-10-11 19:20 Alan Stern
2004-10-11 19:36 ` James Bottomley
2004-10-11 20:03   ` Alan Stern
2004-10-11 20:12     ` James Bottomley
2004-10-11 20:40       ` Mike Anderson
2004-10-11 21:15         ` James Bottomley
2004-10-11 23:13           ` Mike Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041002235714.GA2189@uniball \
    --to=uniball@gmx.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).