nsp32 bad queuecommand return
Subsystems (2)
PATCH 1/1 nsp32 bad queuecommand return
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 <[email protected]>
===== drivers/scsi/nsp32.c 1.32 vs edited =====
drivers/scsi/nsp32.c +4 -6
@@ -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 scsnsp32_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 scsnsp32_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 scsnsp32_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 scsif (ret != TRUE) {nsp32_dbg (NSP32_DEBUG_QUEUECOMMAND ,"selection fail" );nsp32_scsi_done (SCpnt); -return SCSI_MLQUEUE_DEVICE_BUSY ; }return 0 ;
Signature · 1 line
Jens Axboe