public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: tim@birdsnest.maths.tcd.ie
Cc: BlueZ Mailing List <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] Can only start Bluetooth once on my Sony Picturebook
Date: Mon, 10 May 2004 14:57:00 +0200	[thread overview]
Message-ID: <1084193820.4017.25.camel@pegasus> (raw)
In-Reply-To: <200405101325.18922.tim@birdsnest.maths.tcd.ie>

[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]

Hi Timothy,

> A little query which does not really matter,
> but which leaves me slightly puzzled.
> 
> I'm running linux-2.6.6-rc2 under Fedora-1
> on my Sony C1VFK Picturebook.
> This has in-built Bluetooth.
> To start this running, I say "spicctrl -l1"
> (when the blue Bluetooth light on my laptop comes on)
> followed by "service bluetooth restart".
> 
> All this works perfectly.
> But if I give the command "spicctrl -l0"
> to stop the inbuilt Bluetooth
> I am never able to restart it,
> except by re-booting.
> 
> I couldn't see from a very brief (and ignorant) look at the source
> why the sonypi_ioctl() call couldn't be reversed.
> 
> Perhaps there is some command I could give
> to restart Bluetooth, short of re-booting?

you can keep every Bluetooth daemon running even if no device is
attached. They will re-init themself if you power-up your internal
Bluetooth device. What I think that happens is that the stopping with
spicctrl is the same as a physical unplug and this causes a kernel oops.
Check if you have CONFIG_BT_HCIUSB_SCO enabled, if yes, disable for now
or apply the attached patch.

Regards

Marcel


[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 530 bytes --]

===== 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);
 

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-10 12:25 [Bluez-users] Can only start Bluetooth once on my Sony Picturebook Timothy Murphy
2004-05-10 12:57 ` Marcel Holtmann [this message]
2004-05-10 20:38   ` Timothy Murphy
2004-05-10 20:57   ` Michal Semler
2004-05-10 21:14     ` 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=1084193820.4017.25.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=bluez-users@lists.sourceforge.net \
    --cc=tim@birdsnest.maths.tcd.ie \
    /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