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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 7373AC4320A for ; Wed, 1 Sep 2021 02:01:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51ABD60F56 for ; Wed, 1 Sep 2021 02:01:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241711AbhIACCd (ORCPT ); Tue, 31 Aug 2021 22:02:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241656AbhIACCb (ORCPT ); Tue, 31 Aug 2021 22:02:31 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52E7AC061760 for ; Tue, 31 Aug 2021 19:01:35 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id v26so22068ybd.9 for ; Tue, 31 Aug 2021 19:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wGf0CBf7Tu/z6D0lNg7ihUdE2JvD3e3Vtv/fQHec648=; b=YmSq0+bWCymGEFH+CXNH4EwHLCnhnw+M+d6hWq6smLmdS+GV57gbbjyBLM/uPToPY1 51iU7WHx67Fw1MIefKAH817ioZ0E6suxsrLjIvLmdLCutUqcGf+0oC1RTzYsmVJqQmnY l9VOCvYVyb7LgVBt+Tv0H4ic7xi7yJLf8RoxHrDM16NHbNIfOGC1xLIe1D95ePlc5cLz 2a84XENy2oJl3CLZ+TpH7z4td1iRinNGQPsppAcMQBwomHXFwBeO0eGy+snzj2Br+IFz FLrBPKRDEZcjHxw+XFZY7ObbDA+Be0hUdsWKneO8ZFyXKpZ2MyhHLYNh+nqaD8ApD6ex j7ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wGf0CBf7Tu/z6D0lNg7ihUdE2JvD3e3Vtv/fQHec648=; b=tpyU0pTcCYTSbZsY2RpVkqGme6u65PTChKC9eLev/n13E2asqbgw4eopOsFrmc13g4 Eq5lbETAPDBf99fovbxi6UsYyqutzdSBlt33lZcbUGx24KVvfcHbxAYtySyHIWjDWPec W0cdwMO1TscGuHKx6cQHxMO4/heIAuf21geF+JvO8b31hBo6N2rHePv6/b94qPczJ138 Kq3VePLMAAxIHzqWPpuH+8yi5thED6FfPN/hHiyK39FViTd0ITfN6Y+5mMqjbMDfnL57 uhPGDtCu2NSdB0SF94jzHSHvoADT3bAJnwtJfRhXzI2fhsHKc6VuU6QkeqVbIJnUjiRl ulig== X-Gm-Message-State: AOAM533GZDcATa+KXEjMv+y02l3hqWY4SrEOrWYX1Iaujv84Tbu2lWa0 KAADoUmjV7p698hCvT/XLnNehdy2uOAaB7sw2clYpQ== X-Google-Smtp-Source: ABdhPJzS7FEQLRCVO4eB7zcbXBfM/3bpCfq0Sb6/vCuY1JPZSdsXPS2l/TYnXb0DygQv9KJKHtWoGYr+Jwlq5e1MuKo= X-Received: by 2002:a25:9c01:: with SMTP id c1mr33882582ybo.228.1630461694456; Tue, 31 Aug 2021 19:01:34 -0700 (PDT) MIME-Version: 1.0 References: <20210831231804.zozyenear45ljemd@skbuf> In-Reply-To: <20210831231804.zozyenear45ljemd@skbuf> From: Saravana Kannan Date: Tue, 31 Aug 2021 19:00:58 -0700 Message-ID: Subject: Re: [PATCH v1 1/2] driver core: fw_devlink: Add support for FWNODE_FLAG_BROKEN_PARENT To: Vladimir Oltean Cc: Andrew Lunn , Greg Kroah-Hartman , "Rafael J. Wysocki" , Linus Walleij , Vivien Didelot , Florian Fainelli , "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 Tue, Aug 31, 2021 at 4:18 PM Vladimir Oltean wrote: > > On Wed, Sep 01, 2021 at 01:02:09AM +0200, Andrew Lunn wrote: > > Rev B is interesting because switch0 and switch1 got genphy, while > > switch2 got the correct Marvell PHY driver. switch2 PHYs don't have > > interrupt properties, so don't loop back to their parent device. > > This is interesting and not what I really expected to happen. It goes to > show that we really need more time to understand all the subtleties of > device dependencies before jumping on patching stuff. > > In case the DSA tree contains more than one switch, different things > will happen in dsa_register_switch(). > The tree itself is only initialized when the last switch calls > dsa_register_switch(). All the other switches just mark themselves as > present and exit probing early. See this piece of code in dsa_tree_setup: > > complete = dsa_tree_setup_routing_table(dst); > if (!complete) > return 0; > > So it should be a general property of cross-chip DSA trees that all > switches except the last one will have the specific PHY driver probed > properly, and not the genphy. > > Because all (N - 1) switches of a tree exit early in dsa_register_switch, > they have successfully probed by the time the last switch brings up the > tree, and brings up the PHYs on behalf of every other switch. > > The last switch can connect to the PHY on behalf of the other switches > past their probe ending, and those PHYs should not defer probing because > their supplier is now probed. It is only that the last switch cannot > connect to the PHYs of its own ports. I'm not saying this with any intention of making things easier for me (I'm not even sure it does). But your description about how multiple switches are handled by DSA has me even more convinced than before that DSA needs to use a component device model. This is like the textbook example for component devices. -Saravana