summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_def.h
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@cavium.com>2017-06-14 05:47:22 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-28 03:21:41 +0200
commit7c3f8fd10bab0b4d9021a11f123fd67e81ef3b0e (patch)
tree462d4eb62fdd6894ca472bda3b1f3b9183e1349f /drivers/scsi/qla2xxx/qla_def.h
parentscsi: qla2xxx: Add fw_started flags to qpair (diff)
downloadlinux-7c3f8fd10bab0b4d9021a11f123fd67e81ef3b0e.tar.xz
linux-7c3f8fd10bab0b4d9021a11f123fd67e81ef3b0e.zip
scsi: qla2xxx: move fields from qla_hw_data to qla_qpair
- Move chip_reset, enable_class_2 fields from qla_hw_data to qla_qpair to reduce cache thrash for target MQ. - Optimizations to reduce unnecessary memory load for good path io. 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.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 0dec148a4580..dfa001357110 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -3252,6 +3252,7 @@ struct qla_qpair {
*/
spinlock_t *qp_lock_ptr;
struct scsi_qla_host *vha;
+ u32 chip_reset;
/* distill these fields down to 'online=0/1'
* ha->flags.eeh_busy
@@ -3263,6 +3264,8 @@ struct qla_qpair {
uint32_t difdix_supported:1;
uint32_t delete_in_progress:1;
uint32_t fw_started:1;
+ uint32_t enable_class_2:1;
+ uint32_t enable_explicit_conf:1;
uint16_t id; /* qp number used with FW */
uint16_t vp_idx; /* vport ID */
@@ -3296,8 +3299,6 @@ struct scsi_qlt_host {
struct qlt_hw_data {
/* Protected by hw lock */
- uint32_t enable_class_2:1;
- uint32_t enable_explicit_conf:1;
uint32_t node_name_set:1;
dma_addr_t atio_dma; /* Physical address. */
@@ -3954,7 +3955,6 @@ struct qla_hw_data {
struct work_struct board_disable;
struct mr_data_fx00 mr;
- uint32_t chip_reset;
struct qlt_hw_data tgt;
int allow_cna_fw_dump;
@@ -4247,6 +4247,25 @@ struct qla2_sgx {
#define QLA_QPAIR_MARK_NOT_BUSY(__qpair) \
atomic_dec(&__qpair->ref_count); \
+
+#define QLA_ENA_CONF(_ha) {\
+ int i;\
+ _ha->base_qpair->enable_explicit_conf = 1; \
+ for (i = 0; i < _ha->max_qpairs; i++) { \
+ if (_ha->queue_pair_map[i]) \
+ _ha->queue_pair_map[i]->enable_explicit_conf = 1; \
+ } \
+}
+
+#define QLA_DIS_CONF(_ha) {\
+ int i;\
+ _ha->base_qpair->enable_explicit_conf = 0; \
+ for (i = 0; i < _ha->max_qpairs; i++) { \
+ if (_ha->queue_pair_map[i]) \
+ _ha->queue_pair_map[i]->enable_explicit_conf = 0; \
+ } \
+}
+
/*
* qla2x00 local function return status codes
*/