diff mbox series

[net,v2,3/3] net: socionext: Reset tx queue in ndo_stop

Message ID 20181023112428.6785-4-masahisa.kojima@linaro.org
State New
Headers show
Series Bugfix for the netsec driver | expand

Commit Message

Masahisa Kojima Oct. 23, 2018, 11:24 a.m. UTC
From: Masahisa Kojima <masahisa.kojima@linaro.org>


We observed that packets and bytes count are not reset
when user performs interface down. Eventually, tx queue is
exhausted and packets will not be sent out.
To avoid this problem, resets tx queue in ndo_stop.

Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver")
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>

Signed-off-by: Yoshitoyo Osaki <osaki.yoshitoyo@socionext.com>

---
changes in v2:
 - update commit comment

 drivers/net/ethernet/socionext/netsec.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.14.2
diff mbox series

Patch

diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
index 5c295cc0b8f8..d4da7e017207 100644
--- a/drivers/net/ethernet/socionext/netsec.c
+++ b/drivers/net/ethernet/socionext/netsec.c
@@ -952,6 +952,9 @@  static void netsec_uninit_pkt_dring(struct netsec_priv *priv, int id)
 	dring->head = 0;
 	dring->tail = 0;
 	dring->pkt_cnt = 0;
+
+	if (id == NETSEC_RING_TX)
+		netdev_reset_queue(priv->ndev);
 }
 
 static void netsec_free_dring(struct netsec_priv *priv, int id)