Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B19C016408 for ; Mon, 7 Aug 2023 19:51:25 +0000 (UTC) Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CA49199E; Mon, 7 Aug 2023 12:51:09 -0700 (PDT) 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=9J+uImyTN0TfhfemsisSDeyNz12H39me+3+txm8sV1M=; b=5hSOXjVS6SKPKxljJRlznnehnO nlcxQoPku63L4M3AugNjdliGPXLSZYCQFC6lYfYdtvnYKeegtTNneZQwvVTFgmQkqhZZzAezt3VHV 7B2d3r6mhN3E88lPY/c51AYGEJ3UxI/90r9Y8QL2bVFng9dS+vF7BtbV0M/TWO6OpIes=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qT6Fh-003O16-RO; Mon, 07 Aug 2023 21:50:53 +0200 Date: Mon, 7 Aug 2023 21:50:53 +0200 From: Andrew Lunn To: Bartosz Golaszewski Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Andrew Halaney , Alex Elder , Srini Kandagatla , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: Re: [PATCH 0/2] net: stmmac: allow sharing MDIO lines Message-ID: <54421791-75fa-4ed3-8432-e21184556cde@lunn.ch> References: <20230807193102.6374-1-brgl@bgdev.pl> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230807193102.6374-1-brgl@bgdev.pl> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On Mon, Aug 07, 2023 at 09:31:00PM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Two MACs may share MDIO lines to the PHYs. Let's allow that in the > stmmac driver by providing a new device-tree property allowing one MAC > node to reference the MDIO bus defined on a second MAC node. I don't understand why this is needed. phy-handle can point to a phy on any MDIO bus. So it is no problem for one MAC to point to the other MACs MDIO bus as is. You do sometimes get into ordering problems, especially if MAC0 is pointing to a PHY on MAC1 MDIO bus. But MAC0 should get a -EPROBE_DEFER, MAC1 then probes, creating its MDIO bus and the two PHYs on it, and then later MAC0 is probes again and is successful. Andrew