scsi: mpt3sas: Add separate function for aero doorbell reads
authorSuganath Prabu <suganath-prabu.subramani@broadcom.com>
Fri, 7 Dec 2018 07:28:33 +0000 (12:58 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 13 Dec 2018 02:29:07 +0000 (21:29 -0500)
commitb899202901a8add28adc73a1ae077217fa341dfe
treeed5e3d24b9fc7e68ad104965483e304114cc6fa6
parentcc68e6077bbf09de3e792716a1d38588bdb7a785
scsi: mpt3sas: Add separate function for aero doorbell reads

Sometimes Aero controllers appears to be returning bad data (0) for
doorbell register read and if retries are performed immediately after the
bad read, they return good data.

Workaround is added to retry read from doorbell registers for maximum three
times if driver get the zero.  Added functions base_readl_aero for Aero IOC
and base_readl for gen35 and other controllers.

Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.c
drivers/scsi/mpt3sas/mpt3sas_base.h