net: fec: don't reset irq coalesce settings to defaults on "ip link up"
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Wed, 23 Nov 2022 13:38:52 +0000 (14:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Dec 2022 11:36:42 +0000 (12:36 +0100)
commit91582b3a1ab222c459da7600290f5b8f1b9f570f
tree42f37c6b0e0cb4c8ee3ed1dfaec4e714758d7cfb
parentc772dab247f1a5cacc109c4e09ae6e0843a73445
net: fec: don't reset irq coalesce settings to defaults on "ip link up"

[ Upstream commit df727d4547de568302b0ed15b0d4e8a469bdb456 ]

Currently, when a FEC device is brought up, the irq coalesce settings
are reset to their default values (1000us, 200 frames). That's
unexpected, and breaks for example use of an appropriate .link file to
make systemd-udev apply the desired
settings (https://www.freedesktop.org/software/systemd/man/systemd.link.html),
or any other method that would do a one-time setup during early boot.

Refactor the code so that fec_restart() instead uses
fec_enet_itr_coal_set(), which simply applies the settings that are
stored in the private data, and initialize that private data with the
default values.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/freescale/fec_main.c