From patchwork Wed Oct 31 23:03:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 149884 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp96536ljp; Wed, 31 Oct 2018 16:05:45 -0700 (PDT) X-Google-Smtp-Source: AJdET5e+9SgcP3e8efhHKgDrYKAfqN9AV2hTHEbcO4vMiOa1Cw/5njy4cNnSebEVroe2jA6Vr5ZW X-Received: by 2002:a62:62c3:: with SMTP id w186-v6mr5290180pfb.5.1541027145454; Wed, 31 Oct 2018 16:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541027145; cv=none; d=google.com; s=arc-20160816; b=KCLt9N0fSpVmzqcU3cAAtW46JEmIu7eAk9bq3Y6kqnY7fyMpBQk+Qqgb+tVoTQc0Nm j8QHx5FBxAL3fvAmqJi4vQNMmxM5QRKDwcfb71HyzN7OSzu1TffiLi5kAMKW7Z1ZDBxS a4M1WKhIO6/nZS3JGffIFVBdt46iHaerrIunVgJj9K3N9bZ4N42i9i5m8DZYWNoqyk/X T8HLiR53WsK3ntvi6/qQwFLN9coexaSxRjaFx2yf26ib+yotHvDENa9K5UvnqPz++4SI bx1m5vc3PSySAuv5kLK1qX+v778uQmYTxzX/DAx6cxsFvKTSoeHzBKVJQ0UebI6acsca IWcA== 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=szCPkKIpXwqFilp2niyzZByFLw/jLZ8GrulgpVp4+37hvZlT8skmUEfjsz1AZg/bYY gRMNvqwL33sQZVC1ODz6WEdzLCKjWwjSsKlOHIzR7x0V1wdzE2nxr/SNWIWjj9644sFR ESS7bj6f6yyQpDjBAg0UojlCDe50PmazFgq1QS62yDGm3Z8bQjJwy0I4rDKtRNW3AApd XnjQ/mQf/9iFrB5ejEdHgQ/6910hgCUmkJxQZqd/bT4LjSOjdzDYmRBzBkTzBmubeGXV nI+XpaDbdCc/DSDv4KGqi+rh1/19ocZ0+9gv0a/zTBaCKQYDhCrMEDctjzJKoBGPQIDY bH9Q== 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 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 m26-v6si13205954pfe.80.2018.10.31.16.05.45; Wed, 31 Oct 2018 16:05:45 -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=B9YM54d8; 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 S1725986AbeKAIFy (ORCPT + 15 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: 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 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)