Commit c74c9300 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Felipe Balbi

usb: gadget: check for streams only for SS udcs

Currently the UASP gadget fails to bind on an UDC which does not provide
stream support. This is true for all udc in tree except for dummy and
dwc3 since they don't support SuperSpeed.
There is no need to test for the availability of stream support on those
UDCs because we will never even try to use them. I think it is sane to
assume that StreamSupport is always available on SuperSpeed since it is
one of the key features.
The host side will only allocate on SS so this part is also fine.
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 118d63f7
...@@ -126,7 +126,7 @@ ep_matches ( ...@@ -126,7 +126,7 @@ ep_matches (
* descriptor and see if the EP matches it * descriptor and see if the EP matches it
*/ */
if (usb_endpoint_xfer_bulk(desc)) { if (usb_endpoint_xfer_bulk(desc)) {
if (ep_comp) { if (ep_comp && gadget->max_speed >= USB_SPEED_SUPER) {
num_req_streams = ep_comp->bmAttributes & 0x1f; num_req_streams = ep_comp->bmAttributes & 0x1f;
if (num_req_streams > ep->max_streams) if (num_req_streams > ep->max_streams)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment