summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorAndy Gospodarek <gospo@broadcom.com>2018-01-26 10:27:47 -0500
committerDavid S. Miller <davem@davemloft.net>2018-01-29 14:19:23 -0500
commit0bc0b97fca73fca19edd0bd1463972144b44abaa (patch)
tree31fc3a5a80e5bf8a4d091a09d2f8047528e4bb50 /drivers/net/ethernet/broadcom
parentc76fe2d98c726224a975a0d0198c3fb50406d325 (diff)
downloadtalos-obmc-linux-0bc0b97fca73fca19edd0bd1463972144b44abaa.tar.gz
talos-obmc-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/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c8
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)
OpenPOWER on IntegriCloud