mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
usb: gadget: file_storage: remove its last pieces
This patch removes the last pieces of the file_storage gadget hidden in storage_common behind __maybe_unused bars. The CBI bits have no user on the gadget side. Only file_storage implemented the obsolete protocol. The additional USB3.0 descriptors were served by file_storage, the other gadgets are using composite for this. Acked-by: Michal Nazarewicz <mpn@google.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
9931faca02
commit
d3eeee6846
@ -93,18 +93,6 @@
|
|||||||
|
|
||||||
/*-------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/* CBI Interrupt data structure */
|
|
||||||
struct interrupt_data {
|
|
||||||
u8 bType;
|
|
||||||
u8 bValue;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CBI_INTERRUPT_DATA_LEN 2
|
|
||||||
|
|
||||||
/* CBI Accept Device-Specific Command request */
|
|
||||||
#define USB_CBI_ADSC_REQUEST 0x00
|
|
||||||
|
|
||||||
|
|
||||||
/* Length of a SCSI Command Data Block */
|
/* Length of a SCSI Command Data Block */
|
||||||
#define MAX_COMMAND_SIZE 16
|
#define MAX_COMMAND_SIZE 16
|
||||||
|
|
||||||
@ -385,41 +373,6 @@ static struct usb_ss_ep_comp_descriptor fsg_ss_bulk_out_comp_desc = {
|
|||||||
/*.bMaxBurst = DYNAMIC, */
|
/*.bMaxBurst = DYNAMIC, */
|
||||||
};
|
};
|
||||||
|
|
||||||
static __maybe_unused struct usb_ext_cap_descriptor fsg_ext_cap_desc = {
|
|
||||||
.bLength = USB_DT_USB_EXT_CAP_SIZE,
|
|
||||||
.bDescriptorType = USB_DT_DEVICE_CAPABILITY,
|
|
||||||
.bDevCapabilityType = USB_CAP_TYPE_EXT,
|
|
||||||
|
|
||||||
.bmAttributes = cpu_to_le32(USB_LPM_SUPPORT),
|
|
||||||
};
|
|
||||||
|
|
||||||
static __maybe_unused struct usb_ss_cap_descriptor fsg_ss_cap_desc = {
|
|
||||||
.bLength = USB_DT_USB_SS_CAP_SIZE,
|
|
||||||
.bDescriptorType = USB_DT_DEVICE_CAPABILITY,
|
|
||||||
.bDevCapabilityType = USB_SS_CAP_TYPE,
|
|
||||||
|
|
||||||
/* .bmAttributes = LTM is not supported yet */
|
|
||||||
|
|
||||||
.wSpeedSupported = cpu_to_le16(USB_LOW_SPEED_OPERATION
|
|
||||||
| USB_FULL_SPEED_OPERATION
|
|
||||||
| USB_HIGH_SPEED_OPERATION
|
|
||||||
| USB_5GBPS_OPERATION),
|
|
||||||
.bFunctionalitySupport = USB_LOW_SPEED_OPERATION,
|
|
||||||
.bU1devExitLat = USB_DEFAULT_U1_DEV_EXIT_LAT,
|
|
||||||
.bU2DevExitLat = cpu_to_le16(USB_DEFAULT_U2_DEV_EXIT_LAT),
|
|
||||||
};
|
|
||||||
|
|
||||||
static __maybe_unused struct usb_bos_descriptor fsg_bos_desc = {
|
|
||||||
.bLength = USB_DT_BOS_SIZE,
|
|
||||||
.bDescriptorType = USB_DT_BOS,
|
|
||||||
|
|
||||||
.wTotalLength = cpu_to_le16(USB_DT_BOS_SIZE
|
|
||||||
+ USB_DT_USB_EXT_CAP_SIZE
|
|
||||||
+ USB_DT_USB_SS_CAP_SIZE),
|
|
||||||
|
|
||||||
.bNumDeviceCaps = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct usb_descriptor_header *fsg_ss_function[] = {
|
static struct usb_descriptor_header *fsg_ss_function[] = {
|
||||||
(struct usb_descriptor_header *) &fsg_intf_desc,
|
(struct usb_descriptor_header *) &fsg_intf_desc,
|
||||||
(struct usb_descriptor_header *) &fsg_ss_bulk_in_desc,
|
(struct usb_descriptor_header *) &fsg_ss_bulk_in_desc,
|
||||||
@ -429,20 +382,6 @@ static struct usb_descriptor_header *fsg_ss_function[] = {
|
|||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Maxpacket and other transfer characteristics vary by speed. */
|
|
||||||
static __maybe_unused struct usb_endpoint_descriptor *
|
|
||||||
fsg_ep_desc(struct usb_gadget *g, struct usb_endpoint_descriptor *fs,
|
|
||||||
struct usb_endpoint_descriptor *hs,
|
|
||||||
struct usb_endpoint_descriptor *ss)
|
|
||||||
{
|
|
||||||
if (gadget_is_superspeed(g) && g->speed == USB_SPEED_SUPER)
|
|
||||||
return ss;
|
|
||||||
else if (gadget_is_dualspeed(g) && g->speed == USB_SPEED_HIGH)
|
|
||||||
return hs;
|
|
||||||
return fs;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Static strings, in UTF-8 (for simplicity we use only ASCII characters) */
|
/* Static strings, in UTF-8 (for simplicity we use only ASCII characters) */
|
||||||
static struct usb_string fsg_strings[] = {
|
static struct usb_string fsg_strings[] = {
|
||||||
{FSG_STRING_INTERFACE, fsg_string_interface},
|
{FSG_STRING_INTERFACE, fsg_string_interface},
|
||||||
|
Loading…
Reference in New Issue
Block a user