From patchwork Tue May 31 09:25:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 831872 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4V9PMqD012089 for ; Tue, 31 May 2011 09:25:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754781Ab1EaJZV (ORCPT ); Tue, 31 May 2011 05:25:21 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:59998 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753378Ab1EaJZV (ORCPT ); Tue, 31 May 2011 05:25:21 -0400 Received: from axis700.grange (dslb-094-221-101-096.pools.arcor-ip.net [94.221.101.96]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0Lpijq-1Pvq832Bte-00fVHH; Tue, 31 May 2011 11:25:17 +0200 Received: by axis700.grange (Postfix, from userid 1000) id 189F3E6AB4; Tue, 31 May 2011 11:25:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 0F853106755; Tue, 31 May 2011 11:25:17 +0200 (CEST) Date: Tue, 31 May 2011 11:25:16 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: Dan Williams , Vinod Koul Subject: [PATCH] dmaengine: shdma: fix a regression: initialise DMA channels for memcpy Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:GXYVmUGk5Ajuk9DuRkEtRX+HSK3LCheETcpqaH18ewZ VZAEFWc9XYvG7nRxpW2+YHsNoYSP4fXR5oUDELceVUC9qjpqJx souTzrxUo/zAsmDaA3PVE1Xw3aaAz2N2TS26Hx/VPXPVeEOsdX 1/2KebPffCSVINr3Wwc74JlfKTXS4pzIbQpP1QTyNjbmW0dB2P aoYgPWFdhjX5xi+9JykJHdS9nXI/k0lPV+T7h8+8h4= Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 31 May 2011 09:25:26 +0000 (UTC) A recent patch has introduced a regression, where repeating a memcpy DMA test with shdma module unloading between them skips the DMA channel configuration. Fix this regression by always configuring the channel during its allocation. Signed-off-by: Guennadi Liakhovetski --- drivers/dma/shdma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 636e409..6eb8454 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c @@ -343,7 +343,7 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan) dmae_set_dmars(sh_chan, cfg->mid_rid); dmae_set_chcr(sh_chan, cfg->chcr); - } else if ((sh_dmae_readl(sh_chan, CHCR) & 0xf00) != 0x400) { + } else { dmae_init(sh_chan); }