public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ohci: Add missing cache-flush for hcca area
Date: Wed, 21 Oct 2015 00:31:20 +0200	[thread overview]
Message-ID: <201510210031.20451.marex@denx.de> (raw)
In-Reply-To: <1445359169-28875-1-git-send-email-hdegoede@redhat.com>

On Tuesday, October 20, 2015 at 06:39:29 PM, Hans de Goede wrote:
> We need to cache-flush the hcca area after the initial memset, otherwise
> on the first hc_interrupt we might see an old $random value as done_head
> and try to interpret that as the address for a completed td (followed by
> chaos).
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Dang, this came three hours after the release of 2015.10 ;-)

Oh well. Applied, thanks!

> ---
>  drivers/usb/host/ohci-hcd.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
> index 9bde2b2..ccbfc02 100644
> --- a/drivers/usb/host/ohci-hcd.c
> +++ b/drivers/usb/host/ohci-hcd.c
> @@ -2205,6 +2205,7 @@ int ohci_register(struct udevice *dev, struct
> ohci_regs *regs) if (!ohci->hcca)
>  		return -ENOMEM;
>  	memset(ohci->hcca, 0, sizeof(struct ohci_hcca));
> +	flush_dcache_hcca(ohci->hcca);
> 
>  	if (hc_reset(ohci) < 0)
>  		return -EIO;

Best regards,
Marek Vasut

      reply	other threads:[~2015-10-20 22:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20 16:39 [U-Boot] [PATCH] ohci: Add missing cache-flush for hcca area Hans de Goede
2015-10-20 22:31 ` Marek Vasut [this message]

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=201510210031.20451.marex@denx.de \
    --to=marex@denx.de \
    --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