From: Jens Axboe <axboe@suse.de>
To: "Mukker, Atul" <Atulm@lsil.com>
Cc: "'linux-scsi@vger.kernel.org'" <linux-scsi@vger.kernel.org>,
'James Bottomley' <James.Bottomley@steeleye.com>
Subject: Re: [PATCH] megaraid2 bad queuecommand return
Date: Fri, 19 Nov 2004 16:04:17 +0100 [thread overview]
Message-ID: <20041119150417.GN26240@suse.de> (raw)
In-Reply-To: <0E3FA95632D6D047BA649F95DAB60E570562CAF1@exa-atlanta>
On Fri, Nov 19 2004, Mukker, Atul wrote:
> Linux/Documentation/scsi/scsi_mid_low_api.txt
>
> "
> ...
> /**
> * queuecommand - queue scsi command, invoke 'done' on completion
> * @scp: pointer to scsi command object
> * @done: function pointer to be invoked on completion
> ...
> *
> * Returns 0 on success.
> *
> * If there's a failure, return either:
> *
> * SCSI_MLQUEUE_DEVICE_BUSY if the device queue is full, or
> * SCSI_MLQUEUE_HOST_BUSY if the entire host queue is full
> *
> * On both of these returns, the mid-layer will requeue the I/O
> ...
> "
>
> So the driver should set the if_busy flag to SCSI_MLQUEUE_DEVICE_BUSY or
> SCSI_MLQUEUE_HOST_BUSY (this is appropriate in this case) instead of setting
> it to 1, isn't it?
>
> So, the following seems more appropriate
>
> --- megaraid_mbox.c 2004-09-27 22:14:43.000000000 -0400
> +++ megaraid_mbox.c.mod 2004-11-19 12:15:21.776345776 -0500
> @@ -1675,7 +1675,7 @@
>
> if (!(scb = megaraid_alloc_scb(adapter, scp))) {
> scp->result = (DID_ERROR << 16);
> - *busy = 1;
> + *busy = SCSI_MLQUEUE_HOST_BUSY;
> return NULL;
> }
>
Nope doesn't work, only if you kill the done() call as well. non-zero
return will always trigger a requeue, which your SCSI done has alread
done. This is the bug.
--
Jens Axboe
next prev parent reply other threads:[~2004-11-19 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-19 14:40 [PATCH] megaraid2 bad queuecommand return Mukker, Atul
2004-11-19 15:04 ` Jens Axboe [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-11-19 9:01 Jens Axboe
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=20041119150417.GN26240@suse.de \
--to=axboe@suse.de \
--cc=Atulm@lsil.com \
--cc=James.Bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
/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).