linux/drivers/ufs/core
Bart Van Assche 54c814c8b2 scsi: ufs: core: Start the RTC update work later
The RTC update work involves runtime resuming the UFS controller. Hence,
only start the RTC update work after runtime power management in the UFS
driver has been fully initialized. This patch fixes the following kernel
crash:

Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
Workqueue: events ufshcd_rtc_work
Call trace:
 _raw_spin_lock_irqsave+0x34/0x8c (P)
 pm_runtime_get_if_active+0x24/0x9c (L)
 pm_runtime_get_if_active+0x24/0x9c
 ufshcd_rtc_work+0x138/0x1b4
 process_one_work+0x148/0x288
 worker_thread+0x2cc/0x3d4
 kthread+0x110/0x114
 ret_from_fork+0x10/0x20

Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
Closes: https://lore.kernel.org/linux-scsi/0c0bc528-fdc2-4106-bc99-f23ae377f6f5@linaro.org/
Fixes: 6bf999e0eb ("scsi: ufs: core: Add UFS RTC support")
Cc: Bean Huo <beanhuo@micron.com>
Cc: stable@vger.kernel.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20241031212632.2799127-1-bvanassche@acm.org
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-11-04 20:56:59 -05:00
..
Kconfig scsi: ufs: core: Remove HPB support 2023-07-23 16:40:39 -04:00
Makefile scsi: ufs: core: Remove HPB support 2023-07-23 16:40:39 -04:00
ufs_bsg.c scsi: bsg: Pass queue_limits to bsg_setup_queue() 2024-04-11 21:37:48 -04:00
ufs_bsg.h
ufs_trace.h scsi: ufs: Move UFS trace events to private header 2024-08-22 20:54:46 -04:00
ufs-debugfs.c
ufs-debugfs.h
ufs-fault-injection.c fault-inject: improve build for CONFIG_FAULT_INJECTION=n 2024-09-01 20:43:33 -07:00
ufs-fault-injection.h scsi: ufs: core: Make fault injection dynamically configurable per HBA 2023-11-24 19:23:35 -05:00
ufs-hwmon.c scsi: ufs: Rename a function argument 2023-07-31 15:17:50 -04:00
ufs-mcq.c scsi: ufs: core: Fix the issue of ICU failure 2024-10-15 22:07:31 -04:00
ufs-sysfs.c scsi: ufs: Add HCI capabilities sysfs group 2024-08-12 22:11:24 -04:00
ufs-sysfs.h
ufshcd-crypto.c scsi: ufs: core: Add UFSHCD_QUIRK_BROKEN_CRYPTO_ENABLE 2024-07-10 22:32:30 -04:00
ufshcd-crypto.h scsi: ufs: core: Add UFSHCD_QUIRK_KEYS_IN_PRDT 2024-07-10 22:32:30 -04:00
ufshcd-priv.h scsi: ufs: core: Fix deadlock during RTC update 2024-07-15 22:57:16 -04:00
ufshcd.c scsi: ufs: core: Start the RTC update work later 2024-11-04 20:56:59 -05:00