From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 2 Apr 2017 05:01:41 +0200 Subject: [U-Boot] [PATCH v5 02/19] usb: dwc2: Use separate input and output buffers In-Reply-To: References: <20170401180556.2416-1-sjg@chromium.org> <20170401180556.2416-3-sjg@chromium.org> <2ae9f6f1-421f-4aa8-a568-f70b3ba66408@denx.de> Message-ID: <4a0e984d-95e6-53db-ba39-2df4e3ffd0bf@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/02/2017 01:40 AM, Simon Glass wrote: > Hi Marek, > > On 1 April 2017 at 14:15, Marek Vasut wrote: >> On 04/01/2017 08:05 PM, Simon Glass wrote: >>> On Raspberry Pi 2 and 3 a problem was noticed when enabling driver model >>> for USB: the cache invalidate after an incoming transfer does not seem to >>> work correctly. >>> >>> This may be a problem with the underlying caching implementation on armv7 >>> and armv8 but this seems very unlikely. As a work-around, use separate >>> buffers for input and output. This ensures that the input buffer will not >>> hold dirty cache data. >> >> What do you think of this patch: >> [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA > > Yes that matches what I did as a hack. I didn't realise that the DMA > would go through the cache. Thanks for the pointer. DMA should not go through the cache. I have yet to review that patch, but IMO it's relevant to this problem you observe. -- Best regards, Marek Vasut