From patchwork Mon May 22 14:05:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 9740521 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 8FE9B601C2 for ; Mon, 22 May 2017 14:05:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 807012868F for ; Mon, 22 May 2017 14:05:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7553828697; Mon, 22 May 2017 14:05:53 +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 342122868F for ; Mon, 22 May 2017 14:05:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934139AbdEVOFv (ORCPT ); Mon, 22 May 2017 10:05:51 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:35480 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934244AbdEVOFr (ORCPT ); Mon, 22 May 2017 10:05:47 -0400 Received: by mail-lf0-f66.google.com with SMTP id 99so5568132lfu.2; Mon, 22 May 2017 07:05:46 -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=RsHYWhoDzZcWI6oQXqtKCkYOqgTFWXwSlFbnqvz9GshtIzK3lTHXiNGI92qOuzPluT tD91es3VzSAw1NrofUyaMCiwGb4sgv/jlSy18/4wc9etZA68CpVbtJ+RgO9cwgSRIE7M sk3Ij9zO9s8M6CoBavIH9DEfEqpO6gPWIZBDrsrQMBmg1hDhj/66dArLwBDqz6KvYDy8 aBiqDpaqq/IocRTCgpFbM6is/NFikKPf4hHgn+O9Qwk+W9S3ZdYUzgoXk+9ESA7Qyark cZTUEPCElKTev8yEAEeGm9tIeTPiyBlVaob+WUWEuqSz/hMKFGOJIyHKXYk+bMhHiFTz tw1A== 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=OshAb++8R4rDPn92flziGn0CgExzHckvRiAO0bUcCNQ3R4xpyE9VfuvA0GRafndPs6 MUG8UOK0trdN++n/dNRKG4EvpLqrBU7ttz9Gh27QLBCBqYhwyb8575maNnMxmUUS9oLA WAeLoDygss+0QCdb0gzAW6CmdFYozRUv/tzrGUxx2EJ0AnDtF1MQF9ySXTjkjo/0Ad5D faXkvsPW2YBlji7nVbw4eObgI8aW298DtJXcPQC3nTsLZulWcqsIO1iyQmh9v8RZ4SnI ydNZbcPL9o4u/J3QxGXJXWkUYHncUwCZ2j9ucY5SKtZE1KNaW5I9Pmuj83kimPGuay/Q aBbw== X-Gm-Message-State: AODbwcAeO0rHsJNqqaf2rO5IY3lP0J2EjJ+fkGZXh34fp5wtFzhTe1KK vtn5XXJv4Jq3nqQj X-Received: by 10.25.115.71 with SMTP id o68mr5364046lfc.96.1495461940245; Mon, 22 May 2017 07:05:40 -0700 (PDT) Received: from giga1.localdomain ([195.245.52.203]) by smtp.gmail.com with ESMTPSA id h17sm2255362lfg.47.2017.05.22.07.05.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 May 2017 07:05:39 -0700 (PDT) From: Alexander Sverdlin To: dmaengine@vger.kernel.org Cc: Alexander Sverdlin , Dan Williams , Vinod Koul , stable@vger.kernel.org Subject: [PATCH v3 1/2] dmaengine: ep93xx: Always start from BASE0 Date: Mon, 22 May 2017 16:05:22 +0200 Message-Id: <20170522140523.24281-2-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170522140523.24281-1-alexander.sverdlin@gmail.com> References: <20170522140523.24281-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; }