From patchwork Wed May 17 17:33:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 9731755 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 004D8601BC for ; Wed, 17 May 2017 17:34:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0AC32866D for ; Wed, 17 May 2017 17:34:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5A3D28797; Wed, 17 May 2017 17:34:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 949702866D for ; Wed, 17 May 2017 17:34:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753798AbdEQReW (ORCPT ); Wed, 17 May 2017 13:34:22 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36342 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753759AbdEQReV (ORCPT ); Wed, 17 May 2017 13:34:21 -0400 Received: by mail-wm0-f66.google.com with SMTP id k15so3832412wmh.3; Wed, 17 May 2017 10:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=O5gN5iBUB40i3TZhQqF9dwmgr88LwkM3PRI0Sl1T/j8=; b=GdpTyLGXDwEDLvkMisedQz7sruqFiyS/I08RqDLA5hl0DodnqlaXNOjZuFSX8cnyWk Zyyhgrrb+x58x/ZBz4ZhahN6vYpz2rwvjuDNRlXOj2RXc3aidxxGloBctf1ArLemAoEI x8mdjGzVG5BftswkWlAh69aO8h+jLhUqB/mPiALhtBCY53HDDg6xnvH10c6nW2CUipnS LO0reyEyEvTvrSdOLu0n9m9FIMtQ4l9+gYaJLwMQZKkz7IB+AsK3UI6ElEtB5kkwWtfl r/zzy8MeV2gEqtslqI8gu9C4K/AlBreZptb6U0YKiJFg0sBXnBz54JgooWdg5jFPbNX+ iK8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=O5gN5iBUB40i3TZhQqF9dwmgr88LwkM3PRI0Sl1T/j8=; b=iUx3WxmpivEedsbmPJbRurVYVU1ivkOfm4ZXsGaYOReGfUn7TucnbS+N1LowQadQhY 8piXguwmecTeyccYGEbrhp+SfU2fTDO1PfTui9hJV/BpaE8XKx75DfFU/pdWYQBsDrHs nPEzufCd1UD71Szxu8a8sKFXb4zd9noozm4pREmd6A8KLotdP/l+ZY4GH22As5QggUIe FU75hT0Cl1JM64EZbYW86dDP/Vmp5M3DFfxNt7Lw06S35waH12flIKQZjU+2kgz2DFmq EhIJaogwBByVJfytWBeTvSwUt2qIN2+Q1jiRptGVTxZUfhcVTlfGNGpQF3l/iz4GQ5by PzAA== X-Gm-Message-State: AODbwcCget9rY6ziyFG9oabNaUP3fsc26HfSRQzq1jlZsy4yaN4COpto vqYIsLt0w306WA== X-Received: by 10.25.56.19 with SMTP id f19mr1128525lfa.173.1495042449551; Wed, 17 May 2017 10:34:09 -0700 (PDT) Received: from giga1.localdomain ([195.245.52.203]) by smtp.gmail.com with ESMTPSA id 2sm494802lju.0.2017.05.17.10.34.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 May 2017 10:34:08 -0700 (PDT) From: Alexander Sverdlin To: dmaengine@vger.kernel.org Cc: Alexander Sverdlin , Dan Williams , Vinod Koul , stable@vger.kernel.org Subject: [PATCH v2 1/2] dmaengine: ep93xx: Always start from BASE0 Date: Wed, 17 May 2017 19:33:53 +0200 Message-Id: <20170517173354.20695-2-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170517173354.20695-1-alexander.sverdlin@gmail.com> References: <20170517173354.20695-1-alexander.sverdlin@gmail.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The current buffer is being reset to zero on device_free_chan_resources() but not on device_terminate_all(). It could happen that HW is restarted and expects BASE0 to be used, but the driver is not synchronized and will start from BASE1. One solution is to reset the buffer explicitly in m2p_hw_setup(). Signed-off-by: Alexander Sverdlin Cc: stable@vger.kernel.org --- drivers/dma/ep93xx_dma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c index d37e8dda8079..deb009c3121f 100644 --- a/drivers/dma/ep93xx_dma.c +++ b/drivers/dma/ep93xx_dma.c @@ -323,6 +323,8 @@ static int m2p_hw_setup(struct ep93xx_dma_chan *edmac) | M2P_CONTROL_ENABLE; m2p_set_control(edmac, control); + edmac->buffer = 0; + return 0; }