From: Greg KH <gregkh@linuxfoundation.org>
To: Ranjan Kumar <ranjan.kumar@broadcom.com>
Cc: linux-scsi@vger.kernel.org, martin.petersen@oracle.com,
sathya.prakash@broadcom.com, sreekanth.reddy@broadcom.com,
stable@vger.kernel.org
Subject: Re: [PATCH] mpt3sas: Perform additional retries if Doorbell read returns 0
Date: Thu, 15 Jun 2023 10:47:12 +0200 [thread overview]
Message-ID: <2023061538-dizzy-amiable-9ec7@gregkh> (raw)
In-Reply-To: <20230615083010.45837-1-ranjan.kumar@broadcom.com>
On Thu, Jun 15, 2023 at 02:00:10PM +0530, Ranjan Kumar wrote:
> Doorbell and Host diagnostic registers could return 0 even
> after 3 retries and that leads to occasional resets of the
> controllers, hence increased the retry count to thirty.
>
> 'Fixes: b899202901a8 ("mpt3sas: Add separate function for aero doorbell reads ")'
No ' characters here please.
> Cc: stable@vger.kernel.org
>
> Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
No blank line before the signed-off-by and the other fields please.
Didn't checkpatch warn you about this?
> ---
> drivers/scsi/mpt3sas/mpt3sas_base.c | 50 ++++++++++++++++-------------
> drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++-
> 2 files changed, 31 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 53f5492579cb..44e7ccb6f780 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -201,20 +201,20 @@ module_param_call(mpt3sas_fwfault_debug, _scsih_set_fwfault_debug,
> * while reading the system interface register.
> */
> static inline u32
> -_base_readl_aero(const volatile void __iomem *addr)
> +_base_readl_aero(const volatile void __iomem *addr, u8 retry_count)
Are you sure that volatile really does what you think it does here?
> {
> u32 i = 0, ret_val;
>
> do {
> ret_val = readl(addr);
> i++;
> - } while (ret_val == 0 && i < 3);
> + } while (ret_val == 0 && i < retry_count);
So newer systems will complete this failure loop faster than older ones?
That feels very wrong, you will be changing this in a year or so. Use
time please, not counts.
thanks,
greg k-h
next prev parent reply other threads:[~2023-06-15 8:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 8:30 [PATCH] mpt3sas: Perform additional retries if Doorbell read returns 0 Ranjan Kumar
2023-06-15 8:47 ` Greg KH [this message]
2023-06-22 15:26 ` Sathya Prakash Veerichetty
2023-06-22 16:08 ` Greg KH
2023-06-22 16:15 ` Sathya Prakash Veerichetty
2023-06-22 17:04 ` Greg KH
2023-07-05 17:09 ` Sathya Prakash Veerichetty
2023-07-05 17:16 ` Greg KH
2023-07-05 17:30 ` Sathya Prakash Veerichetty
2023-07-05 17:28 ` Sathya Prakash Veerichetty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2023061538-dizzy-amiable-9ec7@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ranjan.kumar@broadcom.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox