enetc: Add interrupt coalescing support
authorClaudiu Manoil <claudiu.manoil@nxp.com>
Tue, 21 Jul 2020 07:55:21 +0000 (10:55 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 22:38:30 +0000 (15:38 -0700)
commit915710812ba0ff11f49aa810025f91bbad8da20a
tree43d602cf5bc651d645e40a66d321e7a509066e17
parent058d9cfa6075463396e42fb7be64c015cbdda80b
enetc: Add interrupt coalescing support

Enable programming of the interrupt coalescing registers
and allow manual configuration of the coalescing time
thresholds via ethtool.  Packet thresholds have been fixed
to predetermined values as there's no point in making them
run-time configurable, also anticipating the dynamic interrupt
moderation (DIM) algorithm which uses fixed packet thresholds
as well.  If the interface is up when the operation mode of
traffic interrupt events is changed by the user (i.e. switching
from default per-packet interrupts to coalesced interrupts),
the traffic needs to be paused in the process.
This patch also prepares the ground for introducing DIM on Rx.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc.h
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
drivers/net/ethernet/freescale/enetc/enetc_hw.h