[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YV9tmyitHLlbV6XJ@lunn.ch>
Date: Thu, 7 Oct 2021 23:58:51 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Prasanna Vengateshan <prasanna.vengateshan@...rochip.com>
Cc: netdev@...r.kernel.org, olteanv@...il.com, robh+dt@...nel.org,
UNGLinuxDriver@...rochip.com, Woojung.Huh@...rochip.com,
hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
kuba@...nel.org, linux-kernel@...r.kernel.org,
vivien.didelot@...il.com, f.fainelli@...il.com,
devicetree@...r.kernel.org
Subject: Re: [PATCH v4 net-next 05/10] net: dsa: microchip: add DSA support
for microchip lan937x
> +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
Powered by blists - more mailing lists