From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
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
Date: Thu, 28 Jan 2016 09:18:29 +0100 [thread overview]
Message-ID: <20160128091829.48d5a47c@amdc2363> (raw)
In-Reply-To: <1453927180-490-1-git-send-email-srae@broadcom.com>
Hi Steve,
> From: Frank Wang <frank.wang@rock-chips.com>
>
> 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.
I'm aware of this problem, however now I'm busy with fixing dfu issue
regarding sending large files (e.g. 26 MiB). Patches are under
testing now.
After sending them I'll fix the fastboot problem.
>
> Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
> Tested-by: Steve Rae <srae@broadcom.com>
> ---
>
> 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);
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2016-01-28 8:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 20:39 [U-Boot] [PATCH][RE-SUBMIT] usb: gadget: dwc2_udc_otg: modified the check condition for max packet size of ep_in in high speed Steve Rae
2016-01-27 20:47 ` Marek Vasut
2016-01-28 8:18 ` Lukasz Majewski [this message]
2016-01-29 16:42 ` Lukasz Majewski
2016-01-29 20:35 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160128091829.48d5a47c@amdc2363 \
--to=l.majewski@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox