Merge branch 'svn-trunk'

This commit is contained in:
Bart Van Assche
2019-04-23 18:46:05 -07:00
3 changed files with 10 additions and 41 deletions

View File

@@ -711,7 +711,6 @@ static void sqa_qla2xxx_free_session(struct fc_port *fcport)
struct scsi_qla_host *vha = fcport->vha;
struct se_session *se_sess = fcport->se_sess;
struct scst_session *scst_sess = se_sess->fabric_sess_ptr;
struct qla_tgt_mgmt_cmd *mcmd;
TRACE_ENTRY();
@@ -719,26 +718,6 @@ static void sqa_qla2xxx_free_session(struct fc_port *fcport)
vha->host_no, vha->vp_idx, wwn_to_str(fcport->port_name),
fcport->d_id.b.domain, fcport->d_id.b.area, fcport->d_id.b.al_pa);
mcmd = kzalloc(sizeof(*mcmd), GFP_ATOMIC);
if (mcmd) {
DECLARE_COMPLETION_ONSTACK(c);
struct scsi_lun sl;
memset(&sl, 0, sizeof(sl));
mcmd->sess = fcport;
mcmd->reset_count = vha->hw->base_qpair->chip_reset;
mcmd->completion = &c;
scst_rx_mgmt_fn_lun(scst_sess, SCST_NEXUS_LOSS_SESS,
&sl, sizeof(sl), SCST_ATOMIC, mcmd);
wait_for_completion(&c);
kfree(mcmd);
TRACE_MGMT_DBG("sqatgt(%ld/%d): Flush cmd done %s\n",
vha->host_no, vha->vp_idx,
wwn_to_str(fcport->port_name));
}
{
DECLARE_COMPLETION_ONSTACK(c);
@@ -1743,11 +1722,6 @@ static void sqa_task_mgmt_fn_done(struct scst_mgmt_cmd *scst_mcmd)
vha->host_no, vha->vp_idx, scst_mcmd,
scst_mcmd->status, scst_mcmd->state);
if (mcmd->completion) {
complete(mcmd->completion);
goto out;
}
mcmd->fc_tm_rsp = sqa_convert_to_fc_tm_status(scst_mgmt_cmd_get_status(scst_mcmd));
qlt_xmit_tm_rsp(mcmd);

View File

@@ -1731,12 +1731,11 @@ qla24xx_abort_sp_done(void *ptr, int res)
srb_t *sp = ptr;
struct srb_iocb *abt = &sp->u.iocb_cmd;
if (del_timer(&sp->u.iocb_cmd.timer)) {
if (sp->flags & SRB_WAKEUP_ON_COMP)
complete(&abt->u.abt.comp);
else
sp->free(sp);
}
del_timer(&sp->u.iocb_cmd.timer);
if (sp->flags & SRB_WAKEUP_ON_COMP)
complete(&abt->u.abt.comp);
else
sp->free(sp);
}
int
@@ -1750,7 +1749,7 @@ qla24xx_async_abort_cmd(srb_t *cmd_sp, bool wait)
sp = qla2xxx_get_qpair_sp(cmd_sp->vha, cmd_sp->qpair, cmd_sp->fcport,
GFP_ATOMIC);
if (!sp)
goto done;
return rval;
abt_iocb = &sp->u.iocb_cmd;
sp->type = SRB_ABT_CMD;
@@ -1774,20 +1773,17 @@ qla24xx_async_abort_cmd(srb_t *cmd_sp, bool wait)
cmd_sp->handle, cmd_sp->type);
rval = qla2x00_start_sp(sp);
if (rval != QLA_SUCCESS)
goto done_free_sp;
if (rval != QLA_SUCCESS) {
sp->free(sp);
return rval;
}
if (wait) {
wait_for_completion(&abt_iocb->u.abt.comp);
rval = abt_iocb->u.abt.comp_status == CS_COMPLETE ?
QLA_SUCCESS : QLA_FUNCTION_FAILED;
} else {
goto done;
}
done_free_sp:
sp->free(sp);
done:
return rval;
}

View File

@@ -1015,7 +1015,6 @@ struct qla_tgt_mgmt_cmd {
uint32_t reset_count;
struct work_struct work;
uint64_t unpacked_lun;
struct completion *completion;
union {
struct atio_from_isp atio;
struct imm_ntfy_from_isp imm_ntfy;