[Bluetooth] Add ignore parameters to the HCI USB driver

This patch adds the module parameters ignore_csr and ignore_sniffer
to the HCI USB driver. This allows an easier use of CSR ROM chips
that need an additional initialization routine and the Frontline
sniffers.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

+21 -3
+18 -1
drivers/bluetooth/hci_usb.c
··· 65 65 #endif 66 66 67 67 static int ignore = 0; 68 + static int ignore_csr = 0; 69 + static int ignore_sniffer = 0; 68 70 static int reset = 0; 69 71 70 72 #ifdef CONFIG_BT_HCIUSB_SCO 71 73 static int isoc = 2; 72 74 #endif 73 75 74 - #define VERSION "2.8" 76 + #define VERSION "2.9" 75 77 76 78 static struct usb_driver hci_usb_driver; 77 79 ··· 100 98 MODULE_DEVICE_TABLE (usb, bluetooth_ids); 101 99 102 100 static struct usb_device_id blacklist_ids[] = { 101 + /* CSR BlueCore devices */ 102 + { USB_DEVICE(0x0a12, 0x0001), .driver_info = HCI_CSR }, 103 + 103 104 /* Broadcom BCM2033 without firmware */ 104 105 { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE }, 105 106 ··· 841 836 if (ignore || id->driver_info & HCI_IGNORE) 842 837 return -ENODEV; 843 838 839 + if (ignore_csr && id->driver_info & HCI_CSR) 840 + return -ENODEV; 841 + 842 + if (ignore_sniffer && id->driver_info & HCI_SNIFFER) 843 + return -ENODEV; 844 + 844 845 if (intf->cur_altsetting->desc.bInterfaceNumber > 0) 845 846 return -ENODEV; 846 847 ··· 1071 1060 1072 1061 module_param(ignore, bool, 0644); 1073 1062 MODULE_PARM_DESC(ignore, "Ignore devices from the matching table"); 1063 + 1064 + module_param(ignore_csr, bool, 0644); 1065 + MODULE_PARM_DESC(ignore_csr, "Ignore devices with id 0a12:0001"); 1066 + 1067 + module_param(ignore_sniffer, bool, 0644); 1068 + MODULE_PARM_DESC(ignore_sniffer, "Ignore devices with id 0a12:0002"); 1074 1069 1075 1070 module_param(reset, bool, 0644); 1076 1071 MODULE_PARM_DESC(reset, "Send HCI reset command on initialization");
+3 -2
drivers/bluetooth/hci_usb.h
··· 31 31 #define HCI_IGNORE 0x01 32 32 #define HCI_RESET 0x02 33 33 #define HCI_DIGIANSWER 0x04 34 - #define HCI_SNIFFER 0x08 35 - #define HCI_BROKEN_ISOC 0x10 34 + #define HCI_CSR 0x08 35 + #define HCI_SNIFFER 0x10 36 36 #define HCI_BCM92035 0x20 37 + #define HCI_BROKEN_ISOC 0x40 37 38 38 39 #define HCI_MAX_IFACE_NUM 3 39 40