Hi Oliver/Johan On Aug 30, 2011, at 10:52 AM, Oliver Neukum wrote: > Am Dienstag, 30. August 2011, 10:45:05 schrieb Johan Hedberg: >> Hi Oliver, >> >> On Tue, Aug 30, 2011, Oliver Neukum wrote: > >> I think this is a real issue, but it only happens with the HCIINQUIRY >> ioctl which bluetoothd doesn't use (but hcitool does). I think the >> problems is with the following type of additions in the patch: >> >> + if (test_bit(HCI_MGMT, &hdev->flags) && >> + test_and_clear_bit(HCI_INQUIRY, &hdev->flags)) >> + mgmt_discovering(hdev->id, 0); >> >> Because of the ordering of the if-statement the HCI_INQUIRY flags >> doesn't get cleared if HCI_MGMT is not set and so the HCIINQUIRY ioctl >> doesn't trigger inquiry even though it should (see hci_inq_req in >> net/bluetooth/hci_core.c). Can you try to flip the ordering of the >> test_bit and test_and_clear_bit calls in all relevant if-statements in >> the patch and see if it resolves your issue? > > Hi, > > this patch makes it work again. I'm working on a new version of discovery procedure support and I have the fix for this issue in that patch series (see [PATCH v2 01/16] Bluetooth: Periodic Inquiry and mgmt discovering event). Soon, I'll send the new version of discovery patches to ML. Andre-- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html