Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17983139rwd; Tue, 27 Jun 2023 09:58:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ44us/NKdjrrx4Ay1sMDeh4RZ2sF4WPb2jIphJemrb4d3Q/7dijOyTz92RUL8Qq3p/qzQlj X-Received: by 2002:a05:6a20:7d95:b0:126:676f:1f1c with SMTP id v21-20020a056a207d9500b00126676f1f1cmr13425524pzj.28.1687885116807; Tue, 27 Jun 2023 09:58:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687885116; cv=pass; d=google.com; s=arc-20160816; b=hZA3PigQSsMWm8lQ7bMMV9wIkq0R3yzD2WYxSg7SJA5auwBsTdPt2ZDnm44TgqMH0l j/e6Zf3MQQIm05eBeXAxs54fsxV5LMP+XZqDzXYIoNHdfj4nQ0zkkHxp2NEJfdbAmDBm 6OgnfhbdwoLNV1DVpXtLppR5WCKwbse7K9ZTba3X5Uk4P9+K8b/iZF/3u5s6Yb+gugKt YR9UcVDoWkrcmHSSiLVdB9zuYEeMAE/lbTW3IVcmOke8j4pZ3eKomUl1iKKPRzDPT4Ty qnh0WHGD3bjCfANc9mSwBd/Ic7aF2K9ogmAzNmJWRp/MLju+fhwwK4632800XQzZvZU4 NnnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ACFnn+eysEYBw4xQas4l5AAvB09EpI4EX/FhhmIm4M8=; fh=iurQRswHi9hWiYvyPjsOpfQdagiAg7Zmv5exCLcOUfA=; b=vWaP1zlpEGZX2RE0kZwgyjdBLIhK4OcrTN8YaaTo/L/CJyQtWQKNdlpCN8xVO1bgSN 4X2oGHgMYnDCGRjvfnTrez2e07O8yBXO4HmWKz5FyQweiq/AY4pYxY25Yjl48jJck2Uj cCcZl8S2TUeW5kaqBKCc4X4gCgYBW0qJiCYiuBzR+vdILht/uDJ9BRaE5blqaeokHNjm ItwICUxWpdMRJF1ojom5RURE7Bg3Ak9wqqmIsgvPfShkpY/cv+lDsZooglEu+q6Ebx+P bZYqTvWoC640hEk7gomXjjr8hdQKuJBjqQM324DGmyIzKW8Lv+l4rQ93rgsGmp+OX+d4 5Opw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FdjCugzO; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv10-20020a632e0a000000b0051f7686dfb7si7198637pgb.189.2023.06.27.09.58.23; Tue, 27 Jun 2023 09:58:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FdjCugzO; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232499AbjF0QcS (ORCPT + 99 others); Tue, 27 Jun 2023 12:32:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbjF0Qbu (ORCPT ); Tue, 27 Jun 2023 12:31:50 -0400 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2086.outbound.protection.outlook.com [40.107.249.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7F0C3AA5; Tue, 27 Jun 2023 09:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EynYh7VQD5QfKHGYyyHrrhWyJaEy1lZyEljD56cIJB/yQ5XNvpj07kbg0wPLcSrv7ZtKHF3//7LuMb9rP7VRAbUoFxUZjP72BulNSIS0/mTRPoL8enRxgGveeYbGMy3qVEYNIXPGilqQhTQPBkjCA12SYZglTnW4sZ7nz1zWjDLaO5QA2fCk5G6Z73u4bzD9cO7GTulvb0G5vbrNzfktIfsx5Wc9Ar+72yjPi2477lR65aGpe0ZugtbcRt68cApgIrojKQH4DQVrjOpmGKj3DO/gxv097m58VOb/tuQMOd5MDLObNctjV+LaJcn8kwfrUKlkv1EQJfFLTA6E2+Yr/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ACFnn+eysEYBw4xQas4l5AAvB09EpI4EX/FhhmIm4M8=; b=TzGkTSH+VC9Rer61gWy6lwxhBC3aA7Phzp1IaxjS2RcE/OgTlJkx3ezjrkNGYgLWOatkQoQPwsOQ0IaCiyoqH/aW6ENF55726yqjG5+5ZCNxbcwLwxQB/TKcKiheL2KFZr7KYDfaFHAh4MklKO6RrX23FscmZiV09mpMoo8XacJArMc3Yj6GXr0vvIsXy2vKBUIWJRsb6QA6Ch4JQeE+T/B8e2pa+x1MvY1qkQYlOdYYBQjhki1eLIWGHd6BGuzMFjLn4M56xxv8LTQ9DAIio6VtQyet2VPIkpTsmlRFCuLB/QyP7yg7gcLEtGj8Xkczhf7pPFwYcRi3WUdfcYrIQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ACFnn+eysEYBw4xQas4l5AAvB09EpI4EX/FhhmIm4M8=; b=FdjCugzOwObq26zI9HJQ5LoyPpYRcOEEoHnocUslvGdVpXp1zPFHPikCNRQQbYEEoG0402o0+hmH0F1/2xe8QgatmYURiiB2i3ppG+KG6cJx3a+UsdAbn+yyCbMJatSUNIJ1qIHVsNlCJChHD3fLx0pE9F9Q5gBJ4zPerx0WbmE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by AM8PR04MB7314.eurprd04.prod.outlook.com (2603:10a6:20b:1df::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Tue, 27 Jun 2023 16:31:29 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::c40e:d76:fd88:f460]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::c40e:d76:fd88:f460%5]) with mapi id 15.20.6521.026; Tue, 27 Jun 2023 16:31:29 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Xiaoliang Yang , Richard Cochran , Antoine Tenart , linux-kernel@vger.kernel.org Subject: [PATCH v2 net 1/3] net: mscc: ocelot: don't report that RX timestamping is enabled by default Date: Tue, 27 Jun 2023 19:31:12 +0300 Message-Id: <20230627163114.3561597-2-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230627163114.3561597-1-vladimir.oltean@nxp.com> References: <20230627163114.3561597-1-vladimir.oltean@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: FR3P281CA0078.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1f::19) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|AM8PR04MB7314:EE_ X-MS-Office365-Filtering-Correlation-Id: f34dd1f3-8945-491f-8463-08db772bf5e2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QLYoQee3YFEjz+D+Gf6qGOXzxHPVoZx4rjNUcdd7diJ3yshrzchz4HpNti7IcGTfhHZbGb8mBWzTx2fLsW9EHny4E8RWGEMGdiqW3c8ccn0bsyb6x3q1feo0aLnD8bJ37cAF3bNWupHLy28AA73qFesUdRpDZfuljO9cX+yWE2IDa+HtEPmbsot8gGjdL1guqTcNvsBoBS7A7Y/eQFxGVfj5VFF8yvnU34pYTHDX+Vv1XUungfMkEjLzZTgUGt0clVBPO39aQR3bE5YNxXD+UoXNcqZtdzcRIKenght7zxoCQ3i6zjxVkeN+5o4Ukbp5zkFH47cUlzKvJwmaWe8AFqY2ThEr2hrILRcbVC+fGLyevdAcxnLFycLLhjtRltRfMD1XNK7Q1JA7Vkk6+kHKrtAeq+t8K68K2+pJ+fdm8CzJ0vEg/aim2IdhNpeaOxS6pSmKM/oTXKDqS2udTH70y+0fnMnuCCnD5DRTXEc0zApoaFWwT72Df6A7HrGOuorsgvoMqMMN7YC0WLEUHW6rHtfTzXX/kLR+RTWUKUJMyYSSPU31zLqATAx8r3qQYwFLKCVmvYWyqc0dxbS7xWlCaTKVhwB+WErhgqRdRZHcKs3TFDCJQoYtDGRHqpa5jMJd X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(6512007)(1076003)(44832011)(7416002)(66556008)(4326008)(6916009)(66946007)(478600001)(316002)(36756003)(8936002)(66476007)(5660300002)(8676002)(2906002)(86362001)(54906003)(41300700001)(26005)(52116002)(6486002)(186003)(6506007)(38100700002)(6666004)(38350700002)(2616005)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?mJkfqYYSYGiI07u5iU08328E8CSd1oOL+C1MLCe5Cw9mUVcyqdOgNQKGSVzW?= =?us-ascii?Q?TcRpMlE214SXIGzLu6Z1sW64qYlJMVuq5djSchK3rwoC8/znD213vXWdguHj?= =?us-ascii?Q?Fo3OD6TwZ5fpcvmYVIVPlZ2OZNi8a8ir+446KZaLWgoYnq69hRIT8ncAWzUc?= =?us-ascii?Q?idzMUCmMVxHi5u2a3P3/EcpYcPCQfifz0PgU6viDX0i1jG6t7DfKMdfhPyqL?= =?us-ascii?Q?A6XekZKPZmRLlKg5itv58OkqGsDXB9orEjp7JYHmPRQjOmElT77c++m20LYu?= =?us-ascii?Q?HuGQtK0PY7LtsQyaw9e032cyl+d8TE7B/ziqYzg4tm3VLOBk/VtM0ytffSbQ?= =?us-ascii?Q?iRM2Ec8LubIMczkUQoWHV4BVdA2tX2PUIYK7KRgStoItjG50A49pPD3xdzrB?= =?us-ascii?Q?/45mBTXF191uVEK/C6gCuIyHOcpuDnfKCW5RoGbOfmY0EmZ+CGbFPs3rLU5E?= =?us-ascii?Q?9gvF1BZ05O5nR0DEcyvxNLlyuGFd9xsFsntnzHFV6d7IchnfurRt3hROfGtS?= =?us-ascii?Q?TktXjnzsjX++B+4OYOXto2ssUdg1Wd8F5WgKnEUOR8HebQL8LHWHus/scLQR?= =?us-ascii?Q?1dQIupopKtFIN6Gj3RYC0G3+VDyJWgDslTZFn00wuBCuHL4zISf4sMiMIsuk?= =?us-ascii?Q?e1doKy8zZauqHXygP3iboqK4hzNRiGdy3p7vYsx7h93saZMwlpaefagdNApE?= =?us-ascii?Q?4wYr9xb28557FtRbKZSr+extcI5j9nwKPVhHop6bI82oXBYNTjztaCeBuSgE?= =?us-ascii?Q?n7YyZQUVM41ASYuMt9U9XIkaB4i7ifgSRBpqIcR62pnDOf62LHOAxB3RoUsY?= =?us-ascii?Q?CVQRUPQzJy47aUlZqOOR8g6V/sMTs3NpXP4DlQvlOV9rchuipQlilfFStBe1?= =?us-ascii?Q?gR0uhWTg0iYq1yWfWz15oA30hOku9P2fx2Lm7xIOCtbgAPic5ircaCItXixg?= =?us-ascii?Q?OR3te0mWS7ydr8REgNVizZHJ491Yiwl726PTPeg5nZ0eLSC6HioM/aLkN5ia?= =?us-ascii?Q?sCcxt4xQ2UtXfwX/mBxyInDKxAuB86wQFTgiIPEe3j/lcMZZqlF6l1h1naNs?= =?us-ascii?Q?K3gRP2HyhnlgX+redRtaLxir1IHXXTJL5HlNiOz7ReoUAmIlU1fpC0WAifwd?= =?us-ascii?Q?PCmZgclZv1BKAdVF5LsMdvKaqeUy7W6Nu5iJqc9gajxk9O/FMBsF0ycGjyjF?= =?us-ascii?Q?kmbNLj/B/sc/3gyd0oZhwE4YfxlFQxAdgwZ95frD89TtKa8ZFQaA6KzcZuGF?= =?us-ascii?Q?QbrKrR9eK+LIyQmmQ4dbw1NpgLSxW9OHXHCQxqPam7wA8mp9MLt7tdm1Tb9t?= =?us-ascii?Q?qveFyLVvkEmJwE6ecQhZbwovP1Nbyauds64kZ6VapuHO0rM8Vj+zJycjuMPk?= =?us-ascii?Q?3VTZ6pmXUt49NKx7JXT49PUSqT9xwkWIBM1pUfUfgBfVV1AnAGTNR2+yf3TW?= =?us-ascii?Q?OmzAs1LnP/H6moujqhvzQJG/rDTeyYDy88R5bgQ3unBD69Jb7KANZyjEV0DG?= =?us-ascii?Q?TW8ZSPdbwKRiDCdNgQQO1WTSTorCiRP8ES8yhCXdcM3ad2TIl6LtlPtP+u4q?= =?us-ascii?Q?p8xFek3IeohFfQZdb+be76odArWFTXxhD7WkElLSYyEKlquZsAHc3C0esmor?= =?us-ascii?Q?GA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f34dd1f3-8945-491f-8463-08db772bf5e2 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2023 16:31:29.7647 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: seFwnY4ves/WEPlo73HcT8O9aCBHmKNM4MYTcLdC6XMEHH+xMXnpnt7nx85pEe2V13rcJwa/EULmrC1ERZHYRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7314 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PTP RX timestamping should be enabled when the user requests it, not by default. If it is enabled by default, it can be problematic when the ocelot driver is a DSA master, and it sidesteps what DSA tries to avoid through __dsa_master_hwtstamp_validate(). Additionally, after the change which made ocelot trap PTP packets only to the CPU at ocelot_hwtstamp_set() time, it is no longer even true that RX timestamping is enabled by default, because until ocelot_hwtstamp_set() is called, the PTP traps are actually not set up. So the rx_filter field of ocelot->hwtstamp_config reflects an incorrect reality. Fixes: 96ca08c05838 ("net: mscc: ocelot: set up traps for PTP packets") Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support") Signed-off-by: Vladimir Oltean --- v1->v2: none drivers/net/ethernet/mscc/ocelot_ptp.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/ethernet/mscc/ocelot_ptp.c b/drivers/net/ethernet/mscc/ocelot_ptp.c index 2180ae94c744..673bfd70867a 100644 --- a/drivers/net/ethernet/mscc/ocelot_ptp.c +++ b/drivers/net/ethernet/mscc/ocelot_ptp.c @@ -824,11 +824,6 @@ int ocelot_init_timestamp(struct ocelot *ocelot, ocelot_write(ocelot, PTP_CFG_MISC_PTP_EN, PTP_CFG_MISC); - /* There is no device reconfiguration, PTP Rx stamping is always - * enabled. - */ - ocelot->hwtstamp_config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT; - return 0; } EXPORT_SYMBOL(ocelot_init_timestamp); -- 2.34.1