@@ -66,6 +66,7 @@ static struct usb_driver btusb_driver;
6666#define BTUSB_INTEL_BROKEN_INITIAL_NCMD BIT(25)
6767#define BTUSB_INTEL_NO_WBS_SUPPORT BIT(26)
6868#define BTUSB_ACTIONS_SEMI BIT(27)
69+ #define BTUSB_BARROT BIT(28)
6970
7071static const struct usb_device_id btusb_table [] = {
7172 /* Generic Bluetooth USB device */
@@ -812,6 +813,10 @@ static const struct usb_device_id quirks_table[] = {
812813 { USB_DEVICE (0x0cb5 , 0xc547 ), .driver_info = BTUSB_REALTEK |
813814 BTUSB_WIDEBAND_SPEECH },
814815
816+ /* Barrot Technology Bluetooth devices */
817+ { USB_DEVICE (0x33fa , 0x0010 ), .driver_info = BTUSB_BARROT },
818+ { USB_DEVICE (0x33fa , 0x0012 ), .driver_info = BTUSB_BARROT },
819+
815820 /* Actions Semiconductor ATS2851 based devices */
816821 { USB_DEVICE (0x10d7 , 0xb012 ), .driver_info = BTUSB_ACTIONS_SEMI },
817822
@@ -1194,6 +1199,18 @@ static int btusb_recv_intr(struct btusb_data *data, void *buffer, int count)
11941199 }
11951200
11961201 if (!hci_skb_expect (skb )) {
1202+ /* Each chunk should correspond to at least 1 or more
1203+ * events so if there are still bytes left that doesn't
1204+ * constitute a new event this is likely a bug in the
1205+ * controller.
1206+ */
1207+ if (count && count < HCI_EVENT_HDR_SIZE ) {
1208+ bt_dev_warn (data -> hdev ,
1209+ "Unexpected continuation: %d bytes" ,
1210+ count );
1211+ count = 0 ;
1212+ }
1213+
11971214 /* Complete frame */
11981215 btusb_recv_event (data , skb );
11991216 skb = NULL ;
0 commit comments