aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libiscsi.c10
-rw-r--r--include/scsi/iscsi_if.h1
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 7551abe40900..3eddab0774e4 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1796,9 +1796,9 @@ static int iscsi_exec_task_mgmt_fn(struct iscsi_conn *conn,
1796 NULL, 0); 1796 NULL, 0);
1797 if (!task) { 1797 if (!task) {
1798 spin_unlock_bh(&session->lock); 1798 spin_unlock_bh(&session->lock);
1799 iscsi_conn_printk(KERN_ERR, conn, "Could not send TMF.\n");
1799 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); 1800 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
1800 spin_lock_bh(&session->lock); 1801 spin_lock_bh(&session->lock);
1801 ISCSI_DBG_EH(session, "tmf exec failure\n");
1802 return -EPERM; 1802 return -EPERM;
1803 } 1803 }
1804 conn->tmfcmd_pdus_cnt++; 1804 conn->tmfcmd_pdus_cnt++;
@@ -2203,7 +2203,7 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
2203 goto success_unlocked; 2203 goto success_unlocked;
2204 case TMF_TIMEDOUT: 2204 case TMF_TIMEDOUT:
2205 spin_unlock_bh(&session->lock); 2205 spin_unlock_bh(&session->lock);
2206 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); 2206 iscsi_conn_failure(conn, ISCSI_ERR_SCSI_EH_SESSION_RST);
2207 goto failed_unlocked; 2207 goto failed_unlocked;
2208 case TMF_NOT_FOUND: 2208 case TMF_NOT_FOUND:
2209 if (!sc->SCp.ptr) { 2209 if (!sc->SCp.ptr) {
@@ -2290,7 +2290,7 @@ int iscsi_eh_device_reset(struct scsi_cmnd *sc)
2290 break; 2290 break;
2291 case TMF_TIMEDOUT: 2291 case TMF_TIMEDOUT:
2292 spin_unlock_bh(&session->lock); 2292 spin_unlock_bh(&session->lock);
2293 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); 2293 iscsi_conn_failure(conn, ISCSI_ERR_SCSI_EH_SESSION_RST);
2294 goto done; 2294 goto done;
2295 default: 2295 default:
2296 conn->tmf_state = TMF_INITIAL; 2296 conn->tmf_state = TMF_INITIAL;
@@ -2371,7 +2371,7 @@ failed:
2371 * we drop the lock here but the leadconn cannot be destoyed while 2371 * we drop the lock here but the leadconn cannot be destoyed while
2372 * we are in the scsi eh 2372 * we are in the scsi eh
2373 */ 2373 */
2374 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); 2374 iscsi_conn_failure(conn, ISCSI_ERR_SCSI_EH_SESSION_RST);
2375 2375
2376 ISCSI_DBG_EH(session, "wait for relogin\n"); 2376 ISCSI_DBG_EH(session, "wait for relogin\n");
2377 wait_event_interruptible(conn->ehwait, 2377 wait_event_interruptible(conn->ehwait,
@@ -2453,7 +2453,7 @@ int iscsi_eh_target_reset(struct scsi_cmnd *sc)
2453 break; 2453 break;
2454 case TMF_TIMEDOUT: 2454 case TMF_TIMEDOUT:
2455 spin_unlock_bh(&session->lock); 2455 spin_unlock_bh(&session->lock);
2456 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); 2456 iscsi_conn_failure(conn, ISCSI_ERR_SCSI_EH_SESSION_RST);
2457 goto done; 2457 goto done;
2458 default: 2458 default:
2459 conn->tmf_state = TMF_INITIAL; 2459 conn->tmf_state = TMF_INITIAL;
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
index a8631acd37c3..c3e1cbcc2ad2 100644
--- a/include/scsi/iscsi_if.h
+++ b/include/scsi/iscsi_if.h
@@ -263,6 +263,7 @@ enum iscsi_err {
263 ISCSI_ERR_INVALID_HOST = ISCSI_ERR_BASE + 18, 263 ISCSI_ERR_INVALID_HOST = ISCSI_ERR_BASE + 18,
264 ISCSI_ERR_XMIT_FAILED = ISCSI_ERR_BASE + 19, 264 ISCSI_ERR_XMIT_FAILED = ISCSI_ERR_BASE + 19,
265 ISCSI_ERR_TCP_CONN_CLOSE = ISCSI_ERR_BASE + 20, 265 ISCSI_ERR_TCP_CONN_CLOSE = ISCSI_ERR_BASE + 20,
266 ISCSI_ERR_SCSI_EH_SESSION_RST = ISCSI_ERR_BASE + 21,
266}; 267};
267 268
268/* 269/*