diff options
author | Quinn Tran <quinn.tran@cavium.com> | 2017-06-14 06:47:17 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-28 04:21:40 +0300 |
commit | 82de802ad46e23820f7fcaddc45adde181d95562 (patch) | |
tree | 5769de7e041b27991ea14768c74837bf6825800f /drivers/scsi/qla2xxx/qla_def.h | |
parent | c5419e2618b951a73d590e0752810686d52c45cf (diff) | |
download | linux-82de802ad46e23820f7fcaddc45adde181d95562.tar.xz |
scsi: qla2xxx: Preparation for Target MQ.
In Current code, Req Q 0, RespQ 0 & hardware_lock are the main resources
for sending and process completion of Target IO. These resources are now
referenced behind a new qpair/"struct qla_qpair base_qpair". Main path
IO handle will access those resources via the qpair pointer in
preparation for Target MQ.
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 1b5049b1ef4a..64109134e276 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -3182,6 +3182,9 @@ struct qla_tc_param { #define QLA_PRECONFIG_VPORTS 32 #define QLA_MAX_VPORTS_QLA24XX 128 #define QLA_MAX_VPORTS_QLA25XX 256 + +struct qla_qpair; + /* Response queue data structure */ struct rsp_que { dma_addr_t dma; @@ -3201,6 +3204,7 @@ struct rsp_que { struct qla_msix_entry *msix; struct req_que *req; srb_t *status_srb; /* status continuation entry */ + struct qla_qpair *qpair; dma_addr_t dma_fx00; response_t *ring_fx00; @@ -3241,6 +3245,14 @@ struct req_que { struct qla_qpair { spinlock_t qp_lock; atomic_t ref_count; + + /* + * For qpair 0, qp_lock_ptr will point at hardware_lock due to + * legacy code. For other Qpair(s), it will point at qp_lock. + */ + spinlock_t *qp_lock_ptr; + struct scsi_qla_host *vha; + /* distill these fields down to 'online=0/1' * ha->flags.eeh_busy * ha->flags.pci_channel_io_perm_failure @@ -3252,10 +3264,7 @@ struct qla_qpair { uint32_t delete_in_progress:1; uint16_t id; /* qp number used with FW */ - uint16_t num_active_cmd; /* cmds down at firmware */ - cpumask_t cpu_mask; /* CPU mask for cpu affinity operation */ uint16_t vp_idx; /* vport ID */ - mempool_t *srb_mempool; /* to do: New driver: move queues to here instead of pointers */ @@ -3266,7 +3275,7 @@ struct qla_qpair { struct qla_hw_data *hw; struct work_struct q_work; struct list_head qp_list_elem; /* vha->qp_list */ - struct scsi_qla_host *vha; + uint16_t cpuid; }; /* Place holder for FW buffer parameters */ |