diff mbox series

[v2,2/2] Bluetooth: btusb: Fix regression in the initialization of fake Bluetooth controllers

Message ID 20250222050439.1494-2-nishiyama.pedro@gmail.com (mailing list archive)
State New
Headers show
Series [v2,1/2] Bluetooth: Add new quirks for fake Bluetooth dongles | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/SubjectPrefix success Gitlint PASS

Commit Message

Pedro Nishiyama Feb. 22, 2025, 5:04 a.m. UTC
Set HCI_OP_READ_VOICE_SETTING and HCI_OP_READ_PAGE_SCAN_TYPE as broken.
These features are falsely reported as supported.

Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages")
Signed-off-by: Pedro Nishiyama <nishiyama.pedro@gmail.com>
---
 drivers/bluetooth/btusb.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Paul Menzel Feb. 22, 2025, 5:29 a.m. UTC | #1
Dear Pedro,


Am 22.02.25 um 06:04 schrieb Pedro Nishiyama:
> Set HCI_OP_READ_VOICE_SETTING and HCI_OP_READ_PAGE_SCAN_TYPE as broken.
> These features are falsely reported as supported.

Please list the affected controllers.

> Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages")

As the summary/title says, that it’s a regression, could you please 
elaborate, that it worked before, and how it regressed? Were these 
quirks present before?

> Signed-off-by: Pedro Nishiyama <nishiyama.pedro@gmail.com>
> ---
>   drivers/bluetooth/btusb.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 8149e53fd0a7..903361456acf 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -2436,6 +2436,8 @@ static int btusb_setup_csr(struct hci_dev *hdev)
>   		set_bit(HCI_QUIRK_BROKEN_ERR_DATA_REPORTING, &hdev->quirks);
>   		set_bit(HCI_QUIRK_BROKEN_FILTER_CLEAR_ALL, &hdev->quirks);
>   		set_bit(HCI_QUIRK_NO_SUSPEND_NOTIFIER, &hdev->quirks);
> +		set_bit(HCI_QUIRK_BROKEN_READ_VOICE_SETTING, &hdev->quirks);
> +		set_bit(HCI_QUIRK_BROKEN_READ_PAGE_SCAN_TYPE, &hdev->quirks);
>   
>   		/* Clear the reset quirk since this is not an actual
>   		 * early Bluetooth 1.1 device from CSR.


Kind regards,

Paul
Pedro Nishiyama Feb. 22, 2025, 6:35 a.m. UTC | #2
Hello Paul,

On Sat, Feb 22, 2025 at 2:29 AM Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>
> Dear Pedro,
>
>
> Am 22.02.25 um 06:04 schrieb Pedro Nishiyama:
> > Set HCI_OP_READ_VOICE_SETTING and HCI_OP_READ_PAGE_SCAN_TYPE as broken.
> > These features are falsely reported as supported.
>
> Please list the affected controllers.
>
> > Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages")
>
> As the summary/title says, that it’s a regression, could you please
> elaborate, that it worked before, and how it regressed? Were these
> quirks present before?
>

Sorry, I realized I put the wrong commit in the fixes tag. The error
originated after
commit c8992cffbe74 (“Bluetooth: hci_event: Use of a function table to
handle Command Complete”).
When the min/max length of the commands began to be checked. The clone
I have here returns
a smaller buffer than expected by the command.
Since I'll need to fix the version tag, I'll put this information in
the description in the next version.

> > Signed-off-by: Pedro Nishiyama <nishiyama.pedro@gmail.com>
> > ---
> >   drivers/bluetooth/btusb.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> > index 8149e53fd0a7..903361456acf 100644
> > --- a/drivers/bluetooth/btusb.c
> > +++ b/drivers/bluetooth/btusb.c
> > @@ -2436,6 +2436,8 @@ static int btusb_setup_csr(struct hci_dev *hdev)
> >               set_bit(HCI_QUIRK_BROKEN_ERR_DATA_REPORTING, &hdev->quirks);
> >               set_bit(HCI_QUIRK_BROKEN_FILTER_CLEAR_ALL, &hdev->quirks);
> >               set_bit(HCI_QUIRK_NO_SUSPEND_NOTIFIER, &hdev->quirks);
> > +             set_bit(HCI_QUIRK_BROKEN_READ_VOICE_SETTING, &hdev->quirks);
> > +             set_bit(HCI_QUIRK_BROKEN_READ_PAGE_SCAN_TYPE, &hdev->quirks);
> >
> >               /* Clear the reset quirk since this is not an actual
> >                * early Bluetooth 1.1 device from CSR.
>
>
> Kind regards,
>
> Paul

Best regards,

Pedro
diff mbox series

Patch

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 8149e53fd0a7..903361456acf 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2436,6 +2436,8 @@  static int btusb_setup_csr(struct hci_dev *hdev)
 		set_bit(HCI_QUIRK_BROKEN_ERR_DATA_REPORTING, &hdev->quirks);
 		set_bit(HCI_QUIRK_BROKEN_FILTER_CLEAR_ALL, &hdev->quirks);
 		set_bit(HCI_QUIRK_NO_SUSPEND_NOTIFIER, &hdev->quirks);
+		set_bit(HCI_QUIRK_BROKEN_READ_VOICE_SETTING, &hdev->quirks);
+		set_bit(HCI_QUIRK_BROKEN_READ_PAGE_SCAN_TYPE, &hdev->quirks);
 
 		/* Clear the reset quirk since this is not an actual
 		 * early Bluetooth 1.1 device from CSR.