From: Paul Menzel <pmenzel@molgen.mpg.de>
To: "Vladimir V. Kondratyev" <vladimirkondratyev2@gmail.com>
Cc: marcel@holtmann.org, luiz.dentz@gmail.com,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
Sergey Lebedev <lsa.uz@pm.me>,
Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>,
Kiran K <kiran.k@intel.com>
Subject: Re: [PATCH] Bluetooth: btintel_pcie: fix stale cache in set_dxstate fallback check
Date: Wed, 2 Sep 2026 07:35:02 +0200 [thread overview]
Message-ID: <d633b7ee-0afa-4fa1-8340-3d7616f429d2@molgen.mpg.de> (raw)
In-Reply-To: <20260901203818.112189-2-vladimirkondratyev2@gmail.com>
[Cc: +Chandrashekar, +Kiran]
Dear Vladimir,
Thank you for your patch.
Am 01.09.26 um 22:37 schrieb Vladimir V. Kondratyev:
> btintel_pcie_set_dxstate() falls back to checking the controller state via
> btintel_pcie_in_d3/d0() when the alive interrupt is missed. However, these
> helpers read boot_stage_cache, which is only updated by the interrupt
> handler. As such, if the interrupt was missed, the cache is stale and the
> fallback check always fails, exhausting all retries and returning -EBUSY,
> causing suspend to abort.
Can you reproduce this on real hardware?
> The fix involves re-reading the hardware register before the fallback state
> check, consistent with btintel_pcie_resume().
>
> Fixes: e57362f4911b ("Bluetooth: btintel_pcie: Add support for _suspend() / _resume()")
>
> Signed-off-by: Vladimir V. Kondratyev <vladimirkondratyev2@gmail.com>
> Tested-by: Sergey Lebedev <lsa.uz@pm.me>
> ---
> drivers/bluetooth/btintel_pcie.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
> index fda474406003..7fca8eea6e01 100644
> --- a/drivers/bluetooth/btintel_pcie.c
> +++ b/drivers/bluetooth/btintel_pcie.c
> @@ -2778,9 +2778,13 @@ static int btintel_pcie_set_dxstate(struct btintel_pcie_data *data, u32 dxstate)
> BTINTEL_PCIE_MSIX_HW_INT_CAUSES_GP0);
>
> /* A hardware bug may cause the alive interrupt to be missed.
> - * Check if the controller reached the expected state and retry
> - * the operation only if it hasn't.
> + * Refresh boot_stage_cache from hardware since it is only
> + * updated by the interrupt handler, then check if the
> + * controller reached the expected state and retry the
> + * operation only if it hasn't.
Re-flow for less lines?
> */
> + data->boot_stage_cache = btintel_pcie_rd_reg32(data,
> + BTINTEL_PCIE_CSR_BOOT_STAGE_REG);
To me it sounds strange, that a register name *boot stage* should change
after the boot. ;-)
> if (dxstate == BTINTEL_PCIE_STATE_D0) {
> if (btintel_pcie_in_d0(data))
> return 0;
Kind regards,
Paul
next prev parent reply other threads:[~2026-09-02 5:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 20:34 [PATCH] Bluetooth: btintel_pcie: fix stale cache in set_dxstate fallback check Vladimir V. Kondratyev
2026-05-07 21:06 ` bluez.test.bot
2026-09-01 20:37 ` [PATCH] " Vladimir V. Kondratyev
2026-09-01 22:36 ` bluez.test.bot
2026-09-02 5:35 ` Paul Menzel [this message]
2026-09-02 7:24 ` [PATCH] " Sergey Lebedev
2026-09-02 8:38 ` Paul Menzel
2026-09-02 9:30 ` Sergey Lebedev
2026-09-03 14:29 ` [PATCH v3] " Vladimir V. Kondratyev
2026-09-03 14:36 ` Paul Menzel
2026-09-03 14:47 ` [v3] " bluez.test.bot
2026-09-03 15:35 ` [PATCH v3] " Vladimir V. Kondratyev
2026-09-03 17:20 ` Sergey Lebedev
2026-09-03 18:40 ` [v3] " bluez.test.bot
2026-09-03 20:19 ` Paul Menzel
2026-09-03 19:22 ` [PATCH v4] " Vladimir V. Kondratyev
2026-09-03 19:53 ` Sergey Lebedev
2026-09-03 21:25 ` [v4] " bluez.test.bot
-- strict thread matches above, loose matches on Subject: below --
2026-08-30 15:15 [PATCH] " Sergey Lebedev
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=d633b7ee-0afa-4fa1-8340-3d7616f429d2@molgen.mpg.de \
--to=pmenzel@molgen.mpg.de \
--cc=chandrashekar.devegowda@intel.com \
--cc=kiran.k@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lsa.uz@pm.me \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=vladimirkondratyev2@gmail.com \
/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