]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: aacraid: fix PCI error recovery path
authorGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Thu, 6 Apr 2017 21:12:09 +0000 (18:12 -0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 12 Apr 2017 00:45:59 +0000 (20:45 -0400)
commitc125063209099ff9a52a5f39e8737fcd0b2145a2
treef042c0d9b613642141bef22c742fdb89b09d2e91
parent2de65d4a6c2b2c2d12410a45762e6a6ca2e1bde5
scsi: aacraid: fix PCI error recovery path

During a PCI error recovery, if aac_check_health() is not aware that a
PCI error happened and we have an offline PCI channel, it might trigger
some errors (like NULL pointer dereference) and inhibit the error
recovery process to complete.

This patch makes the health check procedure aware of PCI channel issues,
and in case of error recovery process, the function
aac_adapter_check_health() returns -1 and let the recovery process to
complete successfully. This patch was tested on upstream kernel
v4.11-rc5 in PowerPC ppc64le architecture with adapter 9005:028d
(VID:DID) - the error recovery procedure was able to recover fine.

Fixes: 354eb0e8d819 ("aacraid: Added EEH support")
Cc: stable@vger.kernel.org # v4.6+
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/aacraid.h
drivers/scsi/aacraid/commsup.c