Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/iscsi add debug messages



details:   https://anonhg.NetBSD.org/src/rev/9ce32f583594
branches:  trunk
changeset: 828216:9ce32f583594
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Dec 03 07:23:12 2017 +0000

description:
add debug messages

diffstat:

 sys/dev/iscsi/iscsi_send.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r 7055db03f382 -r 9ce32f583594 sys/dev/iscsi/iscsi_send.c
--- a/sys/dev/iscsi/iscsi_send.c        Sat Dec 02 23:05:52 2017 +0000
+++ b/sys/dev/iscsi/iscsi_send.c        Sun Dec 03 07:23:12 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iscsi_send.c,v 1.34 2017/02/25 12:03:57 mlelstv Exp $  */
+/*     $NetBSD: iscsi_send.c,v 1.35 2017/12/03 07:23:12 mlelstv Exp $  */
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -395,7 +395,7 @@
                /* notify event handlers of connection shutdown */
                DEBC(conn, 1, ("%s\n", (conn->destroy) ? "TERMINATED" : "RECOVER"));
                add_event((conn->destroy) ? ISCSI_CONNECTION_TERMINATED
-                                                                 : ISCSI_RECOVER_CONNECTION,
+                                         : ISCSI_RECOVER_CONNECTION,
                                  sess->id, conn->id, conn->terminating);
 
                DEBC(conn, 1, ("Waiting for conn_idle\n"));
@@ -1251,10 +1251,15 @@
 
        ccb = get_ccb(conn, xs == NULL);
        /* can only happen if terminating... */
-       if (ccb == NULL)
+       if (ccb == NULL) {
+               DEBC(conn, 0, ("send_task_management, ref_ccb=%p, xs=%p, term=%d. No CCB\n",
+                       ref_ccb, xs, conn->terminating));
                return conn->terminating;
+       }
        ppdu = get_pdu(conn, xs == NULL);
        if (ppdu == NULL) {
+               DEBC(conn, 0, ("send_task_management, ref_ccb=%p, xs=%p, term=%d. No PDU\n",
+                       ref_ccb, xs, conn->terminating));
                free_ccb(ccb);
                return conn->terminating;
        }
@@ -1489,6 +1494,7 @@
 
        if (xs->xs_control & XS_CTL_RESET) {
                if (send_task_management(conn, NULL, xs, TARGET_WARM_RESET)) {
+                       DEBC(conn, 0, ("send_task_management TARGET_WARM_RESET failed\n"));
                        xs->error = XS_SELTIMEOUT;
                        scsipi_done(xs);
                        unref_session(session);



Home | Main Index | Thread Index | Old Index