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.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E7702C433B4 for ; Wed, 5 May 2021 00:41:42 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65903613CB for ; Wed, 5 May 2021 00:41:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65903613CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9y4eOEjIKeDLFXciLyBBgV0+82oQuNkTVcm6aXirz28=; b=AmxYliV090dNjQckjvE2x8PCp 5wPH7p73SJUUhlY0HbYSHdaQFhfps+PXf4AHSbxp2wd/KOLOxhMBt3W71eQUfopa1tbMX1y0Wm4lA W4059GxxqqOBI5wGp1F93cU/Qq8YFy5fg3wMLShzctYV09BJwm0krWevW/hXnpOwz4llO6WAuaj25 nx21+WqWun3sOa3aGMTZImo2uSRA7wakPNu4E6Ue1budBggyhFhQe3mhqvAHxSXtrzvcy/AJ6TIe9 iQSCJiRXWXvcp+cKEJ/2cRqrFAr0Gq2klwH3WiWAIpFAYTskiX7ACOnUVPJjiVI/hd1wHxaO4jNMf N+HRVVSIw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1le5Wt-00HSOS-Mq; Wed, 05 May 2021 00:36:44 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1le5Vl-00HSLX-Q4 for linux-arm-kernel@desiato.infradead.org; Wed, 05 May 2021 00:35:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GQcBXhiG4WSKbf/NKH+KIteUYu6u/x6SNCEh0wAhXc4=; b=3P9ZHBVLOE/8S9wjQAFZVoGXhK 9kNvcDtkDkathlC5AwL9iTk/c0bMNnAq9ukW6m9jcaeL7gzmXtyJ+r4j2PvhzcleNuig9ZF0Vc/2g mZWXRYXpNrM5JXJca6co88l+DtTnw8SkZhFfNwNe2md046boflVLaS8UltKNQWx09Rp1FIPhHldgH Arrz8jKVaDfyKbrPPexcaY1PfL0avuzaiZk+tjc6ZYMRnQchcRAn1v1OgGtbfgwTWeD2vZAnqRhdg eTqyup6WIrwDrU296jm2enKp8W98UHcQKdrl8CIaudLXyMR57AdzwCRC6pz53bpJyNI3qZFDlI3j+ mhoLE0KQ==; Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1le5Vi-004MTc-SF for linux-arm-kernel@lists.infradead.org; Wed, 05 May 2021 00:35:32 +0000 Received: by mail-ed1-x52b.google.com with SMTP id b17so9517564ede.0 for ; Tue, 04 May 2021 17:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=GQcBXhiG4WSKbf/NKH+KIteUYu6u/x6SNCEh0wAhXc4=; b=MIPpoTfg07W36wb7bopairhQEaQzQYki7Tpcwd8BU+s7fyNlDmnJpkewhI9gD3wVlo QkkfmJPdI7MeQBQnqt2zirp41ojwrtpuelnJT3Uwgk3UGLKwfBdDmJLfPIZtJqzifFSv rMoSIyTtVygXCpVHDJNBpvRXaFoqvvuL9JBjZjf/FD3tlLptBV6+dJ8RpSGFT5gWgKkn TdW1vEJgtdLk+DgqtAITpHO8gheN5qjVZiz0kxazHQkbTx28RTTFR7QdAnaRIQ3p1dCf D3LigiZZemA+zx6H1VwgfuBICIZnDpvH3T2YuIFBUeHk9Dh7uGLqSnXHrkMYax55wfMB 9wSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GQcBXhiG4WSKbf/NKH+KIteUYu6u/x6SNCEh0wAhXc4=; b=GHLC4D5mVmjBZQwAQqFhFRUoYLr8vgxfvTblPsxS7n4s9NZl90EypEAPzRr63+kZIo tmbNk+HUm/mRDOYwVNQNd8oDXx03AyLHmIQq8sJvjon+7tuHZgwDyhOuCm31FSlWkcLY V+8+l2UkSNoEzA2kjoNZWcJrdGFyQ5y5x/5a14m2UBCXsmdtxwPZvfbwfJWqpHH+DgOC dtQrPnLDGA/sKe0RG+dHIdBq+iWs+jHSHf2uJ3bGO6ZcXYWTXk3UZdELONQ1BC3VDvgK L8+htl+hO04gj949lCmJA80iJGkXZW/Ragi0t9kjPfX9WWrNcx0Oki+zzesf1hwqJakY kHaQ== X-Gm-Message-State: AOAM532gAZ0auynkDJv/gDw81PmjBIgBoZMCMc6jwbr12UEIo/it0qhP a7wuZ2EAEJf9Q6Id59ObN4I= X-Google-Smtp-Source: ABdhPJzJ28LwP1ruNR/6xg95ajBMTXpp2+a15spYOqcq7u3I/Ju4F8LD2joilelT7IoSnEVB/LmYpg== X-Received: by 2002:a05:6402:36d:: with SMTP id s13mr29337677edw.103.1620174929306; Tue, 04 May 2021 17:35:29 -0700 (PDT) Received: from Ansuel-xps.localdomain (93-35-189-2.ip56.fastwebnet.it. [93.35.189.2]) by smtp.gmail.com with ESMTPSA id ne17sm2103286ejc.56.2021.05.04.17.35.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 May 2021 17:35:28 -0700 (PDT) Date: Wed, 5 May 2021 02:35:25 +0200 From: Ansuel Smith To: Florian Fainelli Subject: Re: [RFC PATCH net-next v3 17/20] net: phy: phylink: permit to pass dev_flags to phylink_connect_phy Message-ID: References: <20210504222915.17206-1-ansuelsmth@gmail.com> <20210504222915.17206-17-ansuelsmth@gmail.com> <79cd97fe-02e8-4373-75a5-78ad0179c42b@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <79cd97fe-02e8-4373-75a5-78ad0179c42b@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210504_173530_938195_7D95BC4B X-CRM114-Status: GOOD ( 25.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Russell King , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Alexandre Torgue , Vivien Didelot , Jose Abreu , linux-arm-kernel@lists.infradead.org, Maxime Coquelin , Giuseppe Cavallaro , Jakub Kicinski , Vladimir Oltean , Claudiu Beznea , "David S. Miller" , linux-kernel@vger.kernel.org, Heiner Kallweit Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 04, 2021 at 03:33:36PM -0700, Florian Fainelli wrote: > 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? I did some testing. Just to make sure I'm correctly implementing this I'm using the phy-handle binding and the phy-mode set to internal. It does work with a quick test but I think with this implementation we would be back to this problem [0]. (I'm declaring the phy_port to the top mdio driver like it was done before [0]) I was thinking if a good solution would be to register a internal mdio driver in the qca8k code so that it can use the MASTER reg. (it's late here so I could be very confused about this) I think that using this solution we would be able to better describe the phy by declaring them INSIDE the switch node instead of declaring them outside in the top mdio node. The internal mdio driver would register with this new mdio node inside the switch node and use the custom mdio read/write that use the MASTER reg. [0] http://patchwork.ozlabs.org/project/netdev/patch/20190319195419.12746-3-chunkeey@gmail.com/ > -- > Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel