Thread (9 messages) flat view 9 messages, 5 authors, 2021-09-17

Re: [PATCH v1 net] net: mscc: ocelot: remove buggy and useless write to ANA_PFC_PFC_CFG

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2021-09-16 11:49:26
Also in: lkml

On Wed, Sep 15, 2021 at 06:09:37PM -0700, Colin Foster wrote:
quoted hunk ↗ jump to hunk
A useless write to ANA_PFC_PFC_CFG was left in while refactoring ocelot to
phylink. Since priority flow control is disabled, writing the speed has no
effect.

Further, it was using ethtool.h SPEED_ instead of OCELOT_SPEED_ macros,
which are incorrectly offset for GENMASK.

Lastly, for priority flow control to properly function, some scenarios
would rely on the rate adaptation from the PCS while the MAC speed would
be fixed. So it isn't used, and even if it was, neither "speed" nor
"mac_speed" are necessarily the correct values to be used.

Fixes: e6e12df625f2 ("net: mscc: ocelot: convert to phylink")
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
---
 drivers/net/ethernet/mscc/ocelot.c | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index c581b955efb3..08be0440af28 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -569,10 +569,6 @@ void ocelot_phylink_mac_link_up(struct ocelot *ocelot, int port,
 	ocelot_port_writel(ocelot_port, DEV_CLOCK_CFG_LINK_SPEED(speed),
 			   DEV_CLOCK_CFG);
 
-	/* No PFC */
-	ocelot_write_gix(ocelot, ANA_PFC_PFC_CFG_FC_LINK_SPEED(speed),
-			 ANA_PFC_PFC_CFG, port);
-
This will conflict with the other patch.... why didn't you send both as
part of a series? By not doing that, you are telling patchwork to
build-test them in parallel, which of course does not work:
https://patchwork.kernel.org/project/netdevbpf/patch/20210916012341.518512-1-colin.foster@in-advantage.com/

Also, why didn't you bump the version counter of the patch, and we're
still at v1 despite the earlier attempt?

git format-patch -2 --cover-letter --subject-prefix="PATCH v3 net" -o /opt/patches/linux/ocelot-phylink-fixes/v3/
./scripts/get_maintainer.pl /opt/patches/linux/ocelot-phylink-fixes/v3/*.patch
./scripts/checkpatch.pl --strict /opt/patches/linux/ocelot-phylink-fixes/v3/*.patch
# Go through patches, write change log compared to v2 using vimdiff, meld, git range-diff, whatever
# Write cover letter summarizing what changes and why. If fixing bugs explain the impact.
git send-email \
	--to='netdev@vger.kernel.org' \
	--to='linux-kernel@vger.kernel.org' \
	--cc='Vladimir Oltean [off-list ref]' \
	--cc='Claudiu Manoil [off-list ref]' \
	--cc='Alexandre Belloni [off-list ref]' \
	--cc='UNGLinuxDriver@microchip.com' \
	--cc='"David S. Miller" [off-list ref]' \
	--cc='Jakub Kicinski [off-list ref]' \
	/opt/patches/linux/ocelot-phylink-fixes/v3/*.patch

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Please keep this tag but resend a new version. You can download the patch with the review tags automatically using:
git b4 20210916010938.517698-1-colin.foster@in-advantage.com
git b4 20210916012341.518512-1-colin.foster@in-advantage.com

where "git b4" is an alias configured like this in ~/.gitconfig:

[b4]
	midmask = https://lore.kernel.org/r/%s
[alias]
	b4 = "!f() { b4 am -t -o - $@ | git am -3; }; f"
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help