mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
f_fs: Return correct USB endpoint descriptor to user space daemon
Some of user space daemon like ADB queries endpoint descriptor using ioctl to know wMaxPacketSize value. Based on wMaxPacketSize value it queues additional buffer to read zero length packet if expected read buffer size is multiple of wMaxPacketSize. Currently driver is missing handling for super speed plus case which results into sending full speed related USB endpoint descriptor (i.e. wMaxPacketSize 64 bytes). Hence when adbd is expecting 64 bytes packet from host, it queues one more additional buffer. This results into mismatch of ADB command and response when multiple ADB commands are used and causing different ADB related stability issues. Fix this issue adding super speed plus check with FUNCTIONFS_ENDPOINT_DESC ioctl command. Change-Id: I9416295c07c2d98f9d32df43d7e506f975da15a2 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
parent
e501d1acc0
commit
4abb83b709
1 changed files with 1 additions and 0 deletions
|
|
@ -1457,6 +1457,7 @@ static long ffs_epfile_ioctl(struct file *file, unsigned code,
|
|||
struct usb_endpoint_descriptor desc1, *desc;
|
||||
|
||||
switch (epfile->ffs->gadget->speed) {
|
||||
case USB_SPEED_SUPER_PLUS:
|
||||
case USB_SPEED_SUPER:
|
||||
desc_idx = 2;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue