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