mbox series

[v4,0/2] mpt3sas: Additional retries when reading specific registers

Message ID 20230829090020.5417-1-ranjan.kumar@broadcom.com
Headers show
Series mpt3sas: Additional retries when reading specific registers | expand

Message

Ranjan Kumar Aug. 29, 2023, 9 a.m. UTC
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.

v1->v2:
-added a new patch for volatile as suggested by Greg KH.
-renamed macro as suggested by Damien Le Moal.

v2->v3:
-Modified patch description with more details.

v3->v4:
- Code simplification

Ranjan Kumar (2):
  mpt3sas: Perform additional retries if Doorbell read returns 0
  mpt3sas: Removing volatile qualifier

 drivers/scsi/mpt3sas/mpi/mpi2.h     |  2 +-
 drivers/scsi/mpt3sas/mpt3sas_base.c | 50 ++++++++++++++++++++---------
 drivers/scsi/mpt3sas/mpt3sas_base.h |  3 +-
 3 files changed, 38 insertions(+), 17 deletions(-)

Comments

Martin K. Petersen Aug. 31, 2023, 1:39 a.m. UTC | #1
Ranjan,

> 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.

Applied to 6.6/scsi-staging, thanks!
Martin K. Petersen Sept. 5, 2023, 10:18 a.m. UTC | #2
On Tue, 29 Aug 2023 14:30:18 +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.
> 
> v1->v2:
> -added a new patch for volatile as suggested by Greg KH.
> -renamed macro as suggested by Damien Le Moal.
> 
> [...]

Applied to 6.6/scsi-queue, thanks!

[1/2] mpt3sas: Perform additional retries if Doorbell read returns 0
      https://git.kernel.org/mkp/scsi/c/4ca10f3e3174
[2/2] mpt3sas: Removing volatile qualifier
      https://git.kernel.org/mkp/scsi/c/0854065092a7
Patrick Strateman Dec. 9, 2023, 8:21 p.m. UTC | #3
The loop in _base_readl_ext_retry is wrong, it runs 30 times regardless 
of the result from readl.

This results in the value being incorrect and the device being reset 
nearly continuously.

if (ret_val == 0) continue;

should be

if (ret_val != 0) break;

On 8/30/23 18:39, Martin K. Petersen wrote:
> Ranjan,
>
>> 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.
> Applied to 6.6/scsi-staging, thanks!
>