]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/qla2xxx/qla_os.c
[SCSI] qla2xxx: Stop unconditional completion of mailbox commands issued in interrupt...
[karo-tx-linux.git] / drivers / scsi / qla2xxx / qla_os.c
index 01c87004b219a8225e2fe86507487fd8a2825ae4..abec1dd31194ea919c39bd5d20fd4b6d231823a4 100644 (file)
@@ -4014,7 +4014,10 @@ qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
                                ql_dbg(ql_dbg_aer, vha, 0x9001,
                                    "Due to pci channel io frozen, doing premature "
                                    "completion of mbx command.\n");
-                               complete(&ha->mbx_intr_comp);
+                               if (test_bit(MBX_INTR_WAIT,
+                                   &ha->mbx_cmd_flags)) {
+                                       complete(&ha->mbx_intr_comp);
+                               }
                        }
                }
                qla2x00_free_irqs(vha);