diff options
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/bcm203x.c | 1 | ||||
-rw-r--r-- | drivers/bluetooth/hci_ldisc.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/hci_usb.c | 25 |
3 files changed, 23 insertions, 7 deletions
diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c index 6f67141f4de0..13ba729cdd57 100644 --- a/drivers/bluetooth/bcm203x.c +++ b/drivers/bluetooth/bcm203x.c | |||
@@ -234,6 +234,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id | |||
234 | data->fw_data = kmalloc(firmware->size, GFP_KERNEL); | 234 | data->fw_data = kmalloc(firmware->size, GFP_KERNEL); |
235 | if (!data->fw_data) { | 235 | if (!data->fw_data) { |
236 | BT_ERR("Can't allocate memory for firmware image"); | 236 | BT_ERR("Can't allocate memory for firmware image"); |
237 | release_firmware(firmware); | ||
237 | usb_free_urb(data->urb); | 238 | usb_free_urb(data->urb); |
238 | kfree(data->buffer); | 239 | kfree(data->buffer); |
239 | kfree(data); | 240 | kfree(data); |
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 1994270c16e1..93ba25b7ea32 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c | |||
@@ -191,7 +191,7 @@ static int hci_uart_flush(struct hci_dev *hdev) | |||
191 | 191 | ||
192 | /* Flush any pending characters in the driver and discipline. */ | 192 | /* Flush any pending characters in the driver and discipline. */ |
193 | tty_ldisc_flush(tty); | 193 | tty_ldisc_flush(tty); |
194 | if (tty->driver->flush_buffer) | 194 | if (tty->driver && tty->driver->flush_buffer) |
195 | tty->driver->flush_buffer(tty); | 195 | tty->driver->flush_buffer(tty); |
196 | 196 | ||
197 | if (test_bit(HCI_UART_PROTO_SET, &hu->flags)) | 197 | if (test_bit(HCI_UART_PROTO_SET, &hu->flags)) |
@@ -290,7 +290,7 @@ static int hci_uart_tty_open(struct tty_struct *tty) | |||
290 | if (tty->ldisc.flush_buffer) | 290 | if (tty->ldisc.flush_buffer) |
291 | tty->ldisc.flush_buffer(tty); | 291 | tty->ldisc.flush_buffer(tty); |
292 | 292 | ||
293 | if (tty->driver->flush_buffer) | 293 | if (tty->driver && tty->driver->flush_buffer) |
294 | tty->driver->flush_buffer(tty); | 294 | tty->driver->flush_buffer(tty); |
295 | 295 | ||
296 | return 0; | 296 | return 0; |
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c index 6a0c2230f82f..e2d4beac7420 100644 --- a/drivers/bluetooth/hci_usb.c +++ b/drivers/bluetooth/hci_usb.c | |||
@@ -67,6 +67,8 @@ static int ignore = 0; | |||
67 | static int ignore_dga = 0; | 67 | static int ignore_dga = 0; |
68 | static int ignore_csr = 0; | 68 | static int ignore_csr = 0; |
69 | static int ignore_sniffer = 0; | 69 | static int ignore_sniffer = 0; |
70 | static int disable_scofix = 0; | ||
71 | static int force_scofix = 0; | ||
70 | static int reset = 0; | 72 | static int reset = 0; |
71 | 73 | ||
72 | #ifdef CONFIG_BT_HCIUSB_SCO | 74 | #ifdef CONFIG_BT_HCIUSB_SCO |
@@ -107,9 +109,12 @@ static struct usb_device_id blacklist_ids[] = { | |||
107 | { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE }, | 109 | { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE }, |
108 | 110 | ||
109 | /* Broadcom BCM2035 */ | 111 | /* Broadcom BCM2035 */ |
110 | { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_BROKEN_ISOC }, | 112 | { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, |
111 | { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 }, | 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 | /* Microsoft Wireless Transceiver for Bluetooth 2.0 */ | 118 | /* Microsoft Wireless Transceiver for Bluetooth 2.0 */ |
114 | { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET }, | 119 | { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET }, |
115 | 120 | ||
@@ -119,11 +124,13 @@ static struct usb_device_id blacklist_ids[] = { | |||
119 | /* ISSC Bluetooth Adapter v3.1 */ | 124 | /* ISSC Bluetooth Adapter v3.1 */ |
120 | { USB_DEVICE(0x1131, 0x1001), .driver_info = HCI_RESET }, | 125 | { USB_DEVICE(0x1131, 0x1001), .driver_info = HCI_RESET }, |
121 | 126 | ||
122 | /* RTX Telecom based adapter with buggy SCO support */ | 127 | /* RTX Telecom based adapters with buggy SCO support */ |
123 | { USB_DEVICE(0x0400, 0x0807), .driver_info = HCI_BROKEN_ISOC }, | 128 | { USB_DEVICE(0x0400, 0x0807), .driver_info = HCI_BROKEN_ISOC }, |
129 | { USB_DEVICE(0x0400, 0x080a), .driver_info = HCI_BROKEN_ISOC }, | ||
124 | 130 | ||
125 | /* Belkin F8T012 */ | 131 | /* Belkin F8T012 and F8T013 devices */ |
126 | { USB_DEVICE(0x050d, 0x0012), .driver_info = HCI_WRONG_SCO_MTU }, | 132 | { USB_DEVICE(0x050d, 0x0012), .driver_info = HCI_WRONG_SCO_MTU }, |
133 | { USB_DEVICE(0x050d, 0x0013), .driver_info = HCI_WRONG_SCO_MTU }, | ||
127 | 134 | ||
128 | /* Digianswer devices */ | 135 | /* Digianswer devices */ |
129 | { USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER }, | 136 | { USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER }, |
@@ -990,8 +997,10 @@ static int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id | |||
990 | if (reset || id->driver_info & HCI_RESET) | 997 | if (reset || id->driver_info & HCI_RESET) |
991 | set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks); | 998 | set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks); |
992 | 999 | ||
993 | if (id->driver_info & HCI_WRONG_SCO_MTU) | 1000 | if (force_scofix || id->driver_info & HCI_WRONG_SCO_MTU) { |
994 | set_bit(HCI_QUIRK_FIXUP_BUFFER_SIZE, &hdev->quirks); | 1001 | if (!disable_scofix) |
1002 | set_bit(HCI_QUIRK_FIXUP_BUFFER_SIZE, &hdev->quirks); | ||
1003 | } | ||
995 | 1004 | ||
996 | if (id->driver_info & HCI_SNIFFER) { | 1005 | if (id->driver_info & HCI_SNIFFER) { |
997 | if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x997) | 1006 | if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x997) |
@@ -1161,6 +1170,12 @@ MODULE_PARM_DESC(ignore_csr, "Ignore devices with id 0a12:0001"); | |||
1161 | module_param(ignore_sniffer, bool, 0644); | 1170 | module_param(ignore_sniffer, bool, 0644); |
1162 | MODULE_PARM_DESC(ignore_sniffer, "Ignore devices with id 0a12:0002"); | 1171 | MODULE_PARM_DESC(ignore_sniffer, "Ignore devices with id 0a12:0002"); |
1163 | 1172 | ||
1173 | module_param(disable_scofix, bool, 0644); | ||
1174 | MODULE_PARM_DESC(disable_scofix, "Disable fixup of wrong SCO buffer size"); | ||
1175 | |||
1176 | module_param(force_scofix, bool, 0644); | ||
1177 | MODULE_PARM_DESC(force_scofix, "Force fixup of wrong SCO buffers size"); | ||
1178 | |||
1164 | module_param(reset, bool, 0644); | 1179 | module_param(reset, bool, 0644); |
1165 | MODULE_PARM_DESC(reset, "Send HCI reset command on initialization"); | 1180 | MODULE_PARM_DESC(reset, "Send HCI reset command on initialization"); |
1166 | 1181 | ||