Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp340227pxk; Thu, 1 Oct 2020 03:55:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNDCByY0qZsGC9OMlw4dzLRRKbMEMVWTRQJr5gtvBx4JCZ6OBgV3k2mCu6LmlcOQDOLvYN X-Received: by 2002:a17:906:1118:: with SMTP id h24mr7742123eja.515.1601549737410; Thu, 01 Oct 2020 03:55:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601549737; cv=none; d=google.com; s=arc-20160816; b=iRQ0DjEP8PIM5oFPLkuFLqzar7HKITXSEAFuBnF+siBM8JVMxK0P+yDt9y6OI5+Z+o 8Ggb0VZSLzwErxIrqKKdE7svMmhEgRxGp8fvvL3AEEWhTD1714O5mJtDVXJFEu7z8Ojt QU0avLxZYjDn08axwXnbmLFptfAV4Q3iKHPnNDrWcu24jdioLOlrbPsuLtPfM/UzFSw+ lJ7bZAMBU16uTAEMTbFKY0BDSnb43GNoccjdFrObNEn9hQXLMR9a7nshYzOYqOFqhTNq Coz0E8SD8sNDp4DVk/2q6VFQIMIuwwCGeYHX2niY/Cg99hAb8YTtRNJlI5QL+vMYJb1s pBCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=IcFQiQZum5hWGGwxpKSprsiXp3l5KT0+hNGM5dt8iro=; b=f1Q9UoZu98MMPvS5SbRHDKr05WYWGB6xj1Oojg3EI0fBaaYFTZEkC94zRbSJrpEEav X/8LQttJZw/1jujQmeFMjsVnS337SiTUeTOexiZc+9in+APKFqYQYZnJZ/gal3cdFBbD K+XDIqOg9UhMtYgexx97IFlDNKhD1dAMSm+DQYlVRaM/iQlN2iVWY7wSZDTWV8e+R1FG gEcWcqQ2536JxKxCAA3Jf4eRo7bXR7pF5n/w1e2tyNK7ItUh5ZOoGyF4Ht/4gf0BVtXN ooPYr1yieFuZlrQuqGkkbHyct3KOkDKzpy399IpT9j8417qmM3qdV5a+1cvqnnSspK1w SKEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=LV04TV5D; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k12si3143042ejp.206.2020.10.01.03.55.14; Thu, 01 Oct 2020 03:55:37 -0700 (PDT) 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=@ti.com header.s=ti-com-17Q1 header.b=LV04TV5D; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732276AbgJAKxr (ORCPT + 99 others); Thu, 1 Oct 2020 06:53:47 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43082 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732208AbgJAKx1 (ORCPT ); Thu, 1 Oct 2020 06:53:27 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 091ArOvl064271; Thu, 1 Oct 2020 05:53:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1601549604; bh=IcFQiQZum5hWGGwxpKSprsiXp3l5KT0+hNGM5dt8iro=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=LV04TV5DiqKDj0msgUmVitPm+kjFcpwnI0P7Q50OVBWVnW3XY0PlMgn4sJih2M3gw OHsKmmyGJYxal9iuH0guoDKRFD/5Im7Qk4OnQvuvs1356gdcn7l2KZxzKKoaGGxax4 uapbs5rL8uG73kSNhSl5OxJw9AlI+btG1+mAa+oA= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 091ArOOf026235; Thu, 1 Oct 2020 05:53:24 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 1 Oct 2020 05:53:23 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Thu, 1 Oct 2020 05:53:23 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 091ArM6W129850; Thu, 1 Oct 2020 05:53:23 -0500 From: Grygorii Strashko To: "David S. Miller" , , Jakub Kicinski , Vignesh Raghavendra CC: Sekhar Nori , , , Murali Karicheri , Grygorii Strashko Subject: [PATCH net-next 3/8] net: ethernet: ti: am65-cpsw: use cppi5_desc_is_tdcm() Date: Thu, 1 Oct 2020 13:52:53 +0300 Message-ID: <20201001105258.2139-4-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001105258.2139-1-grygorii.strashko@ti.com> References: <20201001105258.2139-1-grygorii.strashko@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use cppi5_desc_is_tdcm() helper for teardown indicator detection instead of hard-coded value. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 6cea338df7ad..65c5446e324e 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -767,7 +767,7 @@ static int am65_cpsw_nuss_rx_packets(struct am65_cpsw_common *common, return ret; } - if (desc_dma & 0x1) { + if (cppi5_desc_is_tdcm(desc_dma)) { dev_dbg(dev, "%s RX tdown flow: %u\n", __func__, flow_idx); return 0; } @@ -935,7 +935,7 @@ static int am65_cpsw_nuss_tx_compl_packets(struct am65_cpsw_common *common, if (res == -ENODATA) break; - if (desc_dma & 0x1) { + if (cppi5_desc_is_tdcm(desc_dma)) { if (atomic_dec_and_test(&common->tdown_cnt)) complete(&common->tdown_complete); break; -- 2.17.1