]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: aacraid: Check for PCI state of device in a generic way
authorGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Fri, 17 Nov 2017 21:14:53 +0000 (19:14 -0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 21 Nov 2017 03:29:10 +0000 (22:29 -0500)
commitbd257b2f3bc68514fad19763f540fea581c12d22
tree6d4e7049ec9eab1dcef11a41572795a89fc462b2
parent5ebde4694e3b572c4623fd46be98e5c0ca70b522
scsi: aacraid: Check for PCI state of device in a generic way

Commit 16ae9dd35d37 ("scsi: aacraid: Fix for excessive prints on EEH")
introduced checks about the state of device before any PCI operations in
the driver. Basically, this prevents it to perform PCI accesses when
device is in the process of recover from a PCI error. In PowerPC, such
mechanism is called EEH, and the aforementioned commit introduced checks
that are based on EEH-specific primitives for that.

The potential problems with this approach are three: first, these checks
are "locked" to powerpc only - another archs could have error recovery
methods too, like AER in Intel. Also, the powerpc primitives perform
expensive FW accesses to validate the precise PCI state of a device.
Finally, code becomes more complicated and needs ifdef validation based
on arch config being set.

So, this patch makes use of generic PCI state checks, which are
lightweight and non-dependent of arch configs - also, it makes the code
cleaner.

Fixes: 16ae9dd35d37 ("scsi: aacraid: Fix for excessive prints on EEH")
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Reviewed-by: Dave Carroll <david.carroll@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aacraid/commsup.c