Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v1] Bluetooth: btintel_pcie: Reset controller before configuring MSI-X
@ 2026-05-11 13:27 Kiran K
  2026-05-11 14:19 ` [v1] " bluez.test.bot
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kiran K @ 2026-05-11 13:27 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: ravishankar.srivatsa, chethan.tumkur.narayan, aluvala.sai.teja,
	Kiran K

From: Sai Teja Aluvala <aluvala.sai.teja@intel.com>

Perform the shared hardware reset in btintel_pcie_probe() before
configuring MSI-X so the controller starts from a known clean state.

While here, move btintel_pcie_config_msix() out of
btintel_pcie_config_pcie() and into the probe sequence, and propagate
errors from btintel_pcie_reset_bt() so probe fails cleanly if the
shared HW reset does not complete.

Signed-off-by: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
Signed-off-by: Kiran K <kiran.k@intel.com>
---
 drivers/bluetooth/btintel_pcie.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index fda474406003..6ff08de9ec78 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -1646,9 +1646,6 @@ static int btintel_pcie_config_pcie(struct pci_dev *pdev,
 	if (err)
 		return err;
 
-	/* Configure MSI-X with causes list */
-	btintel_pcie_config_msix(data);
-
 	return 0;
 }
 
@@ -2659,6 +2656,14 @@ static int btintel_pcie_probe(struct pci_dev *pdev,
 	if (err)
 		goto exit_error;
 
+	err = btintel_pcie_reset_bt(data);
+	if (err) {
+		dev_err(&pdev->dev, "Bluetooth shared HW reset failed (%d)\n", err);
+		goto exit_error;
+	}
+
+	/* Configure MSI-X with causes list */
+	btintel_pcie_config_msix(data);
 	pci_set_drvdata(pdev, data);
 
 	err = btintel_pcie_alloc(data);
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [v1] Bluetooth: btintel_pcie: Reset controller before configuring MSI-X
  2026-05-11 13:27 [PATCH v1] Bluetooth: btintel_pcie: Reset controller before configuring MSI-X Kiran K
@ 2026-05-11 14:19 ` bluez.test.bot
  2026-05-11 20:49 ` [PATCH v1] " Paul Menzel
  2026-05-12 16:41 ` Luiz Augusto von Dentz
  2 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2026-05-11 14:19 UTC (permalink / raw)
  To: linux-bluetooth, kiran.k

[-- Attachment #1: Type: text/plain, Size: 882 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=1092796

---Test result---

Test Summary:
CheckPatch                    PASS      0.67 seconds
GitLint                       PASS      0.28 seconds
SubjectPrefix                 PASS      1.58 seconds
BuildKernel                   PASS      26.84 seconds
CheckAllWarning               PASS      29.54 seconds
CheckSparse                   PASS      28.25 seconds
BuildKernel32                 PASS      26.49 seconds
TestRunnerSetup               PASS      576.72 seconds
IncrementalBuild              PASS      25.73 seconds



https://github.com/bluez/bluetooth-next/pull/166

---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] Bluetooth: btintel_pcie: Reset controller before configuring MSI-X
  2026-05-11 13:27 [PATCH v1] Bluetooth: btintel_pcie: Reset controller before configuring MSI-X Kiran K
  2026-05-11 14:19 ` [v1] " bluez.test.bot
@ 2026-05-11 20:49 ` Paul Menzel
  2026-05-12  9:50   ` K, Kiran
  2026-05-12 16:41 ` Luiz Augusto von Dentz
  2 siblings, 1 reply; 5+ messages in thread
From: Paul Menzel @ 2026-05-11 20:49 UTC (permalink / raw)
  To: Kiran K
  Cc: linux-bluetooth, ravishankar.srivatsa, chethan.tumkur.narayan,
	aluvala.sai.teja

Dear Kiran,


Thank you for your patch.

Am 11.05.26 um 15:27 schrieb Kiran K:
> From: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
> 
> Perform the shared hardware reset in btintel_pcie_probe() before
> configuring MSI-X so the controller starts from a known clean state.

Did you run into problems with the current ordering?

> While here, move btintel_pcie_config_msix() out of
> btintel_pcie_config_pcie() and into the probe sequence, and propagate
> errors from btintel_pcie_reset_bt() so probe fails cleanly if the
> shared HW reset does not complete.

“While here” also sounds to me to split the commit into two. But your call.

Please add a paragraph how to test it. (Maybe what log messages to look 
out for.) Is there a way to force `btintel_pcie_reset_bt()` to fail?

> Signed-off-by: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
> Signed-off-by: Kiran K <kiran.k@intel.com>
> ---
>   drivers/bluetooth/btintel_pcie.c | 11 ++++++++---
>   1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
> index fda474406003..6ff08de9ec78 100644
> --- a/drivers/bluetooth/btintel_pcie.c
> +++ b/drivers/bluetooth/btintel_pcie.c
> @@ -1646,9 +1646,6 @@ static int btintel_pcie_config_pcie(struct pci_dev *pdev,
>   	if (err)
>   		return err;
>   
> -	/* Configure MSI-X with causes list */
> -	btintel_pcie_config_msix(data);
> -
>   	return 0;
>   }
>   
> @@ -2659,6 +2656,14 @@ static int btintel_pcie_probe(struct pci_dev *pdev,
>   	if (err)
>   		goto exit_error;
>   
> +	err = btintel_pcie_reset_bt(data);
> +	if (err) {
> +		dev_err(&pdev->dev, "Bluetooth shared HW reset failed (%d)\n", err);

What is “shared HW reset”?

> +		goto exit_error;
> +	}
> +
> +	/* Configure MSI-X with causes list */
> +	btintel_pcie_config_msix(data);
>   	pci_set_drvdata(pdev, data);
>   
>   	err = btintel_pcie_alloc(data);


Kind regards,

Paul

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v1] Bluetooth: btintel_pcie: Reset controller before configuring MSI-X
  2026-05-11 20:49 ` [PATCH v1] " Paul Menzel
@ 2026-05-12  9:50   ` K, Kiran
  0 siblings, 0 replies; 5+ messages in thread
From: K, Kiran @ 2026-05-12  9:50 UTC (permalink / raw)
  To: Paul Menzel
  Cc: linux-bluetooth@vger.kernel.org, Srivatsa, Ravishankar,
	Tumkur Narayan, Chethan, Aluvala Sai Teja

Hi  Paul,

Thanks for the comments.

>Subject: Re: [PATCH v1] Bluetooth: btintel_pcie: Reset controller before
>configuring MSI-X
>
>Dear Kiran,
>
>
>Thank you for your patch.
>
>Am 11.05.26 um 15:27 schrieb Kiran K:
>> From: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
>>
>> Perform the shared hardware reset in btintel_pcie_probe() before
>> configuring MSI-X so the controller starts from a known clean state.
>
>Did you run into problems with the current ordering?
Yes, we found hardware initialization issue due to which _probe() was failing and the issue was seen only in simics (virtual environment).  This happens if hardware is not reset to boot rom mode before initializing.
>
>> While here, move btintel_pcie_config_msix() out of
>> btintel_pcie_config_pcie() and into the probe sequence, and propagate
>> errors from btintel_pcie_reset_bt() so probe fails cleanly if the
>> shared HW reset does not complete.
>
>“While here” also sounds to me to split the commit into two. But your call.
I will update the commit message in v2 version of the patch.
>
>Please add a paragraph how to test it. (Maybe what log messages to look out
>for.) Is there a way to force `btintel_pcie_reset_bt()` to fail?
>
>> Signed-off-by: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
>> Signed-off-by: Kiran K <kiran.k@intel.com>
>> ---
>>   drivers/bluetooth/btintel_pcie.c | 11 ++++++++---
>>   1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/bluetooth/btintel_pcie.c
>> b/drivers/bluetooth/btintel_pcie.c
>> index fda474406003..6ff08de9ec78 100644
>> --- a/drivers/bluetooth/btintel_pcie.c
>> +++ b/drivers/bluetooth/btintel_pcie.c
>> @@ -1646,9 +1646,6 @@ static int btintel_pcie_config_pcie(struct pci_dev
>*pdev,
>>   	if (err)
>>   		return err;
>>
>> -	/* Configure MSI-X with causes list */
>> -	btintel_pcie_config_msix(data);
>> -
>>   	return 0;
>>   }
>>
>> @@ -2659,6 +2656,14 @@ static int btintel_pcie_probe(struct pci_dev *pdev,
>>   	if (err)
>>   		goto exit_error;
>>
>> +	err = btintel_pcie_reset_bt(data);
>> +	if (err) {
>> +		dev_err(&pdev->dev, "Bluetooth shared HW reset failed
>(%d)\n",
>> +err);
>
>What is “shared HW reset”?
Shared HW reset refers to initializing hardware to boot rom state.
>
>> +		goto exit_error;
>> +	}
>> +
>> +	/* Configure MSI-X with causes list */
>> +	btintel_pcie_config_msix(data);
>>   	pci_set_drvdata(pdev, data);
>>
>>   	err = btintel_pcie_alloc(data);
>
>
>Kind regards,
>
>Paul

Thanks,
Kiran


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] Bluetooth: btintel_pcie: Reset controller before configuring MSI-X
  2026-05-11 13:27 [PATCH v1] Bluetooth: btintel_pcie: Reset controller before configuring MSI-X Kiran K
  2026-05-11 14:19 ` [v1] " bluez.test.bot
  2026-05-11 20:49 ` [PATCH v1] " Paul Menzel
@ 2026-05-12 16:41 ` Luiz Augusto von Dentz
  2 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2026-05-12 16:41 UTC (permalink / raw)
  To: Kiran K
  Cc: linux-bluetooth, ravishankar.srivatsa, chethan.tumkur.narayan,
	aluvala.sai.teja

Hi Kiran,

On Mon, May 11, 2026 at 9:11 AM Kiran K <kiran.k@intel.com> wrote:
>
> From: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
>
> Perform the shared hardware reset in btintel_pcie_probe() before
> configuring MSI-X so the controller starts from a known clean state.
>
> While here, move btintel_pcie_config_msix() out of
> btintel_pcie_config_pcie() and into the probe sequence, and propagate
> errors from btintel_pcie_reset_bt() so probe fails cleanly if the
> shared HW reset does not complete.
>
> Signed-off-by: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
> Signed-off-by: Kiran K <kiran.k@intel.com>
> ---
>  drivers/bluetooth/btintel_pcie.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
> index fda474406003..6ff08de9ec78 100644
> --- a/drivers/bluetooth/btintel_pcie.c
> +++ b/drivers/bluetooth/btintel_pcie.c
> @@ -1646,9 +1646,6 @@ static int btintel_pcie_config_pcie(struct pci_dev *pdev,
>         if (err)
>                 return err;
>
> -       /* Configure MSI-X with causes list */
> -       btintel_pcie_config_msix(data);
> -
>         return 0;
>  }
>
> @@ -2659,6 +2656,14 @@ static int btintel_pcie_probe(struct pci_dev *pdev,
>         if (err)
>                 goto exit_error;
>
> +       err = btintel_pcie_reset_bt(data);
> +       if (err) {
> +               dev_err(&pdev->dev, "Bluetooth shared HW reset failed (%d)\n", err);
> +               goto exit_error;
> +       }
> +
> +       /* Configure MSI-X with causes list */
> +       btintel_pcie_config_msix(data);

Sashiko raised several comments on this:

https://sashiko.dev/#/patchset/20260511132711.1216139-1-kiran.k%40intel.com

>         pci_set_drvdata(pdev, data);
>
>         err = btintel_pcie_alloc(data);
> --
> 2.53.0
>
>


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-12 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 13:27 [PATCH v1] Bluetooth: btintel_pcie: Reset controller before configuring MSI-X Kiran K
2026-05-11 14:19 ` [v1] " bluez.test.bot
2026-05-11 20:49 ` [PATCH v1] " Paul Menzel
2026-05-12  9:50   ` K, Kiran
2026-05-12 16:41 ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox