Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3556574pxb; Mon, 24 Jan 2022 12:08:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDtiaJqLip4nlJz6bWsZjIhRJBB2UEXFv161ENIlyzLHe9nFtmg6Q1cRiM6BHgWUa/CI7/ X-Received: by 2002:a17:902:b944:b0:14a:b045:4d00 with SMTP id h4-20020a170902b94400b0014ab0454d00mr15796466pls.52.1643054932653; Mon, 24 Jan 2022 12:08:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643054932; cv=none; d=google.com; s=arc-20160816; b=teusDWxzaUYgHrNj/Mf70cFNNEvBYDBgz0WYVK15f/JHEq9W4tsXUGRED6vOhDIV+M BOpUHaS22rqQq3VG4So6ubNe7+u9eTVshEXkggK/Xo+fpA54dkT+UyQedEUT1DC6GYno h8+OkR3LxVPoO7c/9qSQeKKpZ6kbOXOKD1jlw26dNCdszotUDbgcjesDSGz9d8De21YB fOEn0GRBhgePNW4HTCVay0jcencFIk3xWkBVuDeoYXYihfudBl4G5r3iRnKexGRg1ouZ lVKFDEnWNFmZM32082APl9O5YpfXi8ZoLK2ChW2KBVS+KA9vqeOlZBwbjUa5lLKraLc6 Nz0Q== 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=PK34H7NtmAUI5mzRqw9vhcFIk8IBEVJKlp3ANT7kCDz5jmsDO46HNRJGktZmaPQtSa +W+J//QknuM3rahmW/GGO0BNafwWQGNMiRjLLslAU23RTIujBMBnLWQcGnFW42bIZHHb kP72uiQ5zRzWHdDBj5EP46/druYCgfp7Kvi7jqb5dX/HpdnOx5i3BPzXxwY/ijbvvLRP rGBbjN6ZwcqOJLZkl1JKREbWWBNjqrSIpCjkO1iEUSvqhZRT79LeLzKyErApoZFsXg5n WU/zbby2Mr0wpt7w/kEzAU8KReHs5aeUOuxmOqWlKYy2157J0/Iwe0nBfrHW3vccla0I 5Y1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Yi1uho5+; 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 x9si15276063pgu.748.2022.01.24.12.08.39; Mon, 24 Jan 2022 12:08:52 -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=Yi1uho5+; 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 S1346985AbiAXTJW (ORCPT + 99 others); Mon, 24 Jan 2022 14:09:22 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:57388 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343706AbiAXTBT (ORCPT ); Mon, 24 Jan 2022 14:01:19 -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 ams.source.kernel.org (Postfix) with ESMTPS id EEED5B81232; Mon, 24 Jan 2022 19:01:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FE0EC340E5; Mon, 24 Jan 2022 19:01:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050876; bh=5Xvu8d/C0wWF0Z0O/hZRvCFnTmXcuejuftS0FbGyOM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yi1uho5+QbjOGPFWk3pZ27H9JwaZZktylyOJIdF/m0RRx8y4gs09VQIhQKi/DMhYK +d+xVPEfTb4LYDPFzeWdjEe+YGvxTjwrnTFM3ob4zsuPSUIuyp6pCzPTqfTtMdTpTt At3RVN4Z/t80gMpvgpeOg5BfBV4w/zfUcyJRck2A= 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.9 140/157] dmaengine: at_xdmac: Fix lld view setting Date: Mon, 24 Jan 2022 19:43:50 +0100 Message-Id: <20220124183937.210054947@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183932.787526760@linuxfoundation.org> References: <20220124183932.787526760@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;