Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp842332pxu; Thu, 15 Oct 2020 19:04:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5MpK6N8dlQgpH35WssySiGNYU4aUu7OI/cORA4LOLADoFBjO8d850fz+72xyOabFnivR3 X-Received: by 2002:a17:906:4a4c:: with SMTP id a12mr1322831ejv.392.1602813781237; Thu, 15 Oct 2020 19:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602813781; cv=none; d=google.com; s=arc-20160816; b=QNGRa8eeM3kV0inSKJVTblGvSHcTx1o2lf72wC1NZx5ugG3jdWzLkjqauvJYEsdhfp vg+DLFvb5MFLv2VMzLq6PexCsMzNxoI8JF9hy5FshJBP3XxuiyOwuBO3dh2AUj9D2qaH bFR9EYuND2wwce9rjkpeTuGjtFvsKUWEIUfMEC6Ii9dJBsdcKNxVveyNyKIeHnBVPkgr BsfwsNy/aHCgMhiGD8RXF1HRERX49O0MkkwWPP9IgENOWACFIecjZt6bsbWVIO0xXfo3 1dgix3UmwPCZGmNjj7pRirAnM0+F/ouW68ZCtOId/SXJo+q5ktVTfRDXgldYkVhWqX72 IjZA== 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=L1J/DhGtB2vDEh09ZXYBANsKkdsmSa48dCS6N/OOinQWZTcH4D5PDw1ti0W5y8De0S EwELmlSxIU7SCKskvO7mbg1M7PGPblvuh4hh1BvaAbB0zL2snG0H/UG4b1b8CNrdXZDq 74Or+It7Lm0LupET9QGqFzZ+77bftljFt7rTfOhMxWfvFABNXdzXSxen4u2w2i0BiR1J 1ASO9EMsB85h6XTaxXtnSTOK9xGVZwEyl7qbBqWVCUfdXfn8i5wh0H7uaezO5jJGnNZb MArlFCDeXukxp0sjGeWlQ01cFk9ksJi3nTbrg6BgK1/+LHJx01T0xnZvU4kj9NvI2Ynt WkIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FgFO8FTF; 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 w27si639423edl.279.2020.10.15.19.02.37; Thu, 15 Oct 2020 19:03:01 -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=FgFO8FTF; 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 S2388305AbgJOXTy (ORCPT + 99 others); Thu, 15 Oct 2020 19:19:54 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:44736 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388229AbgJOXTt (ORCPT ); Thu, 15 Oct 2020 19:19:49 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 09FNJkeb079951; Thu, 15 Oct 2020 18:19:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1602803986; bh=IcFQiQZum5hWGGwxpKSprsiXp3l5KT0+hNGM5dt8iro=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=FgFO8FTFgBQgSaNHqcUgH8yiWxBMF7JonepWCT1gRc2wiFMZ64nmIUHpavO8Q+XnR r7iSNlgB8ZoRWa8CmGjMFOgrKrZvc5NjDMwTYu7+RbJv204DjoACRuGiaQK4lnqw44 OCPVf8dE7XigELJlD/7uvt76K5g88MTVO0NkoRsQ= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 09FNJkrV127420 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Oct 2020 18:19:46 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 15 Oct 2020 18:19:45 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE105.ent.ti.com (10.64.6.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; Thu, 15 Oct 2020 18:19:45 -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 09FNJiiZ093329; Thu, 15 Oct 2020 18:19:45 -0500 From: Grygorii Strashko To: "David S. Miller" , , Jakub Kicinski , Vignesh Raghavendra CC: Sekhar Nori , , , Murali Karicheri , Grygorii Strashko Subject: [PATCH net-next v2 3/9] net: ethernet: ti: am65-cpsw: use cppi5_desc_is_tdcm() Date: Fri, 16 Oct 2020 02:19:07 +0300 Message-ID: <20201015231913.30280-4-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201015231913.30280-1-grygorii.strashko@ti.com> References: <20201015231913.30280-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