WSL2-Linux-Kernel/drivers/usb/core
Alan Stern d482c7bb05 USB: Skip endpoints with 0 maxpacket length
Endpoints with a maxpacket length of 0 are probably useless.  They
can't transfer any data, and it's not at all unlikely that an HCD will
crash or hang when trying to handle an URB for such an endpoint.

Currently the USB core does not check for endpoints having a maxpacket
value of 0.  This patch adds a check, printing a warning and skipping
over any endpoints it catches.

Now, the USB spec does not rule out endpoints having maxpacket = 0.
But since they wouldn't have any practical use, there doesn't seem to
be any good reason for us to accept them.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>

Link: https://lore.kernel.org/r/Pine.LNX.4.44L0.1910281050420.1485-100000@iolanthe.rowland.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-28 17:46:22 +01:00
..
Kconfig
Makefile
buffer.c
config.c USB: Skip endpoints with 0 maxpacket length 2019-10-28 17:46:22 +01:00
devices.c
devio.c
driver.c
endpoint.c
file.c
generic.c
hcd-pci.c
hcd.c
hub.c
hub.h
ledtrig-usbport.c
message.c
notify.c
of.c
otg_whitelist.h
phy.c
phy.h
port.c
quirks.c
sysfs.c
urb.c
usb-acpi.c
usb.c
usb.h