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 E7FA4C433F5 for ; Thu, 30 Sep 2021 20:15:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CEED0617E5 for ; Thu, 30 Sep 2021 20:15:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346172AbhI3UQ7 (ORCPT ); Thu, 30 Sep 2021 16:16:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbhI3UQ5 (ORCPT ); Thu, 30 Sep 2021 16:16:57 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D165FC06176A for ; Thu, 30 Sep 2021 13:15:14 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id q81so7689216ybq.5 for ; Thu, 30 Sep 2021 13:15:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Me7vW3q+q6rLanOt9S2VuLazMhOi6957p7rnr+uLOIk=; b=R2FWQW45NNofSeNJjPfUjNyFFGod2AQS1fmBgJZAaTIHwyU6++wv5vI9m/2JPTk8rX WugZ1flWTFEs6XzqN2uc0P9GJhlwnkMJi7s1WBXdivpSy2fMM/O+5pPhuHqBVXAPJYFl loP65unlQa3cHJwxa30sHAZSocSa7V3A2W1azPmBVwsIyYnFpWOoKZ5yPA5lvIAY7F4D zCfHC1tvrXhOYtLb8oeHcNk0yi5McHmEsrfMmA/omIIeXH3BjGTZpsNhuIBWsS+o383z gRayEQmmxLWZktUXQsvBfi4jicmQIVD8Nwjrx3KQHpZfz9ItFqgTCFCXT53dhpq8j1dW oCzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Me7vW3q+q6rLanOt9S2VuLazMhOi6957p7rnr+uLOIk=; b=1i9IydbjedxL9Pj69YLarYB8xSIDAKUV3wE2FxDjX5/LicHXtgg9wEmSU8EGgZUpOu GqO8k+9BmZoIozVV6pxDJul9haFi/v7IXAPFWb440CxzbIUyUnnNwsn4hX1tY7dqH3vl OX6LKwh5mIbueImn8by9rMxDYAroeOgbJ6FhT6byYFhKPniccNUVN+Fac6jXQguRyzgF 2O1oIDf8aJvjCSgtBZA3chiD6o1Jh88+dfMwklxzmkPwFe5eIPrF7v2wrnejkhy9Z6aC Q7tecM/ZghXHq4x4KqhgsVhmUlxrBLolJVIRUKtkEI7hLwtckKby9PfQcqLvX0V1tvI3 VkBA== X-Gm-Message-State: AOAM530ekO2a1Bg7DWg8p1EWnLcvdCX5gbzEuMyINa1VLqY0XPTVVJAk inifBjOmIvs+VRvCvoW48fs9rTM1zs36bz2gw3O55g== X-Google-Smtp-Source: ABdhPJyz2NYXeBQwRc9kkgNI9ar1T2WvDJpjlb3i7GnpyBRAvqGnbL4ZtbOFN5XbF1suUYAXztX67XYEMBOQNXZt/yU= X-Received: by 2002:a25:db91:: with SMTP id g139mr1313912ybf.391.1633032913793; Thu, 30 Sep 2021 13:15:13 -0700 (PDT) MIME-Version: 1.0 References: <20210831231804.zozyenear45ljemd@skbuf> <20210930134343.ztq3hgianm34dvqb@skbuf> In-Reply-To: From: Saravana Kannan Date: Thu, 30 Sep 2021 13:14:37 -0700 Message-ID: Subject: Re: [PATCH v1 1/2] driver core: fw_devlink: Add support for FWNODE_FLAG_BROKEN_PARENT To: Florian Fainelli Cc: Andrew Lunn , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 30, 2021 at 1:06 PM Florian Fainelli wrote: > > On 9/30/21 12:48 PM, Saravana Kannan wrote: > > On Thu, Sep 30, 2021 at 12:38 PM Andrew Lunn wrote: > >> > >>> Btw, do we have non-DSA networking devices where fw_devlink=on > >>> delaying PHY probes is causing an issue? > >> > >> I don't know if issues have been reported, but the realtek driver has > >> had problems in the past when the generic driver is used. Take a look > >> at r8169_mdio_register(), it does something similar to DSA. > > > > Does it have the issue of having the PHY as its child too and then > > depending on it to bind to a driver? I can't tell because I didn't > > know how to find that info for a PCI device. > > Yes, r8169 includes a MDIO bus controller, and the PHY is internal to > the Ethernet MAC. These are AFAIR the relevant changes to this discussion: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=16983507742cbcaa5592af530872a82e82fb9c51 > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=11287b693d03830010356339e4ceddf47dee34fa > > > > > >> > >> What is going to make things interesting is that phy_attach_direct() > >> is called in two different contexts. During the MAC drivers probe, it > >> is O.K. to return EPROBE_DEFER, and let the MAC driver try again > >> later, if we know there is a specific PHY driver for it. But when > >> called during the MAC drivers open() op, -EPROBE_DEFER is not > >> allowed. What to do then is an interesting question. > > > > Yeah, basically before doing an open() it'll have to call an API to > > say "just bind with whatever you got". Or something along those lines. > > I already know how to get that to work. I'll send some RFC soonish (I > > hope). > > I don't think this is going to scale, we have dozens and dozens of > drivers that connect to the PHY during ndo_open(). Whichever code calls ->ndo_open() can't that mark all the PHYs that'll be used as "needs to be ready now"? In any case, if we can have an API that allows a less greedy Generic PHY binding, we could slowly transition drivers over or at least move them over as they hit issues with Gen PHY. Anyway, I'll think discussing it over code would be easier. I'll also have more context as I try to make changes. So, let's continue this on my future RFC. -Saravana > 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. > -- > Florian