[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fd1fce8c-cd88-4d71-9fba-6e40cc01182e@lunn.ch>
Date: Mon, 19 Jun 2023 16:10:48 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: Woojung Huh <woojung.huh@...rochip.com>, UNGLinuxDriver@...rochip.com,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Robert Hancock <hancock@...systems.ca>, stable@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: dsa: microchip: ksz9477: follow errata
sheet when applying fixups
> static void ksz9477_phy_errata_setup(struct ksz_device *dev, int port)
> {
> + u16 cr;
> +
> + /* Errata document says the PHY must be configured to 100Mbps
> + * with auto-neg disabled before configuring the PHY MMD
> + * registers.
> + */
> + ksz_pread16(dev, port, REG_PORT_PHY_CTRL, &cr);
> + ksz_pwrite16(dev, port, REG_PORT_PHY_CTRL,
> + PORT_SPEED_100MBIT | PORT_FULL_DUPLEX);
> +
For this fix, these are fine.
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Looking at the values of PORT_SPEED_100MBIT and PORT_FULL_DUPLEX, they
are identical to BMCR_SPEED100 and BMCR_FULLDPLX. In fact, it looks
like for 9477 this is a standard BMCR. Please could you add a follow
up patch which replaces these #defines with the standard ones in
include/uapi/linux/mii.h. The code is then more understandable by
people who know the standard defines.
Thanks
Andrew
Powered by blists - more mailing lists