]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: remove buggy and useless write to ANA_PFC_PFC_CFG
authorColin Foster <colin.foster@in-advantage.com>
Fri, 17 Sep 2021 15:39:04 +0000 (08:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Sep 2021 11:59:52 +0000 (12:59 +0100)
commit52f02837f5428f2254aabead65c9d6dc9779a4ac
treecc7500da2d982545de4a75a37a7b79877dc61c1c
parent8ba0f370f37e7642d435a225acf183c6796cc015
net: mscc: ocelot: remove buggy and useless write to ANA_PFC_PFC_CFG

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: 520544871945 ("net: mscc: ocelot: convert to phylink")
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c