|
@@ -117,12 +117,14 @@ qla2x00_check_reg32_for_disconnect(scsi_qla_host_t *vha, uint32_t reg)
|
|
|
{
|
|
|
/* Check for PCI disconnection */
|
|
|
if (reg == 0xffffffff) {
|
|
|
- /*
|
|
|
- * Schedule this on the default system workqueue so that all the
|
|
|
- * adapter workqueues and the DPC thread can be shutdown
|
|
|
- * cleanly.
|
|
|
- */
|
|
|
- schedule_work(&vha->hw->board_disable);
|
|
|
+ if (!test_and_set_bit(PFLG_DISCONNECTED, &vha->pci_flags)) {
|
|
|
+ /*
|
|
|
+ * Schedule this (only once) on the default system
|
|
|
+ * workqueue so that all the adapter workqueues and the
|
|
|
+ * DPC thread can be shutdown cleanly.
|
|
|
+ */
|
|
|
+ schedule_work(&vha->hw->board_disable);
|
|
|
+ }
|
|
|
return true;
|
|
|
} else
|
|
|
return false;
|