A close can cancel the pending profile work and leave DIM in DIM_APPLY_NEW_PROFILE, where net_dim() does nothing. Adaptive coalescing then stays stuck after the next open. Reset the DIM state on ring init and start from the default profile, which is what bcmgenet_init_rx_coalesce() programs. Fixes: 9f4ca05827a2 ("net: bcmgenet: Add support for adaptive RX coalescing") Signed-off-by: Nicolai Buchwitz --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 70c6a6465c81..96620d298677 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -2702,8 +2702,11 @@ static void bcmgenet_init_dim(struct bcmgenet_rx_ring *ring, { struct bcmgenet_net_dim *dim = &ring->dim; + memset(&dim->dim, 0, sizeof(dim->dim)); INIT_WORK(&dim->dim.work, cb); dim->dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE; + /* Match the profile bcmgenet_init_rx_coalesce() programs */ + dim->dim.profile_ix = NET_DIM_DEF_PROFILE_EQE; dim->event_ctr = 0; dim->packets = 0; dim->bytes = 0; -- 2.53.0