1
0
Fork 0

usb/gadget: Fix "high bandwidth" check in usb_gadget_ep_match_desc()

commit 11fb379987 upstream.

The current code tries to test for bits that are masked out by
usb_endpoint_maxp(). Instead, use the proper accessor to access
the new high bandwidth bits.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pull/10/head
Benjamin Herrenschmidt 2018-01-12 17:50:02 +11:00 committed by Greg Kroah-Hartman
parent e0096f93aa
commit 2ba5966edd
1 changed files with 1 additions and 1 deletions

View File

@ -923,7 +923,7 @@ int usb_gadget_ep_match_desc(struct usb_gadget *gadget,
return 0;
/* "high bandwidth" works only at high speed */
if (!gadget_is_dualspeed(gadget) && usb_endpoint_maxp(desc) & (3<<11))
if (!gadget_is_dualspeed(gadget) && usb_endpoint_maxp_mult(desc) > 1)
return 0;
switch (type) {