From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39981C433F5 for ; Thu, 2 Sep 2021 23:02:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19D3860F42 for ; Thu, 2 Sep 2021 23:02:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347983AbhIBXDT (ORCPT ); Thu, 2 Sep 2021 19:03:19 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:54282 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347855AbhIBXDR (ORCPT ); Thu, 2 Sep 2021 19:03:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=OYFToequarzac4GcuUzxdyCTeg1E65wYgDUFdHDP4Uo=; b=Brb8sRznxEqSdqZBTUb1/AgPss Cdfiz/moRjSVVbhoYXQ+U2mDxo4gRpMKwWEbPLPVFixvmZb4lPd73Oh1rV+zTueyJkT6cdOrL9yJ4 wpit+vQ4qgFAwE0tZ3yXnbs2xWA/5s1pqO88QV8cFVyWJpiztsq1vTIf7klgpy3dkd0k=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mLvig-0053pN-8j; Fri, 03 Sep 2021 01:02:06 +0200 Date: Fri, 3 Sep 2021 01:02:06 +0200 From: Andrew Lunn To: Vladimir Oltean Cc: "Russell King (Oracle)" , Florian Fainelli , Vladimir Oltean , netdev@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , Heiner Kallweit , "David S. Miller" , Jakub Kicinski , Vivien Didelot , linux-kernel@vger.kernel.org, Linus Walleij , Alvin =?utf-8?Q?=C5=A0ipraga?= , ACPI Devel Maling List , kernel-team , Len Brown Subject: Re: [RFC PATCH net-next 1/3] net: phy: don't bind genphy in phy_attach_direct if the specific driver defers probe Message-ID: References: <20210901225053.1205571-1-vladimir.oltean@nxp.com> <20210901225053.1205571-2-vladimir.oltean@nxp.com> <20210902185016.GL22278@shell.armlinux.org.uk> <20210902213303.GO22278@shell.armlinux.org.uk> <20210902213949.r3q5764wykqgjm4z@skbuf> <20210902222439.GQ22278@shell.armlinux.org.uk> <20210902224506.5h7bnybjbljs5uxz@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210902224506.5h7bnybjbljs5uxz@skbuf> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > > Note that phylink_destroy() is documented as: > > > > * Note: the rtnl lock must not be held when calling this function. > > ... > > Any other issues besides needing to take rtnl_mutex top-level when > calling phylink_destroy? We should try to keep phylink_create and phylink_destroy symmetrical: /** * phylink_create() - create a phylink instance * @config: a pointer to the target &struct phylink_config * @fwnode: a pointer to a &struct fwnode_handle describing the network * interface * @iface: the desired link mode defined by &typedef phy_interface_t * @mac_ops: a pointer to a &struct phylink_mac_ops for the MAC. * * Create a new phylink instance, and parse the link parameters found in @np. * This will parse in-band modes, fixed-link or SFP configuration. * * Note: the rtnl lock must not be held when calling this function. Having different locking requirements will catch people out. Interestingly, there is no ASSERT_NO_RTNL(). Maybe we should add such a macro. Andrew