Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp93001lqe; Tue, 26 Mar 2024 22:43:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCe6M6HIok52F/rcdrqf7F9oZWLbuDeq1UWmvZWRMjfXZXSB9vPivRi+//GpRvv7b4n1uptwjmX90Ek4SPzbaCeoe9bimaMVU6U56EPw== X-Google-Smtp-Source: AGHT+IGe+qsxiS7XTXMXRgFdry44xFZdZlXoiTYVZI4hz4BDP0lKjmzP+/sClN6hdn1oDLDxBi5b X-Received: by 2002:a05:620a:8cc:b0:789:f0ac:1b5d with SMTP id z12-20020a05620a08cc00b00789f0ac1b5dmr236352qkz.34.1711518194365; Tue, 26 Mar 2024 22:43:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711518194; cv=pass; d=google.com; s=arc-20160816; b=EnLUdXcui5/tooDqEyEc5WL5yuQUDHdjw5HIoOmaldV/M3ioTYyGwcWMB69YpMeXsP CHmbJArnYPX5X85PG1CC3OCuNo65XlCFCwWFPs5pHKuJYJ0McmLBx8rQFlGorzbunwYk wpwpk6Cvasx4/EgSc+RnUXo9Hx9Dw06qxx8Ach8PPc5inEf3+0CVQDCcMDNhhuF61fKi beGWpHN8Q6dV3HnnGlZEc/d+N3I3sUNvD/2QbVp8XhvK/2YOb8xn9sW4yU66YTDsRzrh RJnrYYCic7O4SwRdFplHGXeHAGkuBfWBrL52qI1d2J2k9NxZUxtpAeTDIicowkN81Und Pmig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=SXnJ/nkGq8MQYcYDTq+gWGEJI4HADRdErVvMi57hR1I=; fh=2R03CoGtO6TEr6lAfccZT/JZAr1qKnbvARihla1UyPo=; b=aHq9uSjPEJayiRWEINzjCrBbT+foYhLzGXjj/wcqCOAOBH8ZlKqU6EkJWThcnVdXvv kU2d5daDL+2ZoVJf8oFLTAHPBF7K/uXcYQMbiHEp7AkfqVXfZJ1siDnUPSL9CTj+wZOV uz+4JU9+WlrwJleXZmWymkLZDNFDItZ5/ipbqYlmMxoLyyaDLhvg1fRWmk8emezLT9um DDj0Vm1LgFxwhqv0TwFW0u/KrxbsvyOEWASNBumC2wLbMxPIozxJdcIsFOFTblT8e9jK XwVqHu/kHrqXESVr9hq6o+s5r6bGQYAUTWCJt1wsYtQhMxNrU/RddRa5+n0TNpoYl/qZ Gz3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Z0LipRbe; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-120336-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120336-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pa48-20020a05620a833000b0078a3f30bf78si8746789qkn.6.2024.03.26.22.43.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 22:43:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120336-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Z0LipRbe; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-120336-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120336-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1AFC21C22DEB for ; Wed, 27 Mar 2024 05:43:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65AF51BC40; Wed, 27 Mar 2024 05:42:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Z0LipRbe" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBF60134A5; Wed, 27 Mar 2024 05:42:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711518174; cv=none; b=MqTQZch4Pz9Y1ml3rdJ9pJrIDYSh4zQkFTGQ1/uxhSiDeWT0GvfSahseX0s0B2nt0tR1yrVSovRuPX+7JhapTX6zeJnj0axNFlA7/3QqpMIE+dylOZ/BzCze6SVPeWAaynzwg3kQJmW+kIn5iaH5rXUhPjQ+6pE2r2JVA/LKEig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711518174; c=relaxed/simple; bh=gT9JMuRKI4jdYdmjO6l0bHa8hzlKAHE36LSilQNd0+g=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Sh7N8JS4uI5MOvlPWdKGcjHI/s2z3lJJDeWHeOTbj2NCpjEzpXD0Y5FPY/OjY5l1col77qgHfDYWZTML8s+cYv//MD67cbysIUCx0TyW50oFN+m5cPAkzADPT7d1m9oPd8dt2AiMXpvhioMvaK0CT2h5W3RHz4SvGBwjfW8TjQ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=Z0LipRbe; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42R5gePk100705; Wed, 27 Mar 2024 00:42:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1711518160; bh=SXnJ/nkGq8MQYcYDTq+gWGEJI4HADRdErVvMi57hR1I=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Z0LipRbe5T1/SMI6BuPT3e8pgGXiyRlE1WaHsmz7hxny5GVafYQTSrDfsebiIsOdR BeVLP8d61XCfg1kZRR9XxbQvFlzdyy7Jc5C+uoHWPJNb40aB2TuRUPN8NsPxlG60/h NSZrAwRlnZkEqE47UFtTuTOsGBxs9woYvuEGKeOg= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42R5geoK002234 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 27 Mar 2024 00:42:40 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 27 Mar 2024 00:42:39 -0500 Received: from fllvsmtp8.itg.ti.com (10.64.41.158) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 27 Mar 2024 00:42:39 -0500 Received: from localhost (chintan-thinkstation-p360-tower.dhcp.ti.com [172.24.227.220]) by fllvsmtp8.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42R5gc1N018526; Wed, 27 Mar 2024 00:42:39 -0500 From: Chintan Vankar To: Dan Carpenter , Siddharth Vadapalli , Grygorii Strashko , "Heiner Kallweit" , Vladimir Oltean , Chintan Vankar , Andrew Lunn , Roger Quadros , Richard Cochran , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" CC: , Subject: [PATCH net-next v4 3/3] net: ethernet: ti: am65-cpsw-ethtool: Update rx_filters for CPSW's timestamping capability Date: Wed, 27 Mar 2024 11:12:34 +0530 Message-ID: <20240327054234.1906957-3-c-vankar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327054234.1906957-1-c-vankar@ti.com> References: <20240327054234.1906957-1-c-vankar@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Update supported hwtstamp_rx_filters values for CPSW's timestamping capability. Signed-off-by: Chintan Vankar --- Changes from v3 to v4: - No changes in v4. Link to v3: https://lore.kernel.org/r/20240320102600.3418248-3-c-vankar@ti.com/ drivers/net/ethernet/ti/am65-cpsw-ethtool.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-ethtool.c b/drivers/net/ethernet/ti/am65-cpsw-ethtool.c index d6ce2c9f0a8d..a1d0935d1ebe 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-ethtool.c +++ b/drivers/net/ethernet/ti/am65-cpsw-ethtool.c @@ -695,6 +695,17 @@ static int am65_cpsw_get_ethtool_ts_info(struct net_device *ndev, struct ethtool_ts_info *info) { struct am65_cpsw_common *common = am65_ndev_to_common(ndev); + unsigned int ptp_v2_filter; + + ptp_v2_filter = BIT(HWTSTAMP_FILTER_PTP_V2_L4_EVENT) | + BIT(HWTSTAMP_FILTER_PTP_V2_L4_SYNC) | + BIT(HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ) | + BIT(HWTSTAMP_FILTER_PTP_V2_L2_EVENT) | + BIT(HWTSTAMP_FILTER_PTP_V2_L2_SYNC) | + BIT(HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ) | + BIT(HWTSTAMP_FILTER_PTP_V2_EVENT) | + BIT(HWTSTAMP_FILTER_PTP_V2_SYNC) | + BIT(HWTSTAMP_FILTER_PTP_V2_DELAY_REQ); if (!IS_ENABLED(CONFIG_TI_K3_AM65_CPTS)) return ethtool_op_get_ts_info(ndev, info); @@ -708,7 +719,7 @@ static int am65_cpsw_get_ethtool_ts_info(struct net_device *ndev, SOF_TIMESTAMPING_RAW_HARDWARE; info->phc_index = am65_cpts_phc_index(common->cpts); info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON); - info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_ALL); + info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | ptp_v2_filter; return 0; } -- 2.34.1