diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-01-12 09:50:02 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-03 19:05:42 +0300 |
commit | 57d4bb1beecb1b34237ddc8a08e819a0da4243b1 (patch) | |
tree | a1f2be5bbfe4e3d747ed35819d5dc2ac8f3ae8c3 /drivers/usb/gadget/udc | |
parent | 92e64a1079fac557ebb48ce266d23070924109ef (diff) | |
download | linux-57d4bb1beecb1b34237ddc8a08e819a0da4243b1.tar.xz |
usb/gadget: Fix "high bandwidth" check in usb_gadget_ep_match_desc()
commit 11fb37998759c48e4e4c200c974593cbeab25d3e 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>
Diffstat (limited to 'drivers/usb/gadget/udc')
-rw-r--r-- | drivers/usb/gadget/udc/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c index d685d82dcf48..e97539fc127e 100644 --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c @@ -913,7 +913,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) { |