[SCSI] qla2xxx: Fix vport delete issues
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
committed by
James Bottomley
parent
2e4c332913
commit
feafb7b171
@@ -2641,6 +2641,7 @@ struct qla_hw_data {
|
||||
#define MBX_UPDATE_FLASH_ACTIVE 3
|
||||
|
||||
struct mutex vport_lock; /* Virtual port synchronization */
|
||||
spinlock_t vport_slock; /* order is hardware_lock, then vport_slock */
|
||||
struct completion mbx_cmd_comp; /* Serialize mbx access */
|
||||
struct completion mbx_intr_comp; /* Used for completion notification */
|
||||
struct completion dcbx_comp; /* For set port config notification */
|
||||
@@ -2828,6 +2829,7 @@ typedef struct scsi_qla_host {
|
||||
uint32_t management_server_logged_in :1;
|
||||
uint32_t process_response_queue :1;
|
||||
uint32_t difdix_supported:1;
|
||||
uint32_t delete_progress:1;
|
||||
} flags;
|
||||
|
||||
atomic_t loop_state;
|
||||
@@ -2922,6 +2924,8 @@ typedef struct scsi_qla_host {
|
||||
struct req_que *req;
|
||||
int fw_heartbeat_counter;
|
||||
int seconds_since_last_heartbeat;
|
||||
|
||||
atomic_t vref_count;
|
||||
} scsi_qla_host_t;
|
||||
|
||||
/*
|
||||
@@ -2932,6 +2936,22 @@ typedef struct scsi_qla_host {
|
||||
test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \
|
||||
atomic_read(&ha->loop_state) == LOOP_DOWN)
|
||||
|
||||
#define QLA_VHA_MARK_BUSY(__vha, __bail) do { \
|
||||
atomic_inc(&__vha->vref_count); \
|
||||
mb(); \
|
||||
if (__vha->flags.delete_progress) { \
|
||||
atomic_dec(&__vha->vref_count); \
|
||||
__bail = 1; \
|
||||
} else { \
|
||||
__bail = 0; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QLA_VHA_MARK_NOT_BUSY(__vha) do { \
|
||||
atomic_dec(&__vha->vref_count); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define qla_printk(level, ha, format, arg...) \
|
||||
dev_printk(level , &((ha)->pdev->dev) , format , ## arg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user