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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C6E3C433EF for ; Thu, 30 Sep 2021 20:22:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6678B61527 for ; Thu, 30 Sep 2021 20:22:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbhI3UYc (ORCPT ); Thu, 30 Sep 2021 16:24:32 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:41864 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbhI3UYc (ORCPT ); Thu, 30 Sep 2021 16:24:32 -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=YmcyVghdJHtC/wool3HxKieEO9gZnFRYp8XV9FD2I/E=; b=tGTRsTo7JNRXFpm9YWcxcsHrlb lZKYTQ0oH4zwS8eWytNikCNTFeIZyAdDOz8jIUuvpoBhUuJ+nbuNEwzvU/CcOEVO1j9Ampqc1HxX7 C882PphgctxEbcrOVeMm8l8lkeC0IhhfidAHDXIiv82eCxzfUW9pKsxK9RFRQPTF0L2I=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mW2Zk-0090EA-Vi; Thu, 30 Sep 2021 22:22:40 +0200 Date: Thu, 30 Sep 2021 22:22:40 +0200 From: Andrew Lunn To: Florian Fainelli Cc: Saravana Kannan , Vladimir Oltean , Greg Kroah-Hartman , "Rafael J. Wysocki" , Linus Walleij , Vivien Didelot , "David S. Miller" , Jakub Kicinski , Len Brown , Alvin Sipraga , kernel-team@android.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH v1 1/2] driver core: fw_devlink: Add support for FWNODE_FLAG_BROKEN_PARENT Message-ID: References: <20210831231804.zozyenear45ljemd@skbuf> <20210930134343.ztq3hgianm34dvqb@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org > I don't think this is going to scale, we have dozens and dozens of > drivers that connect to the PHY during ndo_open(). It is not realistic > to audit them all, just like the opposite case where the drivers do > probe MDIO/PHY during their .probe() call is not realistic either. I was wondering if Coccinelle could help use here. But a quick scan of the documents don't suggest it can follow call stacks. Ideally we would what something to goes and finds the struct net_device_ops, and gets the function used for .ndo_open. Then look into that function, and all functions it calls within the driver, and see if any of them connect the PHY to the MAC. We could then add an additional parameter to indicate we are in ndo_open context. But it looks like that is wishful thinking. Andrew