Skip to content
Snippets Groups Projects
Commit 25612f23 authored by Stefan Brüns's avatar Stefan Brüns Committed by Marek Vasut
Browse files

usb: dwc2: Do not mix data toggle for IN and OUT endpoints, check bounds


USB protocol allows for 16 IN and 16 OUT endpoints (USB 2.0 Spec,
8.3.2.2 Endpoint Field). A function may have an EP 1 for both IN and OUT,
so these two should be kept separate. As EPs are either BULK or INTERRUPT
(or ISO), it is fine to have one array per direction for all transfer
types (also see e236519b).

USB device address is 7 bits, so a bus may have more than 16 devices.
Check the device number, as the DWC2 driver only supports BULK/ISO for
the first 16 devices.

Signed-off-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
parent d2ff51b3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment