netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Bryan.Whitehead@microchip.com
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	UNGLinuxDriver@microchip.com
Subject: Re: [PATCH v1 net] lan743x: Expand phy search for LAN7431
Date: Tue, 18 Dec 2018 17:45:28 +0100	[thread overview]
Message-ID: <20181218164528.GA22449@lunn.ch> (raw)
In-Reply-To: <CY4PR1101MB2342E0C8092B1B3974FDBA64FABD0@CY4PR1101MB2342.namprd11.prod.outlook.com>

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@lunn.ch>

    Andrew

  reply	other threads:[~2018-12-18 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 21:44 [PATCH v1 net] lan743x: Expand phy search for LAN7431 Bryan Whitehead
2018-12-18 12:12 ` Andrew Lunn
2018-12-18 16:41   ` Bryan.Whitehead
2018-12-18 16:45     ` Andrew Lunn [this message]
2018-12-19  5:36 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181218164528.GA22449@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Bryan.Whitehead@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).