Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c99701d authored by Mayank Rana's avatar Mayank Rana
Browse files

f_gsi: Add USB full speed descriptors for DPL interface



Currently USB GSI function driver is passing USB high speed related
descriptors as full speed descriptors with USB DPL interface. This
results into USB composite device enumerating with yellow bang when
USB DPL interface is part of it when enumerated USB speed is full
speed. Fix this issue by adding USB full speed descriptors for USB
DPL interface and using same.

Change-Id: I2163020918c5de3210381d4196a3a655ff0cc537
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent d14a930f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2618,10 +2618,10 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f)
		info.string_defs = qdss_gsi_string_defs;
		info.data_desc = &qdss_gsi_data_intf_desc;
		info.data_str_idx = 0;
		info.fs_in_desc = &qdss_gsi_hs_data_desc;
		info.fs_in_desc = &qdss_gsi_fs_data_desc;
		info.hs_in_desc = &qdss_gsi_hs_data_desc;
		info.ss_in_desc = &qdss_gsi_ss_data_desc;
		info.fs_desc_hdr = qdss_gsi_hs_data_only_desc;
		info.fs_desc_hdr = qdss_gsi_fs_data_only_desc;
		info.hs_desc_hdr = qdss_gsi_hs_data_only_desc;
		info.ss_desc_hdr = qdss_gsi_ss_data_only_desc;
		info.in_epname = "gsi-epin";
+14 −0
Original line number Diff line number Diff line
@@ -1340,6 +1340,14 @@ static struct usb_interface_descriptor qdss_gsi_data_intf_desc = {
	.bInterfaceProtocol =	0xff,
};

static struct usb_endpoint_descriptor qdss_gsi_fs_data_desc = {
	.bLength              =	 USB_DT_ENDPOINT_SIZE,
	.bDescriptorType      =	 USB_DT_ENDPOINT,
	.bEndpointAddress     =	 USB_DIR_IN,
	.bmAttributes         =	 USB_ENDPOINT_XFER_BULK,
	.wMaxPacketSize       =	 cpu_to_le16(64),
};

static struct usb_endpoint_descriptor qdss_gsi_hs_data_desc = {
	.bLength              =	 USB_DT_ENDPOINT_SIZE,
	.bDescriptorType      =	 USB_DT_ENDPOINT,
@@ -1364,6 +1372,12 @@ static struct usb_ss_ep_comp_descriptor qdss_gsi_data_ep_comp_desc = {
	.wBytesPerInterval    =	 0,
};

static struct usb_descriptor_header *qdss_gsi_fs_data_only_desc[] = {
	(struct usb_descriptor_header *) &qdss_gsi_data_intf_desc,
	(struct usb_descriptor_header *) &qdss_gsi_fs_data_desc,
	NULL,
};

static struct usb_descriptor_header *qdss_gsi_hs_data_only_desc[] = {
	(struct usb_descriptor_header *) &qdss_gsi_data_intf_desc,
	(struct usb_descriptor_header *) &qdss_gsi_hs_data_desc,