aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 3a432ea0c7a3..d2a4e1530708 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2641,6 +2641,7 @@ struct qla_hw_data {
2641#define MBX_UPDATE_FLASH_ACTIVE 3 2641#define MBX_UPDATE_FLASH_ACTIVE 3
2642 2642
2643 struct mutex vport_lock; /* Virtual port synchronization */ 2643 struct mutex vport_lock; /* Virtual port synchronization */
2644 spinlock_t vport_slock; /* order is hardware_lock, then vport_slock */
2644 struct completion mbx_cmd_comp; /* Serialize mbx access */ 2645 struct completion mbx_cmd_comp; /* Serialize mbx access */
2645 struct completion mbx_intr_comp; /* Used for completion notification */ 2646 struct completion mbx_intr_comp; /* Used for completion notification */
2646 struct completion dcbx_comp; /* For set port config notification */ 2647 struct completion dcbx_comp; /* For set port config notification */
@@ -2828,6 +2829,7 @@ typedef struct scsi_qla_host {
2828 uint32_t management_server_logged_in :1; 2829 uint32_t management_server_logged_in :1;
2829 uint32_t process_response_queue :1; 2830 uint32_t process_response_queue :1;
2830 uint32_t difdix_supported:1; 2831 uint32_t difdix_supported:1;
2832 uint32_t delete_progress:1;
2831 } flags; 2833 } flags;
2832 2834
2833 atomic_t loop_state; 2835 atomic_t loop_state;
@@ -2922,6 +2924,8 @@ typedef struct scsi_qla_host {
2922 struct req_que *req; 2924 struct req_que *req;
2923 int fw_heartbeat_counter; 2925 int fw_heartbeat_counter;
2924 int seconds_since_last_heartbeat; 2926 int seconds_since_last_heartbeat;
2927
2928 atomic_t vref_count;
2925} scsi_qla_host_t; 2929} scsi_qla_host_t;
2926 2930
2927/* 2931/*
@@ -2932,6 +2936,22 @@ typedef struct scsi_qla_host {
2932 test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \ 2936 test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \
2933 atomic_read(&ha->loop_state) == LOOP_DOWN) 2937 atomic_read(&ha->loop_state) == LOOP_DOWN)
2934 2938
2939#define QLA_VHA_MARK_BUSY(__vha, __bail) do { \
2940 atomic_inc(&__vha->vref_count); \
2941 mb(); \
2942 if (__vha->flags.delete_progress) { \
2943 atomic_dec(&__vha->vref_count); \
2944 __bail = 1; \
2945 } else { \
2946 __bail = 0; \
2947 } \
2948} while (0)
2949
2950#define QLA_VHA_MARK_NOT_BUSY(__vha) do { \
2951 atomic_dec(&__vha->vref_count); \
2952} while (0)
2953
2954
2935#define qla_printk(level, ha, format, arg...) \ 2955#define qla_printk(level, ha, format, arg...) \
2936 dev_printk(level , &((ha)->pdev->dev) , format , ## arg) 2956 dev_printk(level , &((ha)->pdev->dev) , format , ## arg)
2937 2957