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

From: Andrew Lunn
Date: Fri Apr 07 2017 - 10:30:10 EST


Hi Juergen

> +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. 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.

Andrew