]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - drivers/usb/gadget/tcm_usb_gadget.c
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[~shefty/rdma-dev.git] / drivers / usb / gadget / tcm_usb_gadget.c
index eaa1005377fc58ff9304ced98db1169823d8d81d..97e68b38cfdf5ebab332f1ae0f670ed7b7edc56b 100644 (file)
@@ -1472,16 +1472,6 @@ static int usbg_queue_tm_rsp(struct se_cmd *se_cmd)
        return 0;
 }
 
        return 0;
 }
 
-static u16 usbg_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)
-{
-       return 0;
-}
-
-static u16 usbg_get_fabric_sense_len(void)
-{
-       return 0;
-}
-
 static const char *usbg_check_wwn(const char *name)
 {
        const char *n;
 static const char *usbg_check_wwn(const char *name)
 {
        const char *n;
@@ -1822,7 +1812,7 @@ static ssize_t tcm_usbg_tpg_store_nexus(
                ret = tcm_usbg_drop_nexus(tpg);
                return (!ret) ? count : ret;
        }
                ret = tcm_usbg_drop_nexus(tpg);
                return (!ret) ? count : ret;
        }
-       if (strlen(page) > USBG_NAMELEN) {
+       if (strlen(page) >= USBG_NAMELEN) {
                pr_err("Emulated NAA Sas Address: %s, exceeds"
                                " max: %d\n", page, USBG_NAMELEN);
                return -EINVAL;
                pr_err("Emulated NAA Sas Address: %s, exceeds"
                                " max: %d\n", page, USBG_NAMELEN);
                return -EINVAL;
@@ -1907,8 +1897,6 @@ static struct target_core_fabric_ops usbg_ops = {
        .queue_data_in                  = usbg_send_read_response,
        .queue_status                   = usbg_send_status_response,
        .queue_tm_rsp                   = usbg_queue_tm_rsp,
        .queue_data_in                  = usbg_send_read_response,
        .queue_status                   = usbg_send_status_response,
        .queue_tm_rsp                   = usbg_queue_tm_rsp,
-       .get_fabric_sense_len           = usbg_get_fabric_sense_len,
-       .set_fabric_sense_len           = usbg_set_fabric_sense_len,
        .check_stop_free                = usbg_check_stop_free,
 
        .fabric_make_wwn                = usbg_make_tport,
        .check_stop_free                = usbg_check_stop_free,
 
        .fabric_make_wwn                = usbg_make_tport,
@@ -1968,7 +1956,6 @@ static void usbg_deregister_configfs(void)
 static struct usb_interface_descriptor bot_intf_desc = {
        .bLength =              sizeof(bot_intf_desc),
        .bDescriptorType =      USB_DT_INTERFACE,
 static struct usb_interface_descriptor bot_intf_desc = {
        .bLength =              sizeof(bot_intf_desc),
        .bDescriptorType =      USB_DT_INTERFACE,
-       .bAlternateSetting =    0,
        .bNumEndpoints =        2,
        .bAlternateSetting =    USB_G_ALT_INT_BBB,
        .bInterfaceClass =      USB_CLASS_MASS_STORAGE,
        .bNumEndpoints =        2,
        .bAlternateSetting =    USB_G_ALT_INT_BBB,
        .bInterfaceClass =      USB_CLASS_MASS_STORAGE,