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

Commit d7d18b2a authored by Chandana Kishori Chiluveru's avatar Chandana Kishori Chiluveru
Browse files

usb: f_gsi: Increase GPS EP maxpacket size to 64bytes



Currently usb driver is using 8 bytes request on interrupt endpoint
for all CDC functions. GPS host driver is expecting short packet/zero
length packet on interrupt endpoint and failing the transfer with 8 bytes
maxpacket. Increase the maxpacket size to 64 bytes so that host ends
the transfer with a short packet.

Change-Id: Icc9919fbd633468d3cc7d4d8ab1945730cdc7c06
Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
parent fa70a0f5
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -343,6 +343,7 @@ static enum usb_prot_id name_to_prot_id(const char *name)

#define LOG2_STATUS_INTERVAL_MSEC 5
#define MAX_NOTIFY_SIZE sizeof(struct usb_cdc_notification)
#define GPS_MAX_NOTIFY_SIZE 64

/* rmnet device descriptors */

@@ -1451,7 +1452,7 @@ static struct usb_endpoint_descriptor gps_fs_notify_desc = {
	.bDescriptorType =	USB_DT_ENDPOINT,
	.bEndpointAddress =	USB_DIR_IN,
	.bmAttributes =		USB_ENDPOINT_XFER_INT,
	.wMaxPacketSize =	cpu_to_le16(MAX_NOTIFY_SIZE),
	.wMaxPacketSize =	cpu_to_le16(GPS_MAX_NOTIFY_SIZE),
	.bInterval =		1 << LOG2_STATUS_INTERVAL_MSEC,
};

@@ -1467,7 +1468,7 @@ static struct usb_endpoint_descriptor gps_hs_notify_desc = {
	.bDescriptorType =	USB_DT_ENDPOINT,
	.bEndpointAddress =	USB_DIR_IN,
	.bmAttributes =		USB_ENDPOINT_XFER_INT,
	.wMaxPacketSize =	cpu_to_le16(MAX_NOTIFY_SIZE),
	.wMaxPacketSize =	cpu_to_le16(GPS_MAX_NOTIFY_SIZE),
	.bInterval =		LOG2_STATUS_INTERVAL_MSEC + 4,
};

@@ -1483,7 +1484,7 @@ static struct usb_endpoint_descriptor gps_ss_notify_desc = {
	.bDescriptorType =	USB_DT_ENDPOINT,
	.bEndpointAddress =	USB_DIR_IN,
	.bmAttributes =		USB_ENDPOINT_XFER_INT,
	.wMaxPacketSize =	cpu_to_le16(MAX_NOTIFY_SIZE),
	.wMaxPacketSize =	cpu_to_le16(GPS_MAX_NOTIFY_SIZE),
	.bInterval =		LOG2_STATUS_INTERVAL_MSEC + 4,
};

@@ -1494,7 +1495,7 @@ static struct usb_ss_ep_comp_descriptor gps_ss_notify_comp_desc = {
	/* the following 3 values can be tweaked if necessary */
	/* .bMaxBurst =		0, */
	/* .bmAttributes =	0, */
	.wBytesPerInterval =	cpu_to_le16(MAX_NOTIFY_SIZE),
	.wBytesPerInterval =	cpu_to_le16(GPS_MAX_NOTIFY_SIZE),
};

static struct usb_descriptor_header *gps_ss_function[] = {