aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-08-15 17:35:25 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-09-17 20:12:58 -0400
commit9c58b7ddd70dd7bfaac4ca87131f36d10aaba441 (patch)
tree2796f11c283904cef9b38f543e31fed3fea565c7 /drivers/infiniband/ulp
parent2ed772b7b9df0f459308b3cbececc0136076d09e (diff)
target: Simplify fabric sense data length handling
Every fabric driver has to supply a se_tfo->set_fabric_sense_len() method, just so iSCSI can return an offset of 2. However, every fabric driver is already allocating a sense buffer and passing it into the target core, either via transport_init_se_cmd() or target_submit_cmd(). So instead of having iSCSI pass the start of its sense buffer into the core and then later tell the core to skip the first 2 bytes, it seems easier for iSCSI just to do the offset of 2 when it passes the sense buffer into the core. Then we can drop the se_tfo->set_fabric_sense_len() everywhere, and just add a couple of lines of code to iSCSI to set the sense data length to the beginning of the buffer right before it sends it over the network. (nab: Remove .set_fabric_sense_len usage from tcm_qla2xxx_npiv_ops + change transport_get_sense_buffer to follow v3.6-rc6 code w/o ->set_fabric_sense_len usage) Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 9e949750be3a..cf23c46185b2 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -3564,11 +3564,6 @@ static int srpt_get_tcm_cmd_state(struct se_cmd *se_cmd)
3564 return srpt_get_cmd_state(ioctx); 3564 return srpt_get_cmd_state(ioctx);
3565} 3565}
3566 3566
3567static u16 srpt_set_fabric_sense_len(struct se_cmd *cmd, u32 sense_length)
3568{
3569 return 0;
3570}
3571
3572/** 3567/**
3573 * srpt_parse_i_port_id() - Parse an initiator port ID. 3568 * srpt_parse_i_port_id() - Parse an initiator port ID.
3574 * @name: ASCII representation of a 128-bit initiator port ID. 3569 * @name: ASCII representation of a 128-bit initiator port ID.
@@ -3948,7 +3943,6 @@ static struct target_core_fabric_ops srpt_template = {
3948 .queue_data_in = srpt_queue_response, 3943 .queue_data_in = srpt_queue_response,
3949 .queue_status = srpt_queue_status, 3944 .queue_status = srpt_queue_status,
3950 .queue_tm_rsp = srpt_queue_response, 3945 .queue_tm_rsp = srpt_queue_response,
3951 .set_fabric_sense_len = srpt_set_fabric_sense_len,
3952 /* 3946 /*
3953 * Setup function pointers for generic logic in 3947 * Setup function pointers for generic logic in
3954 * target_core_fabric_configfs.c 3948 * target_core_fabric_configfs.c