Subject: Re: [PATCH v4 net-next 05/10] net: dsa: microchip: add DSA support for microchip lan937x

From: Andrew Lunn <[email-masked]>
Date: Thu, 7 Oct 2021 23:58:51 +0200

> +static int lan937x_sw_mdio_read(struct mii_bus *bus, int addr, int regnum)
> +{
> +	struct ksz_device *dev = bus->priv;
> +	u16 val;
> +	int ret;
> +

It would be good to check for C45 regnum values and return -EOPNOTSUPP.

> +	ret = lan937x_internal_phy_read(dev, addr, regnum, &val);
> +	if (ret < 0)
> +		return ret;
> +
> +	return val;
> +}
> +
> +static int lan937x_sw_mdio_write(struct mii_bus *bus, int addr, int regnum,
> +				 u16 val)
> +{
> +	struct ksz_device *dev = bus->priv;
> +

Same here.

     Andrew