From: masahisa.kojima@linaro.org
To: netdev@vger.kernel.org
Cc: ilias.apalodimas@linaro.org, jaswinder.singh@linaro.org,
ard.biesheuvel@linaro.org, osaki.yoshitoyo@socionext.com,
Masahisa Kojima <masahisa.kojima@linaro.org>
Subject: [PATCH net v2 3/3] net: socionext: Reset tx queue in ndo_stop
Date: Tue, 23 Oct 2018 20:24:28 +0900 [thread overview]
Message-ID: <20181023112428.6785-4-masahisa.kojima@linaro.org> (raw)
In-Reply-To: <20181023112428.6785-1-masahisa.kojima@linaro.org>
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(+)
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)
--
2.14.2
next prev parent reply other threads:[~2018-10-23 19:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-23 11:24 [PATCH net v2 0/3] Bugfix for the netsec driver masahisa.kojima
2018-10-23 11:24 ` [PATCH net v2 1/3] net: socionext: Stop PHY before resetting netsec masahisa.kojima
2018-10-23 11:24 ` [PATCH net v2 2/3] net: socionext: Add dummy PHY register read in phy_write() masahisa.kojima
2018-10-23 11:24 ` masahisa.kojima [this message]
2018-10-23 11:32 ` [PATCH net v2 0/3] Bugfix for the netsec driver Ard Biesheuvel
2018-10-23 11:39 ` Masahisa Kojima
2018-10-23 17:55 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181023112428.6785-4-masahisa.kojima@linaro.org \
--to=masahisa.kojima@linaro.org \
--cc=ard.biesheuvel@linaro.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jaswinder.singh@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=osaki.yoshitoyo@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox