From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.180 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== 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== 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 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 ; Sat, 5 Dec 2026 11:37:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 65803606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com 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 Received: by mail-dy1-f180.google.com with SMTP id 5a478bee46e88-3866a784546so2498552eec.0 for ; Sat, 05 Dec 2026 03:37:35 -0800 (PST) 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) 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) From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Gsell?= To: intel-wired-lan@lists.osuosl.org, Tony Nguyen , Przemek Kitszel Cc: netdev@vger.kernel.org, Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?UTF-8?q?Fran=C3=A7ois-Xavier=20Gsell?= Subject: [PATCH iwl-net 0/2] igc/igb: recover register access on resume Date: Sat, 5 Dec 2026 19:37:08 +0800 Message-ID: <20261205113710.1833153-1-fxgsell@gmail.com> X-Mailer: git-send-email 2.56.1 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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