From: Jens Axboe <axboe@suse.de>
To: linux-scsi@vger.kernel.org,
James Bottomley <James.Bottomley@steeleye.com>
Subject: [PATCH] nsp32 bad queuecommand return
Date: Fri, 19 Nov 2004 09:57:22 +0100 [thread overview]
Message-ID: <20041119085721.GB26240@suse.de> (raw)
Hi,
The driver appropriately returns SCSI_MLQUEUE_HOST_BUSY, but it has
already completed the command. Just return 0 instead and let the mid
layer handle it through scsi_done().
Signed-off-by: Jens Axboe <axboe@suse.de>
===== drivers/scsi/nsp32.c 1.32 vs edited =====
--- 1.32/drivers/scsi/nsp32.c 2004-10-20 21:24:36 +02:00
+++ edited/drivers/scsi/nsp32.c 2004-11-19 09:10:05 +01:00
@@ -970,8 +970,7 @@ static int nsp32_queuecommand(struct scs
data->CurrentSC = NULL;
SCpnt->result = DID_NO_CONNECT << 16;
done(SCpnt);
-
- return SCSI_MLQUEUE_HOST_BUSY;
+ return 0;
}
/* check target ID is not same as this initiator ID */
@@ -979,7 +978,7 @@ static int nsp32_queuecommand(struct scs
nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "terget==host???");
SCpnt->result = DID_BAD_TARGET << 16;
done(SCpnt);
- return SCSI_MLQUEUE_DEVICE_BUSY;
+ return 0;
}
/* check target LUN is allowable value */
@@ -987,7 +986,7 @@ static int nsp32_queuecommand(struct scs
nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "no more lun");
SCpnt->result = DID_BAD_TARGET << 16;
done(SCpnt);
- return SCSI_MLQUEUE_DEVICE_BUSY;
+ return 0;
}
show_command(SCpnt);
@@ -1019,7 +1018,7 @@ static int nsp32_queuecommand(struct scs
nsp32_msg(KERN_ERR, "SGT fail");
SCpnt->result = DID_ERROR << 16;
nsp32_scsi_done(SCpnt);
- return SCSI_MLQUEUE_HOST_BUSY;
+ return 0;
}
/* Build IDENTIFY */
@@ -1089,7 +1088,6 @@ static int nsp32_queuecommand(struct scs
if (ret != TRUE) {
nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "selection fail");
nsp32_scsi_done(SCpnt);
- return SCSI_MLQUEUE_DEVICE_BUSY;
}
return 0;
--
Jens Axboe
reply other threads:[~2004-11-19 8:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20041119085721.GB26240@suse.de \
--to=axboe@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.