From: sashiko-bot@kernel.org
To: "Navon John Lukose" <navonjohnlukose@gmail.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH wireless 1/2] wifi: iwlwifi: pcie: arm the product reset at probe
Date: Sat, 29 Aug 2026 10:07:58 +0000 [thread overview]
Message-ID: <20260829100758.8E8491F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260829095437.44716-2-navonjohnlukose@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Silent disarm failure unintentionally upgrades a function reset to a product reset, causing an unhandled surprise removal of the Bluetooth device and bypassing ME protections.
- [Medium] Unconditional error log emitted during probe on platforms lacking the product reset _DSM.
--
commit 6aff245a17463ae76f40a95a671116d6cd174711
Author: Navon John Lukose <navonjohnlukose@gmail.com>
wifi: iwlwifi: pcie: arm the product reset at probe
This patch arms the platform-level product reset via ACPI _DSM unconditionally
during probe instead of device teardown. This is intended to fix recovery
failures on laptops where the device loses power and cannot respond to the
_DSM when the reset is requested later.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221695
> 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.
[Severity: Medium]
Will this actually be a no-op on platforms without the _DSM?
Looking at iwl_trans_pcie_set_product_reset(), if the _DSM fails and enable is
true, it prints an error:
if (IS_ERR(res)) {
if (enable)
IWL_ERR_DEV(&pdev->dev,
"ACPI _DSM not available (%d), cannot do product reset\n",
(int)PTR_ERR(res));
return;
}
Because this is now called unconditionally during probe with enable=true, won't
this spam dmesg with an error on every boot for unsupported platforms?
> diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c
> index 28b276c659526..a932e068cd0a5 100644
> --- 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 @@ int iwl_pci_gen1_2_probe(struct pci_dev *pdev,
> iwl_trans_pcie_check_product_reset_status(pdev);
> iwl_trans_pcie_check_product_reset_mode(pdev);
>
> + /* 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);
[Severity: High]
Does arming the sticky reset here unintentionally upgrade future function resets
to product resets if the device is lost?
If the device falls off the bus (e.g. D3cold), the driver requests a reset.
If Intel ME is present, iwl_trans_pcie_reset() forcibly downgrades a PROD_RESET
to a FUNC_RESET.
When iwl_trans_pcie_removal_wk() later tries to disarm the reset:
iwl_trans_pcie_set_product_reset(pdev,
removal->mode ==
IWL_RESET_MODE_PROD_RESET,
removal->integrated);
The _DSM call will fail because the device is inaccessible.
iwl_trans_pcie_set_product_reset() ignores this failure silently when
enable=false.
Then the worker proceeds to call _RST:
if (removal->mode >= IWL_RESET_MODE_FUNC_RESET)
iwl_trans_pcie_call_reset(pdev);
Because the disarm failed, the sticky product reset armed here at probe is
still active. Won't this cause the platform to execute an unexpected product
reset, skipping the companion Bluetooth device teardown and bypassing ME
protections?
> +
> /* set the things we know so far for the grab NIC access */
> iwl_trans_set_info(iwl_trans, &info);
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260829095437.44716-1-navonjohnlukose@gmail.com?part=1
next prev parent reply other threads:[~2026-08-29 10:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 9:54 [PATCH wireless 0/2] wifi: iwlwifi: recover the device after it loses power in D3cold Navon John Lukose
2026-08-29 9:54 ` [PATCH wireless 1/2] wifi: iwlwifi: pcie: arm the product reset at probe Navon John Lukose
2026-08-29 10:07 ` sashiko-bot [this message]
2026-08-29 12:37 ` Navon John Lukose
2026-08-29 9:54 ` [PATCH wireless 2/2] wifi: iwlwifi: pcie: request a product reset when the device is gone after resume Navon John Lukose
2026-08-29 10:06 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260829100758.8E8491F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=navonjohnlukose@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox