Commit 01cca6b9 authored by Jakub Kicinski's avatar Jakub Kicinski

bnxt: disable napi before canceling DIM

napi schedules DIM, napi has to be disabled first,
then DIM canceled.

Noticed while reading the code.

Fixes: 0bc0b97f ("bnxt_en: cleanup DIM work on device shutdown")
Fixes: 6a8788f2 ("bnxt_en: add support for software dynamic interrupt moderation")
Reviewed-by: default avatarMichael Chan <michael.chan@broadcom.com>
Reviewed-by: default avatarEdwin Peer <edwin.peer@broadcom.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 3c603136
...@@ -9134,10 +9134,9 @@ static void bnxt_disable_napi(struct bnxt *bp) ...@@ -9134,10 +9134,9 @@ static void bnxt_disable_napi(struct bnxt *bp)
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; struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring;
napi_disable(&bp->bnapi[i]->napi);
if (bp->bnapi[i]->rx_ring) if (bp->bnapi[i]->rx_ring)
cancel_work_sync(&cpr->dim.work); cancel_work_sync(&cpr->dim.work);
napi_disable(&bp->bnapi[i]->napi);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment