Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp950692lql; Tue, 12 Mar 2024 03:03:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKVUtaAaHHn3x+N6zZHS5uQI40NvJBDuH3VOgzdM10X8sJFF4rHNybH8H4ZJuGBLMxV2VDvbMl65sPsM7FUB7+NozbZUcSAD5Q2eIorg== X-Google-Smtp-Source: AGHT+IEYCvo46FZsjzpkBAYzX74gPmaAWGo21+W7lbulg4S+/O4XNuW/5MIZvq5YZnQgWaO+9oPI X-Received: by 2002:a05:6870:204e:b0:21e:c5d7:5966 with SMTP id l14-20020a056870204e00b0021ec5d75966mr8106980oad.54.1710237794368; Tue, 12 Mar 2024 03:03:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710237794; cv=pass; d=google.com; s=arc-20160816; b=janXED+1onVJVC0RLX8G5pjB/1z53JmJwqEBU7hDLimSnTY9pfcAvok2qAoNQU065c TGBwTAbZZerJAKs6wuePL6pZX/SjVdIEUPIY5TaKdUmeEUqsEnRfmn5g1lC7H3cCNUJH HqzNR1DGhbuJxpMCUJCP/qL9C3iWzZS1qwsAGdNggNjs1Cc4yQzFE0dVOz3MTd9kXb26 qW2mlZhrpLHedBHtTqGX9J/W6vAPFWGaK/y/eqZozFUAsMAK+GbM0HCFoNnnknXrV8UV TXdiEz89pChjdl2oSTsnUx/Oz3vZyR1S/FQpBRpVDlvOc56WdGF7d69EGAZTpl/S7jQO Ap8w== 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=/xqGfD1xDzdX3pXWJ+m04kLd2BeOZdfT2Cv3ra7gfAA=; fh=crexIvUApIzm/BHSMXg0ur20as7bBvKKuTf7EodP1Aw=; b=tIsgJWD/QAUY19HaGi9NRKyMDDDvTH1xEnVmjjRijFECspg75NPfZTAlelWipwHeS+ Wq7A91/rT4fIJQD8JsNFZuuItQAZWEhl+DU4IFhY0vRyD+DX9N0iFd7DIBCqcYTvfKQQ Lz455U+Fff5zOJwf/ffdQXMaTFgAPZnWTILGlpuuj4qy7yFv0Jk7jxs4MRrsZYPQH90h DFPytJXku4Ivjg/SPhEZDNkBINM+/uOoQYX2EflzyBzpA63t8kZyMVLGDySdjxA0kOsW iI97t1EBBSBz63cXfRpvHc4GJza5p4q3VUgJrvoRBCYTDhG/EhH8hb69GKLzeDAdlzwp PAWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FM7kufMR; 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-100087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100087-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j11-20020a634a4b000000b005c600ffa335si6559182pgl.217.2024.03.12.03.03.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 03:03:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FM7kufMR; 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-100087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100087-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E5ECD281A7F for ; Tue, 12 Mar 2024 10:03:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A71378661; Tue, 12 Mar 2024 10:03:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="FM7kufMR" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 C6E4233994; Tue, 12 Mar 2024 10:03:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710237785; cv=none; b=PUFn1D1Y77N2KdL/oT0D31yDPU2PhCQSsYwTfQ/VKch5j/KaWMraD5U/w7KI41EojVWlZ83V+Yk8P6Q8pItZ8KhNfLQzJuOWUvQ4fbq7cq+YCxFgoBM8sErqOSn6L2U1QpiSYeAT6bpFHP54NvPZNYYB+cH4/YBpV2ws9wdubmE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710237785; c=relaxed/simple; bh=DskpTvr5tqLs+ZTEGN+HyiY1/Zyt8F2f0qn3bJEqEZg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gtQWOYHlMCuvMgAmewyC0haZs6eU09uybxCyMoz64WU2OSipVxbuhPpRs5AXn1z868/olRSGeWOe36kz0jLwDk4M/9rj2Hgw6oz60jyXFpBTdY3kptU1M2KNj+ZEyNtQLTEm9Jj8S7sTCzrMeu4EkzgUesW3TGLmQjClUDp7d84= 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=FM7kufMR; arc=none smtp.client-ip=198.47.19.141 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 fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42CA2dAV114245; Tue, 12 Mar 2024 05:02:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1710237759; bh=/xqGfD1xDzdX3pXWJ+m04kLd2BeOZdfT2Cv3ra7gfAA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=FM7kufMRnl+wuMybaEVJcnY5KMpByddtgtDJ3+F3puyPe8Nt1tsbUtn+Vu2MBeKjM s7WdNQzP9al3R+GF+EwE/tctVn2XHK7cjBHZ+FrnE77xFowUsS8EWK6HZPyWXJaht1 z8Z8OvUCzxyZAWZfQ9FyXs+QdbvPxKRd1qXElRZ8= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42CA2d8C003925 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 12 Mar 2024 05:02:39 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 12 Mar 2024 05:02:39 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) 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.2507.23 via Frontend Transport; Tue, 12 Mar 2024 05:02:39 -0500 Received: from localhost (chintan-thinkstation-p360-tower.dhcp.ti.com [172.24.227.220]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42CA2cDO087381; Tue, 12 Mar 2024 05:02:39 -0500 From: Chintan Vankar To: Dan Carpenter , Siddharth Vadapalli , Heiner Kallweit , Chintan Vankar , Vladimir Oltean , "Grygorii Strashko" , Andrew Lunn , "Roger Quadros" , Richard Cochran , Paolo Abeni , Jakub Kicinski , "Eric Dumazet" , "David S. Miller" CC: , Subject: [PATCH v2 3/3] net: ethernet: ti: am65-cpsw-ethtool: Update rx_filters for device's timestamping Date: Tue, 12 Mar 2024 15:32:33 +0530 Message-ID: <20240312100233.941763-3-c-vankar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312100233.941763-1-c-vankar@ti.com> References: <20240312100233.941763-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 device's timestamping. Signed-off-by: Chintan Vankar --- Changes from v1 to v2: - This patch is newly added in v2. 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