Skip to content

Commit 972707b

Browse files
Villemoesgregkh
authored andcommitted
net: fec: properly guard irq coalesce setup
commit 7e63035 upstream. Prior to the Fixes: commit, the initialization code went through the same fec_enet_set_coalesce() function as used by ethtool, and that function correctly checks whether the current variant has support for irq coalescing. Now that the initialization code instead calls fec_enet_itr_coal_set() directly, that call needs to be guarded by a check for the FEC_QUIRK_HAS_COALESCE bit. Fixes: df727d4 (net: fec: don't reset irq coalesce settings to defaults on "ip link up") Reported-by: Greg Ungerer <gregungerer@westnet.com.au> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20221205204604.869853-1-linux@rasmusvillemoes.dk Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 289721f commit 972707b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,8 @@ fec_restart(struct net_device *ndev)
11631163
writel(0, fep->hwp + FEC_IMASK);
11641164

11651165
/* Init the interrupt coalescing */
1166-
fec_enet_itr_coal_set(ndev);
1166+
if (fep->quirks & FEC_QUIRK_HAS_COALESCE)
1167+
fec_enet_itr_coal_set(ndev);
11671168
}
11681169

11691170
static void fec_enet_stop_mode(struct fec_enet_private *fep, bool enabled)

0 commit comments

Comments
 (0)