From patchwork Mon Jun 26 15:40:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 113020 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7593609vqr; Mon, 26 Jun 2023 09:13:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7zRmCcV1TwuIRk+YJw4P/fLQQFX8qBbHhkB3P2woeQf6KQdxxBIWapgK42cqLxTL7qlOMp X-Received: by 2002:a05:6512:ea7:b0:4f6:1433:fca0 with SMTP id bi39-20020a0565120ea700b004f61433fca0mr18675694lfb.0.1687796018465; Mon, 26 Jun 2023 09:13:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687796018; cv=pass; d=google.com; s=arc-20160816; b=WVc7zFXEmhuFlODRySGPgHllgmwmngYhEAjvzM/YYlkqHfn3U2pe5J0+aplIb1C+m+ 33gMRqmKerJAqTWXEKXdKAlFQZpgxI2mgRDeHKCS/3bPguNA9wm0ek0PyipLZEMAVRRs /Mw61Hyexso3tMk3d7ZBzu6O2YfmdQ2iuwaE3zj2LhCq16QVpTGp18FjRkWVm5PbXNk0 5IuxCjU3pM7iQc/t4z+EUDdQ1vuUmCRkYXh7/YGjqDYH5gVD2gvFHJp73jjxO7SZsCNc d96L7Bx9XmuX8XW/yZ2+r40xP18Xmme3hXm3xV6gqYt4XuL8o7UeGQ9LeBBPU8Ou1y1q NYgw== 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=zStVAQGa1K36ouN3zyKPcZNh1UiuoisDOyxr4IMqIwI=; fh=iurQRswHi9hWiYvyPjsOpfQdagiAg7Zmv5exCLcOUfA=; b=jkLjNT5mLO7xGTFBm3M0jviWiRMDrR/dDr3Afx/a2Ss39tOW5+qfJ4JEBP7mxUQX11 l33tLnydANQyTHQECvNZp6+S7GjZCaG0M4gCeMwDJC+c/98LxQ5dzXhR2XQQuzUXOUAG /yLNPLq9bM/qd7gWt/X3OAKbqjY+JcGopV1nFJmy3gH2u6CfB9N7wfZMdj4uRhz5PCpo SIbuMffrr+JcOA/3F0QJsZMaPCrTF5LqrZInb1MA5JTbDc6tPQgdMwkMfSGDYsQsqn6m yDzNwh74fZheypZjYqkueEIOfcBhItD/mqUoKq8VN2HltzACy8dWBpWhXucVQlzhhv+n 7tig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=eNSZA3Gq; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i12-20020aa7c70c000000b0051da4e9d7cfsi205823edq.565.2023.06.26.09.13.13; Mon, 26 Jun 2023 09:13:38 -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=eNSZA3Gq; 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 S231377AbjFZPkd (ORCPT + 99 others); Mon, 26 Jun 2023 11:40:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbjFZPk1 (ORCPT ); Mon, 26 Jun 2023 11:40:27 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2050.outbound.protection.outlook.com [40.107.7.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F9691A4; Mon, 26 Jun 2023 08:40:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lB0WAresqtMb5W0NSgliWRCoPLDPIin/HstnkteNozwIcDEy5ft8FrdV784uWzWwDpL8tCl1Q2kSV91KhBh8naU7lZMqIyRrp7tkNzdhkVea0utd9W70bgg2bdRMU+JlpF8USbQpG7aDJ/SRHcTvfPWSxbxjbcr7QBuqPdt87Laf609lr7X4wR7S0F3EEvBmnO4+ojRqmoxK+7lvZpIUf59gaYXnklDMB/eE3CJWIeO6SzjbacBiJ4jHr6MX1nbS9+jQ7hjGH9FOrWqADqjNFY3L8v/xLLK/+vEf4jrnYSZX5L9WCpnFdvpVqPOOUkpMz9Wd47q3194zoNtfDziLvw== 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=zStVAQGa1K36ouN3zyKPcZNh1UiuoisDOyxr4IMqIwI=; b=lES6UuI5bSdum/jjhZTeaSHodnKOZDZEcQxmesbvxoZt/KW/xfWFbgTkTmP2TeyFzoQHOlk7fK7HHnoTAUldrw83kOmP6R+7/nhXgZEG28kmtHurmEoX5QyT6VNN9Z2ZOF1qhOVRheMg/WgDu5K7+FTsH90DUSvahcv9h9gMdVrzUxOmwXBGkasiUASzlsnhVxqOD9ui2iXKyGM2uLAwVz4v4j6PtZxJqMiBpLSB9OPF3H1uPQt0C8cZowSC3K5oQDXd8DxDYY5MCZNu00wIIOP6ucQs2jDeQdoeEWCrYVnKWXcCDxW69Y3fp7LlQmwHiUid1tEHb0pnwALLufgnjg== 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=zStVAQGa1K36ouN3zyKPcZNh1UiuoisDOyxr4IMqIwI=; b=eNSZA3GqMN9wf/TnWhovx+qPz1rk+/agdGll1DPkuTu4MGyDvKDL6KRRXZyLeSsARLmCpuYSRbPAw11wKbPI0MJVfbY3u1OrJgnWfJHJQYqFbVMcbvrzpDJwjRl4YyoNn1LxYqeSuZ9nZ6JEiHowKoMjL5l9un5R4Nc5nQe9A90= 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 PAXPR04MB8638.eurprd04.prod.outlook.com (2603:10a6:102:21d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Mon, 26 Jun 2023 15:40:20 +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; Mon, 26 Jun 2023 15:40:20 +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 net 1/3] net: mscc: ocelot: don't report that RX timestamping is enabled by default Date: Mon, 26 Jun 2023 18:40:01 +0300 Message-Id: <20230626154003.3153076-2-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230626154003.3153076-1-vladimir.oltean@nxp.com> References: <20230626154003.3153076-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM0PR10CA0121.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::38) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|PAXPR04MB8638:EE_ X-MS-Office365-Filtering-Correlation-Id: da21f5e2-f627-4ed8-9ec7-08db765ba63d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oSCUD1zVW3pFPGG9JYhhuKIqADee8HkGypJlYyg7Xo+LUOLY3XQ2D+/m9Lx1fK8b4eQ8LTdKkr9MI3c+RtXQRzpBF6h9YPQIFmb0UNwfNMXqitfMX89ExCyINCxu5OYkVmOO5DfOncb85d93dJsWBg5dDnCsheRu91Bl8rKSZeREye5FB9lhLOKbSDCKQWUM7ltut9BdELWqZ3piVeX1zMrfpM0FkRf1mNfCHaKoo57F7rvKKNU7NRn0reTRpYeVyQVKgzrTVm4qfBQ5S/qjg+h8jCu6Ir9GTP39vxbA0lmzZP+0/0ZLltBrM3llGVsrvASMQOqflZp9iE9LTLw9HTptEOCD9b0wCh2l0dH3h44DZgzE+txAHo1BtoI4hR7z9fpYVGpVHGh3jq3MDh59GoZNpOPOkThTEQwOXp1CG5OInWQBpJrp3BPBHh3uGPVXA2dJuMwVezOCLIFadEynj0snlFqhzfEfLeq92LmcaXZeSldThrQBXNEIIgCchiIHMCmBc25LXHalfmTJag08YuqnIhTmbqEZMQUky7Gc00npNTwsI/qCJQjqb7iygVcD0l7rKsBSPPRqPFSwjxU/Lm1JYPM5Y0WQbpGg4Pauc4TjaTsCFd1vq3Cq5DftvFEX 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)(366004)(39860400002)(376002)(346002)(396003)(451199021)(8676002)(66946007)(41300700001)(66476007)(316002)(66556008)(8936002)(4326008)(26005)(1076003)(6506007)(6512007)(186003)(6916009)(2616005)(54906003)(478600001)(6486002)(6666004)(52116002)(2906002)(5660300002)(7416002)(44832011)(38100700002)(38350700002)(36756003)(86362001)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zo9b7Cnljw2H6IUmF49DQaNjnbkx1ffbvmK8/8xBNbUvUz1EKvmcu8TmDGL7OFXtk21Oe9PR5lxv6DSe8jjJPUClNeEvzd2bMyMrOoOo8SXCbsy6j8JorgI2DK3XsJMdI43lk8ZURI1QEjyihpvV4L8/C29IBE9otXehgv5NVU6V02IltGAssHig6bwzGu02W33EFk9wQZCs5o6g8JANQx84QTnApFAe8PZZ4hDpgjkho5rSBv4i5VoQdxHB6TDkS+29QaE2qbJiTGfJShekqNlAy4N1y/EqdEL0n8FmObmuemxREYrTGHHYzZmX7IMiIRxYZAbdxO7ADV38vfA8xACehweBDtdAIZHk2A7WdyUrMx75Q/4iSJ0r8JTAKh1iO5UCj7t75Qr1Fex4Wt8tE2GqkBwgu9k69cd8E7lKu+XlInGAZaDNMnnRtWDQrGRd28sPeO+LGUmK7CHpM0+cGK4Ndl/35+9GnmsoaQHAnaK4hfo1UDJVTEvR32KAAwVoOglnv6yG0FtVNOT5KKaGJjAOKu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com X-MS-Exchange-CrossTenant-Network-Message-Id: da21f5e2-f627-4ed8-9ec7-08db765ba63d X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 15:40:20.8071 (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: 4Ov+PJz8nhHEUyUqGCUyED4+vTXQKXqQoA/mijUeXCPbnHdrRWXy2fQbw/U/uzgLkx3mgoeR3gJQ7JM8G+9Fxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8638 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769782397917220477?= X-GMAIL-MSGID: =?utf-8?q?1769782397917220477?= 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 --- 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);