Message ID | 20231130114006.31760-1-oneukum@suse.com |
---|---|
State | New |
Headers | show |
Series | [RFC] USB: check for transmissible packet sizes when matching endpoints | expand |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 2a938cf47ccd..d163bd279021 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -80,6 +80,9 @@ static bool match_endpoint(struct usb_endpoint_descriptor *epd, { switch (usb_endpoint_type(epd)) { case USB_ENDPOINT_XFER_BULK: + if (!usb_endpoint_maxp(epd)) + return false; + if (usb_endpoint_dir_in(epd)) { if (bulk_in && !*bulk_in) { *bulk_in = epd;
Looking for a bulk endpoint to transfer data over we need something that can transmit data. Signed-off-by: Oliver Neukum <oneukum@suse.com> --- drivers/usb/core/usb.c | 3 +++ 1 file changed, 3 insertions(+)