* [PATCH v1] Bluetooth: hci_qca: Fix SSR unable to wake up bug
@ 2025-11-04 11:26 Shuai Zhang
2025-11-04 11:43 ` Paul Menzel
2025-11-09 21:20 ` Dmitry Baryshkov
0 siblings, 2 replies; 4+ messages in thread
From: Shuai Zhang @ 2025-11-04 11:26 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
During SSR data collection period, the processing of hw_error events
must wait until SSR data Collected or the timeout before it can proceed.
The wake_up_bit function has been added to address the issue
where hw_error events could only be processed after the timeout.
The timeout unit has been changed from jiffies to milliseconds (ms).
Cc: stable@vger.kernel.org
Signed-off-by: Shuai Zhang <quic_shuaz@quicinc.com>
---
drivers/bluetooth/hci_qca.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 888176b0f..a2e3c97a8 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1105,6 +1105,7 @@ static void qca_controller_memdump(struct work_struct *work)
cancel_delayed_work(&qca->ctrl_memdump_timeout);
clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
clear_bit(QCA_IBS_DISABLED, &qca->flags);
+ wake_up_bit(&qca->flags, QCA_MEMDUMP_COLLECTION);
mutex_unlock(&qca->hci_memdump_lock);
return;
}
@@ -1182,6 +1183,7 @@ static void qca_controller_memdump(struct work_struct *work)
qca->qca_memdump = NULL;
qca->memdump_state = QCA_MEMDUMP_COLLECTED;
clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
+ wake_up_bit(&qca->flags, QCA_MEMDUMP_COLLECTION);
}
mutex_unlock(&qca->hci_memdump_lock);
@@ -1602,7 +1604,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 [flat|nested] 4+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_qca: Fix SSR unable to wake up bug
2025-11-04 11:26 [PATCH v1] Bluetooth: hci_qca: Fix SSR unable to wake up bug Shuai Zhang
@ 2025-11-04 11:43 ` Paul Menzel
2025-11-05 2:26 ` Shuai Zhang
2025-11-09 21:20 ` Dmitry Baryshkov
1 sibling, 1 reply; 4+ messages in thread
From: Paul Menzel @ 2025-11-04 11:43 UTC (permalink / raw)
To: Shuai Zhang
Cc: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz,
linux-arm-msm, linux-bluetooth, linux-kernel, stable,
quic_chejiang, quic_jiaymao, quic_chezhou
Dear Shuai,
Thank you for your patch.
Am 04.11.25 um 12:26 schrieb Shuai Zhang:
> During SSR data collection period, the processing of hw_error events
> must wait until SSR data Collected or the timeout before it can proceed.
Collected → collected
> The wake_up_bit function has been added to address the issue
has been added → is added
> where hw_error events could only be processed after the timeout.
The problem is not totally clear to me. What is the current situation?
Maybe start the commit message with that?
> The timeout unit has been changed from jiffies to milliseconds (ms).
Please give the numbers, and also document effect of this change. Is the
timeout the same, or different?
Also, why not make that a separate commit?
Please document a test case.
> Cc: stable@vger.kernel.org
> Signed-off-by: Shuai Zhang <quic_shuaz@quicinc.com>
> ---
> drivers/bluetooth/hci_qca.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 888176b0f..a2e3c97a8 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -1105,6 +1105,7 @@ static void qca_controller_memdump(struct work_struct *work)
> cancel_delayed_work(&qca->ctrl_memdump_timeout);
> clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
> clear_bit(QCA_IBS_DISABLED, &qca->flags);
> + wake_up_bit(&qca->flags, QCA_MEMDUMP_COLLECTION);
> mutex_unlock(&qca->hci_memdump_lock);
> return;
> }
> @@ -1182,6 +1183,7 @@ static void qca_controller_memdump(struct work_struct *work)
> qca->qca_memdump = NULL;
> qca->memdump_state = QCA_MEMDUMP_COLLECTED;
> clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
> + wake_up_bit(&qca->flags, QCA_MEMDUMP_COLLECTION);
`include/linux/wait_bit.h` also contains `clear_and_wake_up_bit()`.
> }
>
> mutex_unlock(&qca->hci_memdump_lock);
> @@ -1602,7 +1604,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);
> }
Kind regards,
Paul
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_qca: Fix SSR unable to wake up bug
2025-11-04 11:43 ` Paul Menzel
@ 2025-11-05 2:26 ` Shuai Zhang
0 siblings, 0 replies; 4+ messages in thread
From: Shuai Zhang @ 2025-11-05 2:26 UTC (permalink / raw)
To: Paul Menzel
Cc: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz,
linux-arm-msm, linux-bluetooth, linux-kernel, stable,
quic_chejiang, quic_jiaymao, quic_chezhou
Hi Paul
Thanks for the feedback!
On 11/4/2025 7:43 PM, Paul Menzel wrote:
> Dear Shuai,
>
>
> Thank you for your patch.
>
> Am 04.11.25 um 12:26 schrieb Shuai Zhang:
>> During SSR data collection period, the processing of hw_error events
>> must wait until SSR data Collected or the timeout before it can proceed.
>
> Collected → collected
>
>> The wake_up_bit function has been added to address the issue
>
> has been added → is added
>
>> where hw_error events could only be processed after the timeout.
>
> The problem is not totally clear to me. What is the current situation? Maybe start the commit message with that?
>
>> The timeout unit has been changed from jiffies to milliseconds (ms).
>
> Please give the numbers, and also document effect of this change. Is the timeout the same, or different?
>
> Also, why not make that a separate commit?
>
> Please document a test case.
>
I’ll fix the grammar, add a commit message to describe the issue,
include a test case, and use clear_and_wake_up_bit for atomicity.
Additionally, I will submit a new patch to explain the timeout unit issue.
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Shuai Zhang <quic_shuaz@quicinc.com>
>> ---
>> drivers/bluetooth/hci_qca.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
>> index 888176b0f..a2e3c97a8 100644
>> --- a/drivers/bluetooth/hci_qca.c
>> +++ b/drivers/bluetooth/hci_qca.c
>> @@ -1105,6 +1105,7 @@ static void qca_controller_memdump(struct work_struct *work)
>> cancel_delayed_work(&qca->ctrl_memdump_timeout);
>> clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
>> clear_bit(QCA_IBS_DISABLED, &qca->flags);
>> + wake_up_bit(&qca->flags, QCA_MEMDUMP_COLLECTION);
>> mutex_unlock(&qca->hci_memdump_lock);
>> return;
>> }
>> @@ -1182,6 +1183,7 @@ static void qca_controller_memdump(struct work_struct *work)
>> qca->qca_memdump = NULL;
>> qca->memdump_state = QCA_MEMDUMP_COLLECTED;
>> clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
>> + wake_up_bit(&qca->flags, QCA_MEMDUMP_COLLECTION);
>
> `include/linux/wait_bit.h` also contains `clear_and_wake_up_bit()`.
>
>> }
>> mutex_unlock(&qca->hci_memdump_lock);
>> @@ -1602,7 +1604,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);
>> }
>
>
> Kind regards,
>
> Paul
Kind regards,
Shuai
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_qca: Fix SSR unable to wake up bug
2025-11-04 11:26 [PATCH v1] Bluetooth: hci_qca: Fix SSR unable to wake up bug Shuai Zhang
2025-11-04 11:43 ` Paul Menzel
@ 2025-11-09 21:20 ` Dmitry Baryshkov
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2025-11-09 21:20 UTC (permalink / raw)
To: Shuai Zhang
Cc: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz,
linux-arm-msm, linux-bluetooth, linux-kernel, stable,
quic_chejiang, quic_jiaymao, quic_chezhou
On Tue, Nov 04, 2025 at 07:26:01PM +0800, Shuai Zhang wrote:
> During SSR data collection period, the processing of hw_error events
> must wait until SSR data Collected or the timeout before it can proceed.
> The wake_up_bit function has been added to address the issue
> where hw_error events could only be processed after the timeout.
>
> The timeout unit has been changed from jiffies to milliseconds (ms).
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Shuai Zhang <quic_shuaz@quicinc.com>
Missing Fixes tag.
> ---
> drivers/bluetooth/hci_qca.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-09 21:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-04 11:26 [PATCH v1] Bluetooth: hci_qca: Fix SSR unable to wake up bug Shuai Zhang
2025-11-04 11:43 ` Paul Menzel
2025-11-05 2:26 ` Shuai Zhang
2025-11-09 21:20 ` Dmitry Baryshkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®