Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3585447pxb; Mon, 24 Jan 2022 12:52:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbCBCkK8m59bvFTVIyazXtjQtulowtRaHy3ecEfM30Q/ozW0ebK1jLNwGwvgaakV0d0aLq X-Received: by 2002:a17:902:8208:b0:14a:c442:8ca2 with SMTP id x8-20020a170902820800b0014ac4428ca2mr16248855pln.12.1643057528368; Mon, 24 Jan 2022 12:52:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643057528; cv=none; d=google.com; s=arc-20160816; b=x8pga+xT372TIx38git4L4uQIP7CedBUkafE4lxiAQjPk5FrGZJG9LqBTVxPimmkb3 GFuiJIEI9N3YBN0uBXTBCGVfCuV5wwE3yI0rtc7XEZ/A6diQJw3Gf2PL+xqwBreNbsWh Us1UEfr7xcw9ToiX8IyYOf3tJCdbN0QgKhg1m7miC8NQtduQEzbDkqj/bLWTYVY8RP0u fnPwHnQtmmqZMfwGT6qZTolugAGAXhLLWYwFmCqcv/mv3HfqVkdcwFexnaDQD+oWu/yF tbG0oF3cF1sKrPGYXkndKaupXAl0yw2htB6lZV/5QpJ1j/4Nm+l0HJneqPfRhCED6iiP 2Log== 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=hCJBt8R3vcZrruqBbdFWRjaM1bCpj26CTW6i4FywaBWdaCU8NWMUPFK7q03yuzhPa/ 5OTFTu2WfmjTSwljx1YTPM4yADQ7K/JIx6tbCo3X319J3oivEHOOYDt9s8cNGyEiBFwK yubT6Kb0IvWgJGLq40l1ru30/0Lo2arkgDr93D9pznt+AMeSiFgqGrNtf5xAFxsbUoOS fdHQ8Ai00oqHYT7urRAGUgZ2OinKLl0iABb+0qyssUoT6f586koZguX0xn/am112D8PK X5E5t/MjGfsqvwod9KzbfEQezVVABh7BR6w5T4waNBTk7h50Qsbzk4jXH3NpIg6quuiZ 3cAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uqZdcdCb; 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 y7si12497833pfe.156.2022.01.24.12.51.56; Mon, 24 Jan 2022 12:52:08 -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=uqZdcdCb; 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 S1356659AbiAXUHX (ORCPT + 99 others); Mon, 24 Jan 2022 15:07:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350541AbiAXTtE (ORCPT ); Mon, 24 Jan 2022 14:49:04 -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 D87A8C02B8F1; Mon, 24 Jan 2022 11:23:48 -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 2F772B8122A; Mon, 24 Jan 2022 19:23:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 469FBC340E8; Mon, 24 Jan 2022 19:23:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052225; bh=1pszC8haO9AcQCNEv/+zUuqg25w5JfFjf7bNYenSnDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uqZdcdCbo2RCuMtKSNRv9WQLP+/3gexJSjlStLp5/VM+6rvGK3lYS6eBdluuCg58j Z4fM7kbsnM5mxRojJ1gQHB+Mqz1FeY7lIZiciU6l6K+rlAHDcAD8oCocfJ2gqiYj42 0ZXCjLdreVtCYD/QZQtI8/6KuGjEJST4Tcpzvn5M= 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.19 230/239] dmaengine: at_xdmac: Fix lld view setting Date: Mon, 24 Jan 2022 19:44:28 +0100 Message-Id: <20220124183950.417192507@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183943.102762895@linuxfoundation.org> References: <20220124183943.102762895@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;