From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750949AbcGUE07 (ORCPT ); Thu, 21 Jul 2016 00:26:59 -0400 Received: from mail-pf0-f175.google.com ([209.85.192.175]:32887 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbcGUE05 (ORCPT ); Thu, 21 Jul 2016 00:26:57 -0400 Message-ID: <57904F08.7020109@linaro.org> Date: Thu, 21 Jul 2016 12:26:48 +0800 From: zhangfei User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: John Stultz , lkml CC: Jingoo Han , Krzysztof Kozlowski , Maxime Ripard , Vinod Koul , Dan Williams , Mark Brown , Andy Green Subject: Re: [PATCH 6/7] k3dma: Fix occasional DMA ERR issue by using proper dma api References: <1469073189-9167-1-git-send-email-john.stultz@linaro.org> <1469073189-9167-7-git-send-email-john.stultz@linaro.org> In-Reply-To: <1469073189-9167-7-git-send-email-john.stultz@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/21/2016 11:53 AM, John Stultz wrote: > After lots of debugging on an occasional DMA ERR issue, I realized > that the desc structures which we point the dma hardware are being > allocated out of regular memory. This means when we fill the desc > structures, that data doesn't always get flushed out to memory by > the time we start the dma transfer, resulting in the dma engine getting > some null values, resulting in a DMA ERR on the first irq. How about using wmb() flush before start dma to sync desc? I remember I used dma_pool first, then do some optimization referring Russell's driver. Thanks