diff options
author | Varun Prakash <varun@chelsio.com> | 2016-04-19 14:30:13 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-05-10 02:12:08 -0400 |
commit | 8567270d8de6192eb2632b45421b1fde9bcda2f2 (patch) | |
tree | 84db3d3884911087df816395957f2a209a3ca851 | |
parent | 42bc3e57877f2357ccbbc3ad6e6c7d9be44579f9 (diff) |
iscsi-target: add void (*iscsit_get_r2t_ttt)()
Add void (*iscsit_get_r2t_ttt)() to
struct iscsit_transport, iscsi-target
uses this callback to get
r2t->targ_xfer_tag.
cxgbit.ko needs this callback
for Direct Data Placement of Data Out
pdus, adapter uses ttt in Data Out pdus
for placing data directly in to the host
buffers.
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 5 | ||||
-rw-r--r-- | include/target/iscsi/iscsi_transport.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index a827b7afe42c..a28eb87d6efc 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
@@ -3039,7 +3039,10 @@ static int iscsit_send_r2t( | |||
3039 | int_to_scsilun(cmd->se_cmd.orig_fe_lun, | 3039 | int_to_scsilun(cmd->se_cmd.orig_fe_lun, |
3040 | (struct scsi_lun *)&hdr->lun); | 3040 | (struct scsi_lun *)&hdr->lun); |
3041 | hdr->itt = cmd->init_task_tag; | 3041 | hdr->itt = cmd->init_task_tag; |
3042 | r2t->targ_xfer_tag = session_get_next_ttt(conn->sess); | 3042 | if (conn->conn_transport->iscsit_get_r2t_ttt) |
3043 | conn->conn_transport->iscsit_get_r2t_ttt(conn, cmd, r2t); | ||
3044 | else | ||
3045 | r2t->targ_xfer_tag = session_get_next_ttt(conn->sess); | ||
3043 | hdr->ttt = cpu_to_be32(r2t->targ_xfer_tag); | 3046 | hdr->ttt = cpu_to_be32(r2t->targ_xfer_tag); |
3044 | hdr->statsn = cpu_to_be32(conn->stat_sn); | 3047 | hdr->statsn = cpu_to_be32(conn->stat_sn); |
3045 | hdr->exp_cmdsn = cpu_to_be32(conn->sess->exp_cmd_sn); | 3048 | hdr->exp_cmdsn = cpu_to_be32(conn->sess->exp_cmd_sn); |
diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index 46aa219be1ae..32704b214be5 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h | |||
@@ -27,6 +27,8 @@ struct iscsit_transport { | |||
27 | void (*iscsit_release_cmd)(struct iscsi_conn *, struct iscsi_cmd *); | 27 | void (*iscsit_release_cmd)(struct iscsi_conn *, struct iscsi_cmd *); |
28 | void (*iscsit_get_rx_pdu)(struct iscsi_conn *); | 28 | void (*iscsit_get_rx_pdu)(struct iscsi_conn *); |
29 | int (*iscsit_validate_params)(struct iscsi_conn *); | 29 | int (*iscsit_validate_params)(struct iscsi_conn *); |
30 | void (*iscsit_get_r2t_ttt)(struct iscsi_conn *, struct iscsi_cmd *, | ||
31 | struct iscsi_r2t *); | ||
30 | enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); | 32 | enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); |
31 | }; | 33 | }; |
32 | 34 | ||