public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Oliver Neukum <oliver@neukum.org>,
	Sebastian Schmidt <yath@yath.eu.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hci-usb bugfix
Date: Wed, 12 May 2004 15:13:16 +0200	[thread overview]
Message-ID: <1084367596.25099.9.camel@pegasus> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0405110947150.911-100000@ida.rowland.org>

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



  reply	other threads:[~2004-05-12 13:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-09 19:47 [PATCH] hci-usb bugfix Sebastian Schmidt
2004-05-09 20:39 ` Marcel Holtmann
2004-05-10 16:13   ` Alan Stern
2004-05-10 16:19     ` Marcel Holtmann
2004-05-10 16:36       ` Oliver Neukum
2004-05-10 16:52         ` Marcel Holtmann
2004-05-10 19:15           ` Oliver Neukum
2004-05-10 19:39             ` Marcel Holtmann
2004-05-10 20:38               ` Oliver Neukum
2004-05-10 20:58                 ` Marcel Holtmann
2004-05-10 17:19       ` Alan Stern
2004-05-10 17:27         ` Marcel Holtmann
2004-05-10 17:52           ` Alan Stern
2004-05-10 18:07             ` Marcel Holtmann
2004-05-11 14:59               ` Alan Stern
2004-05-12 13:13                 ` Marcel Holtmann [this message]
2004-05-09 22:37 ` Soeren Sonnenburg
2004-05-10 10:40   ` Marcel Holtmann
2004-05-11  7:30     ` Soeren Sonnenburg
2004-05-12 13:15       ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1084367596.25099.9.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=stern@rowland.harvard.edu \
    --cc=yath@yath.eu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox