aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/loopback
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/target/loopback
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/target/loopback')
-rw-r--r--drivers/target/loopback/tcm_loop.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
index 4ab1d0b43a85..7a0da1ae0040 100644
--- a/drivers/target/loopback/tcm_loop.c
+++ b/drivers/target/loopback/tcm_loop.c
@@ -846,11 +846,6 @@ static int tcm_loop_queue_tm_rsp(struct se_cmd *se_cmd)
846 return 0; 846 return 0;
847} 847}
848 848
849static u16 tcm_loop_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)
850{
851 return 0;
852}
853
854static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba) 849static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba)
855{ 850{
856 switch (tl_hba->tl_proto_id) { 851 switch (tl_hba->tl_proto_id) {
@@ -1368,7 +1363,6 @@ static int tcm_loop_register_configfs(void)
1368 fabric->tf_ops.queue_data_in = &tcm_loop_queue_data_in; 1363 fabric->tf_ops.queue_data_in = &tcm_loop_queue_data_in;
1369 fabric->tf_ops.queue_status = &tcm_loop_queue_status; 1364 fabric->tf_ops.queue_status = &tcm_loop_queue_status;
1370 fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp; 1365 fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp;
1371 fabric->tf_ops.set_fabric_sense_len = &tcm_loop_set_fabric_sense_len;
1372 1366
1373 /* 1367 /*
1374 * Setup function pointers for generic logic in target_core_fabric_configfs.c 1368 * Setup function pointers for generic logic in target_core_fabric_configfs.c