From patchwork Fri Oct 19 01:08:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 986415 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="iUfIg/9o"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42bntN3YTSz9sC2 for ; Fri, 19 Oct 2018 12:11:24 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726647AbeJSJPF (ORCPT ); Fri, 19 Oct 2018 05:15:05 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mvsMdqlrZflUMcGarFKUW1cQ+K9e6pvoW52898rH0kU=; b=iUfIg/9oAbi1aeXeSLTrR8n40Yflsjc1TkE1aFsY64WZz+Krw7ALnb4bIzWwOpFdz3 S6PpwvjwjOsOJzfMFB5yf97P15hCuj4QrbBdwgHt9UyluDO66qwpZM2Gl92sGMlOLXtj I9s3BHuV8FLWijHCNuSLTGpOVtOv+EKU7J9dU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mvsMdqlrZflUMcGarFKUW1cQ+K9e6pvoW52898rH0kU=; b=PSQDSPwsiGNTADZ5z7gL7ZAsTet9OGhwuu/vq2pPblnQnSxyXBCNrjme8QwjfpcIHL lrmUSpJZOhpp1PCwSGWW1kUz5evyysFILL9mRCikRko0P44mRhrlaUTpskheVAH9Hctc lVyrUQh6x5l58HHAGfSnJgUEX7wb9kBXEOHakoVFkwkOWpVrwZ+fTJsecSodw+d4HTSJ 3++FbEDXHLLWmRdAm1lx+4Z3lcqkLEwo0iHmTvr01Uacz+lIQUjMT04uFRf4VGmTMf9S dE0pLhpJowKcSIVN7N1K+aH18aeGdgAGhlekSAI72Xt2V03xs+hCyU7NnbkeiUTdYOcr PvKA== X-Gm-Message-State: ABuFfogvhohW6A+kU1tljUiLo8xbLXcbWgGt5DeLB2bW39M3tJvpknQ7 nXzQ/RXvDhTrl9VgMLfadHV8BFI92lk= X-Google-Smtp-Source: ACcGV61pSs7GiUQ3w0BzWGArU9x82VvdTYyr7xhKGvyUGtEdeGWSqQ/1QuKGlUnJRgqI5ZlLQjJd6Q== X-Received: by 2002:a81:7cd:: with SMTP id 196-v6mr19929645ywh.434.1539911482018; Thu, 18 Oct 2018 18:11:22 -0700 (PDT) Received: from localhost ([121.95.100.191]) by smtp.gmail.com with ESMTPSA id n7-v6sm5481918ywb.8.2018.10.18.18.11.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Oct 2018 18:11:21 -0700 (PDT) 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 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> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20181019010843.3605-1-masahisa.kojima@linaro.org> References: <20181019010843.3605-1-masahisa.kojima@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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)