Fix after-suspend-mediacard/sdhc-insert test failed

Bug #2042500 reported by koba
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
New
Undecided
Unassigned
linux (Ubuntu)
Fix Committed
Undecided
AceLan Kao
Jammy
Invalid
Undecided
AceLan Kao
Mantic
Won't Fix
Undecided
AceLan Kao
Noble
Fix Committed
Undecided
AceLan Kao
linux-oem-6.1 (Ubuntu)
Invalid
Undecided
Unassigned
Jammy
Fix Released
Undecided
koba
Mantic
Invalid
Undecided
Unassigned
Noble
Invalid
Undecided
Unassigned
linux-oem-6.5 (Ubuntu)
Invalid
Undecided
Unassigned
Jammy
Fix Released
Undecided
koba
Mantic
Invalid
Undecided
Unassigned
Noble
Invalid
Undecided
Unassigned
linux-oem-6.8 (Ubuntu)
In Progress
Undecided
AceLan Kao
Jammy
Invalid
Undecided
Unassigned
Mantic
Invalid
Undecided
Unassigned
Noble
In Progress
Undecided
AceLan Kao

Bug Description

SRU Justification for Noble

[Impact]
checkbox test case, after-suspend-mediacard/sdhc-insert, failed.

[Fix]
The new series of the fix has been merged into v6.9

6d4266675279 PCI/ASPM: Update save_state when configuration changes
64dbb2d70744 PCI/ASPM: Disable L1 before configuring L1 Substates
c198fafa0125 PCI/ASPM: Call pci_save_ltr_state() from pci_save_pcie_state()
17423360a27a PCI/ASPM: Save L1 PM Substates Capability for suspend/resume
1e11b5494c3d PCI/ASPM: Move pci_save_ltr_state() to aspm.c
f3994bba8200 PCI/ASPM: Always build aspm.c
fa84f4435a62 PCI/ASPM: Move pci_configure_ltr() to aspm.c

[Test Case]
1. suspend and resume.
2. check if the error appears in dmesg
~~~
 pcieport 0000:00:1c.0: pciehp: Slot(5): Card not present
 rtsx_pci 0000:05:00.0: Unable to change power state from D0 to D3hot, device inaccessible
 rtsx_pci 0000:05:00.0: Unable to change power state from D3cold to D0, device inaccessible
~~~

[Where the problems could occur]
Hard to evaluate, these patches change the PCI/ASPM behavior and may lead to PCI devices work abnormal.

=============================
[Impact]
checkbox test case, after-suspend-mediacard/sdhc-insert, failed.

[Fix]
Commit a7152be79b62 ("Revert "PCI/ASPM: Save L1 PM Substates Capability
for suspend/resume"") reverted saving and restoring of ASPM L1 Substates
due to a regression that caused resume from suspend to fail on certain
systems. However, we never added this capability back and this is now
causing systems fail to enter low power CPU states, drawing more power
from the battery.

The original revert mentioned that we restore L1 PM substate configuration
even though ASPM L1 may already be enabled. This is due the fact that
the pci_restore_aspm_l1ss_state() was called before pci_restore_pcie_state().

Try to enable this functionality again following PCIe r6.0.1, sec 5.5.4
more closely by:

1) Do not restore ASPM configuration in pci_restore_pcie_state() but
   do that after PCIe capability is restored in pci_restore_aspm_state()
   following PCIe r6.0, sec 5.5.4.

2) ASPM is first enabled on the upstream component and then downstream
   (this is already forced by the parent-child ordering of Linux
   Device Power Management framework).

3) Program ASPM L1 PM substate configuration before L1 enables.

4) Program ASPM L1 PM substate enables last after rest of the fields
   in the capability are programmed.

5) Add denylist that skips restoring on the ASUS and TUXEDO systems
   where these regressions happened, just in case. For the TUXEDO case
   we only skip restore if the BIOS is involved in system suspend
   (that's forcing "mem_sleep=deep" in the command line). This is to
   avoid possible power regression when the default suspend to idle is
   used, and at the same time make sure the devices continue working
   after resume when the BIOS is involved.

[Test Case]
1. suspend and resume.
2. check if the error appears in dmesg
~~~
 pcieport 0000:00:1c.0: pciehp: Slot(5): Card not present
 rtsx_pci 0000:05:00.0: Unable to change power state from D0 to D3hot, device inaccessible
 rtsx_pci 0000:05:00.0: Unable to change power state from D3cold to D0, device inaccessible
~~~

[where the issue could happen]
low, the patch works well on the reported malfunctioned ASUS platform too.

koba (kobako)
Changed in linux (Ubuntu Noble):
status: New → In Progress
assignee: nobody → koba (kobako)
Changed in linux-oem-6.1 (Ubuntu Jammy):
status: New → In Progress
assignee: nobody → koba (kobako)
Changed in linux-oem-6.5 (Ubuntu Jammy):
status: New → In Progress
assignee: nobody → koba (kobako)
tags: added: oem-priority originate-from-2035307 stella
koba (kobako)
description: updated
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-oem-6.5/6.5.0-1008.8 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-jammy-linux-oem-6.5' to 'verification-done-jammy-linux-oem-6.5'. If the problem still exists, change the tag 'verification-needed-jammy-linux-oem-6.5' to 'verification-failed-jammy-linux-oem-6.5'.

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: kernel-spammed-jammy-linux-oem-6.5-v2 verification-needed-jammy-linux-oem-6.5
Timo Aaltonen (tjaalton)
Changed in linux-oem-6.5 (Ubuntu Jammy):
status: In Progress → Fix Committed
koba (kobako)
Changed in linux (Ubuntu Mantic):
assignee: nobody → koba (kobako)
status: New → In Progress
Changed in linux (Ubuntu Jammy):
assignee: nobody → koba (kobako)
status: New → In Progress
Changed in linux-oem-6.1 (Ubuntu Mantic):
status: New → Invalid
Changed in linux-oem-6.1 (Ubuntu Noble):
status: New → Invalid
Changed in linux-oem-6.5 (Ubuntu Mantic):
status: New → Invalid
Changed in linux-oem-6.5 (Ubuntu Noble):
status: New → Invalid
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Not seeing the issue with the kernel in proposed#2.

tags: added: verification-done-jammy-linux-oem-6.5
removed: verification-needed-jammy-linux-oem-6.5
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-oem-6.5 - 6.5.0-1008.8

---------------
linux-oem-6.5 (6.5.0-1008.8) jammy; urgency=medium

  * jammy/linux-oem-6.5: 6.5.0-1008.8 -proposed tracker (LP: #2041878)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync git-ubuntu-log
    - [Packaging] resync update-dkms-versions helper

  * System hang after unplug/plug DP monitor with AMD W7500 card (LP: #2042912)
    - SAUCE: drm/amd/pm: Fix error of MACO flag setting code

  * Fix after-suspend-mediacard/sdhc-insert test failed (LP: #2042500)
    - SAUCE: PCI/ASPM: Add back L1 PM Substate save and restore

  * Keyboard and Touchpad Not Working in New Lenovo V15 Gen4 Laptop
    (LP: #2034477)
    - x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility
    - platform/x86: Add s2idle quirk for more Lenovo laptops

  * Fix RPL-U CPU C-state alway keep at C3 when system run PHM with idle screen
    on (LP: #2042385)
    - SAUCE: r8169: Add quirks to enable ASPM on Dell platforms

  * Fix system suspend problem for Cirrus CS35L41 HDA codec on HP ZBook Fury 16
    G9 (LP: #2042060)
    - ALSA: hda: cs35l41: Override the _DSD for HP Zbook Fury 17 G9 to correct
      boost type
    - ALSA: hda: cs35l41: Use reset label to get GPIO for HP Zbook Fury 17 G9
    - ALSA: hda: cs35l41: Assert reset before system suspend
    - ALSA: hda: cs35l41: Assert Reset prior to de-asserting in probe and system
      resume
    - ALSA: hda: cs35l41: Run boot process during resume callbacks
    - ALSA: hda: cs35l41: Force a software reset after hardware reset
    - ALSA: hda: cs35l41: Do not unload firmware before reset in system suspend
    - ALSA: hda: cs35l41: Check CSPL state after loading firmware
    - ASoC: cs35l41: Detect CSPL errors when sending CSPL commands

  * Miscellaneous Ubuntu changes
    - [Packaging] Add ppa2 to getabis

  [ Ubuntu: 6.5.0-13.13 ]

  * mantic/linux: 6.5.0-13.13 -proposed tracker (LP: #2042652)
  * arm64 atomic issues cause disk corruption (LP: #2042573)
    - locking/atomic: scripts: fix fallback ifdeffery

  [ Ubuntu: 6.5.0-11.11 ]

  * mantic/linux: 6.5.0-11.11 -proposed tracker (LP: #2041879)
  * CVE-2023-31085
    - ubi: Refuse attaching if mtd's erasesize is 0
  * CVE-2023-4244
    - netfilter: nft_set_rbtree: skip sync GC for new elements in this transaction
  * CVE-2023-5633
    - drm/vmwgfx: Keep a gem reference to user bos in surfaces
  * CVE-2023-5345
    - fs/smb/client: Reset password pointer to NULL
  * CVE-2023-5090
    - x86: KVM: SVM: always update the x2avic msr interception
  * Packaging resync (LP: #1786013)
    - [Packaging] update helper scripts

 -- Timo Aaltonen <email address hidden> Fri, 10 Nov 2023 13:04:39 +0200

Changed in linux-oem-6.5 (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-oem-6.1/6.1.0-1027.27 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-jammy-linux-oem-6.1' to 'verification-done-jammy-linux-oem-6.1'. If the problem still exists, change the tag 'verification-needed-jammy-linux-oem-6.1' to 'verification-failed-jammy-linux-oem-6.1'.

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: kernel-spammed-jammy-linux-oem-6.1-v2 verification-needed-jammy-linux-oem-6.1
Timo Aaltonen (tjaalton)
Changed in linux-oem-6.1 (Ubuntu Jammy):
status: In Progress → Fix Committed
AceLan Kao (acelankao)
tags: added: verification-done-jammy-linux-oem-6.1
removed: verification-needed-jammy-linux-oem-6.1
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (27.4 KiB)

This bug was fixed in the package linux-oem-6.1 - 6.1.0-1027.27

---------------
linux-oem-6.1 (6.1.0-1027.27) jammy; urgency=medium

  * jammy/linux-oem-6.1: 6.1.0-1027.27 -proposed tracker (LP: #2041604)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync git-ubuntu-log
    - [Packaging] resync update-dkms-versions helper
    - [Packaging] update variants

  * RTL8111EPP: Fix the network lost after resume with DASH (LP: #2043786)
    - r8169: add handling DASH when DASH is disabled
    - r8169: fix network lost after resume on DASH systems

  * System hang after unplug/plug DP monitor with AMD W7500 card (LP: #2042912)
    - SAUCE: drm/amd/pm: Fix error of MACO flag setting code

  * Fix after-suspend-mediacard/sdhc-insert test failed (LP: #2042500)
    - Revert "PCI/ASPM: Save L1 PM Substates Capability for suspend/resume"
    - SAUCE: PCI/ASPM: Add back L1 PM Substate save and restore

  * Jammy update: v6.1.61 upstream stable release (LP: #2042580)
    - Revert "Revert "clk: ti: Stop using legacy clkctrl names for omap4 and 5""
    - KVM: x86/pmu: Truncate counter value to allowed width on write
    - mmc: core: Align to common busy polling behaviour for mmc ioctls
    - mmc: block: ioctl: do write error check for spi
    - mmc: core: Fix error propagation for some ioctl commands
    - ASoC: codecs: wcd938x: Convert to platform remove callback returning void
    - ASoC: codecs: wcd938x: Simplify with dev_err_probe
    - ASoC: codecs: wcd938x: fix regulator leaks on probe errors
    - ASoC: codecs: wcd938x: fix runtime PM imbalance on remove
    - pinctrl: qcom: lpass-lpi: fix concurrent register updates
    - mcb: Return actual parsed size when reading chameleon table
    - mcb-lpc: Reallocate memory region to avoid memory overlapping
    - virtio_balloon: Fix endless deflation and inflation on arm64
    - virtio-mmio: fix memory leak of vm_dev
    - virtio-crypto: handle config changed by work queue
    - virtio_pci: fix the common cfg map size
    - vsock/virtio: initialize the_virtio_vsock before using VQs
    - vhost: Allow null msg.size on VHOST_IOTLB_INVALIDATE
    - arm64: dts: rockchip: Add i2s0-2ch-bus-bclk-off pins to RK3399
    - arm64: dts: rockchip: Fix i2s0 pin conflict on ROCK Pi 4 boards
    - mm: fix vm_brk_flags() to not bail out while holding lock
    - hugetlbfs: clear resv_map pointer if mmap fails
    - mm/page_alloc: correct start page when guard page debug is enabled
    - mm/migrate: fix do_pages_move for compat pointers
    - hugetlbfs: extend hugetlb_vma_lock to private VMAs
    - maple_tree: add GFP_KERNEL to allocations in mas_expected_entries()
    - nfsd: lock_rename() needs both directories to live on the same fs
    - drm/i915/pmu: Check if pmu is closed before stopping event
    - drm/amd: Disable ASPM for VI w/ all Intel systems
    - drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper()
    - ARM: OMAP: timer32K: fix all kernel-doc warnings
    - firmware/imx-dsp: Fix use_after_free in imx_dsp_setup_channels()
    - clk: ti: Fix missing omap4 mcbsp functional clock and aliases
    - clk: ti: Fix missing omap5 mcbsp functional clock and aliases
    - r8169: fix the KCSAN reporte...

Changed in linux-oem-6.1 (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Bun K Tan (bktan1) wrote :

 Please try this patch https://<email address hidden>/ from David E Box.

AceLan Kao (acelankao)
Changed in linux (Ubuntu Jammy):
assignee: koba (kobako) → AceLan Kao (acelankao)
Changed in linux (Ubuntu Mantic):
assignee: koba (kobako) → AceLan Kao (acelankao)
Changed in linux (Ubuntu Noble):
assignee: koba (kobako) → AceLan Kao (acelankao)
AceLan Kao (acelankao)
Changed in linux (Ubuntu Jammy):
status: In Progress → Invalid
Revision history for this message
AceLan Kao (acelankao) wrote :

New series of the patches https://patchwork.kernel.<email address hidden>/

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

The patch seems be accepted and will be merged to v6.9.
We'll skip this fix on Mantic as the patchset grouth and affects all PCI devices, and will try backporting it to Noble kernel.

AceLan Kao (acelankao)
Changed in linux (Ubuntu Mantic):
status: In Progress → Won't Fix
Timo Aaltonen (tjaalton)
Changed in linux-oem-6.8 (Ubuntu Jammy):
status: New → Invalid
Changed in linux-oem-6.8 (Ubuntu Mantic):
status: New → Invalid
AceLan Kao (acelankao)
Changed in linux-oem-6.8 (Ubuntu Noble):
assignee: nobody → AceLan Kao (acelankao)
status: New → In Progress
AceLan Kao (acelankao)
description: updated
AceLan Kao (acelankao)
description: updated
Changed in linux (Ubuntu Noble):
status: In Progress → Fix Committed
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.