пятница

[Bug 2138423] Re: [SRU] Fix the error during suspend on cs42l43

** Changed in: linux (Ubuntu Questing)
Status: In Progress => Fix Committed

--
You received this bug notification because you are subscribed to linux
in Ubuntu.
Matching subscriptions: Bgg, Bmail, Nb
https://bugs.launchpad.net/bugs/2138423

Title:
[SRU] Fix the error during suspend on cs42l43

Status in HWE Next:
In Progress
Status in linux package in Ubuntu:
Fix Released
Status in linux-oem-6.17 package in Ubuntu:
Invalid
Status in linux source package in Noble:
Won't Fix
Status in linux-oem-6.17 source package in Noble:
Fix Committed
Status in linux source package in Questing:
Fix Committed
Status in linux-oem-6.17 source package in Questing:
Invalid
Status in linux source package in Resolute:
Fix Released
Status in linux-oem-6.17 source package in Resolute:
Invalid

Bug description:
[Impact]
The system fails to read IRQ status after suspend/resume on Lenovo systems, resulting in error -16 (EBUSY) in kernel logs:

cs42l43 sdw:0:0:01fa:4243:01: Failed to read IRQ status: -16

This error occurs during system suspend/resume cycles when IRQ
handlers attempt to access volatile registers on suspended hardware.
The race condition happens because the MFD driver disables IRQs upon
entering suspend, but IRQ handlers can run, claim a PM runtime
reference, get scheduled, and then try to access registers after the
device has been force suspended.

Affected hardware: Lenovo systems with Cirrus Logic cs42l43 audio codec
Failure rate: Occurs on every suspend/resume cycle

[Fix]
This series of 6 patches fixes the IRQ handling race condition during system suspend/resume by properly coordinating IRQ masking between the MFD driver and child drivers.

The patches are upstream in mainline kernel v6.18:

1. mfd: cs42l43: Move IRQ enable/disable to encompass force suspend (62aec8a0a5b6)
- Moves IRQ disabling to cover the whole forced suspend state to avoid race conditions

2. mfd: cs42l43: Remove IRQ masking in suspend (afe0f94992db)
- Removes IRQ masking from MFD code since individual child drivers now mask their own IRQs

3. ASoC: cs42l43: Rename system suspend callback and fix debug print (638ca7601f41)
- Clarifies that the function is a system suspend callback, not runtime suspend

4. ASoC: cs42l43: Store IRQ domain in codec private data (149dda5f42a8)
- Prepares for refactoring by storing IRQ domain pointer in private data

5. ASoC: cs42l43: Disable IRQs in system suspend (a69b4ba19a07)
- Masks IRQs and syncs work queues in the codec driver during system suspend

6. ASoC: cs42l43: Shutdown jack detection on suspend (dd7ae5b8b3c2)
- Fully powers down jack detection during system suspend

Already in questing :
- mfd: cs42l43: Move IRQ enable/disable to encompass force suspend (commit 62aec8a0a5b6)

Patches:
https://lore.kernel.org/lkml/20250903094549.271068-1-ckeepax@opensource.cirrus.com/

[Test Plan]
Suspend and resume the system 30 times using the command:

$ sudo rtcwake -m mem -s 20

Without the patches:
- The error "cs42l43 sdw:0:0:01fa:4243:01: Failed to read IRQ status: -16" appears in dmesg after each resume
- Check with: $ dmesg | grep "cs42l43.*IRQ.*-16"

With the patches:
- No IRQ status read errors in dmesg
- Verify with: $ dmesg | grep "cs42l43.*IRQ.*-16" (should return no results)

[Where problems could occur]
It may break the Cirrus Logic cs42l43 audio codec driver.

The patches are merged upstream in kernel v6.18.
The hardware is not supported by noble 6.8 kernel.
So SRU for questing and oem-6.17.

To manage notifications about this bug go to:
https://bugs.launchpad.net/hwe-next/+bug/2138423/+subscriptions

Комментариев нет:

Отправить комментарий