diff options
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r-- | drivers/scsi/libiscsi.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index b00be6c3efc1..59908aead531 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -393,10 +393,12 @@ static void iscsi_free_task(struct iscsi_task *task) | |||
393 | struct iscsi_session *session = conn->session; | 393 | struct iscsi_session *session = conn->session; |
394 | struct scsi_cmnd *sc = task->sc; | 394 | struct scsi_cmnd *sc = task->sc; |
395 | 395 | ||
396 | ISCSI_DBG_SESSION(session, "freeing task itt 0x%x state %d sc %p\n", | ||
397 | task->itt, task->state, task->sc); | ||
398 | |||
396 | session->tt->cleanup_task(task); | 399 | session->tt->cleanup_task(task); |
397 | task->state = ISCSI_TASK_FREE; | 400 | task->state = ISCSI_TASK_FREE; |
398 | task->sc = NULL; | 401 | task->sc = NULL; |
399 | |||
400 | /* | 402 | /* |
401 | * login task is preallocated so do not free | 403 | * login task is preallocated so do not free |
402 | */ | 404 | */ |
@@ -451,6 +453,9 @@ static void iscsi_complete_task(struct iscsi_task *task, int state) | |||
451 | { | 453 | { |
452 | struct iscsi_conn *conn = task->conn; | 454 | struct iscsi_conn *conn = task->conn; |
453 | 455 | ||
456 | ISCSI_DBG_SESSION(conn->session, | ||
457 | "complete task itt 0x%x state %d sc %p\n", | ||
458 | task->itt, task->state, task->sc); | ||
454 | if (task->state == ISCSI_TASK_COMPLETED || | 459 | if (task->state == ISCSI_TASK_COMPLETED || |
455 | task->state == ISCSI_TASK_ABRT_TMF || | 460 | task->state == ISCSI_TASK_ABRT_TMF || |
456 | task->state == ISCSI_TASK_ABRT_SESS_RECOV) | 461 | task->state == ISCSI_TASK_ABRT_SESS_RECOV) |
@@ -1836,6 +1841,8 @@ int iscsi_eh_abort(struct scsi_cmnd *sc) | |||
1836 | cls_session = starget_to_session(scsi_target(sc->device)); | 1841 | cls_session = starget_to_session(scsi_target(sc->device)); |
1837 | session = cls_session->dd_data; | 1842 | session = cls_session->dd_data; |
1838 | 1843 | ||
1844 | ISCSI_DBG_SESSION(session, "aborting sc %p\n", sc); | ||
1845 | |||
1839 | mutex_lock(&session->eh_mutex); | 1846 | mutex_lock(&session->eh_mutex); |
1840 | spin_lock_bh(&session->lock); | 1847 | spin_lock_bh(&session->lock); |
1841 | /* | 1848 | /* |
@@ -1858,6 +1865,8 @@ int iscsi_eh_abort(struct scsi_cmnd *sc) | |||
1858 | sc->SCp.phase != session->age) { | 1865 | sc->SCp.phase != session->age) { |
1859 | spin_unlock_bh(&session->lock); | 1866 | spin_unlock_bh(&session->lock); |
1860 | mutex_unlock(&session->eh_mutex); | 1867 | mutex_unlock(&session->eh_mutex); |
1868 | ISCSI_DBG_SESSION(session, "failing abort due to dropped " | ||
1869 | "session.\n"); | ||
1861 | return FAILED; | 1870 | return FAILED; |
1862 | } | 1871 | } |
1863 | 1872 | ||