Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp179539imd; Wed, 31 Oct 2018 16:55:46 -0700 (PDT) X-Google-Smtp-Source: AJdET5cGrA8fmLRm0Iqp0gdz82NpXtWTAVIbPlmoBQBFqktP81y2V4AWHUi+T6UI/n//FnGfNRHG X-Received: by 2002:a17:902:b401:: with SMTP id x1-v6mr197125plr.237.1541030146606; Wed, 31 Oct 2018 16:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541030146; cv=none; d=google.com; s=arc-20160816; b=UTpqKYfxKBlWEwHD9CBeUcAccybzgjTzvkgFmQIQzyNAdyW0fjEZWB6YRSawTI1JpJ u0VqgOMM6N8MwY5yjv7X6F07lggn2XEoIO9JpQQSNVlKoAe0QfIsvfpxn29Bju9+PBBS skeGKxLHGdnIDJYIrjbfPPphkjt6kRyNMuZ1Tkv0+0a4LlFejdIk0pJGrb0hX+SHayNb DaGcGkk6e1G/dIrSSQJa22vjdJh6LZQ3zobKQ+l43mHxHErMpxMQyQCdV+/f2kzS4AQA HU66Ei9zj2z8lSOC2Ur48nayetu5pK7h522wNX+51HVdv6FZ6Rstw5D20uHKPGtarv67 eomQ== 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=fdzo3JVVvYpRas46erm1kDvqaAZ4rlmAMJQORzW/1ss=; b=MX7HCPa7/xmLq+JsIeUn+cIuy4SRlac9YdYhvAIQnLAseNshKSJJazjDKSC4Qwrtcy e3D/5pNuYe+wcC9v8pgPZoLfP62N10qtKgRZ+SIdjIoAz5WgtbS+0gZgjWntjBV+vKIZ MAfrHc8kh7yy26v9kUy8aSPF+xOmzBqDGX5zraxvFKLRlac9BXMdSPIQuKDDAiskJGsH FtYpLkcw4dJGPGs3dvahW58X2t89P+0APt29MCXIRIocs6EaZyyc7Q4Y3dY+D+SrQ5Rb O0iuiaTDln6qBmZnm8VMxaaeGFlFu5//RI9jaOV4jA/IayoLfMx/9P4WxDOokwKzP4hD TYeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=B9YM54d8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 e73-v6si28988022pfb.98.2018.10.31.16.55.31; Wed, 31 Oct 2018 16:55:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=B9YM54d8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726167AbeKAIFy (ORCPT + 99 others); Thu, 1 Nov 2018 04:05:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:52496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbeKAIFy (ORCPT ); Thu, 1 Nov 2018 04:05:54 -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 1A28420664; Wed, 31 Oct 2018 23:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027143; bh=tin9VUn5KBBLYgnFfPiCXX+PD8SLNdQ9X2aZueU12go=; h=From:To:Cc:Subject:Date:From; b=B9YM54d8eUvfjAoZuOpjvyOl4C0G6SSFCGsYSw+BTwQHQDJhOmZppUYmIBCDT7hUy jE+m2KjqCQFdXj5/6YCkL/w9JDPouyBG1bhwfy5IYjphVX4+5f48HTBO1KEl1x3jQ4 eQOZO6+VdbJF/XSnJkPdggFSxUepQSpcLG1Wz9ms= 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.19 001/146] net: socionext: Reset tx queue in ndo_stop Date: Wed, 31 Oct 2018 19:03:16 -0400 Message-Id: <20181031230541.28822-1-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c index 4289ccb26e4e..d2caeb9edc04 100644 --- a/drivers/net/ethernet/socionext/netsec.c +++ b/drivers/net/ethernet/socionext/netsec.c @@ -940,6 +940,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.17.1