diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-01-11 15:42:44 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-01-24 08:43:12 -0500 |
commit | c74c930082fd407e3b9e503d855d78777a8e5a84 (patch) | |
tree | 9be81e1bd1fe201cb4c5ad225753ee820a719b3f | |
parent | 118d63f7f84cd400ba537f5d318c035c95c6776d (diff) |
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: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/gadget/epautoconf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index 753aa0683ac1..e0e6375ef5dd 100644 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c | |||
@@ -126,7 +126,7 @@ ep_matches ( | |||
126 | * descriptor and see if the EP matches it | 126 | * descriptor and see if the EP matches it |
127 | */ | 127 | */ |
128 | if (usb_endpoint_xfer_bulk(desc)) { | 128 | if (usb_endpoint_xfer_bulk(desc)) { |
129 | if (ep_comp) { | 129 | if (ep_comp && gadget->max_speed >= USB_SPEED_SUPER) { |
130 | num_req_streams = ep_comp->bmAttributes & 0x1f; | 130 | num_req_streams = ep_comp->bmAttributes & 0x1f; |
131 | if (num_req_streams > ep->max_streams) | 131 | if (num_req_streams > ep->max_streams) |
132 | return 0; | 132 | return 0; |