🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #27351

[PATCH iwl-net 0/2] igc/igb: recover register access on resume

#27351
From: François-Xavier Gsell
Date: Sat, 05 Dec 2026 11:37
66 lines
13838 bytes
When a register read returns all-ones, igc and igb set hw->hw_addr to
NULL (igc also detaches the netdev). Only the AER slot_reset handler
restores it, so when the fault is not reported through AER the adapter
stays dead until it is removed and rescanned. Suspend/resume even
re-attaches the netdev with register access still disabled.

On an I225-V (rev 03) behind an AMD 600 series chipset switch this
happens about once a week: MMIO reads return all-ones while
pci_device_is_present() is still true. Config space taken after one
such event shows BAR0 and BAR3 reading zero with Memory Space Enable
still set, and the device's AER registers hold an Unsupported Request
for a read of BAR0 + 0xc030, the register igc failed to read. This
machine boots with pcie_aspm=off, so Linux does not request _OSC
control and native AER is off; nothing was reported and
igc_io_slot_reset() never ran. As far as I can tell a UR on a read
is advisory non-fatal, so native AER would likely only have logged
it. The same symptom is reported on other AMD boards with I225-V and
I226-V.

These patches restore hw_addr in the resume path, as ixgbe_resume()
already does.

Tested on 7.3.6 with the I225-V by clearing Memory Space Enable with
setpci for a few seconds to trigger the detach, re-enabling it, then
suspending and resuming (rtcwake -m mem):
  without the patch: "Link detected: no", register reads stay
                     all-ones, interface unusable
  with the patch:    "NIC Link is Up 2500 Mbps Full Duplex" after
                     resume, DHCP lease and traffic work

In both runs the suspend of the detached adapter logs AMD-Vi
IO_PAGE_FAULTs from the device, because the driver cannot stop DMA
without register access. That is unchanged by this series.

Not yet confirmed on a real event: after the one real detach that
was followed by a suspend, the BARs read zero again a day later, so
either the restore on resume did not stick or the device lost them
again. Recovering a real event may need the BARs checked and restored
at runtime too.

The igb change is compile-tested only (W=1, no new warnings); I have
no igb hardware.

This series was prepared with an AI coding assistant (Claude Opus 5.5 in
Claude Code), as noted in each commit message. Over one long session I
asked it why the NIC kept dropping off the bus and then to prepare an
upstream fix. It read the kernel logs and the igc/igb/ixgbe sources,
found the missing hw_addr restore, wrote both patches and their
changelogs, and wrote the setpci + rtcwake reproducer and the script
that captured the config space quoted above. I ran the captures and the
tests on the hardware, and I have reviewed every line of the patches.

Recovering without a suspend cycle when the device is still present
is a separate change and is not part of this series.

François-Xavier Gsell (2):
  igc: restore hw_addr on resume after a failed register read
  igb: restore hw_addr on resume after a failed register read

 drivers/net/ethernet/intel/igb/igb_main.c | 4 ++++
 drivers/net/ethernet/intel/igc/igc_main.c | 4 ++++
 2 files changed, 8 insertions(+)

-- 
2.56.1
Technical Details
Message-ID: <20261205113710.1833153-1-fxgsell@gmail.com>
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377955-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377955-linux-kernel-netdev=dewy.ru
From: fxgsell@gmail.com (François-Xavier Gsell)
Newsgroups: linux.kernel.netdev
Subject: [PATCH iwl-net 0/2] igc/igb: recover register access on resume
Date: Sat,  5 Dec 2026 19:37:08 +0800
Organization: Usenet Network
Message-ID: <20261205113710.1833153-1-fxgsell@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3016637"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:gkRDtNfBFxLuxkpJC1A3Zq+kdN4= sha256:gFJB1+K5hgJFpuV4eJ9IZ7P1a/9099JrJQ8t1W55TjI=
	sha1:gfH1wTJgPqWrgVOTbAiA3v/fpAA= sha256:yyrDKQFbeHzaU15mKWqF3gBFa1A2eFTQ12B4gMbgo1A=
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 85405117E00; Sat,  5 Dec 2026 14:37:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.297
X-Spam-Status: No, score=-3.297 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
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 6_eRxDkKpLmJ;
	Sat,  5 Dec 2026 14:37:48 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-377955-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 512A5117DFC; Sat,  5 Dec 2026 14:37:38 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id CB66A347EC; Sat,  5 Dec 2026 11:37:36 +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=1796470656;
	b=RL1WmPH5o2hrDDa4Yf0FDQtaxTsElY5inEq/1a9tm0WVHbdGLUly/eOVMhY6yGSpS8m9
	 zE9wR1F/leC5AvO+gzvRJo6/8L9lEGIy3hSYfysr/lYKTd0uqOwFNDa3GqUiYd1odkXiO
	 1SCrTOvrGb5krgiaxkK2/9QRvPHcMFCTuEBDjHhaEVouXShdG+5qnt3Obka3yyhZEZ+7v
	 kFMtfZgVyJaqyf/yiW1eabTVTUuwiw/yTRxtIiPEPH7Us1tvv3UUGV204POVNXwb08ULP
	 7fwe+gponpLjrNqI4zpLV9r8ZE0z3eILl2qkqUyMQX6t6ncu7YzwJLpzTW+cN4qoVzg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796470656;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Transfer-Encoding;
	bh=+NL+jCiPcT90fTJ4+BbsCkAYpHlfSJ72yjX/Hv34nNg=;
	b=GLJ3N8gXN+VT5b2nqMp+47CQKpLluOnrJGY4zgG4KPmDSQOWDDjUhT4IDDEI4eFyFQiW
	 8ALwnTZHdmEoll08efmJPIcij0zpIofq6DnHhEaRtVhA+0v/+LA2hzUDPJFtIndUKJJa/
	 Y78FSVuJFH1/YHNFIrK5EFg1kOw1oKLg/XyeMrsMvevGtl04bvgfa9xNLX6C9NMpLsCd3
	 QxT7fG+hXPf0/du50/Ln2dW7gON3NSTfkgSZOKwGDm4r3z3rm75A42zHly358eX8+eLSf
	 42HXo3O3NdeQuVV5oMAsVOPVC0scr1EjvFj6tK+4+1deOYlHLlQqUYMgdQtQA//mGww==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=NLq54aYy;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	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 A1BE5606A335;
	Sat,  5 Dec 2026 11:37:36 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=NLq54aYy
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.180
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796470655;
	b=HOo3NNEC/UtPVFPor4srw4uilqoM3Z8kumQ06vBMoGfclsuNXrUzy1nsWm8bM19HsPDo
	 3UnL2hvc11DHTkSLpuHuNYgc8FA8CuCv19Hwgpi+AqGchpBSFVTkmfxPo4k2FkiyvoOZF
	 VHdt/fFramVRVjjVrbYJN/IS2n3hc/4TUSPJ0ZN7q547FUZ3JX704AiWaIXqCCClu5ZKQ
	 BWuk54DKRxIYBB887LN/1EzGjf5yu1eFOp3Yy/74XjS1kR8fcQKya5WHIwkz1ELCt8ZRb
	 +Gd457Meg0zkO+5Ua4Rgnt6SgtIhot8CrCjSt6gRU4UrX+9G7zQ1GuiQlQyCwS5MuiA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796470655;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:MIME-Version:Content-Type:
	 Content-Transfer-Encoding;
	bh=+NL+jCiPcT90fTJ4+BbsCkAYpHlfSJ72yjX/Hv34nNg=;
	b=GLiPE5090D8igHxNSiRaJcxU9l6t7+Li0XngHnIxst61jjKXsTLr15GCL4YXSZ2gB2HL
	 lgFVDU4z3LMadEzRDVnX2+6IntS2xaIc3I65NdHg2Xv7ppjkNx4F1YtOKYV6yNC79Vnrm
	 KxSphtGvMadwctCD4o95gSdJOeJE5ZL6Giti8oiaYSr17UFtf4zsHRl/6hg4LkMgOocH/
	 ghsT7Slw6Mr9kYWtE3EH3kLlO3tAzizg+Yb9Txl3PIyVNqnBO4zZrRzyFWgtXGahzlaPq
	 BnFW5giCBECXcCErCvvCr2EF3Op1tqb7HeEfhg0060w8NKXKbKlV6OYK+qUWSiuDk6g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=NLq54aYy;
	arc=none smtp.remote-ip=74.125.82.180
X-Received: from mail-dy1-f180.google.com (mail-dy1-f180.google.com [74.125.82.180])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65803606A322
	for <netdev@vger.kernel.org>; Sat,  5 Dec 2026 11:37:35 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 65803606A322
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dy1-f180.google.com with SMTP id 5a478bee46e88-3866a784546so2498552eec.0
        for <netdev@vger.kernel.org>; Sat, 05 Dec 2026 03:37:35 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1796470654; x=1797075454; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:mime-version:message-id:date
         :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=+NL+jCiPcT90fTJ4+BbsCkAYpHlfSJ72yjX/Hv34nNg=;
        b=NLq54aYyeTRbajEMETMgOg45G94tfO1k8K4z06s/HXlhoDYn2E7zaVTSa8/5GhBeeb
         Yp5SiR6PByOREV+xnm30Gn8mkuwy0UZK8hCIxe97IS5PmBIcL3oWJzKvDKLuBrsarWh5
         yhtwW+doPtGtqRdrcX2glgqcpOmLxl59lTB7V4DM0aYqdNJHyOLDjnQyHr4NQTVpugt7
         cm77SqQ2jeYkHro1RZvvRavAhI2r3FzM6QgocnwbXbx8MxTXYmiQGLnVjU0YqTR4LbZd
         rkz1f49jKHCvBIlBAJf/yKMXoFrXWB/PVsrgB94U4naIo4ehuHA/oZEeAkMQVFR6Diyi
         coIw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1796470654; x=1797075454;
        h=content-transfer-encoding:content-type:mime-version:message-id:date
         :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=+NL+jCiPcT90fTJ4+BbsCkAYpHlfSJ72yjX/Hv34nNg=;
        b=cgzadkkeU6kSBFK77i8Vw3a4+ojcIrp3j+LwkicyHwl0KCcT1i+mFr4UPVwTBcSF9E
         D99q5CyyqqRc5KhDSih0i7dPpm3uks8x4niOVXOvYGie1h5Bs0WFmEbbKbqmPCqFWii6
         voWlCsEGsm7EN0MAaOd5+/GG21eB+WSpmh88c3buXc4pksPQyhw1v0qOmrelFvcrpose
         gc/jgQQV3nAJWnPHxDMFgtNrFy85SYoP6Y24KxBa+kK4lL+mugonMlfAn64nV+oVXLzG
         5QJB1ZEgOWqf2eGL8JvYyyTGQFSQv+r764guVnhzY1MO6p7kAyT49dE0LFJXkiw7dv/j
         ZTOw==
X-Gm-Message-State: AB4q+uHxP4ZMGfqJBQE5YsNi+pC9Tys4CkxMU5EocJdo3fzTF5a7JiNq
	UggjF1gi3TmR6HOGvaIn3L2jim1Ly9tmol9IZIUvDBXQDjaQ6dxlW0QR
X-Gm-Gg: AZFdTZdYPWcE20fgsDmEmhDGfT7167TDQ+WTuVsnpqe64AaW5pEbLHv4NN9xHyoC4Wt
	McdWrYg4Z087au86nmKJ+6ylmiu3sR8yZnzYituuzV7A2mOYgMDoBxtmPPRqydhInTk+6Ww95ax
	WwiZ//XW7n13lvzpFaWx6Zeb49QWX34PIEQTf+s2scQRYWoRjHp+PL0+9yOcGINwxjbk82MtJSN
	KnIQSf6BWQe3H6kbbVi8Yhx8tpDPm5VHJUKAdANtcKJKENZgzs+I9C5ExJRAnMNdJAxPpNx6Gkz
	jpx0N3S0wb/fIL+rHmSJBOQSfwvZjtvL7I+Nc5pXu5hrYySpBdrk+OW/UimVT7KILSJdnSY9Z+Y
	4UKAcERajDUL0zBCboqipWdO2TP0V3Cn7C62uWw9L5JDvNg7DoGIgAcYsgI43sUTrjU3+mUgRxy
	dK4GiTy5buTLfZY9ofDpMokPiajtwjIviox+TXsEykOuYOEpxB+fpIh4h354VIIWCeQYa1lqqMt
	Jst2u+re7gASUllInrb+TXxZu/0Zbgrxu7SyfFoyWxc5SZBEZKql3bBRVGCZf52EjOtgpTZp7RA
	mp0x88hlN7A6V4CAc68b38/qXPb4AMvz9oFvvYehHj1vuBrrlQlYba/NlNuAYEVP8CEOy/NPETr
	bBCfQywuAinzq9GNs9yPbHw==
X-Received: by 2002:a05:7300:4f24:b0:386:240c:19dd with SMTP id 5a478bee46e88-387520b0356mr4925336eec.9.1796470654303;
        Sat, 05 Dec 2026 03:37:34 -0800 (PST)
X-Received: from magnetar.tailcd130b.ts.net ([103.11.48.23])
        by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3875224312fsm18567758eec.26.2026.12.05.03.37.31
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sat, 05 Dec 2026 03:37:33 -0800 (PST)
X-Cc: netdev@vger.kernel.org,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	François-Xavier Gsell <fxgsell@gmail.com>
X-Mailer: git-send-email 2.56.1
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