2024-03-28 13:18:36

by Werner Sembach

[permalink] [raw]
Subject: [PATCH] Bluetooth: btintel: Add devices to HCI_QUIRK_BROKEN_LE_CODED

From: Christoffer Sandberg <[email protected]>

For HW variants 0x17, 0x18 and 0x19 LE Coded PHY causes scan and
connection issues when enabled. This patch disables it through
the existing quirk.

Signed-off-by: Christoffer Sandberg <[email protected]>
Signed-off-by: Werner Sembach <[email protected]>
Cc: <[email protected]>
---
drivers/bluetooth/btintel.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index cdc5c08824a0a..6dbfb74d0adf9 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2881,6 +2881,8 @@ static int btintel_setup_combined(struct hci_dev *hdev)
case 0x17:
case 0x18:
case 0x19:
+ /* 0x17, 0x18 and 0x19 have issues when LE Coded PHY is enabled */
+ set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);
case 0x1b:
case 0x1c:
/* Display version information of TLV type */
--
2.34.1



2024-03-28 13:23:49

by Paul Menzel

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: btintel: Add devices to HCI_QUIRK_BROKEN_LE_CODED

Dear Christoffer, dear Werner,


Thank you for the patch.

Am 28.03.24 um 14:18 schrieb Werner Sembach:
> From: Christoffer Sandberg <[email protected]>
>
> For HW variants 0x17, 0x18 and 0x19 LE Coded PHY causes scan and
> connection issues when enabled. This patch disables it through
> the existing quirk.

It would fit in two lines with 75 characters per line.

On what hardware with what clients do you experience this exactly?

> Signed-off-by: Christoffer Sandberg <[email protected]>
> Signed-off-by: Werner Sembach <[email protected]>
> Cc: <[email protected]>
> ---
> drivers/bluetooth/btintel.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
> index cdc5c08824a0a..6dbfb74d0adf9 100644
> --- a/drivers/bluetooth/btintel.c
> +++ b/drivers/bluetooth/btintel.c
> @@ -2881,6 +2881,8 @@ static int btintel_setup_combined(struct hci_dev *hdev)
> case 0x17:
> case 0x18:
> case 0x19:
> + /* 0x17, 0x18 and 0x19 have issues when LE Coded PHY is enabled */
> + set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);
> case 0x1b:
> case 0x1c:
> /* Display version information of TLV type */


Kind regards,

Paul

2024-03-28 13:56:27

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: btintel: Add devices to HCI_QUIRK_BROKEN_LE_CODED

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=839335

---Test result---

Test Summary:
CheckPatch PASS 0.63 seconds
GitLint PASS 0.30 seconds
SubjectPrefix PASS 0.11 seconds
BuildKernel PASS 30.01 seconds
CheckAllWarning WARNING 33.22 seconds
CheckSparse WARNING 38.49 seconds
CheckSmatch FAIL 35.31 seconds
BuildKernel32 PASS 29.33 seconds
TestRunnerSetup PASS 523.44 seconds
TestRunner_l2cap-tester PASS 20.15 seconds
TestRunner_iso-tester PASS 37.19 seconds
TestRunner_bnep-tester PASS 6.26 seconds
TestRunner_mgmt-tester PASS 113.00 seconds
TestRunner_rfcomm-tester PASS 7.37 seconds
TestRunner_sco-tester PASS 14.87 seconds
TestRunner_ioctl-tester PASS 7.80 seconds
TestRunner_mesh-tester PASS 5.81 seconds
TestRunner_smp-tester PASS 6.85 seconds
TestRunner_userchan-tester PASS 4.96 seconds
IncrementalBuild PASS 32.67 seconds

Details
##############################
Test: CheckAllWarning - WARNING
Desc: Run linux kernel with all warning enabled
Output:
drivers/bluetooth/btintel.c: In function ‘btintel_setup_combined’:drivers/bluetooth/btintel.c:3034:3: warning: this statement may fall through [-Wimplicit-fallthrough=] 3034 | set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/bluetooth/btintel.c:3035:2: note: here 3035 | case 0x1b: | ^~~~
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
drivers/bluetooth/btintel.c: In function ‘btintel_setup_combined’:drivers/bluetooth/btintel.c:3034:3: warning: this statement may fall through [-Wimplicit-fallthrough=]drivers/bluetooth/btintel.c:3035:2: note: here
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2


---
Regards,
Linux Bluetooth

2024-03-28 14:17:50

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: btintel: Add devices to HCI_QUIRK_BROKEN_LE_CODED

Hi Werner,

On Thu, Mar 28, 2024 at 9:18 AM Werner Sembach <[email protected]> wrote:
>
> From: Christoffer Sandberg <[email protected]>
>
> For HW variants 0x17, 0x18 and 0x19 LE Coded PHY causes scan and
> connection issues when enabled. This patch disables it through
> the existing quirk.
>
> Signed-off-by: Christoffer Sandberg <[email protected]>
> Signed-off-by: Werner Sembach <[email protected]>
> Cc: <[email protected]>
> ---
> drivers/bluetooth/btintel.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
> index cdc5c08824a0a..6dbfb74d0adf9 100644
> --- a/drivers/bluetooth/btintel.c
> +++ b/drivers/bluetooth/btintel.c
> @@ -2881,6 +2881,8 @@ static int btintel_setup_combined(struct hci_dev *hdev)
> case 0x17:
> case 0x18:
> case 0x19:
> + /* 0x17, 0x18 and 0x19 have issues when LE Coded PHY is enabled */
> + set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);

If it is just these 3 then we are missing a break here.

> case 0x1b:
> case 0x1c:
> /* Display version information of TLV type */
> --
> 2.34.1
>


--
Luiz Augusto von Dentz

2024-03-28 23:21:39

by Werner Sembach

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: btintel: Add devices to HCI_QUIRK_BROKEN_LE_CODED

Hi Luiz,

Am 28.03.24 um 15:17 schrieb Luiz Augusto von Dentz:
> Hi Werner,
>
> On Thu, Mar 28, 2024 at 9:18 AM Werner Sembach <[email protected]> wrote:
>> From: Christoffer Sandberg <[email protected]>
>>
>> For HW variants 0x17, 0x18 and 0x19 LE Coded PHY causes scan and
>> connection issues when enabled. This patch disables it through
>> the existing quirk.
>>
>> Signed-off-by: Christoffer Sandberg <[email protected]>
>> Signed-off-by: Werner Sembach <[email protected]>
>> Cc: <[email protected]>
>> ---
>> drivers/bluetooth/btintel.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
>> index cdc5c08824a0a..6dbfb74d0adf9 100644
>> --- a/drivers/bluetooth/btintel.c
>> +++ b/drivers/bluetooth/btintel.c
>> @@ -2881,6 +2881,8 @@ static int btintel_setup_combined(struct hci_dev *hdev)
>> case 0x17:
>> case 0x18:
>> case 0x19:
>> + /* 0x17, 0x18 and 0x19 have issues when LE Coded PHY is enabled */
>> + set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);
> If it is just these 3 then we are missing a break here.

The cases are not added by the patch, the fallthrough was here before. This
patch just adds this quirk for these 3 cases on top to the other things done
below, aka the fallthrough is intentional.

Best regards,

Werner

>
>> case 0x1b:
>> case 0x1c:
>> /* Display version information of TLV type */
>> --
>> 2.34.1
>>
>

2024-03-31 04:52:28

by K, Kiran

[permalink] [raw]
Subject: RE: [PATCH] Bluetooth: btintel: Add devices to HCI_QUIRK_BROKEN_LE_CODED

Hi Werner,

> -----Original Message-----
> From: Werner Sembach <[email protected]>
> Sent: Thursday, March 28, 2024 6:48 PM
> To: Marcel Holtmann <[email protected]>; Luiz Augusto von Dentz
> <[email protected]>
> Cc: Christoffer Sandberg <[email protected]>; Werner Sembach
> <[email protected]>; [email protected]; linux-
> [email protected]
> Subject: [PATCH] Bluetooth: btintel: Add devices to
> HCI_QUIRK_BROKEN_LE_CODED
>
> From: Christoffer Sandberg <[email protected]>
>
> For HW variants 0x17, 0x18 and 0x19 LE Coded PHY causes scan and
> connection issues when enabled. This patch disables it through the existing
> quirk.
>
Do see this issue with latest firmware ? Can you please share the firmware version you are using (share dmesg on system boot) ?

> Signed-off-by: Christoffer Sandberg <[email protected]>
> Signed-off-by: Werner Sembach <[email protected]>
> Cc: <[email protected]>
> ---
> drivers/bluetooth/btintel.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index
> cdc5c08824a0a..6dbfb74d0adf9 100644
> --- a/drivers/bluetooth/btintel.c
> +++ b/drivers/bluetooth/btintel.c
> @@ -2881,6 +2881,8 @@ static int btintel_setup_combined(struct hci_dev
> *hdev)
> case 0x17:
> case 0x18:
> case 0x19:
> + /* 0x17, 0x18 and 0x19 have issues when LE Coded PHY is
> enabled */
> + set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);
> case 0x1b:
> case 0x1c:
> /* Display version information of TLV type */
> --
> 2.34.1
>

Thanks,
Kiran



2024-04-02 17:17:26

by Pauli Virtanen

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: btintel: Add devices to HCI_QUIRK_BROKEN_LE_CODED

pe, 2024-03-29 kello 00:20 +0100, Werner Sembach kirjoitti:
> Hi Luiz,
>
> Am 28.03.24 um 15:17 schrieb Luiz Augusto von Dentz:
> > Hi Werner,
> >
> > On Thu, Mar 28, 2024 at 9:18 AM Werner Sembach <[email protected]> wrote:
> > > From: Christoffer Sandberg <[email protected]>
> > >
> > > For HW variants 0x17, 0x18 and 0x19 LE Coded PHY causes scan and
> > > connection issues when enabled. This patch disables it through
> > > the existing quirk.
> > >
> > > Signed-off-by: Christoffer Sandberg <[email protected]>
> > > Signed-off-by: Werner Sembach <[email protected]>
> > > Cc: <[email protected]>
> > > ---
> > > drivers/bluetooth/btintel.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
> > > index cdc5c08824a0a..6dbfb74d0adf9 100644
> > > --- a/drivers/bluetooth/btintel.c
> > > +++ b/drivers/bluetooth/btintel.c
> > > @@ -2881,6 +2881,8 @@ static int btintel_setup_combined(struct hci_dev *hdev)
> > > case 0x17:
> > > case 0x18:
> > > case 0x19:
> > > + /* 0x17, 0x18 and 0x19 have issues when LE Coded PHY is enabled */
> > > + set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);
> > If it is just these 3 then we are missing a break here.
>
> The cases are not added by the patch, the fallthrough was here before. This
> patch just adds this quirk for these 3 cases on top to the other things done
> below, aka the fallthrough is intentional.

See

https://docs.kernel.org/next/process/deprecated.html#implicit-switch-case-fall-through


>
> Best regards,
>
> Werner
>
> >
> > > case 0x1b:
> > > case 0x1c:
> > > /* Display version information of TLV type */
> > > --
> > > 2.34.1
> > >
> >

--
Pauli Virtanen

2024-04-03 17:55:23

by Werner Sembach

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: btintel: Add devices to HCI_QUIRK_BROKEN_LE_CODED


Am 02.04.24 um 19:16 schrieb Pauli Virtanen:
> pe, 2024-03-29 kello 00:20 +0100, Werner Sembach kirjoitti:
>> Hi Luiz,
>>
>> Am 28.03.24 um 15:17 schrieb Luiz Augusto von Dentz:
>>> Hi Werner,
>>>
>>> On Thu, Mar 28, 2024 at 9:18 AM Werner Sembach <[email protected]> wrote:
>>>> From: Christoffer Sandberg <[email protected]>
>>>>
>>>> For HW variants 0x17, 0x18 and 0x19 LE Coded PHY causes scan and
>>>> connection issues when enabled. This patch disables it through
>>>> the existing quirk.
>>>>
>>>> Signed-off-by: Christoffer Sandberg <[email protected]>
>>>> Signed-off-by: Werner Sembach <[email protected]>
>>>> Cc: <[email protected]>
>>>> ---
>>>> drivers/bluetooth/btintel.c | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
>>>> index cdc5c08824a0a..6dbfb74d0adf9 100644
>>>> --- a/drivers/bluetooth/btintel.c
>>>> +++ b/drivers/bluetooth/btintel.c
>>>> @@ -2881,6 +2881,8 @@ static int btintel_setup_combined(struct hci_dev *hdev)
>>>> case 0x17:
>>>> case 0x18:
>>>> case 0x19:
>>>> + /* 0x17, 0x18 and 0x19 have issues when LE Coded PHY is enabled */
>>>> + set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);
>>> If it is just these 3 then we are missing a break here.
>> The cases are not added by the patch, the fallthrough was here before. This
>> patch just adds this quirk for these 3 cases on top to the other things done
>> below, aka the fallthrough is intentional.
> See
>
> https://docs.kernel.org/next/process/deprecated.html#implicit-switch-case-fall-through
Thanks for the link, will add the explicit fallthrough in a v2.
>
>
>> Best regards,
>>
>> Werner
>>
>>>> case 0x1b:
>>>> case 0x1c:
>>>> /* Display version information of TLV type */
>>>> --
>>>> 2.34.1
>>>>