linux-mips
[Top] [All Lists]

Re: [PATCH 2/3] USB: ehci: add workaround for Synopsys HC bug

To: Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH 2/3] USB: ehci: add workaround for Synopsys HC bug
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 11 Apr 2011 21:42:24 +0200
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, Greg Kroah-Hartman <gregkh@suse.de>, linux-usb@vger.kernel.org
In-reply-to: <Pine.LNX.4.44L0.1104111452040.1975-100000@iolanthe.rowland.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <Pine.LNX.4.44L0.1104111452040.1975-100000@iolanthe.rowland.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; hu-HU; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
2011.04.11. 20:53 keltezéssel, Alan Stern írta:
> On Sun, 10 Apr 2011, Gabor Juhos wrote:
> 
>> A Synopsys USB core used in various SoCs has a bug which might cause
>> that the host controller not issuing ping.
>>
>> When software uses the Doorbell mechanism to remove queue heads, the
>> host controller still has references to the removed queue head even
>> after indicating an Interrupt on Async Advance. This happens if the last
>> executed queue head's Next Link queue head is removed.
>>
>> Consequences of the defect:
>> The Host controller fetches the removed queue head, using memory that
>> would otherwise be deallocated.This results in incorrect transactions on
>> both the USB and system memory. This may result in undefined behavior.
> 
>> --- a/drivers/usb/host/ehci-q.c
>> +++ b/drivers/usb/host/ehci-q.c
>> @@ -1183,6 +1183,9 @@ static void end_unlink_async (struct ehci_hcd *ehci)
>>              ehci->reclaim = NULL;
>>              start_unlink_async (ehci, next);
>>      }
>> +
>> +    if (ehci->has_synopsys_hc_bug)
>> +            writel((u32)ehci->async->qh_dma, &ehci->regs->async_next);
>>  }
> 
> This should be ehci_writel(ehci, ...).

You are right, I will change that.

Thanks,
Gabor

<Prev in Thread] Current Thread [Next in Thread>