Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bc0b97f authored by Andy Gospodarek's avatar Andy Gospodarek Committed by David S. Miller
Browse files

bnxt_en: cleanup DIM work on device shutdown



Make sure to cancel any pending work that might update driver coalesce
settings when taking down an interface.

Fixes: 6a8788f2 ("bnxt_en: add support for software dynamic interrupt moderation")
Signed-off-by: default avatarAndy Gospodarek <gospo@broadcom.com>
Cc: Michael Chan <michael.chan@broadcom.com>
Acked-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c76fe2d9
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -6082,9 +6082,15 @@ static void bnxt_disable_napi(struct bnxt *bp)
	if (!bp->bnapi)
		return;

	for (i = 0; i < bp->cp_nr_rings; i++)
	for (i = 0; i < bp->cp_nr_rings; i++) {
		struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring;

		if (bp->bnapi[i]->rx_ring)
			cancel_work_sync(&cpr->dim.work);

		napi_disable(&bp->bnapi[i]->napi);
	}
}

static void bnxt_enable_napi(struct bnxt *bp)
{