Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3626501pxb; Mon, 1 Mar 2021 15:30:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdjR7soI314hRhePQyFH/JATCJ6WNpuKfcyQkOiF3mrcOY6UnpGZW9xe4YDqkTvhsAI5ZB X-Received: by 2002:a17:906:2c02:: with SMTP id e2mr18644835ejh.155.1614641414290; Mon, 01 Mar 2021 15:30:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614641414; cv=none; d=google.com; s=arc-20160816; b=hAjuDYmqBFYi/QobSmkpCEfEKuL+0vm4cCecKe9SEgGlTYU4PmVjN5NFBpJYARdp0l qbM4BK22Q3VvdYYO79NistyWy8rFEJK083+epFy/M7EF3Bu4a31zbH3KaVlJMNtTzmh+ XZW0nLyPxJH9TaTRadk+5GyjV7hOl3XKxDoj5uqQJlK133NL7dE0Ral4sZioW7sBjfyK funBKDWDea4EZQ8NhYoInQ+GLyoYLXNaxrJIy1zpFHqbJ6ik27j/Z9+iqRNIh7jfmd5f 2befXlK8QVbL0YU9msjXNVYk6Gag2qTSrv/IBx+B1D/7BwAZZf/Ee1tuV3Lm7TfI/3Ul /v7w== 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=ivMi6mSFQiHgYMxCNqWHhY9H8Dk+jHEudGL0GndSTrI=; b=dR1cBI8xpCfEK54NROE3kntZlAiHb7wnKhja4VRO2v9wKdWfLG0GrzaKfPGAEGI+Q+ cl0X0sQGj6e49efCLUCmBL8VuMn5Id1yri3EzcpE2TRomnus+wXmFGO52lUEf9u1HRFV OSg0UmbYT8pSDupSFRxcURzo0qlQn1Sn1d/ZhuOU3BB/XHP2ZLTZ0gX0RmKZwpd4L7U+ a6ofMHGERfnQDmj5gMIKEUvVV/mihnVrSNMAv2ba47Br+k1b7u6q7BFqmsqPihR8lYdL BBAnDaCDTiXZyKU9nC+4u2vdBitStI0I/ZLFOW4Z/+fJ6UNGGq+j9fy5s4oe24PJfGvy s2NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=auAUs6Vy; 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 t15si3663742edq.164.2021.03.01.15.29.52; Mon, 01 Mar 2021 15:30:14 -0800 (PST) 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=auAUs6Vy; 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 S1344125AbhCAXJD (ORCPT + 99 others); Mon, 1 Mar 2021 18:09:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:49706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238889AbhCAR4Z (ORCPT ); Mon, 1 Mar 2021 12:56:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6389264EAE; Mon, 1 Mar 2021 16:38:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616710; bh=5lR8TtXivwai/tfu7bzbgN48oqjqJcWzd+QPq8cYgo8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=auAUs6Vy1vrdIt1ibEOKw2TQNwah17CGrbPJ1m+5Rc5IMzAk5uuSpEoRwEPwPcesz 13wS8ZLJtNUrlTfCD7ekkYech7YwIf3REd31K/V0+rvYrkRcAbilC4GupZfGxmBSge bOmMcoNLe+Q9dZLT9Jfsnjitu06vHW6vuJalJBtQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sudheesh Mavila , Shyam Sundar S K , Tom Lendacky , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 069/247] net: amd-xgbe: Fix NETDEV WATCHDOG transmit queue timeout warning Date: Mon, 1 Mar 2021 17:11:29 +0100 Message-Id: <20210301161035.058070695@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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: Shyam Sundar S K [ Upstream commit 186edbb510bd60e748f93975989ccba25ee99c50 ] The current driver calls netif_carrier_off() late in the link tear down which can result in a netdev watchdog timeout. Calling netif_carrier_off() immediately after netif_tx_stop_all_queues() avoids the warning. ------------[ cut here ]------------ NETDEV WATCHDOG: enp3s0f2 (amd-xgbe): transmit queue 0 timed out WARNING: CPU: 3 PID: 0 at net/sched/sch_generic.c:461 dev_watchdog+0x20d/0x220 Modules linked in: amd_xgbe(E) amd-xgbe 0000:03:00.2 enp3s0f2: Link is Down CPU: 3 PID: 0 Comm: swapper/3 Tainted: G E Hardware name: AMD Bilby-RV2/Bilby-RV2, BIOS RBB1202A 10/18/2019 RIP: 0010:dev_watchdog+0x20d/0x220 Code: 00 49 63 4e e0 eb 92 4c 89 e7 c6 05 c6 e2 c1 00 01 e8 e7 ce fc ff 89 d9 48 RSP: 0018:ffff90cfc28c3e88 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000006 RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff90cfc28d63c0 RBP: ffff90cfb977845c R08: 0000000000000050 R09: 0000000000196018 R10: ffff90cfc28c3ef8 R11: 0000000000000000 R12: ffff90cfb9778000 R13: 0000000000000003 R14: ffff90cfb9778480 R15: 0000000000000010 FS: 0000000000000000(0000) GS:ffff90cfc28c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f240ff2d9d0 CR3: 00000001e3e0a000 CR4: 00000000003406e0 Call Trace: ? pfifo_fast_reset+0x100/0x100 call_timer_fn+0x2b/0x130 run_timer_softirq+0x3e8/0x440 ? enqueue_hrtimer+0x39/0x90 Fixes: e722ec82374b ("amd-xgbe: Update the BelFuse quirk to support SGMII") Co-developed-by: Sudheesh Mavila Signed-off-by: Sudheesh Mavila Signed-off-by: Shyam Sundar S K Acked-by: Tom Lendacky Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 1 + drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c index 5519eff584417..80cf6af822f72 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c @@ -1444,6 +1444,7 @@ static void xgbe_stop(struct xgbe_prv_data *pdata) return; netif_tx_stop_all_queues(netdev); + netif_carrier_off(pdata->netdev); xgbe_stop_timers(pdata); flush_workqueue(pdata->dev_workqueue); diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c index 8a3a60bb26888..4d5506d928973 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c @@ -1396,7 +1396,6 @@ static void xgbe_phy_stop(struct xgbe_prv_data *pdata) pdata->phy_if.phy_impl.stop(pdata); pdata->phy.link = 0; - netif_carrier_off(pdata->netdev); xgbe_phy_adjust_link(pdata); } -- 2.27.0