From nobody Sat Sep 26 21:56:36 2026 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 57A1937D104 for ; Sat, 29 Aug 2026 09:54:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787997297; cv=none; b=lbeRFHQzHW07CyXompxXtE8ZBJ9N2U7ckoDUvbXzJjje73W4/5Rfq6PBD6mnCK4q69Jy1dk22AB3k9vI0ByFKgjXkkCP/S89q4khrdhGEEuxif1knUvb5RFhP7uZSg7hoXa/tUreOMxMiME2QOcoAm0A8hWCGGi5B3QZnmQ5LE0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787997297; c=relaxed/simple; bh=7hM5WaRrHs2c3LW1CjwRnik2dDd+6Q2n4lB4uydT71o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bpiY9/3OtGm/OcEQR4UqS6oVtcLGTsZ65I51AjHdleDG934pzn44FEehALqgbX0i6lrQep1/s7liT+9ipvlUGhad/v/8rNksG6yTA1Ifrt9iLcDcaIf79vZvejLPCGIks8gUmiEbdhNRN9BxtE/bhjUJBcepfImZUiTGtUyg9Vg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CpXUncpn; arc=none smtp.client-ip=209.85.214.181 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.b="CpXUncpn" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2d8f2ed7bdcso411385ad.2 for ; Sat, 29 Aug 2026 02:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787997295; x=1788602095; darn=vger.kernel.org; h=content-transfer-encoding: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=u+bx+HWR1lJgM1IpCVaNlI18J07SWUFh64Ef3O2YpAQ=; b=CpXUncpnnvrvuLB+Fg4ojrZzSGnwrTN3kZkN69xW619n0Zst/ynY1HhErtHPEvrQUA n86qnV3ppao0z4gDC39rjx+sFtZTtkJmT8FrYg9V1ekF3QbTY3x9I9PkowZFzDF5kbaU K1cVlVh1kj7CzSCY6pjDhwwb58Kwh7NZOSbjE1dWi8VeU8WaxKlGYxabWy45CUcu+9az PArZv4c5Sp48HZrLiClVn8GkvNz5OvgAmDiaAE9wSXBQJzzin+E4YJD8wRl+enlRmgz0 3bw50s5V4iNvPlCsKqdDV3lwL1ajGex+vnOF7T2/5TYfhlDGvv1f/Pu5XRULq4wTT1BX M3fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787997295; x=1788602095; h=content-transfer-encoding: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=u+bx+HWR1lJgM1IpCVaNlI18J07SWUFh64Ef3O2YpAQ=; b=Vvzo16nCB67JglYzy+VFQk5HIVmiOcYjoSxBC4707/ZgKsZiBJMaCLAcVQKh3PeDB5 AURTL/m5GfMXpz/9nVmDkAqWjXQSyLcUbpu+i58eV037hg+N34dvhaUdoBtt9lwa1O7o RQPB2/Gft7tuS5abRG6F0Lw3WSt0RnhHHrCN0NhFrcXds2var29Y6F8SVuB8YSrPBe/v kNg00z8eWLB3Q2eEJVxy5EhQMDNEy2oFR/Kkp3cLv1EJiPqXoMwtO1ThwyfdubQhimG9 wpNI/3yXOklJ9Tg+OBARJlXOdvqvsPgE3zwOiF5cgC+oAaWLrsIA4M/JFOqNYyLluKzf u4ow== X-Forwarded-Encrypted: i=1; AKwUvBz8jsmEYI6RJmUHtqsowIj+5RHcxhZy1WfxjCvwyUX1TBwONCP0IemgD+z+5S0XTREW0XtUvhO3ufHURK8=@vger.kernel.org X-Gm-Message-State: AFuF++kbn6MRwtwzRFWrccfBpWa9bgoG3Tmm3NMaR4TDEw+MzKx9n1Sr bDc/iPEAvkDgH3orO3x5VxIllqzrMCXNugVqJJT4aV4NRSf29/BzX5bh X-Gm-Gg: AYBFou0U5rzI+pgJPMUBwDDuUbHn1fMgUjoPU3EFyjTR9d0CZSu14ysE2D8mnjAodBG CBVXFhhnyKl7oz+DHYtT6d6mMcumAP6sYeKX4sM4qCExmIIxiphzLOFwzyAMKVWVlbip50dAeKc ELzxC7TjvdFrKOX/7zhAGdNqerMFCCJQq1KZ1ogxaw5AcA3LBwUODbc8XS5lZv2PnIF43vnpZ50 awHN6XNGEce+feoEzNiAgnL9BTLOOjFZQBVvw7ctsxKneRM8E7SLAHagzwlf48p7BndZVJtkgmy 59IJ/pJTYHsiNWm6YuOyCr49VTkp63cP15XoLoHoZTI/SGtE4/fDrnSjhmYL0ejHU7ZbgVtHMhV io2aeLwQ7UpGk/i/13L6kpbmCtDnKt4FBnYbQGc7QHYgRrqzOHO0p6d74qELLSwaBigF8XxT2Yk 62bpHyZMXj3jv5OiowiaYJqd59q3wq602gTenbMDFzEg/45fokjzaydVcv/0zztat5Hy+gx6g6N rjbJxffKCiV+7BlXQHJghOCd0btNLoFkw== X-Received: by 2002:a17:902:d2c7:b0:2c9:ed4a:c3a4 with SMTP id d9443c01a7336-2d74ce38075mr120434055ad.0.1787997295482; Sat, 29 Aug 2026 02:54:55 -0700 (PDT) Received: from cachyos-aura ([2409:40f2:3104:d691:c7eb:3b03:2c8d:127f]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3286f783c37sm15775697eec.6.2026.08.29.02.54.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2026 02:54:54 -0700 (PDT) From: Navon John Lukose To: miriam.rachel.korenblit@intel.com, linux-wireless@vger.kernel.org Cc: nika@nikableh.moe, emmanuel.grumbach@intel.com, helgaas@kernel.org, markpearson@lenovo.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Navon John Lukose Subject: [PATCH wireless 1/2] wifi: iwlwifi: pcie: arm the product reset at probe Date: Sat, 29 Aug 2026 15:24:36 +0530 Message-ID: <20260829095437.44716-2-navonjohnlukose@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260829095437.44716-1-navonjohnlukose@gmail.com> References: <20260829095437.44716-1-navonjohnlukose@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The driver already implements the platform-level device reset (PLDR): iwl_trans_pcie_call_reset() walks _PRR and evaluates _RST, and iwl_trans_pcie_set_product_reset() arms it over the vendor _DSM. But it is armed too late to ever help. set_product_reset() is only called from iwl_trans_pcie_removal_wk(), i.e. once the device is already being torn down. On these platforms the _DSM dispatch is gated on the firmware reading the device's PCI ID back out of config space: Method (WIST) { Switch (ToInteger (VDID)) { Case (0x272B8086) {...} } } If the device has lost power VDID reads 0xffffffff, WIST() returns 0, the _DSM never reaches the vendor functions and acpi_check_dsm() fails: scheduling reset (mode=3D6) ACPI _DSM not available (-19), cannot do product reset So the reset stays disarmed, _RST falls back to a plain function-level reset and the device is unrecoverable in exactly the case PLDR exists for. Observed on Intel BE200 (8086:272b) on Meteor Lake laptops, where a D3cold transition removes the M.2 module's power rail and the card does not restart when the rail and PERST# are restored. Arm it during probe instead, while the device still answers. The mode is sticky in the platform's namespace, so it is still set when the device later disappears. _RST is only evaluated when the driver actually asks for a reset, and a subsequent non-product reset re-runs the existing disarm path as before. On platforms with no such _DSM this is a no-op. Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D221695 Fixes: 9673c35486d4 ("wifi: iwlwifi: implement product reset for TOP errors= ") Cc: stable@vger.kernel.org Signed-off-by: Navon John Lukose --- --- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c @@ -4252,6 +4252,11 @@ iwl_trans_pcie_check_product_reset_status(pdev); iwl_trans_pcie_check_product_reset_mode(pdev); =20 + /* must be armed while the device still answers: the _DSM is gated on + * reading its PCI ID out of config space + */ + iwl_trans_pcie_set_product_reset(pdev, true, mac_cfg->integrated); + /* set the things we know so far for the grab NIC access */ iwl_trans_set_info(iwl_trans, &info); From nobody Sat Sep 26 21:56:36 2026 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC8FB357D0E for ; Sat, 29 Aug 2026 09:55:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787997303; cv=none; b=W1D6zVnKOzh0PhSXbBW2lE/uAw/XzJzRDjuI9IUPudwZxw7OJvpZHgbjiYG1RY5bFJN8gTdCL3G+WBqTDA7QIhDL8fRMBsX4aLxV8ujD90V6t5QyJllCifRwGCTFOC0sfm1NVWOYF3Icj40X5sTHU4Ej440nhLoQY+nzPle5h94= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787997303; c=relaxed/simple; bh=tGg7OnyL8/9JmC2shM+2pm7rQpu1dy5h3ZLrB4k//cU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s2VPOgw62FTAjq5Ecs4R2KPu4KEQ8YNWzvIGeKobHC6SJaHBpMDJ4mLY5z/PhBGZc6YIargtxjuwPuI1E5D/jB2Zm7sO8wBXhYwuK+8BDZSediRtG9MDyLQSTuy1FVpj6+Nc4e2YKe/CQ2xv82cBOCRqWw8hGnwtRX/Q6YkaCVg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kTB0P2os; arc=none smtp.client-ip=209.85.210.173 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.b="kTB0P2os" Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-849f2f32facso100517b3a.1 for ; Sat, 29 Aug 2026 02:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787997301; x=1788602101; darn=vger.kernel.org; h=content-transfer-encoding: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=r+XYc/uhp00twA6hJyfMPfZH8ZjPnbMc9r1vC8WbHMM=; b=kTB0P2osEwYH7u+U9W9rnjkE1jsj5xpqGXD7R6EJLXyvjV/gtzAYRTjZ+irtalDgeD gM2X+o+6/cLbTPaHr9Ybfleyqge4eTX8tqwAQv7PEMbwAf6zb1dZ+PHk+TEVuFKR9uT6 AL5YvsdNoqHH+kHXanuZEqeKCoC5FQEOI+gtD1e7UVIzXBW/kLWYamBHVq/F4CTGNLjZ qlYXKh+4lpvXUeCPYQpe0NR8nZdiGyl3tOeivAJkXz5gBZVI7RKxX3kNeT618UXtLaWC C4eARuRrFyMuhGkqMzcp3U5Ylzt/BQj54CX4bVsmkvbrGa32LAdzVBHLsH4CJrNzVmbu VOpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787997301; x=1788602101; h=content-transfer-encoding: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=r+XYc/uhp00twA6hJyfMPfZH8ZjPnbMc9r1vC8WbHMM=; b=Xv8a7UQDoOC6rqq5KNY5uNSvq3xAf1YKc3I0y3GFWoZGo9xqyxHhJxWdV/Tp3KRN9P t3se5vU1EsEfIk5Zs7DFCoxZRSLkEPZ4M4xSLHk7Bozo+J9+KWqHT0m3Aq3B2zyb87jm pyBPOgzk4UDHLQNbBKmOleMVTN6PzUVwq/tnsH8u7HcyZf/TSi6DP7X6BCXojsi/Rtut LsAea/khff4y+sihQDOeWcUCqLPgZ5LRg4U+HMSbsMGg2LybswSUOPnxRUEglXmqgevu kzpasdK6r/EY67xkBr56lOfcFI3Pg58axO3fOOxhdkNInefgEx+eDTveLxyvjytmJoz0 5+tg== X-Forwarded-Encrypted: i=1; AKwUvBwh23T3gawVOKDXw24ZncJhJHgacDejT9E828g9L9fSvl0kPa388eMOCQTZyxF+VhTqKxbh+p/I8a4XJqQ=@vger.kernel.org X-Gm-Message-State: AFuF++n+eX3gJ4tQpHyQQ5a33FI8dDyTQXw/sj5ByW6j0ND/P8ncI+yP IsXKKbgxvMgOJa9bOAHkLuXyR+sSYzIdMPvB4jckFq+YBIjk8uDAt/eA X-Gm-Gg: AYBFou2gtLDL+yUDMzUNRz/ixgm7YBsbjAVYJFO3SjOvQwPMEB8lGeYNaBzfiYgIX/I xIPRRpRxY+TvWibIoz/eQKUuOso73OLm1de16jYA+m9zHRqABE3SCSNtyPH1dGy7XCh0DAgw+2z Kd0gLq5NKlMF4q7dNW/4zsqcoCn/UpOESOx88ux+W6SFHil2IbK20U+bsVG7KySknHOb8VVja2c eN2mUGT6JvpJxwA8emn4yUF4+SKGRbsB4dmakqz3fiNIRw3khf+ImUqekCOXvxC9O6SF3PK2m2k omEZtfpJd41Lt1Q6eWh4RwR4uWWLdJeDC7beAWw8/5SzzrKMADwYoikgCqnQWcGX3aefvQelALM 0R0TmW5YRtHq26a3BwSW2i9QJxsx8oiuhd5kzQQFJgVA5Sq3/iWfjIUVXHorP7tZgn5dlgkv/hz 7pYLMUtCn+/NO6QLEQx0hQzVUjT1rM/rD9xcP6XS4MAAjIfXAPNiSr5dn8nLTLeuv05V6B7YmNl EK1Y4lAqpbb8Smenne7D3hmYauL7ysmlnY= X-Received: by 2002:a17:903:228a:b0:2cb:2b50:d9da with SMTP id d9443c01a7336-2d74df53523mr116538065ad.3.1787997301027; Sat, 29 Aug 2026 02:55:01 -0700 (PDT) Received: from cachyos-aura ([2409:40f2:3104:d691:c7eb:3b03:2c8d:127f]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3286f783c37sm15775697eec.6.2026.08.29.02.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2026 02:55:00 -0700 (PDT) From: Navon John Lukose To: miriam.rachel.korenblit@intel.com, linux-wireless@vger.kernel.org Cc: nika@nikableh.moe, emmanuel.grumbach@intel.com, helgaas@kernel.org, markpearson@lenovo.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Navon John Lukose Subject: [PATCH wireless 2/2] wifi: iwlwifi: pcie: request a product reset when the device is gone after resume Date: Sat, 29 Aug 2026 15:24:37 +0530 Message-ID: <20260829095437.44716-3-navonjohnlukose@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260829095437.44716-1-navonjohnlukose@gmail.com> References: <20260829095437.44716-1-navonjohnlukose@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On platforms where D3cold removes the WiFi module's power rail, the device can come back from suspend completely absent from the bus: config space reads 0xffffffff and the downstream link never trains. _iwl_pci_resume() currently notices only a subset of this (scratch =3D=3D ~0U, and only when the device was enabled), then "hopes for the best" by re-initialising over PCI, which cannot work - the hardware is not there. The result is several seconds of handshake timeouts and a bogus ADVANCED_SYSASSERT dump before giving up, and the device stays gone until reboot. Check whether the device answers config cycles at all, and if not ask for a product reset, which power-cycles the module and re-enumerates it. The check is deliberately placed before the STATUS_DEVICE_ENABLED block: that block is skipped entirely when the device was idle or down at suspend time, which is a common case (e.g. the radio was switched off) and one where the device is just as dead. Fixes: 9673c35486d4 ("wifi: iwlwifi: implement product reset for TOP errors= ") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=3D221695 Cc: stable@vger.kernel.org Signed-off-by: Navon John Lukose --- --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -1232,6 +1232,18 @@ if (!trans->op_mode) return 0; =20 + /* Not answering config cycles: it fell off the bus and will not come + * back from a PCI-level re-init. Deliberately checked before the + * STATUS_DEVICE_ENABLED block below, which is skipped entirely if the + * device was idle or down when we suspended. + */ + if (!pci_device_is_present(pdev)) { + IWL_ERR(trans, + "device is not on the bus after resume, requesting product reset\n"); + iwl_trans_pcie_reset(trans, IWL_RESET_MODE_PROD_RESET); + return 0; + } + if (test_bit(STATUS_DEVICE_ENABLED, &trans->status)) { /* * Scratch value was altered, this means the device was powered