]> git.karo-electronics.de Git - linux-beck.git/commit
qla2xxx: prevent board_disable from running during EEH
authorThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Thu, 30 Apr 2015 12:13:05 +0000 (09:13 -0300)
committerJames Bottomley <JBottomley@Odin.com>
Wed, 12 Aug 2015 18:17:22 +0000 (11:17 -0700)
commita30c2a3bf8571c6748dd16edc10b32d45ed71a72
tree28a4589a1f84265a1e0eb586f30a28de0047748f
parentd8571b1ecbd497d78923e046262872e3206b2deb
qla2xxx: prevent board_disable from running during EEH

Commit f3ddac1918fe963bcbf8d407a3a3c0881b47248b ("[SCSI] qla2xxx:
Disable adapter when we encounter a PCI disconnect.") has introduced a
code that disables the board, releasing some resources, when reading
0xffffffff.

In case this happens when there is an EEH, this read will trigger EEH
detection and set PCI channel offline. EEH will be able to recover the
card from this state by doing a reset, so it's a better option than
simply disabling the card.

Since eeh_check_failure will mark the channel as offline before
returning the read value, in case there really was an EEH, we can simply
check for pci_channel_offline, preventing the board_disable code from
running if it's true.

Without this patch, EEH code will try to access those same resources
that board_disable will try to free. This race can cause EEH recovery to
fail.

[  504.370577] EEH: Notify device driver to resume
[  504.370580] qla2xxx [0001:07:00.0]-9002:2: The device failed to resume I/O from slot/link_reset.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/qla2xxx/qla_isr.c