From dd2f349de484782a9e7bfcf95396ff4ca3dc332c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 24 Apr 2019 01:45:46 +0000 Subject: [PATCH] qla2x00t-32gbit, target: Do not submit the NEXUS LOSS task management function when freeing a session Submitting the NEXUS LOSS task management function is not required when freeing an SCST session. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8276 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c | 26 ------------------- qla2x00t-32gbit/qla_target.h | 1 - 2 files changed, 27 deletions(-) diff --git a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c index fa6f1bc46..5bb75e321 100644 --- a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c +++ b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c @@ -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); diff --git a/qla2x00t-32gbit/qla_target.h b/qla2x00t-32gbit/qla_target.h index 7f168dcf4..5dfe6072a 100644 --- a/qla2x00t-32gbit/qla_target.h +++ b/qla2x00t-32gbit/qla_target.h @@ -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;