scsi: lpfc: Stop adapter if pci errors detected
authorJames Smart <jsmart2021@gmail.com>
Tue, 12 Mar 2019 23:30:13 +0000 (16:30 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 Mar 2019 16:57:02 +0000 (12:57 -0400)
commit32a9310076e4f00ac6d8a5a2d39b953d199bef0d
treef671c5bd01d909ff7d14ad84b18e9c5a4d3d2bbb
parent731eedcb317a5a4b5776d3c78ffe5e79c596fa16
scsi: lpfc: Stop adapter if pci errors detected

In a couple of cases, the driver detected a pci error (via pci device state
or via failed register reads) but didn't take any action to disable the
device.  Additionally, the driver is ignoring the status of pci
configuration space reads.

Having the driver take the adapter offline whenever the pci error is
detected.  Pay attention to pci_config_space_read status and return failure
if an error is seen.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c