*
* $Id: hci_usb.c,v 1.8 2002/07/18 17:23:09 maxk Exp $
*/
-#define VERSION "2.4"
+#define VERSION "2.5"
#include <linux/config.h>
#include <linux/module.h>
static struct usb_driver hci_usb_driver;
static struct usb_device_id bluetooth_ids[] = {
- /* Broadcom BCM2033 without firmware */
- { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE },
-
- /* Digianswer device */
- { USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER },
-
/* Generic Bluetooth USB device */
{ USB_DEVICE_INFO(HCI_DEV_CLASS, HCI_DEV_SUBCLASS, HCI_DEV_PROTOCOL) },
MODULE_DEVICE_TABLE (usb, bluetooth_ids);
+static struct usb_device_id blacklist_ids[] = {
+ /* Broadcom BCM2033 without firmware */
+ { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE },
+
+ /* Broadcom BCM2035 */
+ { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET },
+
+ /* Digianswer device */
+ { USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER },
+
+ { } /* Terminating entry */
+};
+
struct _urb *_urb_alloc(int isoc, int gfp)
{
struct _urb *_urb = kmalloc(sizeof(struct _urb) +
#endif
}
BT_DBG("new packet len %d", len);
-
+
skb = bt_skb_alloc(len, GFP_ATOMIC);
if (!skb) {
BT_ERR("%s no memory for the packet", husb->hdev->name);
BT_DBG("udev %p ifnum %d", udev, ifnum);
+ if (!id->driver_info) {
+ const struct usb_device_id *match;
+ match = usb_match_id(intf, blacklist_ids);
+ if (match)
+ id = match;
+ }
+
iface = udev->actconfig->interface[0];
if (id->driver_info & HCI_IGNORE)
hdev->owner = THIS_MODULE;
+ if (id->driver_info & HCI_RESET)
+ set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks);
+
if (hci_register_dev(hdev) < 0) {
BT_ERR("Can't register HCI device");
hci_free_dev(hdev);
module_init(hci_usb_init);
module_exit(hci_usb_cleanup);
-MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
+MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("Bluetooth HCI USB driver ver " VERSION);
MODULE_LICENSE("GPL");