Message ID | 20221109031207.1605138-1-shinichiro.kawasaki@wdc.com |
---|---|
State | Superseded |
Headers | show |
Series | scsi: mpi3mr: suppress command reply debug prints | expand |
On Tue, Nov 8, 2022 at 10:22 PM Damien Le Moal <damien.lemoal@opensource.wdc.com> wrote: > > On 11/9/22 12:12, Shin'ichiro Kawasaki wrote: > > After it receives command reply, mpi3mr driver checks command result. If > > the result is not zero, it prints out command information. This debug > > information is confusing since they are printed even when the non-zero > > result is expected. "Power-on or device reset occurred" is printed for > > Test Unit Ready command at drive detection. Inquiry failure for > > unsupported VPD page header is also printed. They are harmless but look > > like failures. > > > > To avoid the confusion, print the command reply debug information only > > when the module parameter logging_level has value MPI3_DEBUG_REPLY=128, > > in same manner as mpt3sas driver. > > > > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> > > --- > > drivers/scsi/mpi3mr/mpi3mr_os.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c > > index f77ee4051b00..2b95d1d375f2 100644 > > --- a/drivers/scsi/mpi3mr/mpi3mr_os.c > > +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c > > @@ -3265,7 +3265,8 @@ void mpi3mr_process_op_reply_desc(struct mpi3mr_ioc *mrioc, > > } > > > > if (scmd->result != (DID_OK << 16) && (scmd->cmnd[0] != ATA_12) && > > - (scmd->cmnd[0] != ATA_16)) { > > + (scmd->cmnd[0] != ATA_16) && > > + mrioc->logging_level & MPI3_DEBUG_REPLY) { >>> Thanks for fixing this, Can you please use MPI3_DEBUG_SCSI_ERROR instead of MPI3_DEBUG_REPLY as that makes more sense. > > ioc_info(mrioc, "%s :scmd->result 0x%x\n", __func__, > > scmd->result); > > scsi_print_command(scmd); > > Looks OK. > > Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> > > -- > Damien Le Moal > Western Digital Research >
On Nov 10, 2022 / 13:22, Sathya Prakash Veerichetty wrote: > On Tue, Nov 8, 2022 at 10:22 PM Damien Le Moal > <damien.lemoal@opensource.wdc.com> wrote: > > > > On 11/9/22 12:12, Shin'ichiro Kawasaki wrote: ... > > > diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c > > > index f77ee4051b00..2b95d1d375f2 100644 > > > --- a/drivers/scsi/mpi3mr/mpi3mr_os.c > > > +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c > > > @@ -3265,7 +3265,8 @@ void mpi3mr_process_op_reply_desc(struct mpi3mr_ioc *mrioc, > > > } > > > > > > if (scmd->result != (DID_OK << 16) && (scmd->cmnd[0] != ATA_12) && > > > - (scmd->cmnd[0] != ATA_16)) { > > > + (scmd->cmnd[0] != ATA_16) && > > > + mrioc->logging_level & MPI3_DEBUG_REPLY) { > > >>> Thanks for fixing this, Can you please use MPI3_DEBUG_SCSI_ERROR instead of MPI3_DEBUG_REPLY as that makes more sense. Thanks for the comment. Will do so.
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index f77ee4051b00..2b95d1d375f2 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -3265,7 +3265,8 @@ void mpi3mr_process_op_reply_desc(struct mpi3mr_ioc *mrioc, } if (scmd->result != (DID_OK << 16) && (scmd->cmnd[0] != ATA_12) && - (scmd->cmnd[0] != ATA_16)) { + (scmd->cmnd[0] != ATA_16) && + mrioc->logging_level & MPI3_DEBUG_REPLY) { ioc_info(mrioc, "%s :scmd->result 0x%x\n", __func__, scmd->result); scsi_print_command(scmd);
After it receives command reply, mpi3mr driver checks command result. If the result is not zero, it prints out command information. This debug information is confusing since they are printed even when the non-zero result is expected. "Power-on or device reset occurred" is printed for Test Unit Ready command at drive detection. Inquiry failure for unsupported VPD page header is also printed. They are harmless but look like failures. To avoid the confusion, print the command reply debug information only when the module parameter logging_level has value MPI3_DEBUG_REPLY=128, in same manner as mpt3sas driver. Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> --- drivers/scsi/mpi3mr/mpi3mr_os.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)