Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1567632pxx; Fri, 30 Oct 2020 13:09:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxE3Q8gHQzHsuXHxQFohOuYzHNlDhu+vrZL7/GuLnW5JtlNyZwed0T4Hav69nyS+xo70Sw8 X-Received: by 2002:a05:6402:1684:: with SMTP id a4mr4218311edv.79.1604088568703; Fri, 30 Oct 2020 13:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604088568; cv=none; d=google.com; s=arc-20160816; b=J44SIPt4IjfPizeiWN//y/5HdyLaTZS0hGjePmKH7iiN5dz6x+M9uPTMDbsZnbsJmV kibbf2/bVZtOZpyP0flkMMaOMqeRhR+LAvRRMz8twf3sdl4N87vOr/i9s13upvBwJRxG sG6Yyh+bIeGoZQA5T0eOTMDx5q7fYdEwFvoRzzIw0r+l+kPIGDwfJgnJmXAf5RuVSjYc eT34WgPnNShcQf9ks69neOiyj13/yd3YlSMmFN3tj1OR0B/ok/WRVcNB+r/yVsIyVN/6 jQaadd9BkcU4+yFYt1EpF9CUKKAH7QDjOHJBQuvPZEOtFq1/NeeBPqWnxXpd5rmrOoZC DvLA== 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=kKKeEoVssnRvMPdteAC5nlcL9gYwqShFP+khxoCfw3o=; b=FCipQpT8047RLSH3zOCzqGRXOZ0sGbeGQBUyvZa+76zdOyIyC1HILS3LpftmXckaEC BXCGS9FmHk16l1cko7xid3CgSHTikQWzRKcm3vPb46uunzQbQr8KcpYDWWxDHcukc4s1 GLIiv3uuoRYDZt359Iufcj4ZEZLwuIP791dfm0xUY5f1vlD/Hx77qYSGbq4Dt5Kc1Y/d XQkuHdU9EZ1RSIIuIRUwbyPBO1utQ81OT7jiIT+L8zTLZHwRxItrr1rHtcclUskSn47c xz90oGu/wDh1fZoV5FYPzjq4XWgWIcpjUUUeDpkSf5HyphkcKB4pKYrDO4VVNnZlSHFX FhAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=qUWp1jHX; 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 y17si598748edl.557.2020.10.30.13.09.05; Fri, 30 Oct 2020 13:09:28 -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=qUWp1jHX; 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 S1727737AbgJ3UH1 (ORCPT + 99 others); Fri, 30 Oct 2020 16:07:27 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37760 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727074AbgJ3UHY (ORCPT ); Fri, 30 Oct 2020 16:07:24 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 09UK7ItB104209; Fri, 30 Oct 2020 15:07:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1604088438; bh=kKKeEoVssnRvMPdteAC5nlcL9gYwqShFP+khxoCfw3o=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=qUWp1jHXNsGDH/E8KisObgiZF3n1t6JraIIAkdyR610nnF2pD+Q57BrJDtxENBVpL DkJLKqLD8KMsNDfdV5fn3/LHHxGPIPoQ87HOm9KPK756NTKVc0i98v+cA5FiCsNHj1 Iq6nAulU06bekommpj8qbwAFepGP63s7Us+vBGCc= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 09UK7Ipt051971 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 30 Oct 2020 15:07:18 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 30 Oct 2020 15:07:18 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE115.ent.ti.com (157.170.170.26) 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; Fri, 30 Oct 2020 15:07:18 -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 09UK7GcZ101456; Fri, 30 Oct 2020 15:07:17 -0500 From: Grygorii Strashko To: "David S. Miller" , , Jakub Kicinski , Vignesh Raghavendra CC: Sekhar Nori , , , "Reviewed-by : Jesse Brandeburg" , Grygorii Strashko Subject: [PATCH net-next v3 03/10] net: ethernet: ti: am65-cpsw: use cppi5_desc_is_tdcm() Date: Fri, 30 Oct 2020 22:07:00 +0200 Message-ID: <20201030200707.24294-4-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201030200707.24294-1-grygorii.strashko@ti.com> References: <20201030200707.24294-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 Reviewed-by: Jesse Brandeburg --- 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