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=-9.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 F1BB1C433ED for ; Tue, 4 May 2021 22:33:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B890C613D8 for ; Tue, 4 May 2021 22:33:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232424AbhEDWek (ORCPT ); Tue, 4 May 2021 18:34:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbhEDWeg (ORCPT ); Tue, 4 May 2021 18:34:36 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B9DEC061574; Tue, 4 May 2021 15:33:40 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id h11so690815pfn.0; Tue, 04 May 2021 15:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=N/iQQC7fp/dtYGOuSg6VYXx30On1O4Podmv44Ld28t8=; b=cRTWCW0YlQcO68lQFrrYGCgLtQegbYPyhazNFTL3zL/R64bBPmvH0h5Tu9vqfIBhaF 5KQaPkKxiejgQSJLD35yHwKXO0kqounJlwAw12ms9nnlolkco/OLqwvBLIhVZ3C8JiL9 8QerknFPKHi/YlICqWSzmNX6BblRirN0iXoFDw4ZIy8Hr59eS6FCsdDuzxZtcEE+Se7S tF/BiljZhJZJA8XSMtEuRt9vzw2v9nvF3If9rwpc+sblXIiv5OGLf4zcqo44zSfNuLPS ZlrFjXr20bvOQdxkEgH4wAMqttnO4rhW1AwDhYnHNV++ihpOU8IzPzEwjUlM8cXiLYNM iGPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=N/iQQC7fp/dtYGOuSg6VYXx30On1O4Podmv44Ld28t8=; b=qdKOfoOAXLcYie070TYkw+jvFz1uqVskwQpx3a/usPK1OavC/N8KIWz1YL+mdYPYNO qplEKjQUMvOM62IvvAfA6tRo3Ls2ft8rmDgM4WJmZWyt/ZWD4K1+HqX0ZKJ3obR6M8mX 4a/89vH8NSJSWoWXrsPm/+4jQ1nU5WXLx+0InmMlurwGylS/VOrS38OTRkyKs9dUpt9w Odc9B7zVz662Td1lMDcv13cgoQBC8r6qbUocgR8AZCZsRaPxKwizQQIdr61OLkAmU3Rm Hy4waQSj71Qrhv5qfm9CsLGLehoZil78gOnBIjzjbbTUekqLf/IOQ4AXiNViZZ+ccQj9 a+1Q== X-Gm-Message-State: AOAM5337T5p+uBzXLT6Rw2BiysUEdHLXyiJxW7u1McofKsD8vH7tIoFM Q4mnjdTMvTkT/If8ezgLRl0= X-Google-Smtp-Source: ABdhPJxeUdey3txVslmafHpEU1z7jkArZjP7M9glN+el45WexOPrS6npD8eEng0OPRAMcqu3zUpE0A== X-Received: by 2002:a63:f443:: with SMTP id p3mr25493518pgk.378.1620167619709; Tue, 04 May 2021 15:33:39 -0700 (PDT) Received: from [10.67.49.104] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id j16sm5013761pgh.69.2021.05.04.15.33.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 May 2021 15:33:39 -0700 (PDT) Subject: Re: [RFC PATCH net-next v3 17/20] net: phy: phylink: permit to pass dev_flags to phylink_connect_phy To: Ansuel Smith Cc: Nicolas Ferre , Claudiu Beznea , "David S. Miller" , Jakub Kicinski , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Russell King , Andrew Lunn , Heiner Kallweit , Vivien Didelot , Vladimir Oltean , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org References: <20210504222915.17206-1-ansuelsmth@gmail.com> <20210504222915.17206-17-ansuelsmth@gmail.com> From: Florian Fainelli Message-ID: <79cd97fe-02e8-4373-75a5-78ad0179c42b@gmail.com> Date: Tue, 4 May 2021 15:33:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210504222915.17206-17-ansuelsmth@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 5/4/21 3:29 PM, Ansuel Smith wrote: > Add support for phylink_connect_phy to pass dev_flags to the PHY driver. > Change any user of phylink_connect_phy to pass 0 as dev_flags by > default. > > Signed-off-by: Ansuel Smith I do not think that this patch and the next one are necessary at all, because phylink_of_phy_connect() already supports passing a dev_flags. That means that you should be representing the switch's internal MDIO bus in the Device Tree and then describe how each port of the switch connects to the internal PHY on that same bus. Once you do that the logic in net/dsa/slave.c will call phylink_of_phy_connect() and all you will have to do is implement dsa_switch_ops::get_phy_flags. Can you try that? -- Florian