From patchwork Tue Nov 6 05:01:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 150243 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3458040ljp; Mon, 5 Nov 2018 21:02:16 -0800 (PST) X-Google-Smtp-Source: AJdET5fXXMoKSRCRebK7eJn63kXSoCMgJghXxZyfLWzZCx25V4owv0K16dpET8QZAwk6cVMrZas0 X-Received: by 2002:a17:902:c01:: with SMTP id 1-v6mr24948236pls.15.1541480536582; Mon, 05 Nov 2018 21:02:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541480536; cv=none; d=google.com; s=arc-20160816; b=QXulqGNdmC30+AG8jpD9AyJp/Pou39SKMQU9viQvmvS9M3fTWTkp+ictr+XxNO00I0 3tz3/4XE1o7aH6+PpdxtYycC4YVvOvXyzyd2p+76ifYFv0w4H4bgXbg0CwI7PQzRa4t+ aWK4j24HTrIQkvXczFU8ni/BR5hZpuXi44zIuCtvMguB6a5MnGg4MNe/0JYLK9IhigEg QxBmqsRzi7MbLRTyUiHiCf2ML2DVnwwQlmpjFy6o8NRQEz7NipRa7BxUydRXQtvXMMtK iobu6oKkkqKAT07mOKqdsO8KSqHupPBCqZOVY6CI6KGK1C6STm1xMkXXCxS70LwykZmZ NCFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=VKu6Lyuuq1HCg2vjK0SKqBKedEZKBAaQkFejaBLFPf0=; b=GzzKDVlLfzeuPqga9roW/EijVshZ3oknwZYx6799Kdnkd6VjZiDFkmpBGskhc8LGK2 p+Q5FNzPS3ZUmS4Q2raQAAwpZkfZF1Bjdd0vGgsfaQh7BEZxmas0OF8Nz0enNOkSSfKA zUDUqnq4rDfckqmOU9AQeF1a63idWWMmwMvptbH9Q5dciJyJmUaliYsbZxWFL1frEpFn m3sDBWpoWQKzJfvZdPDqjN27Y8lbHpFEIgmPfjI4PbEZAqiqFNB90vwvfWzoYwfvomjh SRv7MQTIvDpyhRrk9xva9a94ZEG7I15U/NVzC+8z5BLQSpCCjlmFB3+ZK27SStGh7xoR /a1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P5pOzBEP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7-v6si4317517plo.100.2018.11.05.21.02.16; Mon, 05 Nov 2018 21:02:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P5pOzBEP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387441AbeKFOZe (ORCPT + 32 others); Tue, 6 Nov 2018 09:25:34 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:44711 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729794AbeKFOZe (ORCPT ); Tue, 6 Nov 2018 09:25:34 -0500 Received: by mail-pf1-f194.google.com with SMTP id j13-v6so5515328pff.11 for ; Mon, 05 Nov 2018 21:02:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=VKu6Lyuuq1HCg2vjK0SKqBKedEZKBAaQkFejaBLFPf0=; b=P5pOzBEPVvT+v94DFEU22LAsgxhHRTt6Ea6meOS+GbP+YI+0kE5s7mOwEVDwpyE7GE xN8AUVPCtu0UPYvze/fOUyRJ8UmOOoHj2pvwkgho1DdT03DyfSEbj8aXIt9cpvE48ju9 mG0ZWl+bbahRA3mvPwY8FbjEg1MpxHMbhmdKM= 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:in-reply-to:references; bh=VKu6Lyuuq1HCg2vjK0SKqBKedEZKBAaQkFejaBLFPf0=; b=CLLGsDMe5OCExtzUP/C7ldcGmpi7c/RSisecPsf8ePZmVncCbmdv4pu9YjGfSYUy1F YON802WKSRvE04i3JQfsodnNTK15LfcWaqYMENCHauObDn0zKZX66IAQomYIQYYPGufc 5N1KsMUNN3UmAVQVzyDrMnxkjdf6TPja1/zMwbXFV3YfqzSz6OjnbKTjjPiT0LJPXEJ5 wNiczXju1pn5/rN3cNv5Pg1ZWdWQv+k4Xhi4aqU5qHJiW6mR+l8R0XUJgT67GWs3NHRd 3AlOKfZU1Zw1K9Xk2BFsqhZYMYEYabe5/kneuWlpeThv4uL7qYgElV9uh5l3q3R5hrbv b6Jw== X-Gm-Message-State: AGRZ1gJVzIZA4T7UQLSEmnJbONy65fyBumEPavNlSqszzLpfEfx+eajZ 5PY5EQuJivdgkZ6kuDO5Hx8c2w== X-Received: by 2002:a63:d655:: with SMTP id d21mr13363464pgj.280.1541480531978; Mon, 05 Nov 2018 21:02:11 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id o7-v6sm55735416pfb.23.2018.11.05.21.02.09 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Nov 2018 21:02:11 -0800 (PST) From: Baolin Wang To: dan.j.williams@intel.com, vkoul@kernel.org, eric.long@unisoc.com Cc: broonie@kernel.org, baolin.wang@linaro.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH 4/7] dmaengine: sprd: Set cur_desc as NULL when free or terminate one dma channel Date: Tue, 6 Nov 2018 13:01:34 +0800 Message-Id: <4b13aba73775582aa570212a1dccc6c511031de6.1541480353.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Long It will be failed to start one new transfer if the channel started one none interrupt transfer before, since we will only set the schan->cur_desc as NULL depending on the transfer interrupt now. Thus we should set schan->cur_desc as NULL when free or terminate one dma channel to avoid this issue. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 1 + 1 file changed, 1 insertion(+) -- 1.7.9.5 diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index e6a74dc..1b39661 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -439,6 +439,7 @@ static void sprd_dma_stop(struct sprd_dma_chn *schan) sprd_dma_stop_and_disable(schan); sprd_dma_unset_uid(schan); sprd_dma_clear_int(schan); + schan->cur_desc = NULL; } static bool sprd_dma_check_trans_done(struct sprd_dma_desc *sdesc,