Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3563297pxb; Mon, 24 Jan 2022 12:17:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLGJe2otXliy/+UeitssB2AmLP4lzeHj+9fOQgGhE6oMGQt+s0ZVZIjhO0+yqw6mG70JAI X-Received: by 2002:a17:90b:4b05:: with SMTP id lx5mr14533pjb.128.1643055473025; Mon, 24 Jan 2022 12:17:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643055473; cv=none; d=google.com; s=arc-20160816; b=tcTu2A2NlbmMmcV58IcjpmXWDa/qBynIgrZ67oO/O+rEbo0knhr9ShHRaKwIeIpLan ggGXcafnuv3R0aF2uBVZAKksKMyHNEnaPAxSA18K67v9vKFQEBkOPCTqUp6y1oRkgkYl x/OrOH6QWvD9PUQw97vonDi6cCG7HM2/NP7Y2J1wA5jAG9bat7nuzdBsnbdX8hGUgD9Q dITjLvpNZRVayxJhiefWlmJ2WCK4QTMEu+OO7k8eKrwLV5SnvJ+bOYIyzVKzWJf1cM+z Tn3zmKDnmr+8/B+qhN0LUl+ALjBTwG0iy65+7IxPMLczuA9OlNPaekoiNx93Fak9FJLl 0Buw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xG+VRmwf0TE/I/FTZmgneIGSsGmkN8hGqgQRoNDAcpI=; b=G3h3/BP7ZJ9ezX/ouvXWd7UE54wB4JDyg71TN7g11z2SzJ9CXnRCSrShgIQJwQAKSx OHkHrAoVHEyd1wh49QNFNk0Kq2BaaRqQyCfxYkiL22s5lueXkELwLj8jh4RWyR486X2n 0LctVRlb/D2MqAZNuhvw0sT4mixrDlW22kW4NbBk7r8JnAVMOFI/gPCNxEtvXkTaW3pC 1n+xEvSZQCHk2vV92s9Nrpnj+qwHxR4oUu6PyuMdoAUBBlRyEmVFltZjpuVXdD41jgCB TjZiXBaaTfWnJB9cZllx4O8LDTyshT6zKIX14UWXhQDwlUMMYWtOHSSMHQmMASyRIh3r HWPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iPUxlK0I; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si13955060pgr.180.2022.01.24.12.17.40; Mon, 24 Jan 2022 12:17:53 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=iPUxlK0I; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348956AbiAXTT4 (ORCPT + 99 others); Mon, 24 Jan 2022 14:19:56 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:40644 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233789AbiAXTLU (ORCPT ); Mon, 24 Jan 2022 14:11:20 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 21F4961291; Mon, 24 Jan 2022 19:11:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D51A4C340E5; Mon, 24 Jan 2022 19:11:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051479; bh=1pszC8haO9AcQCNEv/+zUuqg25w5JfFjf7bNYenSnDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iPUxlK0IuZUdEbdgfvv0sIoS1HXq3krQ/WwRo/VyxbnzTbPA9GNzT+XWfC3gsiHR5 Uq7juqXZpmUdNRAJ2An3MWKsyZqcmxDdYLK08JwQRT+06O8xdNNQCobZcItKo/KSpK 3a5dAxlv+5wB5KjCGK8YJuLysdluzuW4qkSZPwog= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tudor Ambarus , Vinod Koul Subject: [PATCH 4.14 174/186] dmaengine: at_xdmac: Fix lld view setting Date: Mon, 24 Jan 2022 19:44:09 +0100 Message-Id: <20220124183942.706499188@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tudor Ambarus commit 1385eb4d14d447cc5d744bc2ac34f43be66c9963 upstream. AT_XDMAC_CNDC_NDVIEW_NDV3 was set even for AT_XDMAC_MBR_UBC_NDV2, because of the wrong bit handling. Fix it. Fixes: ee0fe35c8dcd ("dmaengine: xdmac: Handle descriptor's view 3 registers") Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20211215110115.191749-10-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/at_xdmac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -100,6 +100,7 @@ #define AT_XDMAC_CNDC_NDE (0x1 << 0) /* Channel x Next Descriptor Enable */ #define AT_XDMAC_CNDC_NDSUP (0x1 << 1) /* Channel x Next Descriptor Source Update */ #define AT_XDMAC_CNDC_NDDUP (0x1 << 2) /* Channel x Next Descriptor Destination Update */ +#define AT_XDMAC_CNDC_NDVIEW_MASK GENMASK(28, 27) #define AT_XDMAC_CNDC_NDVIEW_NDV0 (0x0 << 3) /* Channel x Next Descriptor View 0 */ #define AT_XDMAC_CNDC_NDVIEW_NDV1 (0x1 << 3) /* Channel x Next Descriptor View 1 */ #define AT_XDMAC_CNDC_NDVIEW_NDV2 (0x2 << 3) /* Channel x Next Descriptor View 2 */ @@ -359,7 +360,8 @@ static void at_xdmac_start_xfer(struct a */ if (at_xdmac_chan_is_cyclic(atchan)) reg = AT_XDMAC_CNDC_NDVIEW_NDV1; - else if (first->lld.mbr_ubc & AT_XDMAC_MBR_UBC_NDV3) + else if ((first->lld.mbr_ubc & + AT_XDMAC_CNDC_NDVIEW_MASK) == AT_XDMAC_MBR_UBC_NDV3) reg = AT_XDMAC_CNDC_NDVIEW_NDV3; else reg = AT_XDMAC_CNDC_NDVIEW_NDV2;