summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_def.h
diff options
context:
space:
mode:
authorJoe Lawrence <joe.lawrence@stratus.com>2014-08-26 17:12:14 -0400
committerChristoph Hellwig <hch@lst.de>2014-09-16 09:10:01 -0700
commitbeb9e315e6e0d8d1d7d3a79d2e5d4664aa8f8796 (patch)
treea6955355cb53775302f139fa134462af1f5740c1 /drivers/scsi/qla2xxx/qla_def.h
parent232792b6b43b1420324e432a0498602b9c8d5a8c (diff)
qla2xxx: Prevent removal and board_disable race
Introduce mutual exclusion between the qla2xxx_remove_one PCI driver callback and qla2x00_disable_board_on_pci_error, which is scheduled as board_disable work by qla2x00_check_reg{32,16}_for_disconnect: * Leave the driver-specific data attached to the underlying PCI device intact in qla2x00_disable_board_on_pci_error, so that qla2x00_remove_one has enough breadcrumbs to determine that any board_disable work has been completed. * In qla2xxx_remove_one, set a bit to prevent any subsequent board_disable work from scheduling, then cancel and wait until pending work has completed. * Reuse the PCI device enable count check in qla2x00_remove_one to determine if board_disable has occured. The original purpose of this check was unnecessary since the driver remove function wasn't called when the probe fails. Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com> Acked-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 4267ec6f3258..13988180a48c 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -3404,6 +3404,7 @@ typedef struct scsi_qla_host {
unsigned long pci_flags;
#define PFLG_DISCONNECTED 0 /* PCI device removed */
+#define PFLG_DRIVER_REMOVING 1 /* PCI driver .remove */
uint32_t device_flags;
#define SWITCH_FOUND BIT_0