From patchwork Fri Jul 29 13:21:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12932453 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2420CC00144 for ; Fri, 29 Jul 2022 13:21:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235820AbiG2NVi (ORCPT ); Fri, 29 Jul 2022 09:21:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235451AbiG2NVh (ORCPT ); Fri, 29 Jul 2022 09:21:37 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70042.outbound.protection.outlook.com [40.107.7.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E52DE61B21 for ; Fri, 29 Jul 2022 06:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qa8VmdlZ7IevWMDXce72sevO1PXDTLvQtclszgFtjM4vml2rq+ESx9ez70rCau8EbpJcp1JhDUPSFTBqrb+X2MTbrd/7usYi1iqfv2YGQ9I20Aks2F2+d2nRzmBnepvjbUbeHQo2uwLmaN4WblIBsMeJKCzvFuhnv+qf1W+oFh5ikJrPDqvY7D8VKlEZM8JM8NAcsh8CFYWEjAQDwYZDeIQdsQ33zpPWdIViGpegC/jIYooDVZIW4va2ltLrK69FbLa/wCmtqEOxFbznxOUDsewRoD2diLzT+Mq9WZZvbLEW395gRU3QV42Y34KYcJpT+ma6P4N2fmqk6FaqITOJeQ== 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=WjU/d3lf1cu0/jtc1pOOKsld7lZvQrA8kujNSe6UAMw=; b=bHfUyKpiO5goh678S2bCSrBYSOt+IBUrAvcodA3Y7YHimuvsh+wdeEfcAjgOtvJEqlPOgYTwYykrX8JWAa2S/xuZuAjBU+2c8CRIwW62OaQQHxc7m3LlM68cT3gcvSXsJ/+5p76kJoR89hrK9jmgk5/MjidKqpgnQRWSxPhabApuuA6h0IvN2aVXFbXj3zY39zH8hXAAVrQsbBemqDeGDCzDvlW5Jvw6KoI6jqHxa6MLrD0COrIllXKcVCtat2ynqrSH9P5H/c+969gmFQPIJR1tuhGhux7qeXakjT7X70Akx1I0yMqk59Ae2i0/VXfR3nK2C03DHTNQ36kC5Ln14w== 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=WjU/d3lf1cu0/jtc1pOOKsld7lZvQrA8kujNSe6UAMw=; b=WOvL7IoBpsf277fETbXQOLH23JPGysi4cc8+WbueJq6YcunvIgIVGUSudRGswH3egJJPfZ233FYDshxgoRaLKST/NqsIptiJxK092ZowmcLwIhZ/TJA6ls58Zzpi81/MW6uPzFjfBcWADs1/6233fx+IqixzLjbogTxw9hXavu8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by DBBPR04MB7497.eurprd04.prod.outlook.com (2603:10a6:10:204::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.11; Fri, 29 Jul 2022 13:21:34 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::71b7:8ed1:e4e0:3857]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::71b7:8ed1:e4e0:3857%4]) with mapi id 15.20.5482.011; Fri, 29 Jul 2022 13:21:34 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Vivien Didelot , Florian Fainelli , Oleksij Rempel , Christian Marangi , John Crispin , Kurt Kanzenbach , Mans Rullgard , Arun Ramadoss , Woojung Huh , UNGLinuxDriver@microchip.com, Claudiu Manoil , Alexandre Belloni , George McCollister , DENG Qingfang , Sean Wang , Landen Chao , Matthias Brugger , Hauke Mehrtens , Martin Blumenstingl , Aleksander Jan Bajkowski , =?utf-8?q?Alvin_=C5=A0ipraga?= , Luiz Angelo Daros de Luca , Linus Walleij , Pawel Dembicki , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Geert Uytterhoeven , Russell King , =?utf-8?q?Marek_Beh=C3=BAn?= , Marcin Wojtas , Rob Herring , Frank Rowand Subject: [PATCH v2 net-next 0/4] Validate OF nodes for DSA shared ports Date: Fri, 29 Jul 2022 16:21:15 +0300 Message-Id: <20220729132119.1191227-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: AM8P251CA0022.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::27) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 95824756-e5a9-4a38-0482-08da716541d6 X-MS-TrafficTypeDiagnostic: DBBPR04MB7497:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MicdA5IsgbemixLCrbC+8XOQ9F96364fQ7o7PX3yv6AkobkaHtMI9gchFnFUCKgU92ewlqaJa/6tEpMuPbR0gK3zozBYwNnALrBkzU+hTGhcSwAoKIzMgXASpN2op+iTO04I93+uK62KxX1vQkv8LSvU3doQdf1eA8lEw1g+fDvNrfkm0Sq+caAzMrmrUBXDpKiSqCU1FaILLDdW4jILbqJDSTeSaCYZyDFVKf18tNkgGCZNJCPJlFZqaNCTyoo9R1s2xe2EcN5uIoATP9lJml3mauTILxThK2/MK0TSoTEMMeZTKNJJI0XZeoicdafI+Lq/eccrcf5j2f3KOpt/WpofxBld/9RTlkVwjNuFmrMlsauBzbFz/fKAu5zgqHsQ6/kgE72TNfpZEb6Z1p3+gM6k7swOpSBmFtbDjydehpuDeZUeiyQ3Pe/eeoBDWZ8u9lWk0MdesQo5J3xib3trP4TvyG7mZy4BJHkpPsSqxEwRY0pdmXjZl5w9rcbPO5jcOx3LrXFiXsVmj1fJK7anLt0jhMQLv0Hf3gTGURCxEbi/TpiXqjvjEP2ChHATd6msm+gp6govXwMIgIDG3VzUfbDLlWzVnvc5wfu3tG1NmHEsj9ETWMqa+63NTprFONvOxdSsiqksknr7wRR9sSZeNVLJjR6Yy3086GYs1bUBmOsxVGGIz9F4gYCdazZ1fEEru0WC7Uuf7P5ybfIH/sCp3hNiDllrgFwS6E0fSe0I3n1eu8nxJzhcVLQ0+Zy7Zd2lEtjLVrVKChpqs57d4bZ/HKpZygE9BXHGEktll4iMJoeAJPgpBAp+ir5UK1LQUVbhNhK5Yhx+qtMyMGaFpqH0LQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(376002)(366004)(396003)(346002)(39860400002)(136003)(1076003)(6486002)(2616005)(478600001)(52116002)(6512007)(6506007)(26005)(966005)(38350700002)(186003)(38100700002)(41300700001)(83380400001)(7406005)(66476007)(5660300002)(4326008)(66556008)(8936002)(66946007)(7416002)(36756003)(44832011)(6666004)(8676002)(15650500001)(54906003)(6916009)(316002)(86362001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Ty8mrqA+fsbIwKVx6qVjT+qyn9NC?= =?utf-8?q?s8sW8wubkCScydb8ARiFF0R8w1JwsmYDcjN973PSEW2LU8sw6LHvMAFpGXgMDg9iH?= =?utf-8?q?q0BI8xXNRU0R2kb1xz2ppeFMTpHWmELBM3D6p7sJadlQNc4oTEPkRg440iQgDRlsX?= =?utf-8?q?nXUMVJih2PEYrXUhom9kOR9HnXUWlY5ieIIzaupi6TxWgYScLkBD2KQWiT6h49oLc?= =?utf-8?q?+l4uMr8KWvBKQCdlTsMZucPAZ0BG0N7v9DlFnr3rUm6baPMmgO6rHHOSYWoefSCxg?= =?utf-8?q?fuJNI9pZXjTz2Qc1RjXZJH8YbEg0v0HXV5qzVS1AJU7ARVf2zZakjc4Tsxdi6sptt?= =?utf-8?q?Rd4nH4aSTc+rnAZr/OkOUKaO3SK8RhujFADabQMfKxZS4+yPWDLhKXaFghZPiUh9B?= =?utf-8?q?CueS2dkooCrw7sABU6F15kpd9BbEdY0niJRXexzzf6DPSke2E1A2ENY2gJkJBjOj6?= =?utf-8?q?zz1DqRcO2T/1XjAIIKHZFrrE12wFA0/UhJffKpdlQBZKPRtZvAXMIDBcFprVtMFB1?= =?utf-8?q?5Z6zmImzF2XyTBdrb12wfFIPrWLkJdKn8mdT1iKzUM/TQGFspzlIG6Fy37IY6+z5O?= =?utf-8?q?vuSnsDLFZgnhZiPPgoBCuZF0blHgqvMmZhXxk7fjfE6bCaB3FYpaN+L/ahQJTc+fF?= =?utf-8?q?j1OomwFWhCED4nf6dBTIgu48OZGqamqW6rp7PefYQslqOyZUkvcIH2Sqt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X-MS-Exchange-CrossTenant-Network-Message-Id: 95824756-e5a9-4a38-0482-08da716541d6 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2022 13:21:33.9026 (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: 2S5eL79kM4j+2YSuLrVLxV1F2Gc5sNoaFtfab2njn/+3srDPidOuGRKCv/9/HePpHdPQW33nYmxPt1Snc/2Wjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7497 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This is the first set of measures taken so that more drivers can be transitioned towards phylink on shared (CPU and DSA) ports some time in the future. It consists of: - introducing warnings for drivers that currently skip phylink due to incomplete DT descriptions. - introducing warning for drivers that currently skip phylink due to using platform data (search for struct dsa_chip_data). - closing the possibility for new(ish) drivers to skip phylink, by validating their DT descriptions. - making the code paths used by shared ports more evident. - preparing the code paths used by shared ports for further work to fake a link description where that is possible. More details in patch 4/4. Patches 2 and 3 are DSA cleanups, and patch 1 is a dependency for patch 4. v1 at https://patchwork.kernel.org/project/netdevbpf/patch/20220723164635.1621911-1-vladimir.oltean@nxp.com/ Cc: Rob Herring Cc: Frank Rowand Vladimir Oltean (4): of: base: export of_device_compatible_match() for use in modules net: dsa: avoid dsa_port_link_{,un}register_of() calls with platform data net: dsa: rename dsa_port_link_{,un}register_of net: dsa: validate that DT nodes of shared ports have the properties they need drivers/of/base.c | 1 + net/dsa/dsa2.c | 36 ++++++--- net/dsa/dsa_priv.h | 4 +- net/dsa/port.c | 193 +++++++++++++++++++++++++++++++++++++++++---- 4 files changed, 207 insertions(+), 27 deletions(-)