[Intel Maple Ridge] system cannot enter S3 the first time while connecting to TBT4 storage

Bug #1916467 reported by You-Sheng Yang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Fix Released
High
You-Sheng Yang
Focal
Won't Fix
Undecided
Unassigned
Hirsute
Fix Released
High
You-Sheng Yang
linux-oem-5.10 (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Released
High
You-Sheng Yang
Hirsute
Invalid
Undecided
Unassigned

Bug Description

[SRU Justification]

[Impact]

Systems with Intel Maple Ridge addon card with tbt devices attached may
fail to suspend/resume.

[Fix]

Commit 319696aa80 ("xhci: Fix repeated xhci wake after suspend due to
uncleared internal wake state") currently landed in
https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git branch
for-usb-linus.

[Test Case]

When booted from unpatched kernel, starting from oem-5.10 that has
received Intel Maple Ridge enablement fixes, XHCI port on Maple Ridge
card may wake itself unsolicitedly when performing runtime/deep suspend:

  kernel: [326] pci_pme_active:2422: xhci_hcd 0000:37:00.0: PME# disabled
  kernel: [326] __pci_set_master:4219: xhci_hcd 0000:37:00.0: enabling bus mastering
  kernel: [326] pci_save_state:1553: xhci_hcd 0000:37:00.0: saving config space at offset 0x0 (reading 0x11388086)
  ...
  kernel: [326] pci_pme_active:2422: xhci_hcd 0000:37:00.0: PME# enabled

The suspend resume process will stuck forever.

[Where problems could occur]

Tried on a few more platforms, didn't found possible regression.

========== original bug description ==========

[Reproduce Steps]
1. install TBT4 card
2. Boot into Ubuntu X68
3. suspend and wake up to confirm S3 function
3. Connect TBT storage
4. suspend
5. system cannot enter S3

[Results]
Expected Result: system enters suspend
Actual Result: 1st attempt fails, screen will be turned off but power & fan won't. system can only enter s3 afterwards

Upstream bug: https://bugzilla.kernel.org/show_bug.cgi?id=211377

CVE References

You-Sheng Yang (vicamo)
tags: added: oem-priority originate-from-1910105 somerville
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1916467

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
You-Sheng Yang (vicamo)
description: updated
Revision history for this message
Alex Hung (alexhung) wrote :

A series of thunderbolt / usb4 patches were sent (https://<email address hidden>/#r) and they are going to be in 5.12 (https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=0a25669ba8a276f34dfa41f0eeae96ee9ecb2a17)

A test kernel (https://people.canonical.com/~alexhung/LP1916467/) was built based on oem-5.10 with the followings in current mainline kernel.

4d395c5e74398f664405819330e5a298da37f655
3da88be249973f7b74e7b24ed559e6abc2fc5af4
3cd542e6e6afb6fa6c34d4094d498f42e22110f5
5ca67688256a0aeede5cba288eaef4d8e4a9e622
719e1f561afbe020ed175825a9bd25ed62ed1697
5a6a2c0f0f43676df27632d657a3f18b151a7ef8
c6da62a219d028de10f2e22e93a34c7ee2b88d03

Alternatively, it may also worthwhile to test latest mainline if the above does not work.

Revision history for this message
You-Sheng Yang (vicamo) wrote :

That has been tested with no positive result. Waiting for BIOS & firmware update currently.

Revision history for this message
You-Sheng Yang (vicamo) wrote :

Fixed firmware upgrades.

Changed in linux (Ubuntu):
status: Incomplete → Invalid
Changed in hwe-next:
status: New → Fix Released
Revision history for this message
You-Sheng Yang (vicamo) wrote :

Turns out firmware upgrades do not fix this issue but commit 319696aa8063 ("xhci: Fix repeated xhci wake after suspend due to uncleared internal wake state")[1] does.

Kernel packages built with this patch included are available in https://launchpad.net/~vicamo/+archive/ubuntu/ppa-1916467 for oem-5.10/unstable.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git/commit/?h=for-usb-linus&id=319696aa80630569a52b26d75c2056b6ba807535

Changed in hwe-next:
status: Fix Released → In Progress
Changed in linux (Ubuntu Hirsute):
status: Invalid → In Progress
Changed in linux (Ubuntu Focal):
status: New → Won't Fix
Changed in linux (Ubuntu Hirsute):
importance: Undecided → High
assignee: nobody → You-Sheng Yang (vicamo)
Changed in linux-oem-5.10 (Ubuntu Focal):
status: New → In Progress
importance: Undecided → High
assignee: nobody → You-Sheng Yang (vicamo)
Changed in linux-oem-5.10 (Ubuntu Hirsute):
status: New → Invalid
Revision history for this message
You-Sheng Yang (vicamo) wrote : Re: [Bug 1916467] Re: [Intel Maple Ridge] system cannot enter S3 the first time while connecting to TBT4 storage

Attach dmesg logs for future reference.

Revision history for this message
You-Sheng Yang (vicamo) wrote :
description: updated
You-Sheng Yang (vicamo)
tags: added: originate-from-1912438
You-Sheng Yang (vicamo)
tags: added: originate-from-1912319
tags: added: originate-from-1912556
Timo Aaltonen (tjaalton)
Changed in linux-oem-5.10 (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
You-Sheng Yang (vicamo) wrote :

In 5.10.0-1020-oem in focal-proposed now.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.11.0-13.14

---------------
linux (5.11.0-13.14) hirsute; urgency=medium

  * CVE-2020-27170
    - bpf: Prohibit alu ops for pointer types not defining ptr_limit
    - bpf, selftests: Fix up some test_verifier cases for unprivileged

  * CVE-2020-27171
    - bpf: Fix off-by-one for area size in creating mask to left

 -- Andrea Righi <email address hidden> Fri, 19 Mar 2021 16:49:32 +0100

Changed in linux (Ubuntu Hirsute):
status: In Progress → Fix Released
Timo Aaltonen (tjaalton)
Changed in linux-oem-5.10 (Ubuntu Focal):
status: Fix Committed → Fix Released
Timo Aaltonen (tjaalton)
Changed in hwe-next:
status: In Progress → 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.