Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1619690

Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

From Juergen Borleis <jbe@pengutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303
Date 2017-04-10 09:50 +0200
Message-ID <tuCff-6dm-15@gated-at.bofh.it> (permalink)
References <ttxhD-4AV-7@gated-at.bofh.it> <ttxhE-4AV-23@gated-at.bofh.it> <ttDdo-8mD-13@gated-at.bofh.it>
Organization Pengutronix e.K.

Show all headers | View raw


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).
 
> I'm just wondering if this should be in the PHY 
> driver. But that only works if you can differentiate the virtual PHY
> from the real PHYs in the PHY driver.

For the real PHYs the driver states:

SMSC LAN911x Internal PHY dsa-0.0:01: attached PHY driver [SMSC LAN911x Internal PHY] (mii_bus:phy_addr=dsa-0.0:01, irq=-1)
SMSC LAN911x Internal PHY dsa-0.0:02: attached PHY driver [SMSC LAN911x Internal PHY] (mii_bus:phy_addr=dsa-0.0:02, irq=-1)

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)

And for the fixed-link case:

Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=-1)

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Borleis             |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv2] net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver Juergen Borleis <jbe@pengutronix.de> - 2017-04-07 10:20 +0200
  [PATCH v2 3/4] net: dsa: LAN9303: add I2C managed mode support Juergen Borleis <jbe@pengutronix.de> - 2017-04-07 10:20 +0200
    Re: [PATCH v2 3/4] net: dsa: LAN9303: add I2C managed mode support Andrew Lunn <andrew@lunn.ch> - 2017-04-07 15:50 +0200
      Re: [PATCH v2 3/4] net: dsa: LAN9303: add I2C managed mode support Juergen Borleis <jbe@pengutronix.de> - 2017-04-10 10:00 +0200
  [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303 Juergen Borleis <jbe@pengutronix.de> - 2017-04-07 10:20 +0200
    Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the  SMSC-LAN9303 David Miller <davem@davemloft.net> - 2017-04-07 15:40 +0200
    Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the  SMSC-LAN9303 Andrew Lunn <andrew@lunn.ch> - 2017-04-07 16:40 +0200
      Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303 Juergen Borleis <jbe@pengutronix.de> - 2017-04-10 09:50 +0200
        Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the  SMSC-LAN9303 Andrew Lunn <andrew@lunn.ch> - 2017-04-10 15:30 +0200
  [PATCH v2 4/4] net: dsa: LAN9303: add MDIO managed mode support Juergen Borleis <jbe@pengutronix.de> - 2017-04-07 10:20 +0200
    Re: [PATCH v2 4/4] net: dsa: LAN9303: add MDIO managed mode support Andrew Lunn <andrew@lunn.ch> - 2017-04-07 16:30 +0200
      Re: [PATCH v2 4/4] net: dsa: LAN9303: add MDIO managed mode support David Miller <davem@davemloft.net> - 2017-04-07 16:30 +0200
    Re: [PATCH v2 4/4] net: dsa: LAN9303: add MDIO managed mode support Andrew Lunn <andrew@lunn.ch> - 2017-04-07 17:00 +0200
    Re: [PATCH v2 4/4] net: dsa: LAN9303: add MDIO managed mode support Andrew Lunn <andrew@lunn.ch> - 2017-04-07 17:10 +0200
  [PATCH v2 1/4] net: dsa: add support for the SMSC-LAN9303 tagging format Juergen Borleis <jbe@pengutronix.de> - 2017-04-07 10:20 +0200
    Re: [PATCH v2 1/4] net: dsa: add support for the SMSC-LAN9303  tagging format Andrew Lunn <andrew@lunn.ch> - 2017-04-07 15:10 +0200
      Re: [PATCH v2 1/4] net: dsa: add support for the SMSC-LAN9303 tagging format Juergen Borleis <jbe@pengutronix.de> - 2017-04-10 09:20 +0200
        Re: [PATCH v2 1/4] net: dsa: add support for the SMSC-LAN9303  tagging format Andrew Lunn <andrew@lunn.ch> - 2017-04-10 15:20 +0200

csiph-web