qla2xxx: Check for device state before unloading the driver.
During hot swap of PCI device, there can be PCI error on device, during normal driver unload. The race between normal driver unload and driver unload due to PCI error, can lead to system crash.Fix is to check if there is unload going on and allow that function to unload the driver. Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
c6dc99058e
commit
783e0dc4f6
@@ -3658,6 +3658,7 @@ typedef struct scsi_qla_host {
|
||||
#define PFLG_DISCONNECTED 0 /* PCI device removed */
|
||||
#define PFLG_DRIVER_REMOVING 1 /* PCI driver .remove */
|
||||
#define PFLG_DRIVER_PROBING 2 /* PCI driver .probe */
|
||||
#define PCI_ERR 30
|
||||
|
||||
uint32_t device_flags;
|
||||
#define SWITCH_FOUND BIT_0
|
||||
|
||||
Reference in New Issue
Block a user