Re: [PATCH] hci-usb bugfix

From: Marcel Holtmann
Date: Wed May 12 2004 - 08:17:57 EST

Hi Alan,

> Oliver was right about not using interfaces after they have been released.
> I think the best approach will be for the hci_usb_disconnect() routine to
> release both interfaces when it is called. Something like this:
> In hci_usb.h, add to struct hci_usb:
> struct usb_interface *acl_iface;
> In hci_usb_probe, add near the end:
> husb->acl_iface = intf;
> In hci_usb_disconnect, add:
> /* Always release both interfaces whenever we must release either */
> if (intf == husb->isoc_iface)
> usb_driver_release_interface(&hci_usb_driver,
> husb->acl_iface);
> else if (husb->isoc_iface)
> usb_driver_release_interface(&hci_usb_driver,
> husb->isoc_iface);
> It's not necessary to set the interface private pointers back to NULL,
> since the USB core will do that for you when the interface is released.

actually I was thinking about setting a flag that no more ISOC URB's are
submitted, because the device will still work if the second interface is
disconnected. The ISOC interface is only needed if an SCO link is opened
which would never happen when the Bluetooth chip is configured to route
the SCO traffic over an external PCM interface. Let me think a little
bit about the best way.



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at