linux/drivers/usb/core
Oliver Neukum b3e40fc857 USB: usb_parse_endpoint: ignore reserved bits
Reading bEndpointAddress the spec tells is that:
  b7   is direction, which must be ignored
  b6:4 are reserved which are to be set to zero
  b3:0 are the endpoint address

In order to be backwards compatible with possible future versions of USB
we have to be ready with devices using those bits. That means that we
also have to ignore them like we do with the direction bit.

In consequence the only illegal address you can encoding in four bits is
endpoint zero, for which no descriptor must exist. Hence the check for
exceeding the upper limit on endpoint addresses is removed.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20240502115259.31076-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-03 07:35:37 +02:00
..
buffer.c - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
config.c USB: usb_parse_endpoint: ignore reserved bits 2024-05-03 07:35:37 +02:00
devices.c USB: Remove remnants of Wireless USB and UWB 2023-08-09 14:17:06 +02:00
devio.c usb: convert to new timestamp accessors 2023-10-18 13:26:17 +02:00
driver.c usb: usb_autopm_get_interface use modern helper 2024-01-27 16:43:48 -08:00
endpoint.c usb: core: constify the struct device_type usage 2024-02-19 09:35:46 +01:00
file.c USB: make usb class a const structure 2023-07-25 17:49:30 +02:00
generic.c usb: core: Fix crash w/ usb_choose_configuration() if no driver 2023-12-15 13:54:09 +01:00
hcd-pci.c usb: pci-quirks: handle HAS_IOPORT dependency for AMD quirk 2023-10-02 16:19:12 +02:00
hcd.c USB/Thunderbolt changes for 6.9-rc1 2024-03-21 12:35:20 -07:00
hub.c Merge 6.9-rc2 into usb-next 2024-04-01 17:02:18 +02:00
hub.h Merge 6.9-rc2 into usb-next 2024-04-01 17:02:18 +02:00
Kconfig usb: core: Kconfig: Improve USB authorization mode help 2024-02-17 16:38:35 +01:00
ledtrig-usbport.c usb: core: Use module_led_trigger macro to simplify the code 2023-08-22 14:44:23 +02:00
Makefile usb: misc: onboard_hub: rename to onboard_dev 2024-03-27 07:57:16 +01:00
message.c USB: document some API requirements on disconnection 2024-03-02 20:37:14 +01:00
notify.c
of.c usb: core: Set connect_type of ports based on DT node 2024-03-05 13:28:46 +00:00
otg_productlist.h
phy.c usb: core: add phy notify connect and disconnect 2024-01-27 17:36:14 -08:00
phy.h usb: core: add phy notify connect and disconnect 2024-01-27 17:36:14 -08:00
port.c usb: Disable USB3 LPM at shutdown 2024-04-04 17:00:08 +02:00
quirks.c usb: new quirk to reduce the SET_ADDRESS request timeout 2023-11-23 12:32:44 +00:00
sysfs.c USB: core: Fix deadlock in usb_deauthorize_interface() 2024-03-26 11:02:47 +01:00
urb.c USB: Remove remnants of Wireless USB and UWB 2023-08-09 14:17:06 +02:00
usb-acpi.c usb: usb-acpi: Fix oops due to freeing uninitialized pld pointer 2024-03-19 13:07:35 +01:00
usb.c usb: core: constify the struct device_type usage 2024-02-19 09:35:46 +01:00
usb.h usb: core: constify the struct device_type usage 2024-02-19 09:35:46 +01:00