1 |
From 0f79b02c6f8f3e493e942367d0cf76ab0975ef52 Mon Sep 17 00:00:00 2001 |
2 |
From: Masahisa Kojima <masahisa.kojima@linaro.org> |
3 |
Date: Tue, 23 Oct 2018 20:24:28 +0900 |
4 |
Subject: [PATCH 001/145] net: socionext: Reset tx queue in ndo_stop |
5 |
|
6 |
[ Upstream commit 8d5b0bf611ec5b7618d5b772dddc93b8afa78cb8 ] |
7 |
|
8 |
We observed that packets and bytes count are not reset |
9 |
when user performs interface down. Eventually, tx queue is |
10 |
exhausted and packets will not be sent out. |
11 |
To avoid this problem, resets tx queue in ndo_stop. |
12 |
|
13 |
Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver") |
14 |
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> |
15 |
Signed-off-by: Yoshitoyo Osaki <osaki.yoshitoyo@socionext.com> |
16 |
Signed-off-by: David S. Miller <davem@davemloft.net> |
17 |
Signed-off-by: Sasha Levin <sashal@kernel.org> |
18 |
--- |
19 |
drivers/net/ethernet/socionext/netsec.c | 3 +++ |
20 |
1 file changed, 3 insertions(+) |
21 |
|
22 |
diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c |
23 |
index 4289ccb26e4e..d2caeb9edc04 100644 |
24 |
--- a/drivers/net/ethernet/socionext/netsec.c |
25 |
+++ b/drivers/net/ethernet/socionext/netsec.c |
26 |
@@ -940,6 +940,9 @@ static void netsec_uninit_pkt_dring(struct netsec_priv *priv, int id) |
27 |
dring->head = 0; |
28 |
dring->tail = 0; |
29 |
dring->pkt_cnt = 0; |
30 |
+ |
31 |
+ if (id == NETSEC_RING_TX) |
32 |
+ netdev_reset_queue(priv->ndev); |
33 |
} |
34 |
|
35 |
static void netsec_free_dring(struct netsec_priv *priv, int id) |
36 |
-- |
37 |
2.19.1 |
38 |
|