Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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/20220117135311.6256-4-njavali@marvell.com
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Saurav Kashyap and committed by
Martin K. Petersen
64fd4af6 5239ab63

+4 -2
+4 -2
drivers/scsi/qedf/qedf_main.c
··· 911 911 struct qed_link_output if_link; 912 912 913 913 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"); 915 915 return; 916 916 } 917 917 ··· 3981 3981 struct qedf_ctx *qedf = 3982 3982 container_of(work, struct qedf_ctx, stag_work.work); 3983 3983 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); 3985 3987 qedf_ctx_soft_reset(qedf->lport); 3986 3988 } 3987 3989