diff options
author | Roland Dreier <roland@purestorage.com> | 2012-08-15 23:35:25 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-09-18 02:12:58 +0200 |
commit | 9c58b7ddd70dd7bfaac4ca87131f36d10aaba441 (patch) | |
tree | 2796f11c283904cef9b38f543e31fed3fea565c7 /drivers/target/tcm_fc | |
parent | target: Remove unused target_core_fabric_ops.get_fabric_sense_len method (diff) | |
download | linux-9c58b7ddd70dd7bfaac4ca87131f36d10aaba441.tar.xz linux-9c58b7ddd70dd7bfaac4ca87131f36d10aaba441.zip |
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/tcm_fc')
-rw-r--r-- | drivers/target/tcm_fc/tfc_conf.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c index 4f97701350a8..b74feb0d5133 100644 --- a/drivers/target/tcm_fc/tfc_conf.c +++ b/drivers/target/tcm_fc/tfc_conf.c @@ -495,11 +495,6 @@ static void ft_set_default_node_attr(struct se_node_acl *se_nacl) { } -static u16 ft_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_len) -{ - return 0; -} - static u32 ft_tpg_get_inst_index(struct se_portal_group *se_tpg) { struct ft_tpg *tpg = se_tpg->se_tpg_fabric_ptr; @@ -537,7 +532,6 @@ static struct target_core_fabric_ops ft_fabric_ops = { .queue_data_in = ft_queue_data_in, .queue_status = ft_queue_status, .queue_tm_rsp = ft_queue_tm_resp, - .set_fabric_sense_len = ft_set_fabric_sense_len, /* * Setup function pointers for generic logic in * target_core_fabric_configfs.c |