From: Andrew Lunn <andrew@lunn.ch>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Woojung Huh <woojung.huh@microchip.com>,
UNGLinuxDriver@microchip.com,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Robert Hancock <hancock@sedsystems.ca>,
stable@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: dsa: microchip: ksz9477: follow errata sheet when applying fixups
Date: Mon, 19 Jun 2023 16:10:48 +0200 [thread overview]
Message-ID: <fd1fce8c-cd88-4d71-9fba-6e40cc01182e@lunn.ch> (raw)
In-Reply-To: <20230619081633.589703-1-linux@rasmusvillemoes.dk>
> 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
next prev parent reply other threads:[~2023-06-19 14:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 8:16 Rasmus Villemoes
2023-06-19 14:10 ` Andrew Lunn [this message]
2023-06-19 17:31 ` Robert Hancock
2023-06-20 7:15 ` Rasmus Villemoes
2023-06-19 20:18 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fd1fce8c-cd88-4d71-9fba-6e40cc01182e@lunn.ch \
--to=andrew@lunn.ch \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hancock@sedsystems.ca \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=woojung.huh@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®