Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp477710pxj; Tue, 18 May 2021 07:36:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypZJG8JWOjsRqQy7M/vM6q1kdO0VpL8LVuHGxEQcst7oKM2eBYPVLRzvTTtJEc0wl1/XFa X-Received: by 2002:a05:6402:684:: with SMTP id f4mr724198edy.25.1621348600933; Tue, 18 May 2021 07:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621348600; cv=none; d=google.com; s=arc-20160816; b=fRnYGxAt3neHq35AsUoGWPX/Yp+TYhen6pTzg/yeYlApHiC9cSgF3M/QstYMVFemRr nezzcDmsj4MVpvH50cL0bcyyca8SXob4WCV3F1oybKTMUDcvE8S/6tq5rgIvWUroj3Mi uuoQuuE7N2c8+FpPVaE4EPITRlHB+VI1IuDH0btA1CO3+KIZNMewTCLrRVf+M+zHToLc n6s2PoZdwFsmKGd0RT6KiNDUvDciqFJKx05puFGfTfKZAej/rSMP1TnpICRHE8DzNkTK 4RJ4WfuWLAN5R0BjfDtcVNKW1nVkXbTJSQloycV/w1FY4PNYFJI1GJyxIhaSa3xbjK0Y PMzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TlTmhdIy99oO6nO4pcbnsStY+tcDrLCzYBPL7BK9omE=; b=Esf8g7UcpW0cFj0zBtSxG/Bm6yw3ASujYJPvCF8mKZPgAjjNRc3as6E/pAxDMpolLw OVF3PoGwO0iQH6UyDr/sD623Hb159mGg/FMvR9esXQMN3wdBjjwC8mFrGLLvbOPxyQkl Tk146WlfSOZ1AMJiAP3G2zot12TCPdGB4AoPUDugT0r6Wlln0BIuSm/rGEAxbnC53HgF K3W7LP+6ig9wEL9eEn4Ol8XeXZr8r6gakMlLyIVcalMyfMXQfdbhUM6MonQD3QTzhFPt KgZ8bTWifVIg4Po/9geJtAuLQDSU4OM8CkaqidB5SV1e/QoGS/0xCsj2pfee0gcuOomN HSOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uLWPEOnL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d13si9586634edp.403.2021.05.18.07.36.17; Tue, 18 May 2021 07:36:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uLWPEOnL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344838AbhEQPpo (ORCPT + 99 others); Mon, 17 May 2021 11:45:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:54174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245599AbhEQPaE (ORCPT ); Mon, 17 May 2021 11:30:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F2CA61CBB; Mon, 17 May 2021 14:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262265; bh=3kWhPSrZMF/cCh11znIxXmkSywjvOOU3iFaDQg2PLfM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uLWPEOnL9L5NzWvFmodhSGoyjrf6LrbUIDSVA25sq3L/0MZYijbIoueHDlAyestO/ 8H8VxSLSD3fRqYhEuFdpIzj1gi8TdsokYcG+kscMGim+k4xZEIyF1bUIYX6eL+LEzm Y3ifYRkam76x5vvP4S6oDn749qHRl79fvkOHtqV8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peng Li , Huazhong Tan , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 149/289] net: hns3: use netif_tx_disable to stop the transmit queue Date: Mon, 17 May 2021 16:01:14 +0200 Message-Id: <20210517140310.166384226@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li [ Upstream commit b416e872be06fdace3c36cf5210130509d0f0e72 ] Currently, netif_tx_stop_all_queues() is used to ensure that the xmit is not running, but for the concurrent case it will not take effect, since netif_tx_stop_all_queues() just sets a flag without locking to indicate that the xmit queue(s) should not be run. So use netif_tx_disable() to replace netif_tx_stop_all_queues(), it takes the xmit queue lock while marking the queue stopped. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 3a42b96cb843..ef3148919970 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -526,8 +526,8 @@ static int hns3_nic_net_stop(struct net_device *netdev) if (h->ae_algo->ops->set_timer_task) h->ae_algo->ops->set_timer_task(priv->ae_handle, false); - netif_tx_stop_all_queues(netdev); netif_carrier_off(netdev); + netif_tx_disable(netdev); hns3_nic_net_down(netdev); -- 2.30.2