Commit 130a7545 authored by Marcel Holtmann's avatar Marcel Holtmann

[Bluetooth] Add quirk for broken RTX Telecom based dongles

Some RTX Telecom based USB dongles offer SCO support, but their
implementation is broken. This patch disables the use of the ISOC
interface for these devices.
parent 8b553217
......@@ -29,9 +29,7 @@
* Copyright (c) 2000 Greg Kroah-Hartman <greg@kroah.com>
* Copyright (c) 2000 Mark Douglas Corner <mcorner@umich.edu>
*
* $Id: hci_usb.c,v 1.8 2002/07/18 17:23:09 maxk Exp $
*/
#define VERSION "2.5"
#include <linux/config.h>
#include <linux/module.h>
......@@ -57,9 +55,9 @@
#ifndef CONFIG_BT_HCIUSB_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#define BT_DBG(D...)
#undef BT_DMP
#define BT_DMP( A... )
#define BT_DMP(D...)
#endif
#ifndef CONFIG_BT_HCIUSB_ZERO_PACKET
......@@ -67,6 +65,8 @@
#define URB_ZERO_PACKET 0
#endif
#define VERSION "2.6"
static struct usb_driver hci_usb_driver;
static struct usb_device_id bluetooth_ids[] = {
......@@ -100,6 +100,9 @@ static struct usb_device_id blacklist_ids[] = {
/* Digianswer device */
{ USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER },
/* RTX Telecom based adapter with buggy SCO support */
{ USB_DEVICE(0x0400, 0x0807), .driver_info = HCI_BROKEN_ISOC },
{ } /* Terminating entry */
};
......@@ -821,7 +824,6 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
return -ENODEV;
/* Find endpoints that we need */
uif = intf->cur_altsetting;
for (e = 0; e < uif->desc.bNumEndpoints; e++) {
ep = &uif->endpoint[e];
......@@ -864,14 +866,15 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
husb->ctrl_req = HCI_CTRL_REQ;
/* Find isochronous endpoints that we can use */
size = 0;
isoc_iface = NULL;
isoc_alts = 0;
isoc_ifnum = 1;
#ifdef CONFIG_BT_HCIUSB_SCO
if (!(id->driver_info & HCI_BROKEN_ISOC))
isoc_iface = usb_ifnum_to_if(udev, isoc_ifnum);
if (isoc_iface) {
int a;
struct usb_host_endpoint *isoc_out_ep = NULL;
......
......@@ -23,12 +23,6 @@
SOFTWARE IS DISCLAIMED.
*/
/*
* $Id: hci_usb.h,v 1.2 2002/03/18 19:10:04 maxk Exp $
*/
#ifdef __KERNEL__
/* Class, SubClass, and Protocol codes that describe a Bluetooth device */
#define HCI_DEV_CLASS 0xe0 /* Wireless class */
#define HCI_DEV_SUBCLASS 0x01 /* RF subclass */
......@@ -40,6 +34,7 @@
#define HCI_IGNORE 0x01
#define HCI_RESET 0x02
#define HCI_DIGIANSWER 0x04
#define HCI_BROKEN_ISOC 0x08
#define HCI_MAX_IFACE_NUM 3
......@@ -106,12 +101,6 @@ static inline void _urb_unlink(struct _urb *_urb)
struct _urb *_urb_dequeue(struct _urb_queue *q);
#ifndef container_of
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#endif
struct hci_usb {
struct hci_dev *hdev;
......@@ -130,17 +119,15 @@ struct hci_usb {
__u8 ctrl_req;
struct sk_buff_head transmit_q[4];
struct sk_buff *reassembly[4]; // Reassembly buffers
struct sk_buff *reassembly[4]; /* Reassembly buffers */
rwlock_t completion_lock;
atomic_t pending_tx[4]; // Number of pending requests
struct _urb_queue pending_q[4]; // Pending requests
struct _urb_queue completed_q[4]; // Completed requests
atomic_t pending_tx[4]; /* Number of pending requests */
struct _urb_queue pending_q[4]; /* Pending requests */
struct _urb_queue completed_q[4]; /* Completed requests */
};
/* States */
#define HCI_USB_TX_PROCESS 1
#define HCI_USB_TX_WAKEUP 2
#endif /* __KERNEL__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment