Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4877471pjb; Mon, 27 Jul 2020 07:24:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRSTRaknhmiHwSLC2S7IieRKIbDujhVYWBbZVxgy46kaPAPGd7BrIyztGUIfNt0ILLAs/q X-Received: by 2002:a17:906:c096:: with SMTP id f22mr12156695ejz.159.1595859887739; Mon, 27 Jul 2020 07:24:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859887; cv=none; d=google.com; s=arc-20160816; b=Nr0yYawPCEt9qnP9DII6qzmGUfn17F3P5fZK1+WpXSGxeFp6rHmf4uSP5LsItQBYEa dTNh3Bn//zyVJMgAw681uL2xlcYymrwdyoHgnmT3ryYY93myCILm2KFDNEhVzMkeEk5K M4GTHYnuWtcy4GqG4XUrTT7frltTVWAwb6JN4MSqPgLIfA/CVRLUnj8moEcuOW3PqLPk 845jGllJxgqQy3EnysOWKfsng1JJCI7PqnRBqT22tHCWFGEQovaT8lR8DLvyAfaB/ckH uUxsLH7/phVlJ42w8jjzVEpz6dCHs3bzpi5zAbJb14cZBkI6KYTe5a6N7AoqEX3yfuRo c+hg== 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=dofxhU6eQpSwO1n//+4Aerlstpov/g9EQfAdmX30hrw=; b=RJhNh1qIg/NFJ2HGPE6SwZHjv6YMuo4X79QO1Fq6kAy03GPmJ1LjhR1uS0vjp5KWK8 jnjt6r2PjpvugRdJXYcxxbwfyfyLOMQBuoPqJrvZCKaYBx3ebCadeoa5fGIUQprPu/4+ ANj/4RMCkprkNI0ZFbxCmap9QE0v3qFlklxiDnQMGqeriUiruOe+X7pX9emeYAFCKCFl atql+/u8pC29kiIBxPLptFbKVDnR1B7EalZzI9pRxy04bimtuZw3bgP3heOVxCi4KU5J Lc3GaBZq65TyFNoHpJTc6iHKXQfY3uJKFOdxybSOFDHhYtiwE5y0q5paABJt/g2JVLVB 4Wjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i9QdEFmX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt23si5460450edb.545.2020.07.27.07.24.25; Mon, 27 Jul 2020 07:24:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i9QdEFmX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728220AbgG0OXH (ORCPT + 99 others); Mon, 27 Jul 2020 10:23:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:52140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732004AbgG0OXD (ORCPT ); Mon, 27 Jul 2020 10:23:03 -0400 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 6194D2070A; Mon, 27 Jul 2020 14:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859782; bh=e9V3lPrkqDvI9PpIFRoLbKwiPOAE5nFcLwbfsSfpGZ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i9QdEFmXUUaCw6pViwV10r5Ua79rEAQW1nyOgAxHxOfUxcuNImnNa2s4tC+f5g/kt Lxo3JqQwB8vKfsicL7N5Z4fYAToo6BpZkXB9A64NjIOtzJqdKbCUUgMTWigaQsrN5C dA+rZzofdLT+Bk0heXmYXbr1LSebAIzErqI+XpCs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Vinod Koul , Sasha Levin Subject: [PATCH 5.7 103/179] dmaengine: ti: k3-udma: Fix the running channel handling in alloc_chan_resources Date: Mon, 27 Jul 2020 16:04:38 +0200 Message-Id: <20200727134937.668966561@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@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: Peter Ujfalusi [ Upstream commit b5b0180c2f767e90b4a6a885a0a2abaab6e3d48d ] In the unlikely case when the channel is running (RT enabled) during alloc_chan_resources then we should use udma_reset_chan() and not udma_stop() as the later is trying to initiate a teardown on the channel, which is not valid at this point. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200527070612.636-3-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/ti/k3-udma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index 35f54a1af29d8..b777f1924968f 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -1868,7 +1868,7 @@ static int udma_alloc_chan_resources(struct dma_chan *chan) if (udma_is_chan_running(uc)) { dev_warn(ud->dev, "chan%d: is running!\n", uc->id); - udma_stop(uc); + udma_reset_chan(uc, false); if (udma_is_chan_running(uc)) { dev_err(ud->dev, "chan%d: won't stop!\n", uc->id); goto err_res_free; -- 2.25.1