summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2015-12-16 19:08:52 +0000
committerDavid S. Miller <davem@davemloft.net>2015-12-17 15:27:38 -0500
commit301c141d6a5ddacb8b2310a87a7e8fe997d17a39 (patch)
treec1d0a64bb06dc397c4d622c11b756e83cf964cb7
parent1bd4978a88ac2589f3105f599b1d404a312fb7f6 (diff)
downloadlinux-301c141d6a5ddacb8b2310a87a7e8fe997d17a39.tar.bz2
nfp: clear ring delayed kick counters
We need to clear delayed kick counters when we free rings otherwise after ndo_close()/ndo_open() we could kick HW by more entries than actually written to rings. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Rolf Neugebauer <rolf.neugebauer@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_net_common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index 7060539d276a..6c5af4cb5bdc 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -1363,6 +1363,7 @@ static void nfp_net_tx_ring_free(struct nfp_net_tx_ring *tx_ring)
tx_ring->wr_p = 0;
tx_ring->rd_p = 0;
tx_ring->qcp_rd_p = 0;
+ tx_ring->wr_ptr_add = 0;
tx_ring->txbufs = NULL;
tx_ring->txds = NULL;
@@ -1437,6 +1438,7 @@ static void nfp_net_rx_ring_free(struct nfp_net_rx_ring *rx_ring)
rx_ring->cnt = 0;
rx_ring->wr_p = 0;
rx_ring->rd_p = 0;
+ rx_ring->wr_ptr_add = 0;
rx_ring->rxbufs = NULL;
rx_ring->rxds = NULL;