aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
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/usb/gadget
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/usb/gadget')
-rw-r--r--drivers/usb/gadget/tcm_usb_gadget.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c
index b7ac43b08851..575c82437e4a 100644
--- a/drivers/usb/gadget/tcm_usb_gadget.c
+++ b/drivers/usb/gadget/tcm_usb_gadget.c
@@ -1475,11 +1475,6 @@ static int usbg_queue_tm_rsp(struct se_cmd *se_cmd)
1475 return 0; 1475 return 0;
1476} 1476}
1477 1477
1478static u16 usbg_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)
1479{
1480 return 0;
1481}
1482
1483static const char *usbg_check_wwn(const char *name) 1478static const char *usbg_check_wwn(const char *name)
1484{ 1479{
1485 const char *n; 1480 const char *n;
@@ -1905,7 +1900,6 @@ static struct target_core_fabric_ops usbg_ops = {
1905 .queue_data_in = usbg_send_read_response, 1900 .queue_data_in = usbg_send_read_response,
1906 .queue_status = usbg_send_status_response, 1901 .queue_status = usbg_send_status_response,
1907 .queue_tm_rsp = usbg_queue_tm_rsp, 1902 .queue_tm_rsp = usbg_queue_tm_rsp,
1908 .set_fabric_sense_len = usbg_set_fabric_sense_len,
1909 .check_stop_free = usbg_check_stop_free, 1903 .check_stop_free = usbg_check_stop_free,
1910 1904
1911 .fabric_make_wwn = usbg_make_tport, 1905 .fabric_make_wwn = usbg_make_tport,