* [PATCH v3 0/2] Fix SSR unable to wake up bug
@ 2025-11-07 3:39 Shuai Zhang
2025-11-07 3:39 ` [PATCH v3 1/2] Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup during SSR Shuai Zhang
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Shuai Zhang @ 2025-11-07 3:39 UTC (permalink / raw)
To: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz
Cc: linux-arm-msm, linux-bluetooth, linux-kernel, stable,
quic_chejiang, quic_jiaymao, quic_chezhou, Shuai Zhang
This patch series fixes delayed hw_error handling during SSR.
Patch 1 adds a wakeup to ensure hw_error is processed promptly after coredump collection.
Patch 2 corrects the timeout unit from jiffies to ms.
Changes v3:
- patch2 add Fixes tag
- Link to v2
https://lore.kernel.org/all/20251106140103.1406081-1-quic_shuaz@quicinc.com/
Changes v2:
- Split timeout conversion into a separate patch.
- Clarified commit messages and added test case description.
- Link to v1
https://lore.kernel.org/all/20251104112601.2670019-1-quic_shuaz@quicinc.com/
Shuai Zhang (2):
Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup
during SSR
Bluetooth: hci_qca: Convert timeout from jiffies to ms
drivers/bluetooth/hci_qca.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH v3 1/2] Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup during SSR
2025-11-07 3:39 [PATCH v3 0/2] Fix SSR unable to wake up bug Shuai Zhang
@ 2025-11-07 3:39 ` Shuai Zhang
2025-11-07 4:02 ` Fix SSR unable to wake up bug bluez.test.bot
2025-11-07 3:39 ` [PATCH v3 2/2] Bluetooth: hci_qca: Convert timeout from jiffies to ms Shuai Zhang
2025-11-07 15:37 ` [PATCH v3 0/2] Fix SSR unable to wake up bug Bartosz Golaszewski
2 siblings, 1 reply; 13+ messages in thread
From: Shuai Zhang @ 2025-11-07 3:39 UTC (permalink / raw)
To: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz
Cc: linux-arm-msm, linux-bluetooth, linux-kernel, stable,
quic_chejiang, quic_jiaymao, quic_chezhou, Shuai Zhang
When Bluetooth controller encounters a coredump, it triggers
the Subsystem Restart (SSR) mechanism. The controller first
reports the coredump data, and once the data upload is complete,
it sends a hw_error event. The host relies on this event to
proceed with subsequent recovery actions.
If the host has not finished processing the coredump data
when the hw_error event is received,
it sets a timer to wait until either the data processing is complete
or the timeout expires before handling the event.
The current implementation lacks a wakeup trigger. As a result,
even if the coredump data has already been processed, the host
continues to wait until the timer expires, causing unnecessary
delays in handling the hw_error event.
To fix this issue, adds a `wake_up_bit()` call after the host finishes
processing the coredump data. This ensures that the waiting thread is
promptly notified and can proceed to handle the hw_error event without
waiting for the timeout.
Test case:
- Trigger controller coredump using the command: `hcitool cmd 0x3f 0c 26`.
- Use `btmon` to capture HCI logs.
- Observe the time interval between receiving the hw_error event
and the execution of the power-off sequence in the HCI log.
Signed-off-by: Shuai Zhang <quic_shuaz@quicinc.com>
---
drivers/bluetooth/hci_qca.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 888176b0f..fa6be1992 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1103,7 +1103,7 @@ static void qca_controller_memdump(struct work_struct *work)
qca->qca_memdump = NULL;
qca->memdump_state = QCA_MEMDUMP_COLLECTED;
cancel_delayed_work(&qca->ctrl_memdump_timeout);
- clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
+ clear_and_wake_up_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
clear_bit(QCA_IBS_DISABLED, &qca->flags);
mutex_unlock(&qca->hci_memdump_lock);
return;
@@ -1181,7 +1181,7 @@ static void qca_controller_memdump(struct work_struct *work)
kfree(qca->qca_memdump);
qca->qca_memdump = NULL;
qca->memdump_state = QCA_MEMDUMP_COLLECTED;
- clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
+ clear_and_wake_up_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
}
mutex_unlock(&qca->hci_memdump_lock);
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* RE: Fix SSR unable to wake up bug
2025-11-07 3:39 ` [PATCH v3 1/2] Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup during SSR Shuai Zhang
@ 2025-11-07 4:02 ` bluez.test.bot
0 siblings, 0 replies; 13+ messages in thread
From: bluez.test.bot @ 2025-11-07 4:02 UTC (permalink / raw)
To: linux-bluetooth, quic_shuaz
[-- Attachment #1: Type: text/plain, Size: 2296 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1020728
---Test result---
Test Summary:
CheckPatch PENDING 0.43 seconds
GitLint PENDING 0.35 seconds
SubjectPrefix PASS 0.13 seconds
BuildKernel PASS 23.16 seconds
CheckAllWarning PASS 25.66 seconds
CheckSparse PASS 28.63 seconds
BuildKernel32 PASS 23.13 seconds
TestRunnerSetup PASS 467.12 seconds
TestRunner_l2cap-tester PASS 23.50 seconds
TestRunner_iso-tester PASS 73.83 seconds
TestRunner_bnep-tester PASS 6.05 seconds
TestRunner_mgmt-tester FAIL 109.65 seconds
TestRunner_rfcomm-tester PASS 9.18 seconds
TestRunner_sco-tester PASS 14.11 seconds
TestRunner_ioctl-tester PASS 9.78 seconds
TestRunner_mesh-tester FAIL 11.58 seconds
TestRunner_smp-tester PASS 8.34 seconds
TestRunner_userchan-tester PASS 6.47 seconds
IncrementalBuild PENDING 0.95 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 492, Passed: 487 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.098 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Timed out 2.058 seconds
Mesh - Send cancel - 2 Timed out 1.995 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v3 2/2] Bluetooth: hci_qca: Convert timeout from jiffies to ms
2025-11-07 3:39 [PATCH v3 0/2] Fix SSR unable to wake up bug Shuai Zhang
2025-11-07 3:39 ` [PATCH v3 1/2] Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup during SSR Shuai Zhang
@ 2025-11-07 3:39 ` Shuai Zhang
2025-11-07 15:37 ` [PATCH v3 0/2] Fix SSR unable to wake up bug Bartosz Golaszewski
2 siblings, 0 replies; 13+ messages in thread
From: Shuai Zhang @ 2025-11-07 3:39 UTC (permalink / raw)
To: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz
Cc: linux-arm-msm, linux-bluetooth, linux-kernel, stable,
quic_chejiang, quic_jiaymao, quic_chezhou, Shuai Zhang
Since the timer uses jiffies as its unit rather than ms, the timeout value
must be converted from ms to jiffies when configuring the timer. Otherwise,
the intended 8s timeout is incorrectly set to approximately 33s.
Cc: stable@vger.kernel.org
Fixes: d841502c79e3 ("Bluetooth: hci_qca: Collect controller memory dump during SSR")
Signed-off-by: Shuai Zhang <quic_shuaz@quicinc.com>
---
drivers/bluetooth/hci_qca.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index fa6be1992..c14b2fa9d 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1602,7 +1602,7 @@ static void qca_wait_for_dump_collection(struct hci_dev *hdev)
struct qca_data *qca = hu->priv;
wait_on_bit_timeout(&qca->flags, QCA_MEMDUMP_COLLECTION,
- TASK_UNINTERRUPTIBLE, MEMDUMP_TIMEOUT_MS);
+ TASK_UNINTERRUPTIBLE, msecs_to_jiffies(MEMDUMP_TIMEOUT_MS));
clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v3 0/2] Fix SSR unable to wake up bug
2025-11-07 3:39 [PATCH v3 0/2] Fix SSR unable to wake up bug Shuai Zhang
2025-11-07 3:39 ` [PATCH v3 1/2] Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup during SSR Shuai Zhang
2025-11-07 3:39 ` [PATCH v3 2/2] Bluetooth: hci_qca: Convert timeout from jiffies to ms Shuai Zhang
@ 2025-11-07 15:37 ` Bartosz Golaszewski
2026-01-16 8:37 ` Shuai Zhang
2 siblings, 1 reply; 13+ messages in thread
From: Bartosz Golaszewski @ 2025-11-07 15:37 UTC (permalink / raw)
To: Shuai Zhang
Cc: linux-arm-msm, linux-bluetooth, linux-kernel, stable,
quic_chejiang, quic_jiaymao, quic_chezhou, Bartosz Golaszewski,
Marcel Holtmann, Luiz Augusto von Dentz
On Fri, 7 Nov 2025 04:39:22 +0100, Shuai Zhang <quic_shuaz@quicinc.com> said:
> This patch series fixes delayed hw_error handling during SSR.
>
> Patch 1 adds a wakeup to ensure hw_error is processed promptly after coredump collection.
> Patch 2 corrects the timeout unit from jiffies to ms.
>
> Changes v3:
> - patch2 add Fixes tag
> - Link to v2
> https://lore.kernel.org/all/20251106140103.1406081-1-quic_shuaz@quicinc.com/
>
> Changes v2:
> - Split timeout conversion into a separate patch.
> - Clarified commit messages and added test case description.
> - Link to v1
> https://lore.kernel.org/all/20251104112601.2670019-1-quic_shuaz@quicinc.com/
>
> Shuai Zhang (2):
> Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup
> during SSR
> Bluetooth: hci_qca: Convert timeout from jiffies to ms
>
> drivers/bluetooth/hci_qca.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> --
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/2] Fix SSR unable to wake up bug
2025-11-07 15:37 ` [PATCH v3 0/2] Fix SSR unable to wake up bug Bartosz Golaszewski
@ 2026-01-16 8:37 ` Shuai Zhang
2026-01-16 9:20 ` Bartosz Golaszewski
0 siblings, 1 reply; 13+ messages in thread
From: Shuai Zhang @ 2026-01-16 8:37 UTC (permalink / raw)
To: Bartosz Golaszewski, Shuai Zhang
Cc: linux-arm-msm, linux-bluetooth, linux-kernel, stable,
Marcel Holtmann, Luiz Augusto von Dentz
Hi Bartosz
On 11/7/2025 11:37 PM, Bartosz Golaszewski wrote:
> On Fri, 7 Nov 2025 04:39:22 +0100, Shuai Zhang <quic_shuaz@quicinc.com> said:
>> This patch series fixes delayed hw_error handling during SSR.
>>
>> Patch 1 adds a wakeup to ensure hw_error is processed promptly after coredump collection.
>> Patch 2 corrects the timeout unit from jiffies to ms.
>>
>> Changes v3:
>> - patch2 add Fixes tag
>> - Link to v2
>> https://lore.kernel.org/all/20251106140103.1406081-1-quic_shuaz@quicinc.com/
>>
>> Changes v2:
>> - Split timeout conversion into a separate patch.
>> - Clarified commit messages and added test case description.
>> - Link to v1
>> https://lore.kernel.org/all/20251104112601.2670019-1-quic_shuaz@quicinc.com/
>>
>> Shuai Zhang (2):
>> Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup
>> during SSR
>> Bluetooth: hci_qca: Convert timeout from jiffies to ms
>>
>> drivers/bluetooth/hci_qca.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> --
> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Just a gentle ping. This patch series has been Acked but I haven’t
seen it picked up by linux-next.
Do you need anything else from me?
Thanks,
Shuai
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/2] Fix SSR unable to wake up bug
2026-01-16 8:37 ` Shuai Zhang
@ 2026-01-16 9:20 ` Bartosz Golaszewski
2026-01-16 9:48 ` Shuai Zhang
0 siblings, 1 reply; 13+ messages in thread
From: Bartosz Golaszewski @ 2026-01-16 9:20 UTC (permalink / raw)
To: Shuai Zhang
Cc: Shuai Zhang, linux-arm-msm, linux-bluetooth, linux-kernel, stable,
Marcel Holtmann, Luiz Augusto von Dentz
On Fri, Jan 16, 2026 at 9:37 AM Shuai Zhang
<shuai.zhang@oss.qualcomm.com> wrote:
>
> Hi Bartosz
>
> On 11/7/2025 11:37 PM, Bartosz Golaszewski wrote:
> > On Fri, 7 Nov 2025 04:39:22 +0100, Shuai Zhang <quic_shuaz@quicinc.com> said:
> >> This patch series fixes delayed hw_error handling during SSR.
> >>
> >> Patch 1 adds a wakeup to ensure hw_error is processed promptly after coredump collection.
> >> Patch 2 corrects the timeout unit from jiffies to ms.
> >>
> >> Changes v3:
> >> - patch2 add Fixes tag
> >> - Link to v2
> >> https://lore.kernel.org/all/20251106140103.1406081-1-quic_shuaz@quicinc.com/
> >>
> >> Changes v2:
> >> - Split timeout conversion into a separate patch.
> >> - Clarified commit messages and added test case description.
> >> - Link to v1
> >> https://lore.kernel.org/all/20251104112601.2670019-1-quic_shuaz@quicinc.com/
> >>
> >> Shuai Zhang (2):
> >> Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup
> >> during SSR
> >> Bluetooth: hci_qca: Convert timeout from jiffies to ms
> >>
> >> drivers/bluetooth/hci_qca.c | 6 +++---
> >> 1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >> --
> > Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Just a gentle ping. This patch series has been Acked but I haven’t
> seen it picked up by linux-next.
>
> Do you need anything else from me?
I don't pick up bluetooth patches, Luiz or Marcel do.
Thanks,
Bartosz
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/2] Fix SSR unable to wake up bug
2026-01-16 9:20 ` Bartosz Golaszewski
@ 2026-01-16 9:48 ` Shuai Zhang
2026-01-16 14:42 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 13+ messages in thread
From: Shuai Zhang @ 2026-01-16 9:48 UTC (permalink / raw)
To: Luiz Augusto von Dentz, Marcel Holtmann
Cc: Shuai Zhang, linux-arm-msm, linux-bluetooth, linux-kernel, stable,
Marcel Holtmann, Luiz Augusto von Dentz
Hi Luiz, Marcel
On 1/16/2026 5:20 PM, Bartosz Golaszewski wrote:
> On Fri, Jan 16, 2026 at 9:37 AM Shuai Zhang
> <shuai.zhang@oss.qualcomm.com> wrote:
>> Hi Bartosz
>>
>> On 11/7/2025 11:37 PM, Bartosz Golaszewski wrote:
>>> On Fri, 7 Nov 2025 04:39:22 +0100, Shuai Zhang <quic_shuaz@quicinc.com> said:
>>>> This patch series fixes delayed hw_error handling during SSR.
>>>>
>>>> Patch 1 adds a wakeup to ensure hw_error is processed promptly after coredump collection.
>>>> Patch 2 corrects the timeout unit from jiffies to ms.
>>>>
>>>> Changes v3:
>>>> - patch2 add Fixes tag
>>>> - Link to v2
>>>> https://lore.kernel.org/all/20251106140103.1406081-1-quic_shuaz@quicinc.com/
>>>>
>>>> Changes v2:
>>>> - Split timeout conversion into a separate patch.
>>>> - Clarified commit messages and added test case description.
>>>> - Link to v1
>>>> https://lore.kernel.org/all/20251104112601.2670019-1-quic_shuaz@quicinc.com/
>>>>
>>>> Shuai Zhang (2):
>>>> Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup
>>>> during SSR
>>>> Bluetooth: hci_qca: Convert timeout from jiffies to ms
>>>>
>>>> drivers/bluetooth/hci_qca.c | 6 +++---
>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> --
>>> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>> Just a gentle ping. This patch series has been Acked but I haven’t
>> seen it picked up by linux-next.
>>
>> Do you need anything else from me?
> I don't pick up bluetooth patches, Luiz or Marcel do.
>
> Thanks,
> Bartosz
Could you please help clarify this?
Thanks,
Shuai
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/2] Fix SSR unable to wake up bug
2026-01-16 9:48 ` Shuai Zhang
@ 2026-01-16 14:42 ` Luiz Augusto von Dentz
2026-01-19 7:14 ` Shuai Zhang
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Luiz Augusto von Dentz @ 2026-01-16 14:42 UTC (permalink / raw)
To: Shuai Zhang
Cc: Marcel Holtmann, Shuai Zhang, linux-arm-msm, linux-bluetooth,
linux-kernel, stable
Hi Shuai,
On Fri, Jan 16, 2026 at 4:48 AM Shuai Zhang
<shuai.zhang@oss.qualcomm.com> wrote:
>
> Hi Luiz, Marcel
>
> On 1/16/2026 5:20 PM, Bartosz Golaszewski wrote:
> > On Fri, Jan 16, 2026 at 9:37 AM Shuai Zhang
> > <shuai.zhang@oss.qualcomm.com> wrote:
> >> Hi Bartosz
> >>
> >> On 11/7/2025 11:37 PM, Bartosz Golaszewski wrote:
> >>> On Fri, 7 Nov 2025 04:39:22 +0100, Shuai Zhang <quic_shuaz@quicinc.com> said:
> >>>> This patch series fixes delayed hw_error handling during SSR.
> >>>>
> >>>> Patch 1 adds a wakeup to ensure hw_error is processed promptly after coredump collection.
> >>>> Patch 2 corrects the timeout unit from jiffies to ms.
> >>>>
> >>>> Changes v3:
> >>>> - patch2 add Fixes tag
> >>>> - Link to v2
> >>>> https://lore.kernel.org/all/20251106140103.1406081-1-quic_shuaz@quicinc.com/
> >>>>
> >>>> Changes v2:
> >>>> - Split timeout conversion into a separate patch.
> >>>> - Clarified commit messages and added test case description.
> >>>> - Link to v1
> >>>> https://lore.kernel.org/all/20251104112601.2670019-1-quic_shuaz@quicinc.com/
> >>>>
> >>>> Shuai Zhang (2):
> >>>> Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup
> >>>> during SSR
> >>>> Bluetooth: hci_qca: Convert timeout from jiffies to ms
> >>>>
> >>>> drivers/bluetooth/hci_qca.c | 6 +++---
> >>>> 1 file changed, 3 insertions(+), 3 deletions(-)
> >>>>
> >>>> --
> >>> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >> Just a gentle ping. This patch series has been Acked but I haven’t
> >> seen it picked up by linux-next.
> >>
> >> Do you need anything else from me?
> > I don't pick up bluetooth patches, Luiz or Marcel do.
> >
> > Thanks,
> > Bartosz
>
> Could you please help clarify this?
There were no Fixes: or Cc: Stable in your changes to indicate they
need to be applied to the currently RC and stable trees, in which case
it will only be merged to next-next at a later stage.
If that is not correct then lets us know if that needs either a Fixes
or stable tag so I can send a pull request immediately.
>
> Thanks,
>
> Shuai
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH v3 0/2] Fix SSR unable to wake up bug
2026-01-16 14:42 ` Luiz Augusto von Dentz
@ 2026-01-19 7:14 ` Shuai Zhang
2026-01-19 11:03 ` Shuai Zhang
2026-03-19 5:56 ` Shuai Zhang
2 siblings, 0 replies; 13+ messages in thread
From: Shuai Zhang @ 2026-01-19 7:14 UTC (permalink / raw)
To: Luiz Augusto von Dentz
Cc: Marcel Holtmann, Shuai Zhang, linux-arm-msm, linux-bluetooth,
linux-kernel, stable
Hi Luiz
On 1/16/2026 10:42 PM, Luiz Augusto von Dentz wrote:
> Hi Shuai,
>
> On Fri, Jan 16, 2026 at 4:48 AM Shuai Zhang
> <shuai.zhang@oss.qualcomm.com> wrote:
>> Hi Luiz, Marcel
>>
>> On 1/16/2026 5:20 PM, Bartosz Golaszewski wrote:
>>> On Fri, Jan 16, 2026 at 9:37 AM Shuai Zhang
>>> <shuai.zhang@oss.qualcomm.com> wrote:
>>>> Hi Bartosz
>>>>
>>>> On 11/7/2025 11:37 PM, Bartosz Golaszewski wrote:
>>>>> On Fri, 7 Nov 2025 04:39:22 +0100, Shuai Zhang <quic_shuaz@quicinc.com> said:
>>>>>> This patch series fixes delayed hw_error handling during SSR.
>>>>>>
>>>>>> Patch 1 adds a wakeup to ensure hw_error is processed promptly after coredump collection.
>>>>>> Patch 2 corrects the timeout unit from jiffies to ms.
>>>>>>
>>>>>> Changes v3:
>>>>>> - patch2 add Fixes tag
>>>>>> - Link to v2
>>>>>> https://lore.kernel.org/all/20251106140103.1406081-1-quic_shuaz@quicinc.com/
>>>>>>
>>>>>> Changes v2:
>>>>>> - Split timeout conversion into a separate patch.
>>>>>> - Clarified commit messages and added test case description.
>>>>>> - Link to v1
>>>>>> https://lore.kernel.org/all/20251104112601.2670019-1-quic_shuaz@quicinc.com/
>>>>>>
>>>>>> Shuai Zhang (2):
>>>>>> Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup
>>>>>> during SSR
>>>>>> Bluetooth: hci_qca: Convert timeout from jiffies to ms
>>>>>>
>>>>>> drivers/bluetooth/hci_qca.c | 6 +++---
>>>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> --
>>>>> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>>> Just a gentle ping. This patch series has been Acked but I haven’t
>>>> seen it picked up by linux-next.
>>>>
>>>> Do you need anything else from me?
>>> I don't pick up bluetooth patches, Luiz or Marcel do.
>>>
>>> Thanks,
>>> Bartosz
>> Could you please help clarify this?
> There were no Fixes: or Cc: Stable in your changes to indicate they
> need to be applied to the currently RC and stable trees, in which case
> it will only be merged to next-next at a later stage.
>
> If that is not correct then lets us know if that needs either a Fixes
> or stable tag so I can send a pull request immediately.
I will add Fix tags then update patch.
>> Thanks,
>>
>> Shuai
>>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/2] Fix SSR unable to wake up bug
2026-01-16 14:42 ` Luiz Augusto von Dentz
2026-01-19 7:14 ` Shuai Zhang
@ 2026-01-19 11:03 ` Shuai Zhang
2026-03-19 5:56 ` Shuai Zhang
2 siblings, 0 replies; 13+ messages in thread
From: Shuai Zhang @ 2026-01-19 11:03 UTC (permalink / raw)
To: Luiz Augusto von Dentz
Cc: Marcel Holtmann, Shuai Zhang, linux-arm-msm, linux-bluetooth,
linux-kernel, stable, cheng.jiang
Hi Luiz
On 1/16/2026 10:42 PM, Luiz Augusto von Dentz wrote:
> Hi Shuai,
>
> On Fri, Jan 16, 2026 at 4:48 AM Shuai Zhang
> <shuai.zhang@oss.qualcomm.com> wrote:
>> Hi Luiz, Marcel
>>
>> On 1/16/2026 5:20 PM, Bartosz Golaszewski wrote:
>>> On Fri, Jan 16, 2026 at 9:37 AM Shuai Zhang
>>> <shuai.zhang@oss.qualcomm.com> wrote:
>>>> Hi Bartosz
>>>>
>>>> On 11/7/2025 11:37 PM, Bartosz Golaszewski wrote:
>>>>> On Fri, 7 Nov 2025 04:39:22 +0100, Shuai Zhang <quic_shuaz@quicinc.com> said:
>>>>>> This patch series fixes delayed hw_error handling during SSR.
>>>>>>
>>>>>> Patch 1 adds a wakeup to ensure hw_error is processed promptly after coredump collection.
>>>>>> Patch 2 corrects the timeout unit from jiffies to ms.
>>>>>>
>>>>>> Changes v3:
>>>>>> - patch2 add Fixes tag
>>>>>> - Link to v2
>>>>>> https://lore.kernel.org/all/20251106140103.1406081-1-quic_shuaz@quicinc.com/
>>>>>>
>>>>>> Changes v2:
>>>>>> - Split timeout conversion into a separate patch.
>>>>>> - Clarified commit messages and added test case description.
>>>>>> - Link to v1
>>>>>> https://lore.kernel.org/all/20251104112601.2670019-1-quic_shuaz@quicinc.com/
>>>>>>
>>>>>> Shuai Zhang (2):
>>>>>> Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup
>>>>>> during SSR
>>>>>> Bluetooth: hci_qca: Convert timeout from jiffies to ms
>>>>>>
>>>>>> drivers/bluetooth/hci_qca.c | 6 +++---
>>>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> --
>>>>> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>>> Just a gentle ping. This patch series has been Acked but I haven’t
>>>> seen it picked up by linux-next.
>>>>
>>>> Do you need anything else from me?
>>> I don't pick up bluetooth patches, Luiz or Marcel do.
>>>
>>> Thanks,
>>> Bartosz
>> Could you please help clarify this?
> There were no Fixes: or Cc: Stable in your changes to indicate they
> need to be applied to the currently RC and stable trees, in which case
> it will only be merged to next-next at a later stage.
>
> If that is not correct then lets us know if that needs either a Fixes
> or stable tag so I can send a pull request immediately.
I saw that it has already been acked-by, but I don’t see this change in
linux-next.
>> Thanks,
>>
>> Shuai
>>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/2] Fix SSR unable to wake up bug
2026-01-16 14:42 ` Luiz Augusto von Dentz
2026-01-19 7:14 ` Shuai Zhang
2026-01-19 11:03 ` Shuai Zhang
@ 2026-03-19 5:56 ` Shuai Zhang
2 siblings, 0 replies; 13+ messages in thread
From: Shuai Zhang @ 2026-03-19 5:56 UTC (permalink / raw)
To: Luiz Augusto von Dentz
Cc: Marcel Holtmann, Shuai Zhang, linux-arm-msm, linux-bluetooth,
linux-kernel, stable
Hi Luiz
On 1/16/2026 10:42 PM, Luiz Augusto von Dentz wrote:
> Hi Shuai,
>
> On Fri, Jan 16, 2026 at 4:48 AM Shuai Zhang
> <shuai.zhang@oss.qualcomm.com> wrote:
>> Hi Luiz, Marcel
>>
>> On 1/16/2026 5:20 PM, Bartosz Golaszewski wrote:
>>> On Fri, Jan 16, 2026 at 9:37 AM Shuai Zhang
>>> <shuai.zhang@oss.qualcomm.com> wrote:
>>>> Hi Bartosz
>>>>
>>>> On 11/7/2025 11:37 PM, Bartosz Golaszewski wrote:
>>>>> On Fri, 7 Nov 2025 04:39:22 +0100, Shuai Zhang <quic_shuaz@quicinc.com> said:
>>>>>> This patch series fixes delayed hw_error handling during SSR.
>>>>>>
>>>>>> Patch 1 adds a wakeup to ensure hw_error is processed promptly after coredump collection.
>>>>>> Patch 2 corrects the timeout unit from jiffies to ms.
>>>>>>
>>>>>> Changes v3:
>>>>>> - patch2 add Fixes tag
>>>>>> - Link to v2
>>>>>> https://lore.kernel.org/all/20251106140103.1406081-1-quic_shuaz@quicinc.com/
>>>>>>
>>>>>> Changes v2:
>>>>>> - Split timeout conversion into a separate patch.
>>>>>> - Clarified commit messages and added test case description.
>>>>>> - Link to v1
>>>>>> https://lore.kernel.org/all/20251104112601.2670019-1-quic_shuaz@quicinc.com/
>>>>>>
>>>>>> Shuai Zhang (2):
>>>>>> Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup
>>>>>> during SSR
>>>>>> Bluetooth: hci_qca: Convert timeout from jiffies to ms
>>>>>>
>>>>>> drivers/bluetooth/hci_qca.c | 6 +++---
>>>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> --
>>>>> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>>> Just a gentle ping. This patch series has been Acked but I haven’t
>>>> seen it picked up by linux-next.
>>>>
>>>> Do you need anything else from me?
>>> I don't pick up bluetooth patches, Luiz or Marcel do.
>>>
>>> Thanks,
>>> Bartosz
>> Could you please help clarify this?
> There were no Fixes: or Cc: Stable in your changes to indicate they
> need to be applied to the currently RC and stable trees, in which case
> it will only be merged to next-next at a later stage.
>
> If that is not correct then lets us know if that needs either a Fixes
> or stable tag so I can send a pull request immediately.
So far, I haven’t seen this change merged into linux-next or any other
branch, although it has already been Acked-by.
I’m wondering whether I might be missing some information, or if there
is any additional action needed from my side.
Please let me know.
[1] Patch history:
https://lore.kernel.org/all/20251107033924.3707495-1-quic_shuaz@quicinc.com/
>> Thanks,
>>
>> Shuai
>>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/2] Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup during SSR
@ 2025-11-06 14:01 Shuai Zhang
2025-11-06 14:37 ` Fix SSR unable to wake up bug bluez.test.bot
0 siblings, 1 reply; 13+ messages in thread
From: Shuai Zhang @ 2025-11-06 14:01 UTC (permalink / raw)
To: dmitry.baryshkov, marcel, luiz.dentz
Cc: linux-bluetooth, stable, linux-arm-msm, linux-kernel,
quic_chejiang, Shuai Zhang
When Bluetooth controller encounters a coredump, it triggers
the Subsystem Restart (SSR) mechanism. The controller first
reports the coredump data, and once the data upload is complete,
it sends a hw_error event. The host relies on this event to
proceed with subsequent recovery actions.
If the host has not finished processing the coredump data
when the hw_error event is received,
it sets a timer to wait until either the data processing is complete
or the timeout expires before handling the event.
The current implementation lacks a wakeup trigger. As a result,
even if the coredump data has already been processed, the host
continues to wait until the timer expires, causing unnecessary
delays in handling the hw_error event.
To fix this issue, adds a `wake_up_bit()` call after the host finishes
processing the coredump data. This ensures that the waiting thread is
promptly notified and can proceed to handle the hw_error event without
waiting for the timeout.
Test case:
- Trigger controller coredump using the command: `hcitool cmd 0x3f 0c 26`.
- Use `btmon` to capture HCI logs.
- Observe the time interval between receiving the hw_error event
and the execution of the power-off sequence in the HCI log.
Cc: stable@vger.kernel.org
Signed-off-by: Shuai Zhang <quic_shuaz@quicinc.com>
---
drivers/bluetooth/hci_qca.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 888176b0f..fa6be1992 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1103,7 +1103,7 @@ static void qca_controller_memdump(struct work_struct *work)
qca->qca_memdump = NULL;
qca->memdump_state = QCA_MEMDUMP_COLLECTED;
cancel_delayed_work(&qca->ctrl_memdump_timeout);
- clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
+ clear_and_wake_up_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
clear_bit(QCA_IBS_DISABLED, &qca->flags);
mutex_unlock(&qca->hci_memdump_lock);
return;
@@ -1181,7 +1181,7 @@ static void qca_controller_memdump(struct work_struct *work)
kfree(qca->qca_memdump);
qca->qca_memdump = NULL;
qca->memdump_state = QCA_MEMDUMP_COLLECTED;
- clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
+ clear_and_wake_up_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
}
mutex_unlock(&qca->hci_memdump_lock);
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* RE: Fix SSR unable to wake up bug
2025-11-06 14:01 [PATCH v2 1/2] Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup during SSR Shuai Zhang
@ 2025-11-06 14:37 ` bluez.test.bot
0 siblings, 0 replies; 13+ messages in thread
From: bluez.test.bot @ 2025-11-06 14:37 UTC (permalink / raw)
To: linux-bluetooth, quic_shuaz
[-- Attachment #1: Type: text/plain, Size: 2376 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1020461
---Test result---
Test Summary:
CheckPatch PENDING 0.43 seconds
GitLint PENDING 0.30 seconds
SubjectPrefix PASS 0.16 seconds
BuildKernel PASS 25.84 seconds
CheckAllWarning PASS 28.28 seconds
CheckSparse PASS 32.04 seconds
BuildKernel32 PASS 25.24 seconds
TestRunnerSetup PASS 516.12 seconds
TestRunner_l2cap-tester PASS 23.91 seconds
TestRunner_iso-tester PASS 63.77 seconds
TestRunner_bnep-tester PASS 5.99 seconds
TestRunner_mgmt-tester FAIL 116.24 seconds
TestRunner_rfcomm-tester PASS 9.17 seconds
TestRunner_sco-tester PASS 14.33 seconds
TestRunner_ioctl-tester PASS 9.78 seconds
TestRunner_mesh-tester FAIL 11.86 seconds
TestRunner_smp-tester PASS 8.38 seconds
TestRunner_userchan-tester PASS 6.48 seconds
IncrementalBuild PENDING 0.79 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 484 (98.8%), Failed: 2, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.096 seconds
LL Privacy - Set Flags 2 (Enable RL) Failed 0.161 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Timed out 2.031 seconds
Mesh - Send cancel - 2 Timed out 1.997 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-03-19 5:56 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07 3:39 [PATCH v3 0/2] Fix SSR unable to wake up bug Shuai Zhang
2025-11-07 3:39 ` [PATCH v3 1/2] Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup during SSR Shuai Zhang
2025-11-07 4:02 ` Fix SSR unable to wake up bug bluez.test.bot
2025-11-07 3:39 ` [PATCH v3 2/2] Bluetooth: hci_qca: Convert timeout from jiffies to ms Shuai Zhang
2025-11-07 15:37 ` [PATCH v3 0/2] Fix SSR unable to wake up bug Bartosz Golaszewski
2026-01-16 8:37 ` Shuai Zhang
2026-01-16 9:20 ` Bartosz Golaszewski
2026-01-16 9:48 ` Shuai Zhang
2026-01-16 14:42 ` Luiz Augusto von Dentz
2026-01-19 7:14 ` Shuai Zhang
2026-01-19 11:03 ` Shuai Zhang
2026-03-19 5:56 ` Shuai Zhang
-- strict thread matches above, loose matches on Subject: below --
2025-11-06 14:01 [PATCH v2 1/2] Bluetooth: qca: Fix delayed hw_error handling due to missing wakeup during SSR Shuai Zhang
2025-11-06 14:37 ` Fix SSR unable to wake up bug bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox