aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r--drivers/scsi/libiscsi.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 5606d1e62978..f5915d4d63d9 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -737,12 +737,19 @@ check_mgmt:
737 */ 737 */
738 conn->ctask = list_entry(conn->xmitqueue.next, 738 conn->ctask = list_entry(conn->xmitqueue.next,
739 struct iscsi_cmd_task, running); 739 struct iscsi_cmd_task, running);
740 if (conn->ctask->state == ISCSI_TASK_PENDING) { 740 switch (conn->ctask->state) {
741 case ISCSI_TASK_ABORTING:
742 break;
743 case ISCSI_TASK_PENDING:
741 iscsi_prep_scsi_cmd_pdu(conn->ctask); 744 iscsi_prep_scsi_cmd_pdu(conn->ctask);
742 conn->session->tt->init_cmd_task(conn->ctask); 745 conn->session->tt->init_cmd_task(conn->ctask);
746 /* fall through */
747 default:
748 conn->ctask->state = ISCSI_TASK_RUNNING;
749 break;
743 } 750 }
744 conn->ctask->state = ISCSI_TASK_RUNNING;
745 list_move_tail(conn->xmitqueue.next, &conn->run_list); 751 list_move_tail(conn->xmitqueue.next, &conn->run_list);
752
746 rc = iscsi_xmit_ctask(conn); 753 rc = iscsi_xmit_ctask(conn);
747 if (rc) 754 if (rc)
748 goto again; 755 goto again;