lkml.org 
[lkml]   [2023]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@lunn.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

\
 
 \ /
  Last update: 2023-06-19 16:12    [W:0.047 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site