Commit 48ea62fc authored by Jens Axboe's avatar Jens Axboe Committed by James Bottomley

[PATCH] nsp32 bad queuecommand return

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: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 5b80c49f
...@@ -970,8 +970,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_ ...@@ -970,8 +970,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_
data->CurrentSC = NULL; data->CurrentSC = NULL;
SCpnt->result = DID_NO_CONNECT << 16; SCpnt->result = DID_NO_CONNECT << 16;
done(SCpnt); done(SCpnt);
return 0;
return SCSI_MLQUEUE_HOST_BUSY;
} }
/* check target ID is not same as this initiator ID */ /* check target ID is not same as this initiator ID */
...@@ -979,7 +978,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_ ...@@ -979,7 +978,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_
nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "terget==host???"); nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "terget==host???");
SCpnt->result = DID_BAD_TARGET << 16; SCpnt->result = DID_BAD_TARGET << 16;
done(SCpnt); done(SCpnt);
return SCSI_MLQUEUE_DEVICE_BUSY; return 0;
} }
/* check target LUN is allowable value */ /* check target LUN is allowable value */
...@@ -987,7 +986,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_ ...@@ -987,7 +986,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_
nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "no more lun"); nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "no more lun");
SCpnt->result = DID_BAD_TARGET << 16; SCpnt->result = DID_BAD_TARGET << 16;
done(SCpnt); done(SCpnt);
return SCSI_MLQUEUE_DEVICE_BUSY; return 0;
} }
show_command(SCpnt); show_command(SCpnt);
...@@ -1019,7 +1018,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_ ...@@ -1019,7 +1018,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_
nsp32_msg(KERN_ERR, "SGT fail"); nsp32_msg(KERN_ERR, "SGT fail");
SCpnt->result = DID_ERROR << 16; SCpnt->result = DID_ERROR << 16;
nsp32_scsi_done(SCpnt); nsp32_scsi_done(SCpnt);
return SCSI_MLQUEUE_HOST_BUSY; return 0;
} }
/* Build IDENTIFY */ /* Build IDENTIFY */
...@@ -1089,7 +1088,6 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_ ...@@ -1089,7 +1088,6 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_
if (ret != TRUE) { if (ret != TRUE) {
nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "selection fail"); nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "selection fail");
nsp32_scsi_done(SCpnt); nsp32_scsi_done(SCpnt);
return SCSI_MLQUEUE_DEVICE_BUSY;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment