From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH v1 net] lan743x: Expand phy search for LAN7431 Date: Tue, 18 Dec 2018 17:45:28 +0100 Message-ID: <20181218164528.GA22449@lunn.ch> References: <1545083090-31529-1-git-send-email-Bryan.Whitehead@microchip.com> <20181218121226.GG11088@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: davem@davemloft.net, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com To: Bryan.Whitehead@microchip.com Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:51960 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727029AbeLRQpb (ORCPT ); Tue, 18 Dec 2018 11:45:31 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Dec 18, 2018 at 04:41:20PM +0000, Bryan.Whitehead@microchip.com wrote: > > > - /* set to internal PHY id */ > > > - adapter->mdiobus->phy_mask = ~(u32)BIT(1); > > > + if ((adapter->csr.id_rev & ID_REV_ID_MASK_) == > > ID_REV_ID_LAN7430_) > > > + /* LAN7430 uses internal phy at address 1 */ > > > + adapter->mdiobus->phy_mask = ~(u32)BIT(1); > > > > Hi Bryan > > > > Does LAN7430 have an external MDIO bus as well as the internal one? Is > > there a possibility for a PHY at address 0? If not, you can probably just not > > have a mask at all. > > > > Andrew > > Hi Andrew, > > The LAN7430 does not have an external MDIO bus. > And there is no possibility for a PHY at address 0. > The reason I kept the mask for LAN7430 case is to reduce effort in finding the phy. > Since Linux will scan all addresses in that case unnecessarily. > > But I have tested your suggestion and it does work without a mask. > So I'm fine either way. Hi Bryan Lets keep the patch as it is. As you said, it speeds things up, and since there is no external MDIO bus, nobody can add a second PHY, or a switch chip, etc. Reviewed-by: Andrew Lunn Andrew