Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77065
b: refs/heads/master
c: 9000bcd
h: refs/heads/master
i:
  77063: f329cc2
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Jan 12, 2008
1 parent 6fdd61f commit 1fffc94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bca1088a8194f4fc850b65ea4f324c15d47d3cc3
refs/heads/master: 9000bcd649b26aef4c35d2941f8a65f05bbb9ee1
14 changes: 6 additions & 8 deletions trunk/drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ static int iscsi_data_xmit(struct iscsi_conn *conn)
conn->ctask = list_entry(conn->xmitqueue.next,
struct iscsi_cmd_task, running);
if (conn->session->state == ISCSI_STATE_LOGGING_OUT) {
fail_command(conn, conn->ctask, DID_NO_CONNECT << 16);
fail_command(conn, conn->ctask, DID_IMM_RETRY << 16);
continue;
}
if (iscsi_prep_scsi_cmd_pdu(conn->ctask)) {
Expand Down Expand Up @@ -1024,21 +1024,19 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
* be entering our queuecommand while a block is starting
* up because the block code is not locked)
*/
if (session->state == ISCSI_STATE_IN_RECOVERY) {
switch (session->state) {
case ISCSI_STATE_IN_RECOVERY:
reason = FAILURE_SESSION_IN_RECOVERY;
goto reject;
}

switch (session->state) {
case ISCSI_STATE_LOGGING_OUT:
reason = FAILURE_SESSION_LOGGING_OUT;
goto reject;
case ISCSI_STATE_RECOVERY_FAILED:
reason = FAILURE_SESSION_RECOVERY_TIMEOUT;
break;
case ISCSI_STATE_TERMINATE:
reason = FAILURE_SESSION_TERMINATE;
break;
case ISCSI_STATE_LOGGING_OUT:
reason = FAILURE_SESSION_LOGGING_OUT;
break;
default:
reason = FAILURE_SESSION_FREED;
}
Expand Down

0 comments on commit 1fffc94

Please sign in to comment.