atheros bt failed after S3

Bug #1706833 reported by AceLan Kao
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Undecided
AceLan Kao
linux (Ubuntu)
Fix Released
Undecided
AceLan Kao
Xenial
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
BT fails to load firmware after S3. On my system it's atheros' chip, but the same issue can be seen with broadcom's chip, too.
   [542.6274] WARNING: CPU: 0 PID: 20729 at /build/linux-MD8jsN/linux-4.4.0/drivers/base/firmware_class.c:1148 _request_firmware+0x7c2/0xaf0()

The root cause of this issue is request_firmware() is being called at the wrong time.

[Fix]
The fix is from this old thread[1], but the patch didn't be accepted by the maintainer.
It prevents the work queue from being re-created and calls request_firmware() immediately before usermodehelper is fully resumed. Making the workqueue freezable preserves the delay and will postpone the firmware loading time.

[Test Case]
Verified on the machine has this issue, and confirm this patch works.

[Regression Potential]
From what I can see, I think this change should be safe, and after 240 times S3 test, the system and BT functions are still working.

1. http://lists.openwall.net/netdev/2015/05/06/3

Revision history for this message
AceLan Kao (acelankao) wrote :

This is a sauce patch, for it didn't be accepted by the maintainer.

tags: added: originate-from-1704957 somerville
Revision history for this message
AceLan Kao (acelankao) wrote :

[542.6274] WARNING: CPU: 0 PID: 20729 at /build/linux-MD8jsN/linux-4.4.0/drivers/base/firmware_class.c:1148 _request_firmware+0x7c2/0xaf0()
[542.6276] CPU: 0 PID: 20729 Comm: kworker/u17:0 Tainted: G OE 4.4.0-73-generic #94-Ubuntu
[542.6277] Call Trace:
[542.6277] [<ffffffff813f8493>] dump_stack+0x63/0x90
[542.6277] [<ffffffff81081302>] warn_slowpath_common+0x82/0xc0
[542.6277] [<ffffffff8108144a>] warn_slowpath_null+0x1a/0x20
[542.6277] [<ffffffff81571812>] _request_firmware+0x7c2/0xaf0
[542.6277] [<ffffffff81571b71>] request_firmware+0x31/0x50
[542.6278] [<ffffffffc07a5805>] btusb_setup_qca+0x185/0x3a0 [btusb]
[542.6278] [<ffffffff8156906b>] ? __pm_runtime_resume+0x5b/0x70
[542.6278] [<ffffffffc07a4a49>] btusb_open+0x49/0x250 [btusb]
[542.6278] [<ffffffffc0475cc2>] hci_dev_do_open+0x82/0x580 [bluetooth]
[542.6278] [<ffffffff810ab70d>] ? ttwu_do_activate.constprop.90+0x5d/0x70
[542.6278] [<ffffffffc0477a60>] hci_power_on+0x40/0x1d0 [bluetooth]
[542.6279] [<ffffffff810ecf04>] ? lock_timer_base.isra.22+0x54/0x70
[542.6279] [<ffffffff8109a555>] process_one_work+0x165/0x480
[542.6279] [<ffffffff8109a8bb>] worker_thread+0x4b/0x4c0
[542.6279] [<ffffffff8109a870>] ? process_one_work+0x480/0x480
[542.6279] [<ffffffff810a0be8>] kthread+0xd8/0xf0
[542.6279] [<ffffffff810a0b10>] ? kthread_create_on_node+0x1e0/0x1e0
[542.6279] [<ffffffff8183bd0f>] ret_from_fork+0x3f/0x70
[542.6279] [<ffffffff810a0b10>] ? kthread_create_on_node+0x1e0/0x1e0
[542.6279] ---[ end trace 4e3ab800f10b5115 ]---
[542.6279] bluetooth hci0: firmware: qca/rampatch_usb_00000302.bin will not be loaded
[542.6279] Bluetooth: hci0: failed to request rampatch file: qca/rampatch_usb_00000302.bin (-11)

tags: added: patch
Revision history for this message
Anthony Wong (anthonywong) wrote :

Does the same issue happen on 4.13?

Changed in hwe-next:
assignee: nobody → AceLan Kao (acelankao)
status: New → Triaged
Revision history for this message
AceLan Kao (acelankao) wrote :

Upstream claims it's fixed, but we still need to verify it.

Revision history for this message
AceLan Kao (acelankao) wrote :

The testing kernel could be found here
http://people.canonical.com/~acelan/bugs/lp1706833/

Changed in linux (Ubuntu Xenial):
status: New → Fix Committed
AceLan Kao (acelankao)
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Changed in hwe-next:
status: Triaged → Fix Committed
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-xenial' to 'verification-done-xenial'. If the problem still exists, change the tag 'verification-needed-xenial' to 'verification-failed-xenial'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-xenial
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Bluetooth works great in 100 times S3 cycle. No more firmware loading issue.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (16.2 KiB)

This bug was fixed in the package linux - 4.4.0-93.116

---------------
linux (4.4.0-93.116) xenial; urgency=low

  * linux: 4.4.0-93.116 -proposed tracker (LP: #1709296)

  * Creating conntrack entry failure with kernel 4.4.0-89 (LP: #1709032)
    - Revert "Revert "netfilter: synproxy: fix conntrackd interaction""
    - netfilter: nf_ct_ext: fix possible panic after nf_ct_extend_unregister

  * CVE-2017-1000112
    - Revert "udp: consistently apply ufo or fragmentation"
    - udp: consistently apply ufo or fragmentation

  * CVE-2017-1000111
    - Revert "net-packet: fix race in packet_set_ring on PACKET_RESERVE"
    - packet: fix tp_reserve race in packet_set_ring

  * kernel BUG at [tty_ldisc_reinit] mm/slub.c! (LP: #1709126)
    - tty: Simplify tty_set_ldisc() exit handling
    - tty: Reset c_line from driver's init_termios
    - tty: Handle NULL tty->ldisc
    - tty: Move tty_ldisc_kill()
    - tty: Use 'disc' for line discipline index name
    - tty: Refactor tty_ldisc_reinit() for reuse
    - tty: Destroy ldisc instance on hangup

  * atheros bt failed after S3 (LP: #1706833)
    - SAUCE: Bluetooth: Make request workqueue freezable

  * The Precision Touchpad(PTP) button sends incorrect event code (LP: #1708372)
    - HID: multitouch: handle external buttons for Precision Touchpads

  * Set CONFIG_SATA_HIGHBANK=y on armhf (LP: #1703430)
    - [Config] CONFIG_SATA_HIGHBANK=y

  * xfs slab objects (memory) leak when xfs shutdown is called (LP: #1706132)
    - xfs: fix xfs_log_ticket leak in xfs_end_io() after fs shutdown

  * Adt tests of src:linux time out often on armhf lxc containers (LP: #1705495)
    - [Packaging] tests -- reduce rebuild test to one flavour

  * CVE-2017-7495
    - ext4: fix data exposure after a crash

  * ubuntu/rsi driver downlink wifi throughput drops to 5-6 Mbps when BT
    keyboard is connected (LP: #1706991)
    - SAUCE: Redpine: enable power save by default for coex mode
    - SAUCE: Redpine: uapsd configuration changes

  * [Hyper-V] hv_netvsc: Exclude non-TCP port numbers from vRSS hashing
    (LP: #1690174)
    - hv_netvsc: Exclude non-TCP port numbers from vRSS hashing

  * ath10k doesn't report full RSSI information (LP: #1706531)
    - ath10k: add per chain RSSI reporting

  * ideapad_laptop don't support v310-14isk (LP: #1705378)
    - platform/x86: ideapad-laptop: Add several models to no_hw_rfkill

  * [8087:0a2b] Failed to load bluetooth firmware(might affect some other Intel
    bt devices) (LP: #1705633)
    - Bluetooth: btintel: Create common Intel Version Read function
    - Bluetooth: Use switch statement for Intel hardware variants
    - Bluetooth: Replace constant hw_variant from Intel Bluetooth firmware
      filename
    - Bluetooth: hci_intel: Fix firmware file name to use hw_variant
    - Bluetooth: btintel: Add MODULE_FIRMWARE entries for iBT 3.5 controllers

  * xhci_hcd: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2
    comp_code 13 (LP: #1667750)
    - xhci: Bad Ethernet performance plugged in ASM1042A host

  * OpenPower: Some multipaths temporarily have only a single path
    (LP: #1696445)
    - scsi: ses: don't get power status of SES device slot on probe

  ...

Changed in linux (Ubuntu Xenial):
status: Fix Committed → Fix Released
AceLan Kao (acelankao)
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Changed in hwe-next:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.