scsi: megaraid_sas: add retry logic in megasas_readl
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Mon, 17 Dec 2018 08:47:40 +0000 (00:47 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 20 Dec 2018 02:37:15 +0000 (21:37 -0500)
commit272652fcbf1adf6321efe288583fa4a30a15af31
treea12bc33d235f0357c5341dcc175b5b968f72d16a
parentde516379e85f51c57ee54b113dbb442e5a862cd8
scsi: megaraid_sas: add retry logic in megasas_readl

Due to hardware errata in Aero controllers, reads to certain fusion
registers could intermittently return zero.  This behavior is
transient in nature and subsequent reads will return valid value.

For Aero controllers, any calls to readl to read from certain
registers will be retried for maximum three times, if read returns
zero.

Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/megaraid/megaraid_sas_fusion.c