public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dinh Nguyen <dinguyen@opensource.altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: dwc2: Init desc_before_addr
Date: Wed, 27 Apr 2016 12:15:04 -0500	[thread overview]
Message-ID: <5720F398.1020104@opensource.altera.com> (raw)
In-Reply-To: <1461632904-6909-1-git-send-email-marex@denx.de>

On 04/25/2016 08:08 PM, Marek Vasut wrote:
> Initialize desc_before_addr, otherwise the USB core won't send the
> first 64B Get Device Descriptor request in common/usb.c function
> usb_setup_descriptor() . There are some USB devices which expect
> this sequence and otherwise can misbehave.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  drivers/usb/host/dwc2.c | 3 +++
>  1 file changed, 3 insertions(+)
> ---
> NOTE: I checked this with TotalPhase Beagle USB480 and it does what it is
>       supposed to do now. It would be wonderful to get this into rc3.
> 
> diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
> index b2f4bc6..559c43f 100644
> --- a/drivers/usb/host/dwc2.c
> +++ b/drivers/usb/host/dwc2.c
> @@ -1182,6 +1182,9 @@ static int dwc2_usb_ofdata_to_platdata(struct udevice *dev)
>  static int dwc2_usb_probe(struct udevice *dev)
>  {
>  	struct dwc2_priv *priv = dev_get_priv(dev);
> +	struct usb_bus_priv *bus_priv = dev_get_uclass_priv(dev);
> +
> +	bus_priv->desc_before_addr = true;
>  
>  	return dwc2_init_common(priv);
>  }
> 

With this patch, I no longer have to revert commit "c998da0d67091 usb:
Change power-on / scanning timeout handling" for my problematic Kingston
USB stick to work.

So feel free to add:

Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>

Dinh

  parent reply	other threads:[~2016-04-27 17:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26  1:08 [U-Boot] [PATCH] usb: dwc2: Init desc_before_addr Marek Vasut
2016-04-26  1:10 ` Marek Vasut
2016-04-27 17:15 ` Dinh Nguyen [this message]
2016-04-27 20:40   ` Marek Vasut
2016-04-28  6:16 ` Stefan Roese
2016-04-28 12:42   ` 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=5720F398.1020104@opensource.altera.com \
    --to=dinguyen@opensource.altera.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