Re: [PATCH v2] Bluetooth: btusb: Fix regression with CSR controllers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Paul,

On Wed, Oct 16, 2024 at 12:41 AM Paul Menzel <pmenzel@xxxxxxxxxxxxx> wrote:
>
> Dear Luiz,
>
>
> Thank you for the patch, and fixing the regression. Could
> short-transfers be mentioned in the summary/title to make it more specific?

Sure.

>
> Am 15.10.24 um 17:37 schrieb Luiz Augusto von Dentz:
> > From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
> >
> > CSR controllers don't seem to handle short-transfer properly which cause
> > command to timeout.
>
> The verb is spelled with a space: time out.
>
> Could you elaborate more? Why is starting a quirk list the right thing
> to do? It’s unlikely more controllers are affected?

Elaborate on what? USB short-transfer is a mandatory feature of USB, I
can quote the USB spec if that makes it clearer, now if there are more
controllers affected only time will tell since I don't think anyone
has a lab to validate these changes on all supported models by btusb
driver.

> For people using
> `git log --grep` the product name would be nice to have in the commit
> message:
>
> Product: BT DONGLE10
> Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth
> Dongle (HCI mode)

Ack

> > Link: https://bugzilla.kernel.org/show_bug.cgi?id=219365
> > Fixes: 7b05933340f4 ("Bluetooth: btusb: Fix not handling ZPL/short-transfer")
> > Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
> > ---
> >   drivers/bluetooth/btusb.c | 13 +++++++++----
> >   1 file changed, 9 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> > index c0b6ef8ee5da..f72218c1037e 100644
> > --- a/drivers/bluetooth/btusb.c
> > +++ b/drivers/bluetooth/btusb.c
> > @@ -1366,10 +1366,15 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags)
> >       if (!urb)
> >               return -ENOMEM;
> >
> > -     /* Use maximum HCI Event size so the USB stack handles
> > -      * ZPL/short-transfer automatically.
> > -      */
> > -     size = HCI_MAX_EVENT_SIZE;
> > +     if (le16_to_cpu(data->udev->descriptor.idVendor)  == 0x0a12 &&
> > +         le16_to_cpu(data->udev->descriptor.idProduct) == 0x0001)
> > +             /* Fake CSR devices don't seem to support sort-transter */
>
> s*h*ort
>
> > +             size = le16_to_cpu(data->intr_ep->wMaxPacketSize);
>
> A warning would be nice to have so motivated users could bug Cambridge
> Silicon Radio to fix/improve their devices.

These are fake CSR dongles, there are many things wrong with them and
it is already warned when detected.

> > +     else
> > +             /* Use maximum HCI Event size so the USB stack handles
> > +              * ZPL/short-transfer automatically.
> > +              */
> > +             size = HCI_MAX_EVENT_SIZE;
> >
> >       buf = kmalloc(size, mem_flags);
> >       if (!buf) {
>
> Is Intel going to get such a device to add to a test lab?

Don't think we can get a hold of one of these dongles, they are not
really from CSR and they are really old as well, so I guess the only
option would be for someone to donate it or something.

>
> Kind regards,
>
> Paul



-- 
Luiz Augusto von Dentz





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux