mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 14:20:50 +07:00
scsi: qla2xxx: Fix task mgmt handling for NPIV
Fix task management response for NPIV Target mode. Current code uses the wrong vp index. 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>
This commit is contained in:
parent
a14c771125
commit
72fcd4eb3c
@ -1901,6 +1901,7 @@ static int __qlt_24xx_handle_abts(struct scsi_qla_host *vha,
|
||||
mcmd->reset_count = ha->base_qpair->chip_reset;
|
||||
mcmd->tmr_func = QLA_TGT_ABTS;
|
||||
mcmd->qpair = ha->base_qpair;
|
||||
mcmd->vha = vha;
|
||||
|
||||
/*
|
||||
* LUN is looked up by target-core internally based on the passed
|
||||
@ -2003,7 +2004,7 @@ static void qlt_24xx_handle_abts(struct scsi_qla_host *vha,
|
||||
static void qlt_24xx_send_task_mgmt_ctio(struct qla_qpair *qpair,
|
||||
struct qla_tgt_mgmt_cmd *mcmd, uint32_t resp_code)
|
||||
{
|
||||
struct scsi_qla_host *ha = qpair->vha;
|
||||
struct scsi_qla_host *ha = mcmd->vha;
|
||||
struct atio_from_isp *atio = &mcmd->orig_iocb.atio;
|
||||
struct ctio7_to_24xx *ctio;
|
||||
uint16_t temp;
|
||||
@ -3464,6 +3465,9 @@ static int __qlt_send_term_exchange(struct qla_qpair *qpair,
|
||||
|
||||
ql_dbg(ql_dbg_tgt, vha, 0xe009, "Sending TERM EXCH CTIO (ha=%p)\n", ha);
|
||||
|
||||
if (cmd)
|
||||
vha = cmd->vha;
|
||||
|
||||
pkt = (request_t *)qla2x00_alloc_iocbs_ready(qpair, NULL);
|
||||
if (pkt == NULL) {
|
||||
ql_dbg(ql_dbg_tgt, vha, 0xe050,
|
||||
@ -4379,6 +4383,7 @@ static int qlt_issue_task_mgmt(struct fc_port *sess, u64 lun,
|
||||
mcmd->flags = flags;
|
||||
mcmd->reset_count = ha->base_qpair->chip_reset;
|
||||
mcmd->qpair = ha->base_qpair;
|
||||
mcmd->vha = vha;
|
||||
|
||||
switch (fn) {
|
||||
case QLA_TGT_LUN_RESET:
|
||||
|
@ -959,6 +959,7 @@ struct qla_tgt_mgmt_cmd {
|
||||
uint8_t fc_tm_rsp;
|
||||
struct fc_port *sess;
|
||||
struct qla_qpair *qpair;
|
||||
struct scsi_qla_host *vha;
|
||||
struct se_cmd se_cmd;
|
||||
struct work_struct free_work;
|
||||
unsigned int flags;
|
||||
|
Loading…
Reference in New Issue
Block a user