mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From 0664955bf98135d4e028132423513d648ba3a51d Mon Sep 17 00:00:00 2001
|
|
From: Weijie Gao <hackpascal@gmail.com>
|
|
Date: Thu, 4 Jan 2024 22:49:27 +0800
|
|
Subject: [PATCH] Revert "i2c: core: Run atomic i2c xfer when !preemptible"
|
|
|
|
This reverts commit 3473cf43b9068b9dfef2f545f833f33c6a544b91.
|
|
|
|
The commit breaks machine shutdown with the following error:
|
|
|
|
[ 26.679218] ------------[ cut here ]------------
|
|
[ 26.683815] No atomic I2C transfer handler for 'i2c-3'
|
|
[ 26.688932] WARNING: CPU: 5 PID: 2612 at drivers/i2c/i2c-core.h:40 init_per_zone_wmark_min+0x8fffffff009ef3f0/0x8fffffff00c50000
|
|
|
|
and will finally trigger a kernel panic.
|
|
|
|
This is fixed by revert the commit.
|
|
|
|
Signed-off-by: Weijie Gao <hackpascal@gmail.com>
|
|
---
|
|
drivers/i2c/i2c-core.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/i2c/i2c-core.h
|
|
+++ b/drivers/i2c/i2c-core.h
|
|
@@ -29,7 +29,7 @@ int i2c_dev_irq_from_resources(const str
|
|
*/
|
|
static inline bool i2c_in_atomic_xfer_mode(void)
|
|
{
|
|
- return system_state > SYSTEM_RUNNING && !preemptible();
|
|
+ return system_state > SYSTEM_RUNNING && irqs_disabled();
|
|
}
|
|
|
|
static inline int __i2c_lock_bus_helper(struct i2c_adapter *adap)
|