Skip to content

Commit 0bc0b97

Browse files
CCX-Stingraydavem330
authored andcommitted
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: 6a8788f ("bnxt_en: add support for software dynamic interrupt moderation") Signed-off-by: Andy Gospodarek <[email protected]> Cc: Michael Chan <[email protected]> Acked-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c76fe2d commit 0bc0b97

File tree

1 file changed

+7
-1
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+7
-1
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6082,8 +6082,14 @@ static void bnxt_disable_napi(struct bnxt *bp)
60826082
if (!bp->bnapi)
60836083
return;
60846084

6085-
for (i = 0; i < bp->cp_nr_rings; i++)
6085+
for (i = 0; i < bp->cp_nr_rings; i++) {
6086+
struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring;
6087+
6088+
if (bp->bnapi[i]->rx_ring)
6089+
cancel_work_sync(&cpr->dim.work);
6090+
60866091
napi_disable(&bp->bnapi[i]->napi);
6092+
}
60876093
}
60886094

60896095
static void bnxt_enable_napi(struct bnxt *bp)

0 commit comments

Comments
 (0)