]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
8cefa5ec25b3f45f6df7633b00da74f8d508b686
[thirdparty/kernel/stable-queue.git] /
1 From 8e3ed9e786511ad800c33605ed904b9de49323cf Mon Sep 17 00:00:00 2001
2 From: Chandrakanth patil <chandrakanth.patil@broadcom.com>
3 Date: Tue, 3 Oct 2023 16:30:18 +0530
4 Subject: scsi: megaraid_sas: Increase register read retry rount from 3 to 30 for selected registers
5
6 From: Chandrakanth patil <chandrakanth.patil@broadcom.com>
7
8 commit 8e3ed9e786511ad800c33605ed904b9de49323cf upstream.
9
10 In BMC environments with concurrent access to multiple registers, certain
11 registers occasionally yield a value of 0 even after 3 retries due to
12 hardware errata. As a fix, we have extended the retry count from 3 to 30.
13
14 The same errata applies to the mpt3sas driver, and a similar patch has
15 been accepted. Please find more details in the mpt3sas patch reference
16 link.
17
18 Link: https://lore.kernel.org/r/20230829090020.5417-2-ranjan.kumar@broadcom.com
19 Fixes: 272652fcbf1a ("scsi: megaraid_sas: add retry logic in megasas_readl")
20 Cc: stable@vger.kernel.org
21 Signed-off-by: Chandrakanth patil <chandrakanth.patil@broadcom.com>
22 Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
23 Link: https://lore.kernel.org/r/20231003110021.168862-2-chandrakanth.patil@broadcom.com
24 Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26 ---
27 drivers/scsi/megaraid/megaraid_sas_base.c | 4 ++--
28 1 file changed, 2 insertions(+), 2 deletions(-)
29
30 --- a/drivers/scsi/megaraid/megaraid_sas_base.c
31 +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
32 @@ -248,13 +248,13 @@ u32 megasas_readl(struct megasas_instanc
33 * Fusion registers could intermittently return all zeroes.
34 * This behavior is transient in nature and subsequent reads will
35 * return valid value. As a workaround in driver, retry readl for
36 - * upto three times until a non-zero value is read.
37 + * up to thirty times until a non-zero value is read.
38 */
39 if (instance->adapter_type == AERO_SERIES) {
40 do {
41 ret_val = readl(addr);
42 i++;
43 - } while (ret_val == 0 && i < 3);
44 + } while (ret_val == 0 && i < 30);
45 return ret_val;
46 } else {
47 return readl(addr);