All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nsp32 bad queuecommand return
@ 2004-11-19  8:57 Jens Axboe
  0 siblings, 0 replies; only message in thread
From: Jens Axboe @ 2004-11-19  8:57 UTC (permalink / raw)
  To: linux-scsi, James Bottomley

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-11-19  8:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-19  8:57 [PATCH] nsp32 bad queuecommand return Jens Axboe

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.