summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFrank Wang <frank.wang@rock-chips.com>2016-01-27 12:39:40 -0800
committerMarek Vasut <marex@denx.de>2016-02-04 12:38:26 +0100
commit8c9b4d5598e014036d2f2637c17bd6e3748ff6a3 (patch)
treecd7707347002732c5e342cf642ca84a71b862107 /drivers
parent44189a032804c4a16632f4e80abf77f2820e9a48 (diff)
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: Frank Wang <frank.wang@rock-chips.com> Tested-by: Steve Rae <srae@broadcom.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/dwc2_udc_otg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
index ffe2952f56b..cb20b00a56b 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -557,8 +557,8 @@ static int dwc2_ep_enable(struct usb_ep *_ep,
}
/* hardware _could_ do smaller, but driver doesn't */
- if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK
- && le16_to_cpu(get_unaligned(&desc->wMaxPacketSize)) !=
+ if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK &&
+ le16_to_cpu(get_unaligned(&desc->wMaxPacketSize)) >
ep_maxpacket(ep)) || !get_unaligned(&desc->wMaxPacketSize)) {
debug("%s: bad %s maxpacket\n", __func__, _ep->name);