mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 13:46:25 +00:00
qla2x00t-32gbit, target: Avoid using the protocol_data member
Avoid using this structure member since it is not available in kernel
versions before v4.2. See also commit 7a971b1b3055 ("target: replace
se_cmd->execute_rw with a protocol_data field") # v4.2.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8099 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -436,8 +436,9 @@ static inline void qla_tgt_set_cmd_prot_op(struct qla_tgt_cmd *cmd, uint8_t xmit
|
||||
|
||||
static void sqa_qla2xxx_rel_cmd(struct qla_tgt_cmd *cmd)
|
||||
{
|
||||
struct sqa_scst_tgt *sqa_tgt =
|
||||
(struct sqa_scst_tgt *)cmd->se_cmd.protocol_data;
|
||||
struct fc_port *sess = cmd->sess;
|
||||
struct sqa_scst_tgt *sqa_tgt = sess->vha->vha_tgt.target_lport_ptr;
|
||||
|
||||
percpu_ida_free(&sqa_tgt->tgt_tag_pool, cmd->se_cmd.map_tag);
|
||||
}
|
||||
|
||||
@@ -455,8 +456,6 @@ static struct qla_tgt_cmd *sqa_qla2xxx_get_cmd(struct fc_port *sess)
|
||||
cmd = &((struct qla_tgt_cmd *)sqa_tgt->tgt_cmd_map)[tag];
|
||||
memset(cmd, 0, sizeof(struct qla_tgt_cmd));
|
||||
cmd->se_cmd.map_tag = tag;
|
||||
/* BORROWing this field to carry sqa_tgt */
|
||||
cmd->se_cmd.protocol_data = (void*)sqa_tgt;
|
||||
cmd->sess = sess;
|
||||
cmd->vha = sess->vha;
|
||||
cmd->rel_cmd = sqa_qla2xxx_rel_cmd;
|
||||
|
||||
Reference in New Issue
Block a user