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

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

 



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?


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? 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)

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.

+	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?


Kind regards,

Paul




[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