🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #20996

Re: [PATCH net] net: via-velocity: Stop the device on shutdown

#20996
From: netdev-bot+sashiko
Date: Mon, 23 Nov 2026 13:07
110 lines
12036 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 2

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The patch adds a .shutdown hook to velocity_pci_driver only.
- [Low] The commit message carries a Fixes: tag for 38f34dba806a ("PM:
  ACPI: reboot: Reinstate S5 for reboot").
- [Low] The commit author is "Roland Waltersson
  <roland.waltersson@netinsight.net>", but the only Signed-off-by…

--

net: via-velocity: Stop the device on shutdown

This commit adds a PCI .shutdown hook to the via-velocity driver. The hook
detaches and closes the interface, then disables the PCI device, so the
chip stops DMAing into its RX rings and raising interrupts after
device_shutdown(). The commit message links an occasional reboot hang on a
congatec conga-EAF board to the ACPI S5 preparation, which commit
38f34dba806a reinstated on reboot.

> and the board is never reset. Not running the S5 preparation on reboot
> avoids the hang.

[ ... ]

> Fixes: 38f34dba806a ("PM: ACPI: reboot: Reinstate S5 for reboot")

[Severity: Low]
Was the new velocity_pci_shutdown() hook tested on the conga-EAF board?
Does the hang go away with it?

The message shows that skipping the S5 preparation avoids the hang. It
does not say whether stopping the velocity chip has the same effect.

It also does not explain how a chip that is still bus mastering, or still
has INTx asserted, would hang during _PTS(5) or the GPE disable.

The cited tg3 commit 2ca1c94ce0b6 fixed a different symptom (AER on
reboot).

The Fixes: tag makes this a stable candidate. Could the changelog say
whether the fix was checked against this hang?

> Signed-off-by: Roland Waltersson <rolwal@netinsight.net>

[Severity: Low]
This isn't a bug, but the Signed-off-by address (rolwal@netinsight.net)
does not match the author address (roland.waltersson@netinsight.net).
checkpatch reports this as a From:/Signed-off-by: email address mismatch.

> diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c
> index 6d7b6f3b46339..3daf7a8dd06eb 100644
> --- a/drivers/net/ethernet/via/via-velocity.c
> +++ b/drivers/net/ethernet/via/via-velocity.c

[ ... ]

> @@ -3241,6 +3267,7 @@ static struct pci_driver velocity_pci_driver = {
>  	.id_table	= velocity_pci_id_table,
>  	.probe		= velocity_pci_probe,
>  	.remove		= velocity_pci_remove,
> +	.shutdown	= velocity_pci_shutdown,
>  	.driver = {
>  		.pm = &velocity_pm_ops,
>  	},

[Severity: Medium]
Only velocity_pci_driver gets a .shutdown hook here. Does
velocity_platform_driver need one as well?

The platform driver binds the same VT6110 MAC through the
"via,velocity-vt6110" compatible. It uses the same velocity_probe() core:

velocity_platform_probe()
    return velocity_probe(&pdev->dev, irq, info, BUS_PLATFORM);

Its registration still has no .shutdown:

static struct platform_driver velocity_platform_driver = {
	.probe		= velocity_platform_probe,
	.remove		= velocity_platform_remove,
	.driver = {
		...
	},
};

The commit message describes the problem without naming a bus: "on
reboot, power off or kexec the chip is left running after
device_shutdown(): it keeps receiving packets into its RX rings by DMA and
raising its interrupt."

On a platform-bound velocity with the interface up, the chip would keep
DMAing into its RX rings and raising its IRQ after device_shutdown(). With
kexec, that DMA can land in memory the new kernel has reused.

Apart from pci_disable_device(), velocity_pci_shutdown() does nothing
bus-specific. Could that part go into a shared helper that a platform
.shutdown hook also calls?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/IA0PR17MB668711363A5BE04D1BC3C76B9E792%40IA0PR17MB6687.namprd17.prod.outlook.com
Technical Details
Message-ID: <179543924928.3135.11097619488439916412@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369375-linux-kernel-netdev=dewy.ru
References: <IA0PR17MB668711363A5BE04D1BC3C76B9E792@IA0PR17MB6687.namprd17.prod.outlook.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369375-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: via-velocity: Stop the device on shutdown
Date: Mon, 23 Nov 2026 13:07:29 +0000
Organization: Usenet Network
Message-ID: <179543924928.3135.11097619488439916412@kernel.org>
References: <IA0PR17MB668711363A5BE04D1BC3C76B9E792@IA0PR17MB6687.namprd17.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3883566"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:zK7VcS/l2TpyMPPvLHT+U++4Hpw= sha256:RNew70wSNpn4Az2fJsDRp2nELNAXecf+64jSeb4YLRU=
	sha1:4iV1RUBitFfeB7Ci74l0QxG6RII= sha256:S9J/myyEjYxvq3uZ7KqCLq9PX2RWW5Hx3Ihr5mg9E+c=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 95BD4125DB1; Mon, 23 Nov 2026 16:08:01 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 1pcHzrvgANH5;
	Mon, 23 Nov 2026 16:07:57 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-369375-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id CCC5C125DAD; Mon, 23 Nov 2026 16:07:37 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 5D09227A50; Mon, 23 Nov 2026 13:07:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795439252;
	b=CJMwtvd2uhjqLAWl4BOzWzOwbkCkVgeDyMhxAQg8/aV9B69nI1ZLIsgCR+siTGbSsLtz
	 +hwwY8Du+Sn1xi7Iy64TKvCtgGvNTWOZbxfFxd2CRdACqjNsgaBPDVqv9V2unnILg4hLY
	 wka6Q1L3uE64QslZhp1SY15H4T58fK2cYhN4JlfbK7eyHYinniv5sulb9hlBITf2+JcdY
	 XGlwTeBT1aAPgzdUzYI0AkrER2myPGg2l0rz0S/hyXICSQAdSRbZN+CX6qKETL3Gugx8M
	 7R1zZScVi0BK9802mY/WoS+E27sKc2R/f5mltLvTt3lq0mqEdAVc+pgGx8B+pg2bDbg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795439252;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=mltZcnDft4HwDtA/qRdYtVQKIWQHKVN2xEodH5O1JHE=;
	b=aVQpCY8jsife5bWBaOwRed9ew34eSsaNnbwYWmNpB6Sf48y/LzmrU4Z3aCtkl1hwyiUX
	 UZ7SnDHWzFbl1Ayup7NI685COLXEa1ZMdSddwL6Dg7abJis2T99oSmIUGG368L4TYvbr/
	 XvLy88i8BxZNk3bJx9Wj1S0+wBv8IYVyrEgwsI0B9dhWnYJXQcH/3PiTy7rWiOdHgTzHX
	 MiQrZypRsISsQlAzL/HLQJcjPNAXABeWmq7kvGC+U18BkggZDmWLSlGWPmzE82s2OeKGq
	 g6IO3bDb9TCLZJU4HHBLjF+AKrb3S9eCIwoSF2gTz1QiXR+5g1aLac98kepdyJm9d2A==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NiGYhgMT;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 16D62606A33C;
	Mon, 23 Nov 2026 13:07:32 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NiGYhgMT
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795439251;
	b=rbnAGOwTN8SvCPnEZm3qNYhVj49RYwm24cEmWzTPJ2QmlMi8IFXJ9snOJXT5dZh/Q1bi
	 mAOeQOyvmVs4Rc+HiyD2f9CUr54DH2jABgLTHgBjplu0vhJH/vZig1zHm5qvg+pq4MHj9
	 9B6gJ8+9K32KWhCyTbZWvpNLeyAKDjAA89j9PniarDPSPnI3jXqrz1K1DQT2jJwEyPZ1/
	 8A724jxt321e/hX9VqWVD7B2d0tHpDtdyOT4SoPkfDkM2K9NcX2dxyihMWif5KuB8gqeO
	 Z6cV2F0LlXgAA7XsaGKd9Dku++3FaAnwgym/V/lu254XXHAz/Xje0eG1UHA3MgW8MIw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795439251;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=mltZcnDft4HwDtA/qRdYtVQKIWQHKVN2xEodH5O1JHE=;
	b=ZF5EkOaIIUpD90euwFIuTGq5BBIv5D+XsuVP7pNDyOwss7NFeusXcTc75PkjmHtjSIsk
	 5KE3H4KNnWd6ijwXzk8rZEV4OBMnq1Hub2BZ54ehDgJyMEv2wWeU4tlRxXSH+/X5sOXtc
	 mqtpTP2NWe80kNR8EVEKt0dt6ktcDlWpbuBc//csu2PEu3yiAsFPTcnI8sJhrFoTvNBCB
	 BsuRrDgn+HJU68btOm4C2tiWCYGFrMcJYUKNx9cSQYB36Ufb0OpK3QWLvDN2fDSmV2yeX
	 i8/p199ZwRBgZnHsLUno2Tb8qx6qd149bo71SFa8DrWg+k1U4EXPf9AoRXdADEivL6Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NiGYhgMT;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 330E7606A32E;
	Mon, 23 Nov 2026 13:07:30 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B21311F000D4;
	Mon, 23 Nov 2026 13:07:29 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795439250;
	bh=mltZcnDft4HwDtA/qRdYtVQKIWQHKVN2xEodH5O1JHE=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=NiGYhgMTuRbcY8f6vFTsqFab5dOHu8gmSn18rF+oKM3GNYU7A5xiaj/kc1D+Qtkm5
	 i9fi+KvTwv9GUUPWdQL0MVIp5gVKtbq3agvq/4tzMUiLcLCQFZQE6pPqSSGDFkZfLc
	 Zwww9jPkGxRWd5Kl2MydObySa05xlMcD7Cp586skHg3ruHkPyR+KtHG/LPvjz1mKAz
	 owgwyjly4ov+HKMEMT6NpclfdjaYTUX7hraUiZC1bJd1wZe30sZVmRfIxq/tvjNY4u
	 rqioShJTVzEPoPFyHAwyV2qQOcRZJ5cndCVe/HawOJ2GGjFuW78vidvhaAKl5PQ8AE
	 w4U/usLVfnlmA==
X-Cc: romieu@fr.zoreil.com, netdev@vger.kernel.org, andrew+netdev@lunn.ch,
 davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
 kai.heng.feng@canonical.com, rafael.j.wysocki@intel.com,
 linux-kernel@vger.kernel.org
X-In-Reply-To: <IA0PR17MB668711363A5BE04D1BC3C76B9E792@IA0PR17MB6687.namprd17.prod.outlook.com>
X-sashiko-severity: Medium
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list