Skip to content

Commit

Permalink
nfp: clear ring delayed kick counters
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Rolf Neugebauer <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Jakub Kicinski authored and davem330 committed Dec 17, 2015
1 parent 1bd4978 commit 301c141
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/netronome/nfp/nfp_net_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 301c141

Please sign in to comment.