From mboxrd@z Thu Jan 1 00:00:00 1970 From: masahisa.kojima@linaro.org Subject: [PATCH 3/3] net: socionext: Reset tx queue in ndo_stop Date: Fri, 19 Oct 2018 10:08:43 +0900 Message-ID: <20181019010843.3605-4-masahisa.kojima@linaro.org> References: <20181019010843.3605-1-masahisa.kojima@linaro.org> Cc: ilias.apalodimas@linaro.org, jaswinder.singh@linaro.org, ard.biesheuvel@linaro.org, osaki.yoshitoyo@socionext.com, Masahisa Kojima To: netdev@vger.kernel.org Return-path: Received: from mail-yw1-f68.google.com ([209.85.161.68]:40587 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726245AbeJSJPF (ORCPT ); Fri, 19 Oct 2018 05:15:05 -0400 Received: by mail-yw1-f68.google.com with SMTP id l79-v6so12581212ywc.7 for ; Thu, 18 Oct 2018 18:11:22 -0700 (PDT) In-Reply-To: <20181019010843.3605-1-masahisa.kojima@linaro.org> Sender: netdev-owner@vger.kernel.org List-ID: From: Masahisa Kojima Without resetting tx queue in ndo_stop, packets and bytes count are not reset when the interface is down. Eventually, tx queue is exhausted and packets will not be sent out. Signed-off-by: Masahisa Kojima Signed-off-by: Yoshitoyo Osaki --- 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 e7faaf8be99e..4b32da76d577 100644 --- a/drivers/net/ethernet/socionext/netsec.c +++ b/drivers/net/ethernet/socionext/netsec.c @@ -954,6 +954,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