* [PATCH] scsi: mpi3mr: suppress command reply debug prints @ 2022-11-09 3:12 Shin'ichiro Kawasaki 2022-11-09 5:22 ` Damien Le Moal 0 siblings, 1 reply; 4+ messages in thread From: Shin'ichiro Kawasaki @ 2022-11-09 3:12 UTC (permalink / raw) To: mpi3mr-linuxdrv.pdl, Sathya Prakash Veerichetty, Kashyap Desai, Sumit Saxena, Sreekanth Reddy, linux-scsi, Martin K . Petersen Cc: Damien Le Moal, Shin'ichiro Kawasaki 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) { ioc_info(mrioc, "%s :scmd->result 0x%x\n", __func__, scmd->result); scsi_print_command(scmd); -- 2.37.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: mpi3mr: suppress command reply debug prints 2022-11-09 3:12 [PATCH] scsi: mpi3mr: suppress command reply debug prints Shin'ichiro Kawasaki @ 2022-11-09 5:22 ` Damien Le Moal 2022-11-10 20:22 ` Sathya Prakash Veerichetty 0 siblings, 1 reply; 4+ messages in thread From: Damien Le Moal @ 2022-11-09 5:22 UTC (permalink / raw) To: Shin'ichiro Kawasaki, mpi3mr-linuxdrv.pdl, Sathya Prakash Veerichetty, Kashyap Desai, Sumit Saxena, Sreekanth Reddy, linux-scsi, Martin K . Petersen 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) { > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: mpi3mr: suppress command reply debug prints 2022-11-09 5:22 ` Damien Le Moal @ 2022-11-10 20:22 ` Sathya Prakash Veerichetty 2022-11-11 1:14 ` Shinichiro Kawasaki 0 siblings, 1 reply; 4+ messages in thread From: Sathya Prakash Veerichetty @ 2022-11-10 20:22 UTC (permalink / raw) To: Damien Le Moal Cc: Shin'ichiro Kawasaki, mpi3mr-linuxdrv.pdl, Kashyap Desai, Sumit Saxena, Sreekanth Reddy, linux-scsi, Martin K . Petersen [-- Attachment #1: Type: text/plain, Size: 2709 bytes --] 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 > -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it. [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4227 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: mpi3mr: suppress command reply debug prints 2022-11-10 20:22 ` Sathya Prakash Veerichetty @ 2022-11-11 1:14 ` Shinichiro Kawasaki 0 siblings, 0 replies; 4+ messages in thread From: Shinichiro Kawasaki @ 2022-11-11 1:14 UTC (permalink / raw) To: Sathya Prakash Veerichetty Cc: Damien Le Moal, mpi3mr-linuxdrv.pdl@broadcom.com, Kashyap Desai, Sumit Saxena, Sreekanth Reddy, linux-scsi@vger.kernel.org, Martin K . Petersen 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. -- Shin'ichiro Kawasaki ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-11 1:15 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-11-09 3:12 [PATCH] scsi: mpi3mr: suppress command reply debug prints Shin'ichiro Kawasaki 2022-11-09 5:22 ` Damien Le Moal 2022-11-10 20:22 ` Sathya Prakash Veerichetty 2022-11-11 1:14 ` Shinichiro Kawasaki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox