]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: qla2xxx: Add debug prints in the device remove path
authorArun Easi <aeasi@marvell.com>
Thu, 16 Jun 2022 05:35:05 +0000 (22:35 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 17 Jun 2022 01:59:53 +0000 (21:59 -0400)
Add a debug print in the devloss callback.

Link: https://lore.kernel.org/r/20220616053508.27186-9-njavali@marvell.com
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_attr.c
drivers/scsi/qla2xxx/qla_def.h

index feca9e44b21c80a1f67e68cde88790b1e75ab441..fa1fcbfb946f9dfd9de25a66df2ee41b5bb982b6 100644 (file)
@@ -2714,6 +2714,9 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
        if (!fcport)
                return;
 
+       ql_dbg(ql_dbg_async, fcport->vha, 0x5101,
+              DBG_FCPORT_PRFMT(fcport, "dev_loss_tmo expiry, rport_state=%d",
+                               rport->port_state));
 
        /*
         * Now that the rport has been deleted, set the fcport state to
index 89cb6c24258dc539c99c807190f78497d5c712fb..1bdc7a208fe382f8f0867abfeb4fcf10e911aaef 100644 (file)
@@ -5464,4 +5464,10 @@ struct ql_vnd_tgt_stats_resp {
 #define IS_SESSION_DELETED(_fcport) (_fcport->disc_state == DSC_DELETE_PEND || \
                                      _fcport->disc_state == DSC_DELETED)
 
+#define DBG_FCPORT_PRFMT(_fp, _fmt, _args...) \
+       "%s: %8phC: " _fmt " (state=%d disc_state=%d scan_state=%d loopid=0x%x deleted=%d flags=0x%x)\n", \
+       __func__, _fp->port_name, ##_args, atomic_read(&_fp->state), \
+       _fp->disc_state, _fp->scan_state, _fp->loop_id, _fp->deleted, \
+       _fp->flags
+
 #endif