diff options
author | Andy Gospodarek <gospo@broadcom.com> | 2018-01-26 16:27:47 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-29 20:19:23 +0100 |
commit | 0bc0b97fca73fca19edd0bd1463972144b44abaa (patch) | |
tree | 31fc3a5a80e5bf8a4d091a09d2f8047528e4bb50 /drivers/net/ethernet | |
parent | net: ipv6: send unsolicited NA after DAD (diff) | |
download | linux-0bc0b97fca73fca19edd0bd1463972144b44abaa.tar.xz linux-0bc0b97fca73fca19edd0bd1463972144b44abaa.zip |
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: 6a8788f25625 ("bnxt_en: add support for software dynamic interrupt moderation")
Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
Cc: Michael Chan <michael.chan@broadcom.com>
Acked-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 4b001d2050c2..1500243b9886 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -6082,8 +6082,14 @@ 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) |