Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3549967pxb; Mon, 24 Jan 2022 12:01:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrv2Fss/IHNTE855j/+LA5VWfvC0vkJnN2gzsRJdhJHj7CgZsjfcWGvC8cA4qDNCrijuks X-Received: by 2002:a17:903:1c9:b0:14b:5fe7:e1b9 with SMTP id e9-20020a17090301c900b0014b5fe7e1b9mr3713092plh.118.1643054460662; Mon, 24 Jan 2022 12:01:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643054460; cv=none; d=google.com; s=arc-20160816; b=cRwshALqey20XaB6FY02qRr6WT8rXVRTQEqkID/PdyvWAspy/pFC2D3tY3Blp7XWQe aCuGLFzDya1pjvq8Ubkys0+yqRtEqcaZMiYX3GBVO0wR6zgrXbReanTP+8ghZ7AHuecN nJ6eYHYPm8s6q404/qVcmymJSlMRLXd7oeMbyo5KQpIMx/7ldqs2JOVqQvIdfOnjQU76 r87TYJCNOnJr/igL1o25pak+dmUk6ZcNA7lspoP3mUGbxbThirvHba1+2QFNLMKGXKZ4 SJOP9cgEBvP+ymNB7OO717anIs3OQNTfmHreO8kj8a4MPuXt2n5b2D+uJ4r7u4KRIlob 1d9Q== 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=X6Uac7NNAH5KWCPGD3M5A0diBGZi5r9nrjPb4h5Fcvg=; b=rlki+sZnbbrht8cnfvCJcgkAtD+/pAO68AbBzfOwL/uB82Mg1LvCq2PplRSu7A9cT2 qgnVt0HS5mr1bYrHe/IYaCOrIH/RPW9xlUMNU12BUuPeHx22Za7V7IJNbRpSwVnzKY4i xZBIAcyQ0O79mmYUyKAyw+J5cR01UuReFCFNW7YI9usnwMmx6K298Iv5JNU4B87rlOWN a1rZTzLW/RzG6nROKSo25OFQRi+OLYVO4HBiusMcMuv9Z2a59pAZeBAel5t+/UXU/eVG iW0A4qTTiqAQS1Uot8llzBVZTfK/kgwba3CTZFFOq5ivD/V8BDgnfys91bVUg6nrA5dv Sggw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=locq8A0q; 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 my13si734710pjb.1.2022.01.24.12.00.46; Mon, 24 Jan 2022 12:01:00 -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=locq8A0q; 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 S1344249AbiAXS6Y (ORCPT + 99 others); Mon, 24 Jan 2022 13:58:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344530AbiAXSyq (ORCPT ); Mon, 24 Jan 2022 13:54:46 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EA8CC061394; Mon, 24 Jan 2022 10:53:36 -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 dfw.source.kernel.org (Postfix) with ESMTPS id A087C614E3; Mon, 24 Jan 2022 18:53:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E806C340EC; Mon, 24 Jan 2022 18:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050415; bh=5Xvu8d/C0wWF0Z0O/hZRvCFnTmXcuejuftS0FbGyOM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=locq8A0qfIrk5HT/7iFzihBrJD0g1h6ocwlw7Ud5eeQUJ1kk3kwW1BUOgi/eu3u17 X06mdOYjDOOXHvAxzCfRBNo0j9hARfzXGBPTPcvCTBJVMCtAQn5OWz53X7IGC0zfmm EMb7JEpCRqmMGVSasLbOaWrhAQgq8p55TXkXcTq8= 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.4 110/114] dmaengine: at_xdmac: Fix lld view setting Date: Mon, 24 Jan 2022 19:43:25 +0100 Message-Id: <20220124183930.501498125@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183927.095545464@linuxfoundation.org> References: <20220124183927.095545464@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 */ @@ -360,7 +361,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;