]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: ufs: core: Add HID support
authorHuan Tang <tanghuan@vivo.com>
Fri, 23 May 2025 06:46:04 +0000 (14:46 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 10 Jun 2025 01:52:11 +0000 (21:52 -0400)
commitae7795a8c2582b5fb7971132753810a3f158e7b2
tree89971d5895bd59388c2a7fce3c0fc4ab37afabce
parentc6503be73fa37034fac87c1ffed9f2a82adb5441
scsi: ufs: core: Add HID support

Follow JESD220G, support HID(Host Initiated Defragmentation) through
sysfs, the relevant sysfs nodes are as follows:

1. analysis_trigger
2. defrag_trigger
3. fragmented_size
4. defrag_size
5. progress_ratio
6. state

The detailed definition of the six nodes can be found in the sysfs
documentation.

HID's execution policy is given to user-space.

Signed-off-by: Huan Tang <tanghuan@vivo.com>
Signed-off-by: Wenxing Cheng <wenxing.cheng@vivo.com>
Link: https://lore.kernel.org/r/20250523064604.800-1-tanghuan@vivo.com
Suggested-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bean Huo <huobean@gmail.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Documentation/ABI/testing/sysfs-driver-ufs
drivers/ufs/core/ufs-sysfs.c
drivers/ufs/core/ufshcd.c
include/ufs/ufs.h