Skip to content

Commit 7e63035

Browse files
Villemoeskuba-moo
authored andcommitted
net: fec: properly guard irq coalesce setup
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 <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1f154f3 commit 7e63035

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/freescale/fec_main.c

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

12221222
/* Init the interrupt coalescing */
1223-
fec_enet_itr_coal_set(ndev);
1223+
if (fep->quirks & FEC_QUIRK_HAS_COALESCE)
1224+
fec_enet_itr_coal_set(ndev);
12241225
}
12251226

12261227
static int fec_enet_ipc_handle_init(struct fec_enet_private *fep)

0 commit comments

Comments
 (0)