Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3685249pxb; Mon, 24 Jan 2022 15:18:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJycfSDFzG+AMlS8XLYSK2IXJwv4KUomsqq4EGBkXMR2+IOWdMO1WTVZMBxXhNdVicqZH39x X-Received: by 2002:a17:903:124f:b0:149:a740:d8bc with SMTP id u15-20020a170903124f00b00149a740d8bcmr16707421plh.79.1643066329387; Mon, 24 Jan 2022 15:18:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643066329; cv=none; d=google.com; s=arc-20160816; b=TR88wTXnkVY04LIGEKAvkdp+0OgidhyyyRk5sI5M8ejbXDMWeNSH9w5qwr19RhjwId tuUjLPytw9IVT0qlypx4W5CRMLWgPEoCNyt4+DkYOnnaxfjYFQFOhOp32VQAMNdSnlRJ 88XD/yYpBtBFGnoGtO3lB/ccOfA2Z3vtuPBiMx5zl+AjUDKAY1zCBAcAPbz+uqmi8LKS yYDfElw6AMkJ5k8aw7DvSL7qzC5gfDxQuTuc5OCuqw/0Fkm8ZwZZ+fvty7wSih5Nizkj EKBTEUpUxUcL2ncgKhGQJG/JoNrgh/gYB45R4wZdH0aC250WfLjlDUlyXnGLb5ANsANR X+fg== 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=RJn9Kcmk3EqmV/rRBI7gBTLOCLtSYB7dsi9T20lCqyQ=; b=lpLFsEvjCGH0IcS+cg+CeZUQ3Bt167g7DapOkVyH6QqPNypWJ544kZFmv9jDgL+G7g gFZSCh90bjjWE/lIjx7ZR0B4KB4so2qJBZQCrdIOUnyMNATzd99CPsaaszGV//v4GRcr dIyfELqrlv9G+e3nHA1xDPJi36qpMPcFo0Lvk2kcnVBOjqduDFI/kwpQ5irXaTfIiv/B IZoT23biPhVirD01+b4kmCN2WfMRSFWJgVTmZ7C7lXEWrMzMtY+HyaoVsI64ih8rENt2 +bMg4eh5kwaf3POYFd6VrStNT0TDPi6d+TZY3lsp/ds/EjN2GYlag+G85KVy2yEkW4Jz Bi5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oKbdkgdr; 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 oo3si695731pjb.170.2022.01.24.15.18.37; Mon, 24 Jan 2022 15:18:49 -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=oKbdkgdr; 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 S1845301AbiAXXMB (ORCPT + 99 others); Mon, 24 Jan 2022 18:12:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1584569AbiAXWVZ (ORCPT ); Mon, 24 Jan 2022 17:21:25 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1052DC0424DB; Mon, 24 Jan 2022 12:51:04 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id CE0E0B81063; Mon, 24 Jan 2022 20:51:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 130DCC340E5; Mon, 24 Jan 2022 20:51:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057461; bh=+O6Zta3ruIVFCjjsQEmorm5Dt7LAqB65TAvz9UppKls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oKbdkgdrealHg1yp9HZOPIak9ApSklkZs5V3UT4mBVdPSURAAgQJ+en2rWKoaGhYf HT89iM9E5SFMnadJ/8hs+R6NsQOM91OraG0lbxehASpd7xPcOcOecX6DqGO+wv2781 MN9qvw10bLzOXrQmMpChw1YWzOdnchQWfmdx562Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tudor Ambarus , Vinod Koul Subject: [PATCH 5.15 819/846] dmaengine: at_xdmac: Fix lld view setting Date: Mon, 24 Jan 2022 19:45:36 +0100 Message-Id: <20220124184129.150329126@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 @@ -99,6 +99,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 */ @@ -402,7 +403,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;