1
0
Fork 0
alistair23-linux/drivers/usb
Alan Stern 3fcaac70d2 USB: Fix: Don't skip endpoint descriptors with maxpacket=0
commit 2548288b4f 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 USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
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 USB: usblp: fix use-after-free on disconnect 2019-10-15 20:19:19 +02:00
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 drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
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 USB: microtek: fix info-leak at probe 2019-10-04 11:02:58 +02:00
isp1760 usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
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 usb: mtu3: fix missing include of mtu3_dr.h 2019-10-27 08:58:44 +02:00
musb usb: musb: dma: Correct parameter passed to IRQ handler 2020-01-14 20:08:31 +01:00
phy USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
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 usb: common: create Kconfig file 2019-09-03 19:00:39 +02:00
Makefile USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00