From patchwork Wed Oct 31 23:05:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 149894 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp98913ljp; Wed, 31 Oct 2018 16:07:59 -0700 (PDT) X-Google-Smtp-Source: AJdET5c/mpZToU+14wCL34//VkO2K4xKYq+5XGK2NEr8zhWRI6WLf5kygMDB3H7QVReMsmYOetaY X-Received: by 2002:a63:a552:: with SMTP id r18mr4956062pgu.176.1541027278857; Wed, 31 Oct 2018 16:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541027278; cv=none; d=google.com; s=arc-20160816; b=LXZUKM5zNHfGFWeWkMEyeqN+t0dv6Lwak0NDtC3veDVcCYeu8xM4QvPu0jbnyyp0gY BfuQ+lrXVL1Ta0ilzybqtc9/dIs58Ial8YDdG5X0gGwPTQZkxmv7129vDrl3DiJC320c zowq2cqwDFcOXVvq4h40xb9b8E4cG7jcJfpej24eSL6uC36yVbBegHXAI+wK9UHRRZuc cIGbCaZ9+MiEIB0RYZ8uYgjFlxdr0t/il/gYmT65XufHnX1xWF9rBzf/1YnIarMrl3OW R/KGBpIz6YUgrkZzBr+0trqjE184DTjrpoFPedXoIhy8TIZx7SYoKUv8CUpmNWrlekFV /WZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=YiN6r85vzhCLwwV86GUKK1HqbONmxBMmlERH0QTVrmQ=; b=TxO006Cf1a0Vg1cge4wty/mu/Be6dYJbAa9NZvRoPZzkNUMxTZ4QSPKr4pZy24Orpd TTTQefxAO4JLq+KhoJVQFc9KVteZxmpUbO8XQ72vzjRqFZJVJFYsTCl0BzYrVRCeSrik uiBp3ViSEjSxCx9hPziEl9TgTswsiSmn07arAVkWNJhSls91fYgQvRaAorNebBms8g11 0GYBOgF/rQE0AQoiZIklqgSfTBrQIS/p7wUZgPaB1cw8UPQqOPDCCXO75epdsCLAD/M1 DV7qGEZIXMRaZuk7EmLxc9Zmhd6Eg2OAgux4713mfTnmT7/e+EH5SlGwMNJWj5o00aTH qGig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2vuN0H89; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10-v6si16961487pfi.222.2018.10.31.16.07.58; Wed, 31 Oct 2018 16:07:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@kernel.org header.s=default header.b=2vuN0H89; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729435AbeKAIIH (ORCPT + 15 others); Thu, 1 Nov 2018 04:08:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:56624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729404AbeKAIIG (ORCPT ); Thu, 1 Nov 2018 04:08:06 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6F6C620664; Wed, 31 Oct 2018 23:07:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027276; bh=rBj1VNHYKWFDnGeoONJEY/CgzqejkcKemJ7jY1hdUCQ=; h=From:To:Cc:Subject:Date:From; b=2vuN0H89Jw7mNSPylhuxnqmV/Z9r01wXRNhwp7w3yZU0xdFq8+UEKG2PBL0Z2bCEk rGCn/z8bqPG64/wCktqlVzLLFvPmYg18vB8OqUDbowEMFKdRbeFB2Bw5D/3Vy2FyLA azknR7YjnUPrc1njHp4BDGFlsvGRgeOJmQL+jjtA= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Masahisa Kojima , Yoshitoyo Osaki , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.18 001/126] net: socionext: Reset tx queue in ndo_stop Date: Wed, 31 Oct 2018 19:05:49 -0400 Message-Id: <20181031230754.29029-1-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Masahisa Kojima [ Upstream commit 8d5b0bf611ec5b7618d5b772dddc93b8afa78cb8 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/socionext/netsec.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c index e080d3e7c582..4d7d53fbc0ef 100644 --- a/drivers/net/ethernet/socionext/netsec.c +++ b/drivers/net/ethernet/socionext/netsec.c @@ -945,6 +945,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)