From patchwork Tue Oct 23 11:24:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 149440 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp568571ljp; Tue, 23 Oct 2018 04:26:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV61cFDte9/cHFXwVnPiQLLJIYAF81nUJVxVxb4LIgKjO4a1OedfK1XzgPwtQmqq8FC8cTCa5 X-Received: by 2002:a65:580d:: with SMTP id g13-v6mr43663594pgr.370.1540294001769; Tue, 23 Oct 2018 04:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540294001; cv=none; d=google.com; s=arc-20160816; b=XHcVaVBIWfOYelWmxSLVfzfrpoqjE+oLOgFUHUxs93p79OIgiks2ZjlUPuW6H5DMX4 Ow77IOPR0kzksDAD7pTf0QfjE62L+Br3VUbHMRbgSCcS6xbE8hyKMNgf9AdB2s74KRm/ ALUgKPRsrZ0RtS2fJV1zA1etZtvmGgKrhcy5ZQEHtdYQjUwwZzYwV2Sk48dpsJ+7UWzW Adh+qRwiKEyJoofjadeZB/9gxw+ecaQXJtYFOSqDULty67j42OhEu0pCtzJI5JOJ2H9Z AB2NYU7wrwwnBt7kmbqwu76I20JgI8T9SElCeAiquusXTIpWVmpCazEWbEtkkSxJqKw2 lZlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=FAJ3+oju1lruSTwugc0cfuJ4vFog1NvT8AXzemkt1N8=; b=02rULib8Bt7+1ONJSLJdZXzWKZVDvZjGEItuRISPGxvfhlb0ng6nvp68o9E8nlBtC1 PjeI3/S0HQ4eTHwE74EnHkEtQ0ViA4l7c3OONULUqTonTYCjN2NEyMQdfxQnWYMBX17L b3Ye4XgbcSiiFgjong0NtSh9F9x6zGoq+cJ9HbANgr0DWsVCQYULh/zaAW+IRjUwnqC1 w7x9VaoOeAt5Zu+swx/aZ9E+UVG6LdVvqbGlPQ7QUmHZXpE3CxCqE2M5nM1Q4Bz1UAZS +SnHelCkqWNhA2FGmy6BXQp5Ee160N7LeLeafD9tLdgJQ5oX4Q4v1DpFUQil34CYycbc IdQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CoTYwS3Y; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j20-v6si1056098pgl.279.2018.10.23.04.26.41; Tue, 23 Oct 2018 04:26:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CoTYwS3Y; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728216AbeJWTtn (ORCPT + 10 others); Tue, 23 Oct 2018 15:49:43 -0400 Received: from mail-yw1-f65.google.com ([209.85.161.65]:40502 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727873AbeJWTtn (ORCPT ); Tue, 23 Oct 2018 15:49:43 -0400 Received: by mail-yw1-f65.google.com with SMTP id l79-v6so371790ywc.7 for ; Tue, 23 Oct 2018 04:26:39 -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=FAJ3+oju1lruSTwugc0cfuJ4vFog1NvT8AXzemkt1N8=; b=CoTYwS3YJGlHtLi3+XDSGbka8GGHJrsm19d0Q5IvQmamxrsO4Fa6z0T9/wlIIl4mCU qRzCWLdcynInyEfba6d/cGNm7J7m6ZtPyrgNy87pcddBI8QCPmT3UtExGe3LwSqAB5uC XuWVSIgSnQbnxxTjMUqv+3dAlaVcv2Yz45MF0= 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=FAJ3+oju1lruSTwugc0cfuJ4vFog1NvT8AXzemkt1N8=; b=jPVKCsMgv45JfTCMneu6n84nHdNUIhbH+KQN32pensAWEaBSsSyPeRDt8Hw0NauB0Y 8EDZ9+2/Ov/HfylpfUvqo2WHsuRw/hk9PRHU3fOiQuzpv2IG55obnxk9e3wfQnpQvg/I 0Wwg1SPT/htcwjY9d6nfB555PcHLhawYva1090p+4UV1WrEIR+3yzEGKEFqdGyeGQYeI ghocv49jmitDO+jwuRsRIrBD4TY1h8zr6HiKUFhzs/VUpsOfznHYAYz7urSpApVI/Csl +kK9F/5UTkVSdRsZf3VyAV/RTYXZ5uuMjuAndo2TkY1K9f7X1If5mT88BAh7FZ/fsch6 88qg== X-Gm-Message-State: ABuFfoh+nDj1AOh8BVAao5K6Pj9sffI/jrEKlcWoPZIV6TFMa74nENA/ CEyJRFxG5LTBOqvsflLeUXwKXbLR4WA= X-Received: by 2002:a0d:d606:: with SMTP id y6-v6mr4860619ywd.358.1540293999429; Tue, 23 Oct 2018 04:26:39 -0700 (PDT) Received: from localhost ([121.95.100.191]) by smtp.gmail.com with ESMTPSA id b70-v6sm223031ywe.85.2018.10.23.04.26.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Oct 2018 04:26:39 -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 net v2 3/3] net: socionext: Reset tx queue in ndo_stop Date: Tue, 23 Oct 2018 20:24:28 +0900 Message-Id: <20181023112428.6785-4-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20181023112428.6785-1-masahisa.kojima@linaro.org> References: <20181023112428.6785-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 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 Signed-off-by: Yoshitoyo Osaki --- changes in v2: - update commit comment drivers/net/ethernet/socionext/netsec.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.14.2 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)