Skip to content

Commit 64fd4af

Browse files
Saurav Kashyapmartinkpetersen
authored andcommitted
scsi: qedf: Change context reset messages to ratelimited
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. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 5239ab6 commit 64fd4af

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/scsi/qedf/qedf_main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ void qedf_ctx_soft_reset(struct fc_lport *lport)
911911
struct qed_link_output if_link;
912912

913913
if (lport->vport) {
914-
QEDF_ERR(NULL, "Cannot issue host reset on NPIV port.\n");
914+
printk_ratelimited("Cannot issue host reset on NPIV port.\n");
915915
return;
916916
}
917917

@@ -3981,7 +3981,9 @@ void qedf_stag_change_work(struct work_struct *work)
39813981
struct qedf_ctx *qedf =
39823982
container_of(work, struct qedf_ctx, stag_work.work);
39833983

3984-
QEDF_ERR(&qedf->dbg_ctx, "Performing software context reset.\n");
3984+
printk_ratelimited("[%s]:[%s:%d]:%d: Performing software context reset.",
3985+
dev_name(&qedf->pdev->dev), __func__, __LINE__,
3986+
qedf->dbg_ctx.host_no);
39853987
qedf_ctx_soft_reset(qedf->lport);
39863988
}
39873989

0 commit comments

Comments
 (0)