mirror of
https://github.com/torvalds/linux.git
synced 2026-05-13 00:28:54 +02:00
According to the UFS spec, the bRefClkFreq attribute can only be written when both sub-links are in LS-MODE. However, in HS LSS mode with resetmode = HS_MODE, if the UFS device's default bRefClkFreq value differs from the host controller's dev_ref_clk_freq setting, the write operation will fail. To fix this issue, introduce ufshcd_get_op_mode() function to detect the current link operational mode. Call ufshcd_set_dev_ref_clk() only when both sub-links are in LS-MODE to ensure the attribute can be written successfully. Signed-off-by: Wang Shuaiwei <wangshuaiwei1@xiaomi.com> Link: https://patch.msgid.link/20260414033718.1459540-1-wangshuaiwei1@xiaomi.com Reviewed-by: Peter Wang <peter.wang@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> |
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| ufs_bsg.c | ||
| ufs_bsg.h | ||
| ufs_trace_types.h | ||
| ufs_trace.h | ||
| ufs-debugfs.c | ||
| ufs-debugfs.h | ||
| ufs-fault-injection.c | ||
| ufs-fault-injection.h | ||
| ufs-hwmon.c | ||
| ufs-mcq.c | ||
| ufs-rpmb.c | ||
| ufs-sysfs.c | ||
| ufs-sysfs.h | ||
| ufs-txeq.c | ||
| ufshcd-crypto.c | ||
| ufshcd-crypto.h | ||
| ufshcd-priv.h | ||
| ufshcd.c | ||