lkml.org 
[lkml]   [2004]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] hci-usb bugfix
From
Date
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.

Regards

Marcel


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.066 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site