public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Karan Tilak Kumar <kartilak@cisco.com>
To: sebaddel@cisco.com
Cc: arulponn@cisco.com, djhawar@cisco.com, gcboffa@cisco.com,
	mkai2@cisco.com, satishkh@cisco.com, jejb@linux.ibm.com,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Karan Tilak Kumar <kartilak@cisco.com>
Subject: [PATCH v2 03/13] scsi: fnic: Add and improve log messages
Date: Fri, 27 Oct 2023 11:02:52 -0700	[thread overview]
Message-ID: <20231027180302.418676-4-kartilak@cisco.com> (raw)
In-Reply-To: <20231027180302.418676-1-kartilak@cisco.com>

Add link related log messages in fnic_fcs.c,
Improve log message in fnic_fcs.c,
Add log message in vnic_dev.c.

Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
---
 drivers/scsi/fnic/fnic_fcs.c | 36 ++++++++++++++++++++++++------------
 drivers/scsi/fnic/vnic_dev.c |  4 ++++
 2 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
index 55632c67a8f2..203ffec625a4 100644
--- a/drivers/scsi/fnic/fnic_fcs.c
+++ b/drivers/scsi/fnic/fnic_fcs.c
@@ -64,8 +64,8 @@ void fnic_handle_link(struct work_struct *work)
 			new_port_speed);
 	if (old_port_speed != new_port_speed)
 		FNIC_MAIN_DBG(KERN_INFO, fnic->lport->host,
-				"Current vnic speed set to :  %llu\n",
-				new_port_speed);
+				"fnic<%d>: %s: %d: Current vnic speed set to: %llu\n",
+				fnic->fnic_num, __func__, __LINE__, new_port_speed);
 
 	switch (vnic_dev_port_speed(fnic->vdev)) {
 	case DCEM_PORTSPEED_10G:
@@ -102,6 +102,9 @@ void fnic_handle_link(struct work_struct *work)
 			fnic_fc_trace_set_data(fnic->lport->host->host_no,
 				FNIC_FC_LE, "Link Status: DOWN->DOWN",
 				strlen("Link Status: DOWN->DOWN"));
+			FNIC_MAIN_DBG(KERN_INFO, fnic->lport->host,
+					"fnic<%d>: %s: %d: down->down\n",
+					fnic->fnic_num, __func__, __LINE__);
 		} else {
 			if (old_link_down_cnt != fnic->link_down_cnt) {
 				/* UP -> DOWN -> UP */
@@ -128,8 +131,9 @@ void fnic_handle_link(struct work_struct *work)
 					fnic_fcoe_send_vlan_req(fnic);
 					return;
 				}
-				FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host,
-					     "link up\n");
+				FNIC_MAIN_DBG(KERN_INFO, fnic->lport->host,
+						"fnic<%d>: %s: %d: up->down->up: Link up\n",
+						fnic->fnic_num, __func__, __LINE__);
 				fcoe_ctlr_link_up(&fnic->ctlr);
 			} else {
 				/* UP -> UP */
@@ -138,6 +142,9 @@ void fnic_handle_link(struct work_struct *work)
 					fnic->lport->host->host_no, FNIC_FC_LE,
 					"Link Status: UP_UP",
 					strlen("Link Status: UP_UP"));
+				FNIC_MAIN_DBG(KERN_INFO, fnic->lport->host,
+						"fnic<%d>: %s: %d: up->up\n",
+						fnic->fnic_num, __func__, __LINE__);
 			}
 		}
 	} else if (fnic->link_status) {
@@ -153,7 +160,9 @@ void fnic_handle_link(struct work_struct *work)
 			return;
 		}
 
-		FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, "link up\n");
+		FNIC_MAIN_DBG(KERN_INFO, fnic->lport->host,
+				"fnic<%d>: %s: %d: down->up: Link up\n",
+				fnic->fnic_num, __func__, __LINE__);
 		fnic_fc_trace_set_data(fnic->lport->host->host_no, FNIC_FC_LE,
 				       "Link Status: DOWN_UP", strlen("Link Status: DOWN_UP"));
 		fcoe_ctlr_link_up(&fnic->ctlr);
@@ -161,7 +170,9 @@ void fnic_handle_link(struct work_struct *work)
 		/* UP -> DOWN */
 		fnic->lport->host_stats.link_failure_count++;
 		spin_unlock_irqrestore(&fnic->fnic_lock, flags);
-		FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, "link down\n");
+		FNIC_MAIN_DBG(KERN_INFO, fnic->lport->host,
+				"fnic<%d>: %s: %d: up->down: Link down\n",
+				fnic->fnic_num, __func__, __LINE__);
 		fnic_fc_trace_set_data(
 			fnic->lport->host->host_no, FNIC_FC_LE,
 			"Link Status: UP_DOWN",
@@ -763,8 +774,9 @@ void fnic_set_port_id(struct fc_lport *lport, u32 port_id, struct fc_frame *fp)
 	u8 *mac;
 	int ret;
 
-	FNIC_FCS_DBG(KERN_DEBUG, lport->host, "set port_id %x fp %p\n",
-		     port_id, fp);
+	FNIC_FCS_DBG(KERN_DEBUG, lport->host,
+			"fnic<%d>: %s: %d: set port_id 0x%x fp 0x%p\n",
+			fnic->fnic_num, __func__, __LINE__, port_id, fp);
 
 	/*
 	 * If we're clearing the FC_ID, change to use the ctl_src_addr.
@@ -790,10 +802,10 @@ void fnic_set_port_id(struct fc_lport *lport, u32 port_id, struct fc_frame *fp)
 	if (fnic->state == FNIC_IN_ETH_MODE || fnic->state == FNIC_IN_FC_MODE)
 		fnic->state = FNIC_IN_ETH_TRANS_FC_MODE;
 	else {
-		FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host,
-			     "Unexpected fnic state %s while"
-			     " processing flogi resp\n",
-			     fnic_state_to_str(fnic->state));
+		FNIC_FCS_DBG(KERN_ERR, fnic->lport->host,
+			     "fnic<%d>: %s: %d: Unexpected fnic state: %s processing FLOGI response",
+			     fnic->fnic_num, __func__, __LINE__,
+				 fnic_state_to_str(fnic->state));
 		spin_unlock_irq(&fnic->fnic_lock);
 		return;
 	}
diff --git a/drivers/scsi/fnic/vnic_dev.c b/drivers/scsi/fnic/vnic_dev.c
index 3e5b437c0492..e0b173cc9d5f 100644
--- a/drivers/scsi/fnic/vnic_dev.c
+++ b/drivers/scsi/fnic/vnic_dev.c
@@ -143,6 +143,10 @@ static int vnic_dev_discover_res(struct vnic_dev *vdev,
 		vdev->res[type].vaddr = (char __iomem *)bar->vaddr + bar_offset;
 	}
 
+	pr_info("res_type_wq: %d res_type_rq: %d res_type_cq: %d res_type_intr_ctrl: %d\n",
+		vdev->res[RES_TYPE_WQ].count, vdev->res[RES_TYPE_RQ].count,
+		vdev->res[RES_TYPE_CQ].count, vdev->res[RES_TYPE_INTR_CTRL].count);
+
 	return 0;
 }
 
-- 
2.31.1


  parent reply	other threads:[~2023-10-27 18:03 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 18:02 [PATCH v2 00/13] Introduce support for multiqueue (MQ) in fnic Karan Tilak Kumar
2023-10-27 18:02 ` [PATCH v2 01/13] scsi: fnic: Modify definitions to sync with VIC firmware Karan Tilak Kumar
2023-11-02  7:23   ` Hannes Reinecke
2023-11-06 19:47     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 02/13] scsi: fnic: Add and use fnic number Karan Tilak Kumar
2023-11-02  7:25   ` Hannes Reinecke
2023-11-06 19:49     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` Karan Tilak Kumar [this message]
2023-11-02  7:27   ` [PATCH v2 03/13] scsi: fnic: Add and improve log messages Hannes Reinecke
2023-11-06 19:55     ` Karan Tilak Kumar (kartilak)
2023-11-07  7:20       ` Hannes Reinecke
2023-11-07 19:54         ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 04/13] scsi: fnic: Rename wq_copy to hw_copy_wq Karan Tilak Kumar
2023-11-02  7:28   ` Hannes Reinecke
2023-11-06 19:57     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 05/13] scsi: fnic: Get copy workqueue count and interrupt mode from config Karan Tilak Kumar
2023-11-02  7:29   ` Hannes Reinecke
2023-11-06 19:59     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 06/13] scsi: fnic: Refactor and redefine fnic.h for multiqueue Karan Tilak Kumar
2023-11-02  7:36   ` Hannes Reinecke
2023-11-06 20:11     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 07/13] scsi: fnic: Modify ISRs to support multiqueue(MQ) Karan Tilak Kumar
2023-11-02  7:45   ` Hannes Reinecke
2023-11-06 20:13     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 08/13] scsi: fnic: Define stats to track multiqueue (MQ) IOs Karan Tilak Kumar
2023-11-02  7:46   ` Hannes Reinecke
2023-10-27 18:02 ` [PATCH v2 09/13] scsi: fnic: Remove usage of host_lock Karan Tilak Kumar
2023-11-02  7:52   ` Hannes Reinecke
2023-11-06 20:20     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 10/13] scsi: fnic: Add support for multiqueue (MQ) in fnic_main.c Karan Tilak Kumar
2023-11-02  7:57   ` Hannes Reinecke
2023-10-27 18:03 ` [PATCH v2 11/13] scsi: fnic: Use fnic_lock to protect fnic structures in queuecommand Karan Tilak Kumar
2023-11-02  8:02   ` Hannes Reinecke
2023-10-27 18:03 ` [PATCH v2 12/13] scsi: fnic: Add support for multiqueue (MQ) in fnic driver Karan Tilak Kumar
2023-10-29 17:20   ` kernel test robot
2023-11-02  8:11   ` Hannes Reinecke
2023-11-06 20:25     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:03 ` [PATCH v2 13/13] scsi: fnic: Improve logs and add support for multiqueue (MQ) Karan Tilak Kumar
2023-11-02  7:59   ` Hannes Reinecke
2023-11-06 20:44     ` Karan Tilak Kumar (kartilak)
2023-11-07  7:27       ` Hannes Reinecke
2023-11-07 18:41         ` Karan Tilak Kumar (kartilak)
2023-11-02  8:14   ` Hannes Reinecke
2023-11-06 20:30     ` Karan Tilak Kumar (kartilak)
2023-11-02  9:00 ` [PATCH v2 00/13] Introduce support for multiqueue (MQ) in fnic John Garry
2023-11-06 19:44   ` Karan Tilak Kumar (kartilak)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231027180302.418676-4-kartilak@cisco.com \
    --to=kartilak@cisco.com \
    --cc=arulponn@cisco.com \
    --cc=djhawar@cisco.com \
    --cc=gcboffa@cisco.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mkai2@cisco.com \
    --cc=satishkh@cisco.com \
    --cc=sebaddel@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox