From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Fri, 29 Jan 2016 17:42:31 +0100 Subject: [U-Boot] [PATCH][RE-SUBMIT] usb: gadget: dwc2_udc_otg: modified the check condition for max packet size of ep_in in high speed In-Reply-To: <1453927180-490-1-git-send-email-srae@broadcom.com> References: <1453927180-490-1-git-send-email-srae@broadcom.com> Message-ID: <20160129174231.4239160f@amdc2363> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Steve, > From: Frank Wang > > 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 > Tested-by: Steve Rae > --- > > drivers/usb/gadget/dwc2_udc_otg.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/gadget/dwc2_udc_otg.c > b/drivers/usb/gadget/dwc2_udc_otg.c index 90ed5ff..19d6dcd 100644 > --- a/drivers/usb/gadget/dwc2_udc_otg.c > +++ b/drivers/usb/gadget/dwc2_udc_otg.c > @@ -565,8 +565,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); Acked-by: Lukasz Majewski Tested-by: Lukasz Majewski Test HW: Trats - Exynos4210 (dwc2 udc controller). @Marek: Should I pick this patch or will you take it? -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group