Bug 139041 - QCA Bluetooth [0cf3:e007] failed to initialize if Bluez's "[Policy] AutoEnable=true" was set
Summary: QCA Bluetooth [0cf3:e007] failed to initialize if Bluez's "[Policy] AutoEnabl...
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: linux-bluetooth@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-22 07:49 UTC by Kai-Heng Feng
Modified: 2019-03-21 09:29 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.4
Subsystem:
Regression: No
Bisected commit-id:


Attachments
usb-devices (1.92 KB, application/octet-stream)
2016-07-22 07:50 UTC, Kai-Heng Feng
Details
dmesg (69.26 KB, application/octet-stream)
2016-07-22 07:50 UTC, Kai-Heng Feng
Details
journalctl -b (128.83 KB, application/octet-stream)
2016-07-22 07:50 UTC, Kai-Heng Feng
Details

Description Kai-Heng Feng 2016-07-22 07:49:33 UTC
Currently, Ubuntu uses a udev rule, "50-bluetooth-hci-auto-poweron.rules", which uses "hciconfig hci* up" to power the device on at boot.

But that udev rule will make BT failed to pair some BLE devices [1][2].

By following Bluez's release note [3], we should use "AutoEnable=true" instead of hciconfig, and this change at least works on Intel 7260 & Intel 7265.

But it's not the case on QCA Rome [0cf3:e007], which failed to power on when Bluez tried to start adapter.

This can be solved by using hdev->setup instead of data->setup_on_usb, but looks like there are some concerns which I am not fully understand [4][5].

[1] https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1510570
[2] https://bugzilla.kernel.org/show_bug.cgi?id=104011#c5
[3] http://www.bluez.org/release-of-bluez-5-35/
[4] https://marc.info/?l=linux-bluetooth&m=142290091920257&w=2
[5] https://marc.info/?l=linux-bluetooth&m=142316166001267&w=4
Comment 1 Kai-Heng Feng 2016-07-22 07:50:02 UTC
Created attachment 224901 [details]
usb-devices
Comment 2 Kai-Heng Feng 2016-07-22 07:50:16 UTC
Created attachment 224911 [details]
dmesg
Comment 3 Kai-Heng Feng 2016-07-22 07:50:35 UTC
Created attachment 224921 [details]
journalctl -b
Comment 4 Kai-Heng Feng 2019-03-21 09:29:39 UTC
Fixed by this commit:
commit c7e163fe282f34efdf77fb09b333529de97a6a10
Author: Ethan Hsieh <ethan.hsieh@canonical.com>
Date:   Fri Oct 7 12:06:42 2016 +0800

    Bluetooth: btusb: Fix atheros firmware download error

    Move usb_autopm_get_interface() ahead of setup_on_usb() to prevent
    device from sending usb control message in usb suspend mode.

    The error message is as below:

    [   83.944103] btusb 1-2:1.1: usb_suspend_interface: status 0
    [   83.944107] btusb 1-2:1.0: usb_suspend_interface: status 0
    [   83.960132] usb 1-2: usb auto-suspend, wakeup 0
    [   83.976156] usb 1-2: usb_suspend_device: status 0
    [   83.976162] usb 1-2: usb_suspend_both: status 0
    [  298.689106] Bluetooth: hci0
    [  298.689399] Bluetooth: hci0: Failed to access otp area (-113)

    Signed-off-by: Ethan Hsieh <ethan.hsieh@canonical.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

Note You need to log in before you can comment on or make changes to this bug.