Skip to content

Commit d6d13ee

Browse files
Mike Christiejejb
authored andcommitted
[SCSI] libiscsi: Use SCSI_MLQUEUE_TARGET_BUSY
For the conditions below we do not want the queuecommand function to call us right back, so return SCSI_MLQUEUE_TARGET_BUSY. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1 parent 7b59413 commit d6d13ee

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎drivers/scsi/libiscsi.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,12 +1194,10 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
11941194
switch (session->state) {
11951195
case ISCSI_STATE_IN_RECOVERY:
11961196
reason = FAILURE_SESSION_IN_RECOVERY;
1197-
sc->result = DID_IMM_RETRY << 16;
1198-
break;
1197+
goto reject;
11991198
case ISCSI_STATE_LOGGING_OUT:
12001199
reason = FAILURE_SESSION_LOGGING_OUT;
1201-
sc->result = DID_IMM_RETRY << 16;
1202-
break;
1200+
goto reject;
12031201
case ISCSI_STATE_RECOVERY_FAILED:
12041202
reason = FAILURE_SESSION_RECOVERY_TIMEOUT;
12051203
sc->result = DID_NO_CONNECT << 16;
@@ -1267,7 +1265,7 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
12671265
spin_unlock(&session->lock);
12681266
debug_scsi("cmd 0x%x rejected (%d)\n", sc->cmnd[0], reason);
12691267
spin_lock(host->host_lock);
1270-
return SCSI_MLQUEUE_HOST_BUSY;
1268+
return SCSI_MLQUEUE_TARGET_BUSY;
12711269

12721270
fault:
12731271
spin_unlock(&session->lock);

0 commit comments

Comments
 (0)