[SCSI] libiscsi: add debug printks for iscsi command completion path

Previous thread: [SCSI] zfcp: Keep ccw device and model id in zfcp_ccw.c by Linux Kernel Mailing List on Friday, June 12, 2009 - 11:02 am. (1 message)

Next thread: [SCSI] mpt2sas: bump driver version to 01.100.03.00 by Linux Kernel Mailing List on Friday, June 12, 2009 - 11:02 am. (1 message)
From: Linux Kernel Mailing List
Date: Friday, June 12, 2009 - 11:02 am

Gitweb:     http://git.kernel.org/linus/4421c9ebeeacf3d9c4e6aa558e1a777178e71add
Commit:     4421c9ebeeacf3d9c4e6aa558e1a777178e71add
Parent:     b3cd5050bf8eb32ceecee129cac7c59e6f1668c4
Author:     Mike Christie <michaelc@cs.wisc.edu>
AuthorDate: Wed May 13 17:57:50 2009 -0500
Committer:  James Bottomley <James.Bottomley@HansenPartnership.com>
CommitDate: Sat May 23 15:44:13 2009 -0500

    [SCSI] libiscsi: add debug printks for iscsi command completion path
    
    This patch just adds some debug statements for the abort
    and completion paths.
    
    Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
    Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
---
 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 b00be6c..59908ae 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -393,10 +393,12 @@ static void iscsi_free_task(struct iscsi_task *task)
 	struct iscsi_session *session = conn->session;
 	struct scsi_cmnd *sc = task->sc;
 
+	ISCSI_DBG_SESSION(session, "freeing task itt 0x%x state %d sc %p\n",
+			  task->itt, task->state, task->sc);
+
 	session->tt->cleanup_task(task);
 	task->state = ISCSI_TASK_FREE;
 	task->sc = NULL;
-
 	/*
 	 * login task is preallocated so do not free
 	 */
@@ -451,6 +453,9 @@ static void iscsi_complete_task(struct iscsi_task *task, int state)
 {
 	struct iscsi_conn *conn = task->conn;
 
+	ISCSI_DBG_SESSION(conn->session,
+			  "complete task itt 0x%x state %d sc %p\n",
+			  task->itt, task->state, task->sc);
 	if (task->state == ISCSI_TASK_COMPLETED ||
 	    task->state == ISCSI_TASK_ABRT_TMF ||
 	    task->state == ISCSI_TASK_ABRT_SESS_RECOV)
@@ -1836,6 +1841,8 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
 	cls_session = starget_to_session(scsi_target(sc->device));
 	session = cls_session->dd_data;
 
+	ISCSI_DBG_SESSION(session, "aborting sc %p\n", sc);
+
 ...
Previous thread: [SCSI] zfcp: Keep ccw device and model id in zfcp_ccw.c by Linux Kernel Mailing List on Friday, June 12, 2009 - 11:02 am. (1 message)

Next thread: [SCSI] mpt2sas: bump driver version to 01.100.03.00 by Linux Kernel Mailing List on Friday, June 12, 2009 - 11:02 am. (1 message)