public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Steve Rae <srae@broadcom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot]  question regarding USB gadget driver (dwc2)
Date: Tue, 26 Jan 2016 16:35:55 -0800	[thread overview]
Message-ID: <56A810EB.6010102@broadcom.com> (raw)

Hi Marek & Lukasz,


I have an issue running fastboot on my board (which is USB_SPEED_HIGH):

    => fastboot0

    failed to enable in ep

    failed to enable in ep

    failed to enable in ep

Because of this, fastboot does not even initialize properly, and I need 
to "^C" to break out?

I have traced this the following code in 
"drivers/usb/gadget/dwc2_udc_otg.c":

    559/* hardware _could_ do smaller, but driver doesn't */

    560if ((desc->bmAttributes== USB_ENDPOINT_XFER_BULK

    561&& le16_to_cpu(get_unaligned(&desc->wMaxPacketSize)) !=

    562ep_maxpacket(ep)) || !get_unaligned(&desc->wMaxPacketSize)) {

    563

    564debug("%s: bad %s maxpacket\n", __func__, _ep->name);

    565return -ERANGE;

    566}

    567

    568dev= ep->dev;

    569if (!dev->driver || dev->gadget.speed== USB_SPEED_UNKNOWN) {

    570

    571debug("%s: bogus device state\n", __func__);

    572return -ESHUTDOWN;

    573}

    574

    575ep->stopped = 0;

    576ep->desc= desc;

    577ep->pio_irqs= 0;

    578ep->ep.maxpacket= le16_to_cpu(get_unaligned(&desc->wMaxPacketSize));

The error message is because:

    line 561 wMaxPacketSize= 64, and

    line 562 ep_maxpacket(ep) = 512

I am questioning this logic, because at line 578, the ep.maxpacket is 
being changed to the wMaxPacketSize anyway!


I am uncertain how to proceed - please advise!

Thanks in advance, Steve

             reply	other threads:[~2016-01-27  0:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27  0:35 Steve Rae [this message]
2016-01-27  1:35 ` [U-Boot] question regarding USB gadget driver (dwc2) Marek Vasut
2016-01-27  1:58   ` Steve Rae
2016-01-27  2:11     ` Marek Vasut
2016-01-29 16:40     ` Lukasz Majewski
2016-01-29 18:19       ` Steve Rae

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=56A810EB.6010102@broadcom.com \
    --to=srae@broadcom.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