diff options
author | Roland Dreier <roland@purestorage.com> | 2012-08-15 17:35:25 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-09-17 20:12:58 -0400 |
commit | 9c58b7ddd70dd7bfaac4ca87131f36d10aaba441 (patch) | |
tree | 2796f11c283904cef9b38f543e31fed3fea565c7 /drivers/scsi | |
parent | 2ed772b7b9df0f459308b3cbececc0136076d09e (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/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 556afd5da9ff..2358c16c4c8e 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c | |||
@@ -735,12 +735,6 @@ static int tcm_qla2xxx_queue_tm_rsp(struct se_cmd *se_cmd) | |||
735 | return 0; | 735 | return 0; |
736 | } | 736 | } |
737 | 737 | ||
738 | static u16 tcm_qla2xxx_set_fabric_sense_len(struct se_cmd *se_cmd, | ||
739 | u32 sense_length) | ||
740 | { | ||
741 | return 0; | ||
742 | } | ||
743 | |||
744 | /* Local pointer to allocated TCM configfs fabric module */ | 738 | /* Local pointer to allocated TCM configfs fabric module */ |
745 | struct target_fabric_configfs *tcm_qla2xxx_fabric_configfs; | 739 | struct target_fabric_configfs *tcm_qla2xxx_fabric_configfs; |
746 | struct target_fabric_configfs *tcm_qla2xxx_npiv_fabric_configfs; | 740 | struct target_fabric_configfs *tcm_qla2xxx_npiv_fabric_configfs; |
@@ -1686,7 +1680,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_ops = { | |||
1686 | .queue_data_in = tcm_qla2xxx_queue_data_in, | 1680 | .queue_data_in = tcm_qla2xxx_queue_data_in, |
1687 | .queue_status = tcm_qla2xxx_queue_status, | 1681 | .queue_status = tcm_qla2xxx_queue_status, |
1688 | .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, | 1682 | .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, |
1689 | .set_fabric_sense_len = tcm_qla2xxx_set_fabric_sense_len, | ||
1690 | /* | 1683 | /* |
1691 | * Setup function pointers for generic logic in | 1684 | * Setup function pointers for generic logic in |
1692 | * target_core_fabric_configfs.c | 1685 | * target_core_fabric_configfs.c |
@@ -1734,7 +1727,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = { | |||
1734 | .queue_data_in = tcm_qla2xxx_queue_data_in, | 1727 | .queue_data_in = tcm_qla2xxx_queue_data_in, |
1735 | .queue_status = tcm_qla2xxx_queue_status, | 1728 | .queue_status = tcm_qla2xxx_queue_status, |
1736 | .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, | 1729 | .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, |
1737 | .set_fabric_sense_len = tcm_qla2xxx_set_fabric_sense_len, | ||
1738 | /* | 1730 | /* |
1739 | * Setup function pointers for generic logic in | 1731 | * Setup function pointers for generic logic in |
1740 | * target_core_fabric_configfs.c | 1732 | * target_core_fabric_configfs.c |