diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-01-12 01:50:02 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-22 09:34:37 -0500 |
commit | 11fb37998759c48e4e4c200c974593cbeab25d3e (patch) | |
tree | dd9ede5d130a813b6cec7798d06a3897c97e09c9 | |
parent | 0cb5818a3b250de64e02592f4584f7c21d9566b8 (diff) |
usb/gadget: Fix "high bandwidth" check in usb_gadget_ep_match_desc()
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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 1b3efb14aec7..ac0541529499 100644 --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c | |||
@@ -912,7 +912,7 @@ int usb_gadget_ep_match_desc(struct usb_gadget *gadget, | |||
912 | return 0; | 912 | return 0; |
913 | 913 | ||
914 | /* "high bandwidth" works only at high speed */ | 914 | /* "high bandwidth" works only at high speed */ |
915 | if (!gadget_is_dualspeed(gadget) && usb_endpoint_maxp(desc) & (3<<11)) | 915 | if (!gadget_is_dualspeed(gadget) && usb_endpoint_maxp_mult(desc) > 1) |
916 | return 0; | 916 | return 0; |
917 | 917 | ||
918 | switch (type) { | 918 | switch (type) { |