Re: [PATCH 10/14] qla2xxx: suppress unnecessary log messages during login

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Aug 5, 2021, at 5:20 AM, Nilesh Javali <njavali@xxxxxxxxxxx> wrote:
> 
> From: Arun Easi <aeasi@xxxxxxxxxxx>
> 
> Suppress logging of retryable errors. These could still be seen
> if extended logging is enabled.
> 
> Signed-off-by: Arun Easi <aeasi@xxxxxxxxxxx>
> Signed-off-by: Nilesh Javali <njavali@xxxxxxxxxxx>
> ---
> drivers/scsi/qla2xxx/qla_init.c |  2 +-
> drivers/scsi/qla2xxx/qla_isr.c  | 23 +++++++++++++++++------
> 2 files changed, 18 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index 266e9e06a6f2..6fc4fd8f5fb7 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -360,7 +360,7 @@ qla2x00_async_login(struct scsi_qla_host *vha, fc_port_t *fcport,
> 	if (NVME_TARGET(vha->hw, fcport))
> 		lio->u.logio.flags |= SRB_LOGIN_SKIP_PRLI;
> 
> -	ql_log(ql_log_warn, vha, 0x2072,
> +	ql_dbg(ql_dbg_disc, vha, 0x2072,
> 	       "Async-login - %8phC hdl=%x, loopid=%x portid=%06x retries=%d.\n",
> 	       fcport->port_name, sp->handle, fcport->loop_id,
> 	       fcport->d_id.b24, fcport->login_retry);
> diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
> index 93ab686c7a30..b0b5af21781a 100644
> --- a/drivers/scsi/qla2xxx/qla_isr.c
> +++ b/drivers/scsi/qla2xxx/qla_isr.c
> @@ -2326,6 +2326,7 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
> 	struct srb_iocb *lio;
> 	uint16_t *data;
> 	uint32_t iop[2];
> +	int logit = 1;
> 
> 	sp = qla2x00_get_sp_from_handle(vha, func, req, logio);
> 	if (!sp)
> @@ -2403,9 +2404,11 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
> 	case LSC_SCODE_PORTID_USED:
> 		data[0] = MBS_PORT_ID_USED;
> 		data[1] = LSW(iop[1]);
> +		logit = 0;
> 		break;
> 	case LSC_SCODE_NPORT_USED:
> 		data[0] = MBS_LOOP_ID_USED;
> +		logit = 0;
> 		break;
> 	case LSC_SCODE_CMD_FAILED:
> 		if (iop[1] == 0x0606) {
> @@ -2438,12 +2441,20 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
> 		break;
> 	}
> 
> -	ql_log(ql_log_warn, sp->vha, 0x5037,
> -	       "Async-%s failed: handle=%x pid=%06x wwpn=%8phC comp_status=%x iop0=%x iop1=%x\n",
> -	       type, sp->handle, fcport->d_id.b24, fcport->port_name,
> -	       le16_to_cpu(logio->comp_status),
> -	       le32_to_cpu(logio->io_parameter[0]),
> -	       le32_to_cpu(logio->io_parameter[1]));
> +	if (logit)
> +		ql_log(ql_log_warn, sp->vha, 0x5037, "Async-%s failed: "
> +		       "handle=%x pid=%06x wwpn=%8phC comp_status=%x iop0=%x iop1=%x\n",
> +		       type, sp->handle, fcport->d_id.b24, fcport->port_name,
> +		       le16_to_cpu(logio->comp_status),
> +		       le32_to_cpu(logio->io_parameter[0]),
> +		       le32_to_cpu(logio->io_parameter[1]));
> +	else
> +		ql_dbg(ql_dbg_disc, sp->vha, 0x5037, "Async-%s failed: "
> +		       "handle=%x pid=%06x wwpn=%8phC comp_status=%x iop0=%x iop1=%x\n",
> +		       type, sp->handle, fcport->d_id.b24, fcport->port_name,
> +		       le16_to_cpu(logio->comp_status),
> +		       le32_to_cpu(logio->io_parameter[0]),
> +		       le32_to_cpu(logio->io_parameter[1]));
> 
> logio_done:
> 	sp->done(sp, 0);
> -- 
> 2.19.0.rc0
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx>

--
Himanshu Madhani	 Oracle Linux Engineering





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux