public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Nilesh Javali <njavali@marvell.com>
To: <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <loberman@redhat.com>,
	<jpittman@redhat.com>, <GR-QLogic-Storage-Upstream@marvell.com>
Subject: [PATCH 3/3] qedf: Change context reset messages to ratelimited
Date: Mon, 17 Jan 2022 05:53:11 -0800	[thread overview]
Message-ID: <20220117135311.6256-4-njavali@marvell.com> (raw)
In-Reply-To: <20220117135311.6256-1-njavali@marvell.com>

From: Saurav Kashyap <skashyap@marvell.com>

If FCoE is not configured, libfc/libfcoe keeps on retrying FLOGI and
after 3 retries driver does a context reset and tries fipvlan again.
This leads to context reset message flooding the logs. Hence
ratelimit the message to prevent flooding the logs.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qedf/qedf_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 3a5ce540cfc4..6ad28bc8e948 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -911,7 +911,7 @@ void qedf_ctx_soft_reset(struct fc_lport *lport)
 	struct qed_link_output if_link;
 
 	if (lport->vport) {
-		QEDF_ERR(NULL, "Cannot issue host reset on NPIV port.\n");
+		printk_ratelimited("Cannot issue host reset on NPIV port.\n");
 		return;
 	}
 
@@ -3981,7 +3981,9 @@ void qedf_stag_change_work(struct work_struct *work)
 	struct qedf_ctx *qedf =
 	    container_of(work, struct qedf_ctx, stag_work.work);
 
-	QEDF_ERR(&qedf->dbg_ctx, "Performing software context reset.\n");
+	printk_ratelimited("[%s]:[%s:%d]:%d: Performing software context reset.",
+			dev_name(&qedf->pdev->dev), __func__, __LINE__,
+			qedf->dbg_ctx.host_no);
 	qedf_ctx_soft_reset(qedf->lport);
 }
 
-- 
2.23.1


  parent reply	other threads:[~2022-01-17 13:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17 13:53 [PATCH 0/3] qedf misc bug fixes Nilesh Javali
2022-01-17 13:53 ` [PATCH 1/3] qedf: Add stag_work to all the vports Nilesh Javali
2022-01-17 13:53 ` [PATCH 2/3] qedf: Fix refcount issue when LOGO is received during TMF Nilesh Javali
2022-01-17 13:53 ` Nilesh Javali [this message]
2022-01-19  3:39 ` [PATCH 0/3] qedf misc bug fixes Martin K. Petersen
2022-01-25  5:40 ` Martin K. Petersen

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=20220117135311.6256-4-njavali@marvell.com \
    --to=njavali@marvell.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=jpittman@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loberman@redhat.com \
    --cc=martin.petersen@oracle.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