Thread (18 messages) 18 messages, 3 authors, 2013-10-01

RE: [PATCH v5 1/2] Bluetooth: btmrvl: add setup handler

From: Bing Zhao <hidden>
Date: 2013-09-25 23:23:35
Also in: linux-bluetooth
Subsystem: bluetooth subsystem, the rest · Maintainers: Marcel Holtmann, Luiz Augusto von Dentz, Linus Torvalds

Hi Johan,
You're right that we're missing the clearing of the HCI_SETUP flag for
such a scenario. Could you try the attached patch. It should fix the
We have tested your patch. Yes, it fixes the problem. Thanks!
issue. One problem that it does have is that if the HCIDEVUP ioctl path
goes through before hci_power_on gets called we will never notify mgmt
of the adapter. However, that might be acceptable here since if you're
using HCIDEVUP like this it seems it's not a mgmt based system anyway.
Do you think the following change helps?
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 3d9f02b..24814b0 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1665,7 +1665,7 @@ static void hci_power_on(struct work_struct *work)
 	BT_DBG("%s", hdev->name);
 
 	err = hci_dev_open(hdev->id);
-	if (err < 0) {
+	if (err < 0 && err != -EALREADY) {
 		mgmt_set_powered_failed(hdev, err);
 		return;
 	}
Thanks,
Bing
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help