]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qla2xxx: do not abort all commands in the adapter during EEH recovery
authorMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Mon, 14 Nov 2016 21:26:22 +0000 (19:26 -0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 14 Nov 2016 23:38:10 +0000 (18:38 -0500)
commitae77f2b046ad89775b869020a38fe6221ccc9805
tree8a462254a2f5e092fdc3c5294378a4755bb7d31d
parente4dac58a79c7ca8de5469550f632539602372433
scsi: qla2xxx: do not abort all commands in the adapter during EEH recovery

The previous commit 704dbc270b99 ("qla2xxx: fix invalid DMA access after
command aborts in PCI device remove") introduced a regression during an
EEH recovery, since the change to the qla2x00_abort_all_cmds() function
calls qla2xxx_eh_abort(), which verifies the EEH recovery condition but
handles it heavy-handed. (commit 65a83e312887 "qla2xxx: Disable the
adapter and skip error recovery in case of register disconnect.")

This problem warrants a more general/optimistic solution right into
qla2xxx_eh_abort() (eg in case a real command abort arrives during EEH
recovery, or if it takes long enough to trigger command aborts); but
it's still worth to add a check to ensure the code added by the previous
commit is correct and contained within its owner function.

This commit just adds a 'if (!ha->flags.eeh_busy)' check around it.
(ahem; a trivial fix for this -rc series; sorry for this oversight.)

With it applied, both PCI device remove and EEH recovery works fine.

Fixes: 704dbc270b99 ("scsi: qla2xxx: fix invalid DMA access after command aborts in PCI device remove")
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_os.c