[Bug 214823] New: RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=214823

            Bug ID: 214823
           Summary: RTL8821CE Bluetooth adapter randomly stopped working,
                    only suspend then resume can reset it
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.14.14
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: high
          Priority: P1
         Component: Bluetooth
          Assignee: linux-bluetooth@xxxxxxxxxxxxxxx
          Reporter: thanhdatwarriorok@xxxxxxxxx
        Regression: No

Tried to downgrade rtl8821c version, bluetooth adapter still randomly stop
working

The only fix I found was to suspend then resume, restarting doesn't help

~ > sudo dmesg | grep 'Bluetooth: hci'
[sudo] password for nellowly:
[   32.269597] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c
lmp_ver=08 lmp_subver=8821
[   32.272590] Bluetooth: hci0: RTL: rom_version status=0 version=1
[   32.272595] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_fw.bin
[   32.272611] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_config.bin
[   32.272626] Bluetooth: hci0: RTL: cfg_sz 10, total sz 21678
[   32.858653] Bluetooth: hci0: RTL: fw version 0x826ca99e
[11324.989363] Bluetooth: hci0: command 0x2005 tx timeout
[11327.038375] Bluetooth: hci0: command 0x200b tx timeout
[11329.085367] Bluetooth: hci0: command 0x200c tx timeout
[11331.133356] Bluetooth: hci0: command 0x0401 tx timeout
[11337.968450] Bluetooth: hci0: link tx timeout
[11337.968455] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11340.030351] Bluetooth: hci0: command 0x041f tx timeout
[11340.030362] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11342.078353] Bluetooth: hci0: command 0x0406 tx timeout
[11342.078362] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11348.001581] Bluetooth: hci0: link tx timeout
[11348.001591] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11348.003695] Bluetooth: hci0: link tx timeout
[11348.003703] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11348.004799] Bluetooth: hci0: link tx timeout
[11348.004807] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11348.017537] Bluetooth: hci0: link tx timeout
[11348.017545] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11349.001714] Bluetooth: hci0: link tx timeout
[11349.001719] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11350.077371] Bluetooth: hci0: command 0x0c24 tx timeout
[11350.077383] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11352.125366] Bluetooth: hci0: command 0x0c52 tx timeout
[11352.125371] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11354.173357] Bluetooth: hci0: command 0x0405 tx timeout
[11354.173365] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11356.221372] Bluetooth: hci0: command 0x0408 tx timeout
[11356.221377] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11370.557366] Bluetooth: hci0: link tx timeout
[11370.557376] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11372.605355] Bluetooth: hci0: command 0x0408 tx timeout
[11372.605359] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[12701.885371] Bluetooth: hci0: Timed out waiting for suspend events
[12701.885380] Bluetooth: hci0: Suspend timeout bit: 6
[12701.885388] Bluetooth: hci0: command 0x0408 tx timeout
[12701.885394] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[12701.885406] Bluetooth: hci0: Suspend notifier action (3) failed: -110

I am not familiar with kernel's source but there is this part I found that
seems revelant for at least a work around (can fast reset bluetooth adapter
when it stops working). I just don't know how to patch kernel so...

drivers/bluetooth/hci_h5.c

/* Suspend/resume support. On many devices the RTL BT device loses power during
 * suspend/resume, causing it to lose its firmware and all state. So we simply
 * turn it off on suspend and reprobe on resume.  This mirrors how RTL devices
 * are handled in the USB driver, where the USB_QUIRK_RESET_RESUME is used
which
 * also causes a reprobe on resume.
 */
static int h5_btrtl_suspend(struct h5 *h5)
{
    serdev_device_set_flow_control(h5->hu->serdev, false);
    gpiod_set_value_cansleep(h5->device_wake_gpio, 0);
    gpiod_set_value_cansleep(h5->enable_gpio, 0);
    return 0;
}

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux