linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Juergen Borleis <jbe@pengutronix.de>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	f.fainelli@gmail.com, kernel@pengutronix.de,
	vivien.didelot@savoirfairelinux.com, davem@davemloft.net
Subject: Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303
Date: Mon, 10 Apr 2017 15:25:46 +0200	[thread overview]
Message-ID: <20170410132546.GB19820@lunn.ch> (raw)
In-Reply-To: <201704100944.13165.jbe@pengutronix.de>

On Mon, Apr 10, 2017 at 09:44:12AM +0200, Juergen Borleis wrote:
> Hi Andrew,
> 
> On Friday 07 April 2017 16:29:43 Andrew Lunn wrote:
> > > +static int lan9303_virt_phy_reg_read(struct lan9303 *chip, int regnum)
> > > +{
> > > +	int ret;
> > > +	u32 val;
> > > +
> > > +	if (regnum > MII_EXPANSION) {
> > > +		if (regnum == MII_LAN911X_SPECIAL_CONTROL_STATUS)
> > > +			regnum = 7; /* map to LAN9303_VIRT_SPECIAL_CTRL */
> > > +		else
> > > +			return -EINVAL;
> > > +	}
> >
> > What PHY ID does the virtual PHY use? The same as the LAN911X? Or 
> > something different.
> 
> Something different: 0x00000000 (instead of 0x0007c0d1 the real PHYs are
> using).

Hi Juergen

0x0 does not help us. We cannot bind a specific PHY driver to that.

> For the virtual PHY the driver states (MDIO emulation case):
> 
> Generic PHY 63fec000.etherne:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=63fec000.etherne:00, irq=-1)

This is what i would expect. But i think that means the redirect of
MII_LAN911X_SPECIAL_CONTROL_STATUS to 7 is pointless. The generic PHY
only uses registers below MII_EXPANSION. So unless there is a use of
MII_LAN911X_SPECIAL_CONTROL_STATUS i don't see, you might as well
remove this.

     Andrew

  reply	other threads:[~2017-04-10 13:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07  8:14 [PATCHv2] net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver Juergen Borleis
2017-04-07  8:14 ` [PATCH v2 1/4] net: dsa: add support for the SMSC-LAN9303 tagging format Juergen Borleis
2017-04-07 13:06   ` Andrew Lunn
2017-04-10  7:18     ` Juergen Borleis
2017-04-10 13:15       ` Andrew Lunn
2017-04-07  8:15 ` [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303 Juergen Borleis
2017-04-07 13:35   ` David Miller
2017-04-07 14:29   ` Andrew Lunn
2017-04-10  7:44     ` Juergen Borleis
2017-04-10 13:25       ` Andrew Lunn [this message]
2017-04-07  8:15 ` [PATCH v2 3/4] net: dsa: LAN9303: add I2C managed mode support Juergen Borleis
2017-04-07 13:40   ` Andrew Lunn
2017-04-10  7:58     ` Juergen Borleis
2017-04-07  8:15 ` [PATCH v2 4/4] net: dsa: LAN9303: add MDIO " Juergen Borleis
2017-04-07 14:19   ` Andrew Lunn
2017-04-07 14:27     ` David Miller
2017-04-07 14:54   ` Andrew Lunn
2017-04-07 15:05   ` Andrew Lunn

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=20170410132546.GB19820@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=jbe@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /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).