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=1796470661; b=niaVJ/lwueo1YH5dVwLIXa1KiDDl2SyTPhhhxyHK0ICMe9RIj4Q328I3MGb3F52ndnya HI7PE/EwEougjvK0UBJWsjH96jGXYKmi5tB9VicDrIyE6EvegWNzUd0hRlCPZl1rym3WB cLesGHMRh9XOiThOInx/Rb86C24+R0JM3ejC9WxBLrMU9Z3iAWb88R2rB7Q3pkpKG0HUz nl/TorIVe2FgfUpmmjZana6eEobd3Rmc7Fnq/FJyH+J2xFJtDJN47/V9H0d3ui4QYtaeE hk4yy2OvPcsrrXWIE5sFqx5HG4hw3D6uVMMy2lDaNUd8XFvGHYJ58ZdQFzkl5J81TdQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796470661; 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:In-Reply-To:References:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=kBZJttqsclP6LZt29rgskSbhCXfeKbxoDwF+xH3RtD4=; b=wKh0eB8WfrU7volmiUtl5SvYmxnwb6U48uH9IEd/mfx1lke43DJW9idYyZfFV13KoZYf IUqWfSB+0pVmNYUymph7toXqWlvibvUd/laejg3OcHkhQCSHugxTE9AEfK/m77XyJ0GB2 QYy9g/SKl1OIlV0k4qpYK17JLklKEQn9Vw+EtGoTAxLWHlY3bxRUA93zHmNQOLCTpVg+w MnvkwOALg5JYQYW0U7CPAR/j/Bqxy3K96xe9LQMDBqDimP5f3Vzb9s1H2x39hYs8EltWV eKbn/7WCnMbRNc4ks6e9688bupzMQv2qRH3FQ82Q7pbJR9WrOkwVMwea/r7yHb23MUQ== 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=sY8kNDVF; 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 99C4A606A322 for ; Sat, 5 Dec 2026 11:37:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 99C4A606A322 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=sY8kNDVF Received: by mail-dy1-f180.google.com with SMTP id 5a478bee46e88-38699cf08dfso2481399eec.1 for ; Sat, 05 Dec 2026 03:37:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796470660; x=1797075460; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=kBZJttqsclP6LZt29rgskSbhCXfeKbxoDwF+xH3RtD4=; b=sY8kNDVFg8sIqp4pD4+ljFVsLMJSIeey1VyZGrHOOOtz0gtp/JLslLKLNPFiYIti3/ pdobWSotqQpreBIex/JxjLcFgsAhdpSvKoHBULopJCPTrp1GkPfeL8/S5dyjpaMgKd2p oDPTaKzSZe8OaBry2lbaMFBnxJXfkWZM6nxoQ5kuZrVabs+XNWqt9t6wRyj+ix0rThYO uQoIMOKykr4V5rP8flu6BF48LTGoy+AoiwXpGQ+fuvfeZAylvbxlCR3eaT08jrbOoSc0 WR1mi8u+EpIhP2TD2oJjLZLDVvxwn3vc+8VEJypWajPihKgJEJATC+bGkuNmAtA2jCfd zLkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796470660; x=1797075460; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to: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=kBZJttqsclP6LZt29rgskSbhCXfeKbxoDwF+xH3RtD4=; b=WZpK5m5AsvyETXAgDirFsAPY9PlnigUp0IntzhMEgLLWyBGSR+VE3PvgItsCRjUVM7 /4yv/vh/KbTM2KAHQAHrjrpsgzjlBBT7xpNmTdKnQdaJebkSzefaP6WfPoh6fRvR/KJJ a3hglDmMPH085ljx+GxhpeIVxBBp08Gg3KY4yJqhUZSr9QAAYFyTxNz+IwvreF0au6qY uxD51cP91K++yYd9vD4icMNlDmoGW4wyGL73M5BIlkWC0/XE/AC0JnD4uYMUvrqaVxp9 FZgv3mJQXF1A9P5Sj9ddoaq13Had82Ic9fj47OlzUNNcTa5tW0tjtu32TdoOE+r1bBvM zuGg== X-Gm-Message-State: AB4q+uEaHMfSH9KVTPo0XMWkbyYUwDUy9uQ7Zjfx28RU3+F5PKfRwjgH nH77PQN1tzzOavdoJm2sClWu9LuBMGqfXx9pbKh669rIHZVQFnDjXN7L X-Gm-Gg: AZFdTZfoziDG9Tvnkn7gc+EqlVDPypq14v1ZXzrf5HxdKuDexisCDnRPYeGO7j9jR+E mmbaySIsTX3NsPgmCv15yU1SPapghQ5LJ0cgUqLVFe9PDQPMprurHSka4540We6+lU7mkAIGtA8 mAS5wk0REd5FeXuiXFwabWroVseoGDlvgLyyTlPwCZiA0rsOHwqHH7SFEn/zhy9TrPpv6C8orRO 70REssQTHz8CW1RetXLeh1LVwHn/C+xwO4h7/IULsQPXTcID43m0DycZP9tLL3+XsMVl0cyNeYZ 0JEva4XCZ3YLyS72o7kD4XQdTki1aK1+k3tX6IDqA/XMMDXDEZqoZHQQa2Kob8oyBESV0uGPh/y Dlalf4bSfHoeOKUk3nXWvtiOEd82ZfNZ0jdt3Gp8gMjuk4gfvuii3Xw+0VbqnAJ7RgMK+WGhW9M sqeE42o3xv0TnDz2OFauMjCuUWpou+qu0yVCfPBcT/lm/aGfyUP2mkB3VtwcjjFOBQEArYxINUo sqgrR7Bo6d8fJuJQzKkdEYlRHU8T+pinrCPGvowgyltwLPvN7wBUIi2LMPgNHsVqZbYWgRVEmj0 H8jct5nesTBJ2ONDJaw8B0BbBCcYQg1TwdyrKkCJx3PPzXEk1PMyf1n5h6asHeDhBZYadBId5mE = X-Received: by 2002:a05:7301:b05:b0:386:3e56:d039 with SMTP id 5a478bee46e88-387520f0939mr4900412eec.9.1796470659764; Sat, 05 Dec 2026 03:37:39 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 03:37:39 -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 2/2] igb: restore hw_addr on resume after a failed register read Date: Sat, 5 Dec 2026 19:37:10 +0800 Message-ID: <20261205113710.1833153-3-fxgsell@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261205113710.1833153-1-fxgsell@gmail.com> References: <20261205113710.1833153-1-fxgsell@gmail.com> 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 igb_rd32() sets hw->hw_addr to NULL when a register read returns all-ones, after which every register access is a no-op. __igb_resume() restores PCI state and re-attaches the netdev but never restores hw_addr, so an adapter that saw a single failed read stays unusable across suspend/resume while appearing attached. Only igb_io_slot_reset() restores it today. Restore hw_addr once the device is known to be present, as ixgbe_resume() does. igc has the same problem and gets the same fix. A similar change was discussed for igb in 2016, when a register read during suspend triggered the detach, and was not merged because that read was the real bug. Here the failure happens while the device is running and powered, so there is no stray access to fix; the device needs a path back once it is reachable again. Written with the help of an AI coding assistant (Claude Opus 5.5), which drafted the patch and this message. Compile-tested only. Fixes: 22a8b2915998 ("igb: add register rd/wr for surprise removal") Signed-off-by: François-Xavier Gsell --- drivers/net/ethernet/intel/igb/igb_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 131df3e09ba1..3667a86df248 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -9607,6 +9607,10 @@ static int __igb_resume(struct device *dev, bool rpm) if (!pci_device_is_present(pdev)) return -ENODEV; + + /* A failed register read may have cleared hw_addr. */ + hw->hw_addr = adapter->io_addr; + err = pci_enable_device_mem(pdev); if (err) { dev_err(&pdev->dev, -- 2.56.1