mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 18:51:27 +00:00
qla2x00t-32gbit, target: Stop using se_sess->sess_tearing_down
Since se_sess->sess_tearing_down is not available in older kernel versions, avoid using it. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8144 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -826,7 +826,8 @@ static void sqa_free_session_done(struct scst_session *scst_sess)
|
||||
struct fc_port *fcport =
|
||||
(struct fc_port*)scst_sess_get_tgt_priv(scst_sess);
|
||||
|
||||
fcport->se_sess->sess_tearing_down = 0;
|
||||
if (fcport->unreg_done)
|
||||
complete(fcport->unreg_done);
|
||||
}
|
||||
|
||||
static void sqa_qla2xxx_free_session(struct fc_port *fcport)
|
||||
@@ -836,7 +837,6 @@ static void sqa_qla2xxx_free_session(struct fc_port *fcport)
|
||||
struct scst_session *scst_sess =
|
||||
(struct scst_session *)se_sess->fabric_sess_ptr;
|
||||
struct qla_tgt_mgmt_cmd *mcmd;
|
||||
bool traced = false;
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
@@ -844,9 +844,6 @@ static void sqa_qla2xxx_free_session(struct fc_port *fcport)
|
||||
vha->host_no, vha->vp_idx, fcport->port_name,
|
||||
fcport->d_id.b.domain, fcport->d_id.b.area, fcport->d_id.b.al_pa);
|
||||
|
||||
/* look for sqa_free_session_done to clear this flag. */
|
||||
se_sess->sess_tearing_down = 1;
|
||||
|
||||
mcmd = kzalloc(sizeof(*mcmd), GFP_ATOMIC);
|
||||
if (mcmd) {
|
||||
DECLARE_COMPLETION_ONSTACK(c);
|
||||
@@ -868,14 +865,10 @@ static void sqa_qla2xxx_free_session(struct fc_port *fcport)
|
||||
|
||||
scst_unregister_session(scst_sess, 1, sqa_free_session_done);
|
||||
|
||||
while (se_sess->sess_tearing_down) {
|
||||
if (!traced) {
|
||||
TRACE_MGMT_DBG("sqatgt(%ld/%d): waiting for scst_sess "
|
||||
"unregistration %8phC\n", vha->host_no, vha->vp_idx,
|
||||
fcport->port_name);
|
||||
traced = true;
|
||||
}
|
||||
msleep(100);
|
||||
{
|
||||
DECLARE_COMPLETION_ONSTACK(c);
|
||||
fcport->unreg_done = &c;
|
||||
wait_for_completion(&c);
|
||||
}
|
||||
|
||||
TRACE_MGMT_DBG("sqatgt(%ld/%d): Unregister completed %8phC done \n",
|
||||
|
||||
@@ -2398,6 +2398,7 @@ typedef struct fc_port {
|
||||
struct work_struct reg_work;
|
||||
uint64_t jiffies_at_registration;
|
||||
struct qlt_plogi_ack_t *plogi_link[QLT_PLOGI_LINK_MAX];
|
||||
struct completion *unreg_done;
|
||||
|
||||
uint16_t tgt_id;
|
||||
uint16_t old_tgt_id;
|
||||
|
||||
Reference in New Issue
Block a user