Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17930642ybl; Thu, 2 Jan 2020 15:02:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwkMcVFxNvJGLJU4d4Q3roMa8dhQyurj7itczXAjouJ6HsqkApqxDnkhXXkzXU6OX98a7OU X-Received: by 2002:a05:6808:1c5:: with SMTP id x5mr3302839oic.57.1578006176128; Thu, 02 Jan 2020 15:02:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006176; cv=none; d=google.com; s=arc-20160816; b=UGcM5gu0DHYrfhr16gnbxDZw9R0oRLbbyUuRvY1eEHuYsiJDNNG7VbvcP4pKotwGaE x8a7xZjWQ3g5B/MtmWnlJp9txFhrYBcQXXtGb++lu/aZc6zvQ99x8pq2zlrmthfH1bt9 SF9d76axz038Ao7uWbepNiMWw43f4RuDD2zkVemVy8xExjag28R+Bo0lsIEe6QMf/gls ML5bB1tefIdSksBimXd6Hs90YjW/57VDxAdzXkAsha+Ist2Az//WMj95bcnFvsadBJzJ +yuBPNMD0lVvtvmYCz2kR6uO8/2hfR6ituRAFhtzIGWfPBy71EHFkNyXhVogm2mBGVQ6 fIkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dqCOJlhLV70Bj2GBTHBBqC+/bQBaBR4WBpsFHr8dAcQ=; b=i+21Wk/uYR4b5t/DWnRz9Aqw1ndo2FDcqxN9JaRZWyAljSnnvmxx/PEf8LijOxEX9J JFWZ+2ySDNogqVohl+H6iB2DrTYERFF7LwdGyxBWO3UnIM/qS1+T0K11sX2vqiO26Ini BE9M4RIgZcVvSaAYBoLcAbOC5tIsmxgaO616aURIJCGxi0lHm+8459FJOeVaYgiYAMOv eSWYCo2PYGmAmkzehtbeqOWn+JwkgIKvqnpDTf9K9+uvgaiBoycimBpKeLeGxEaivAkn RKEMlYEQorUsLLqH8L0EcdOIYmS0Fw5eDPeyZx05Vl/UAOj0valnjwpMSyEXq7L6a0sx OoVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mVdZzZDZ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i65si26915522oif.15.2020.01.02.15.02.44; Thu, 02 Jan 2020 15:02:56 -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=@kernel.org header.s=default header.b=mVdZzZDZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727170AbgABWLg (ORCPT + 99 others); Thu, 2 Jan 2020 17:11:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:49782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727142AbgABWLd (ORCPT ); Thu, 2 Jan 2020 17:11:33 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 82A5821D7D; Thu, 2 Jan 2020 22:11:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003093; bh=NXLY67IDTMu6Jlymy/bPZRDp/GZiSr3IJHRem+6GoO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mVdZzZDZR7wH2EnbUH8NZE4/DcUVM4VfYd6Xkf8cMKirRBIe+C3BFevELsqc90im+ 82UvDCkfkFK5bOxv7bGVOYBilZmAfHbBWaO/bID9fsJFMI/a5tU//gRG+VFQN6XPpe Z9riFut5G+fe3plMTBITBwWHkC1LXtmkBv7Z/Rek= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Graumann , Radhey Shyam Pandey , Vinod Koul , Sasha Levin Subject: [PATCH 5.4 017/191] dmaengine: xilinx_dma: Clear desc_pendingcount in xilinx_dma_reset Date: Thu, 2 Jan 2020 23:04:59 +0100 Message-Id: <20200102215831.673206199@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicholas Graumann [ Upstream commit 8a631a5a0f7d4a4a24dba8587d5d9152be0871cc ] Whenever we reset the channel, we need to clear desc_pendingcount along with desc_submitcount. Otherwise when a new transaction is submitted, the irq coalesce level could be programmed to an incorrect value in the axidma case. This behavior can be observed when terminating pending transactions with xilinx_dma_terminate_all() and then submitting new transactions without releasing and requesting the channel. Signed-off-by: Nicholas Graumann Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1571150904-3988-8-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/xilinx/xilinx_dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 5d56f1e4d332..43acba2a1c0e 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -1433,6 +1433,7 @@ static int xilinx_dma_reset(struct xilinx_dma_chan *chan) chan->err = false; chan->idle = true; + chan->desc_pendingcount = 0; chan->desc_submitcount = 0; return err; -- 2.20.1