From patchwork Fri Oct 30 20:07:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 320036 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1724088ilc; Fri, 30 Oct 2020 13:07:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2oTF9ZTjuKEfIG1/A+V+cNQY55L1k4gYovUFDgJ/4UeICXPsbpJtWvSkSIbMNRiWBav9F X-Received: by 2002:aa7:cd90:: with SMTP id x16mr4191935edv.302.1604088450661; Fri, 30 Oct 2020 13:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604088450; cv=none; d=google.com; s=arc-20160816; b=uLAW8sFl4haqb5R/LI056VYBr13hD0ELSmj9twiemHPf1VuX2deGmILA4iu+8xxrB4 pFgKNcjlpUefczWJ1qZBIAZ4XI2rbIzRFeKej7xXvWAE8hJOjPgqIhVCUxLeIWAztx+T IBPCWz9HpDGxj7Plf+nlFFmOZmg2g9P/5MZtdQBRngW4gWBPOG7xPlEnCXdppie/oUPG UW1zHYzrWovpYygRPNCh2BnX0d4E7JdtcZ9I09mFJr3AFynMclpDcsXX5m4wzBSCwo3z sJTXdW4jH19sJ9vKE23y7PutLWoXiJ4fnybJW3ZQChEhFtDbXPp1XNko/kkWktRhEcxy otbA== 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=HQ726C5lvZQnikGyY4r7XbuLElGgsITCSgNgVohFgS1Mt/2IlPDLsbcJCVSPWqHyHt g0eA231d4xKVVpbNp2ibY3ZRJJQDBblq6T9VMRK8HXMl1FaixBFWI1PjMcuxqu62OnfG 9MOGPOl0jo8GCHsV6GkFmyuazavU0pz+BliADC/AeVUH3WF92jJfcJexn4qUJyRt+kH2 FcVeIM5nNBCqCb/4oVU+TScA5T5l+Ju2DlrPGoJQ12RpH/acXKZVqM/nbfMcn80M0XUy dDsX1uEDeX+FFSsgoDsLIhI6xRGEIVjAJxjIQXZCDG+l9vRaJBpdGQ+QsT+XuAfJa40v 0jCw== 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 netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 n13si5106890eda.416.2020.10.30.13.07.30; Fri, 30 Oct 2020 13:07:30 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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 netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S1727739AbgJ3UH1 (ORCPT + 8 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 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: netdev@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(-) -- 2.17.1 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;