Commit 520ca78acc652c89c92e8bf29536319afa9d88bb
Committed by
David S. Miller
1 parent
98bcd08b5b
Exists in
master
and in
4 other branches
[Bluetooth] Correct SCO buffer size for another Broadcom chip
The SCO buffer size values on IBM/Lenovo ThinkPad laptops with a Bluetooth chip from Broadcom are wrong. The USB Bluetooth driver has to set a quirk to correct the SCO buffer size values. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Showing 1 changed file with 15 additions and 2 deletions Side-by-side Diff
drivers/bluetooth/hci_usb.c
| ... | ... | @@ -67,6 +67,8 @@ |
| 67 | 67 | static int ignore_dga = 0; |
| 68 | 68 | static int ignore_csr = 0; |
| 69 | 69 | static int ignore_sniffer = 0; |
| 70 | +static int disable_scofix = 0; | |
| 71 | +static int force_scofix = 0; | |
| 70 | 72 | static int reset = 0; |
| 71 | 73 | |
| 72 | 74 | #ifdef CONFIG_BT_HCIUSB_SCO |
| ... | ... | @@ -110,6 +112,9 @@ |
| 110 | 112 | { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_BROKEN_ISOC }, |
| 111 | 113 | { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 }, |
| 112 | 114 | |
| 115 | + /* IBM/Lenovo ThinkPad with Broadcom chip */ | |
| 116 | + { USB_DEVICE(0x0a5c, 0x201e), .driver_info = HCI_WRONG_SCO_MTU }, | |
| 117 | + | |
| 113 | 118 | /* Microsoft Wireless Transceiver for Bluetooth 2.0 */ |
| 114 | 119 | { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET }, |
| 115 | 120 | |
| ... | ... | @@ -990,8 +995,10 @@ |
| 990 | 995 | if (reset || id->driver_info & HCI_RESET) |
| 991 | 996 | set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks); |
| 992 | 997 | |
| 993 | - if (id->driver_info & HCI_WRONG_SCO_MTU) | |
| 994 | - set_bit(HCI_QUIRK_FIXUP_BUFFER_SIZE, &hdev->quirks); | |
| 998 | + if (force_scofix || id->driver_info & HCI_WRONG_SCO_MTU) { | |
| 999 | + if (!disable_scofix) | |
| 1000 | + set_bit(HCI_QUIRK_FIXUP_BUFFER_SIZE, &hdev->quirks); | |
| 1001 | + } | |
| 995 | 1002 | |
| 996 | 1003 | if (id->driver_info & HCI_SNIFFER) { |
| 997 | 1004 | if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x997) |
| ... | ... | @@ -1160,6 +1167,12 @@ |
| 1160 | 1167 | |
| 1161 | 1168 | module_param(ignore_sniffer, bool, 0644); |
| 1162 | 1169 | MODULE_PARM_DESC(ignore_sniffer, "Ignore devices with id 0a12:0002"); |
| 1170 | + | |
| 1171 | +module_param(disable_scofix, bool, 0644); | |
| 1172 | +MODULE_PARM_DESC(disable_scofix, "Disable fixup of wrong SCO buffer size"); | |
| 1173 | + | |
| 1174 | +module_param(force_scofix, bool, 0644); | |
| 1175 | +MODULE_PARM_DESC(force_scofix, "Force fixup of wrong SCO buffers size"); | |
| 1163 | 1176 | |
| 1164 | 1177 | module_param(reset, bool, 0644); |
| 1165 | 1178 | MODULE_PARM_DESC(reset, "Send HCI reset command on initialization"); |