Skip to content
Snippets Groups Projects
Commit 8c9b4d55 authored by Frank Wang's avatar Frank Wang Committed by Marek Vasut
Browse files

usb: gadget: dwc2_udc_otg: modified the check condition for max packet size of ep_in in high speed


In current high speed fastboot, fs_ep_in.wMaxPacketSize is configured 64 bytes
as default, as a result, it failed to match the size at initialization stage in
usb controller.
Actually, hardware can support less than or equal to 512 bytes in high speed mode,
so I changed the condition from  '!=' to '>' to fix this issue.

Signed-off-by: default avatarFrank Wang <frank.wang@rock-chips.com>
Tested-by: default avatarSteve Rae <srae@broadcom.com>
parent 44189a03
No related branches found
No related tags found
No related merge requests found
...@@ -557,8 +557,8 @@ static int dwc2_ep_enable(struct usb_ep *_ep, ...@@ -557,8 +557,8 @@ static int dwc2_ep_enable(struct usb_ep *_ep,
} }
/* hardware _could_ do smaller, but driver doesn't */ /* hardware _could_ do smaller, but driver doesn't */
if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK &&
&& le16_to_cpu(get_unaligned(&desc->wMaxPacketSize)) != le16_to_cpu(get_unaligned(&desc->wMaxPacketSize)) >
ep_maxpacket(ep)) || !get_unaligned(&desc->wMaxPacketSize)) { ep_maxpacket(ep)) || !get_unaligned(&desc->wMaxPacketSize)) {
debug("%s: bad %s maxpacket\n", __func__, _ep->name); debug("%s: bad %s maxpacket\n", __func__, _ep->name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment