android_kernel_motorola_sm6375/drivers/usb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alan Stern 3fcaac70d2 USB: Fix: Don't skip endpoint descriptors with maxpacket=0
commit 2548288b4fb059b2da9ceada172ef763077e8a59 upstream.

It turns out that even though endpoints with a maxpacket length of 0
aren't useful for data transfer, the descriptors do serve other
purposes.  In particular, skipping them will also skip over other
class-specific descriptors for classes such as UVC.  This unexpected
side effect has caused some UVC cameras to stop working.

In addition, the USB spec requires that when isochronous endpoint
descriptors are present in an interface's altsetting 0 (which is true
on some devices), the maxpacket size _must_ be set to 0.  Warning
about such things seems like a bad idea.

This patch updates an earlier commit which would log a warning and
skip these endpoint descriptors.  Now we only log a warning, and we
don't even do that for isochronous endpoints in altsetting 0.

We don't need to worry about preventing endpoints with maxpacket = 0
from ever being used for data transfers; usb_submit_urb() already
checks for this.

Reported-and-tested-by: Roger Whittaker <Roger.Whittaker@suse.com>
Fixes: d482c7bb05 ("USB: Skip endpoints with 0 maxpacket length")
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://marc.info/?l=linux-usb&m=157790377329882&w=2
Link: https://lore.kernel.org/r/Pine.LNX.4.44L0.2001061040270.1514-100000@iolanthe.rowland.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-14 20:08:38 +01:00
..
atm USB: atm: ueagle-atm: add missing endpoint check 2019-12-17 19:55:44 +01:00
c67x00
cdns3 usb: cdns3: should not use the same dev_id for shared interrupt handler 2020-01-14 20:08:29 +01:00
chipidea usb: chipidea: host: Disable port power only if previously enabled 2020-01-14 20:08:19 +01:00
class
common usb: common: usb-conn-gpio: Don't log an error on probe deferral 2019-12-17 19:55:39 +01:00
core USB: Fix: Don't skip endpoint descriptors with maxpacket=0 2020-01-14 20:08:38 +01:00
dwc2 usb: dwc2: use a longer core rest timeout in dwc2_core_reset() 2019-12-04 22:30:45 +01:00
dwc3 usb: dwc3: gadget: Fix request complete check 2020-01-12 12:21:52 +01:00
early
gadget USB: dummy-hcd: use usb_urb_dir_in instead of usb_pipein 2020-01-12 12:21:10 +01:00
host usb: ohci-da8xx: ensure error return on variable error is set 2020-01-14 20:08:29 +01:00
image
isp1760
misc USB: adutux: fix interface sanity check 2019-12-17 19:55:47 +01:00
mon usb: mon: Fix a deadlock in usbmon between mmap and read 2019-12-17 19:55:49 +01:00
mtu3
musb usb: musb: dma: Correct parameter passed to IRQ handler 2020-01-14 20:08:31 +01:00
phy
renesas_usbhs usb: renesas_usbhs: add suspend event support in gadget mode 2019-12-31 16:43:37 +01:00
roles usb: roles: fix a potential use after free 2019-12-17 19:55:46 +01:00
serial USB: serial: option: add ZLP support for 0x1bc7/0x9010 2020-01-14 20:08:30 +01:00
storage USB: Fix incorrect DMA allocations for local memory pool drivers 2019-12-21 11:04:21 +01:00
typec USB-PD tcpm: bad warning+size, PPS adapters 2020-01-14 20:08:29 +01:00
usbip usbip: Fix error path of vhci_recv_ret_submit() 2019-12-31 16:46:05 +01:00
Kconfig
Makefile
usb-skeleton.c