Re: [PATCH] hci-usb bugfix

From: Marcel Holtmann
Date: Mon May 10 2004 - 11:21:42 EST


Hi Alan,

> It looks like the problem is that hci_usb_disconnect() is trying to do too
> much. When called for the SCO interface it should simply return.

I came to the same conclusion, but I used the attached patch.

> Does this patch improve the situation?

Not tested ;)

Regards

Marcel

===== drivers/bluetooth/hci_usb.c 1.49 vs edited =====
--- 1.49/drivers/bluetooth/hci_usb.c Sat Apr 17 00:23:48 2004
+++ edited/drivers/bluetooth/hci_usb.c Mon May 10 12:03:05 2004
@@ -976,11 +971,13 @@
static void hci_usb_disconnect(struct usb_interface *intf)
{
struct hci_usb *husb = usb_get_intfdata(intf);
- struct hci_dev *hdev = husb->hdev;
+ struct hci_dev *hdev;

- if (!husb)
+ if (!husb || intf == husb->isoc_iface)
return;
+
usb_set_intfdata(intf, NULL);
+ hdev = husb->hdev;

BT_DBG("%s", hdev->name);