summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_target.c
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@cavium.com>2017-06-14 06:47:21 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-28 04:21:40 +0300
commit4b60c82736d0e2d7f863cba1a320e89bf74a884e (patch)
treeecbe1cec04175d4b7bd817529d193943c8f05741 /drivers/scsi/qla2xxx/qla_target.c
parent09620eeb62c4167d0c206f9a69730fa9e9251aae (diff)
downloadlinux-4b60c82736d0e2d7f863cba1a320e89bf74a884e.tar.xz
scsi: qla2xxx: Add fw_started flags to qpair
Add fw_started flag to qpair to reduce cache thrash. This reduce access to qla_hw_data structure by each qpair. 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_target.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 87f80dccaf8c..0ce0d500982a 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -3086,7 +3086,7 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type,
else
vha->tgt_counters.core_qla_que_buf++;
- if (!ha->flags.fw_started || cmd->reset_count != ha->chip_reset) {
+ if (!qpair->fw_started || cmd->reset_count != vha->hw->chip_reset) {
/*
* Either the port is not online or this request was from
* previous life, just abort the processing.
@@ -3096,7 +3096,7 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type,
ql_dbg(ql_dbg_async, vha, 0xe101,
"RESET-RSP online/active/old-count/new-count = %d/%d/%d/%d.\n",
vha->flags.online, qla2x00_reset_active(vha),
- cmd->reset_count, ha->chip_reset);
+ cmd->reset_count, vha->hw->chip_reset);
spin_unlock_irqrestore(qpair->qp_lock_ptr, flags);
return 0;
}
@@ -3206,7 +3206,6 @@ int qlt_rdy_to_xfer(struct qla_tgt_cmd *cmd)
{
struct ctio7_to_24xx *pkt;
struct scsi_qla_host *vha = cmd->vha;
- struct qla_hw_data *ha = vha->hw;
struct qla_tgt *tgt = cmd->tgt;
struct qla_tgt_prm prm;
unsigned long flags = 0;
@@ -3223,7 +3222,7 @@ int qlt_rdy_to_xfer(struct qla_tgt_cmd *cmd)
if (qlt_pci_map_calc_cnt(&prm) != 0)
return -EAGAIN;
- if (!ha->flags.fw_started || (cmd->reset_count != ha->chip_reset) ||
+ if (!qpair->fw_started || (cmd->reset_count != vha->hw->chip_reset) ||
(cmd->sess && cmd->sess->deleted)) {
/*
* Either the port is not online or this request was from
@@ -3234,7 +3233,7 @@ int qlt_rdy_to_xfer(struct qla_tgt_cmd *cmd)
ql_dbg(ql_dbg_async, vha, 0xe102,
"RESET-XFR online/active/old-count/new-count = %d/%d/%d/%d.\n",
vha->flags.online, qla2x00_reset_active(vha),
- cmd->reset_count, ha->chip_reset);
+ cmd->reset_count, vha->hw->chip_reset);
return 0;
}