[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a49b0cff-dd1c-4d89-8287-2909942d718f@lunn.ch>
Date: Thu, 11 May 2023 21:33:45 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: netdev@...r.kernel.org, jarkko.nikula@...ux.intel.com,
andriy.shevchenko@...ux.intel.com, mika.westerberg@...ux.intel.com,
jsd@...ihalf.com, Jose.Abreu@...opsys.com, hkallweit1@...il.com,
linux@...linux.org.uk, linux-i2c@...r.kernel.org,
linux-gpio@...r.kernel.org, mengyuanlou@...-swift.com
Subject: Re: [PATCH net-next v7 8/9] net: txgbe: Implement phylink pcs
> +static int txgbe_pcs_read(struct mii_bus *bus, int addr, int devnum, int regnum)
> +{
> + struct wx *wx = bus->priv;
> + u32 offset, val;
> +
> + offset = devnum << 16 | regnum;
> +
> + /* Set the LAN port indicator to IDA_ADDR */
> + wr32(wx, TXGBE_XPCS_IDA_ADDR, offset);
> +
> + /* Read the data from IDA_DATA register */
> + val = rd32(wx, TXGBE_XPCS_IDA_DATA);
addr is ignored here. So i assume the hardware only supports a single
address? Please add a check for address. If it is 0, do the read,
otherwise return either -EOPNOTSUPP, or 0xffff. What we don't want is
it to appear there are 32 PCS devices.
Andrew
Powered by blists - more mailing lists