scsi: smartpqi: Close write read holes
authorMike McGowen <mike.mcgowen@microchip.com>
Fri, 8 Jul 2022 18:47:05 +0000 (13:47 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 14 Jul 2022 03:42:03 +0000 (23:42 -0400)
commit297bdc540f0e391568788f8ece3020653748a26f
treef78b117198c690a723fa7dd62efbd7fe3b6b177c
parentdab5378485f601174a297a069d040ffb92918bf5
scsi: smartpqi: Close write read holes

Insert a minimum 1 millisecond delay after writing to a register before
reading from it.

SIS and PQI registers that can be both written to and read from can return
stale data if read from too soon after having been written to.

There is no read/write ordering or hazard detection on the inbound path to
the MSGU from the PCIe bus, therefore reads could pass writes.

Link: https://lore.kernel.org/r/165730602555.177165.11181012469428348394.stgit@brunhilda
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Signed-off-by: Mike McGowen <mike.mcgowen@microchip.com>
Co-developed-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/smartpqi/smartpqi_sis.c