All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 214823] New: RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it
Date: Tue, 26 Oct 2021 09:08:36 +0000	[thread overview]
Message-ID: <bug-214823-62941@https.bugzilla.kernel.org/> (raw)

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@vger.kernel.org
          Reporter: thanhdatwarriorok@gmail.com
        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.

             reply	other threads:[~2021-10-26  9:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26  9:08 bugzilla-daemon [this message]
2021-11-06 15:29 ` [Bug 214823] RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it bugzilla-daemon
2021-11-08 16:36 ` bugzilla-daemon
2021-11-10  8:35 ` bugzilla-daemon
2022-03-07 15:31 ` bugzilla-daemon
2023-11-08  9:40 ` bugzilla-daemon

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=bug-214823-62941@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.