scsi: ufs: core: Add WB buffer resize support
authorHuan Tang <tanghuan@vivo.com>
Fri, 11 Apr 2025 09:29:24 +0000 (17:29 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 12 Apr 2025 01:38:06 +0000 (21:38 -0400)
commit500d4b742e0cc712160054413e129a568467a7de
treec0c4e4aff6a799d56e93c2572e6b075a813cf49e
parentae82eaf4aeea060bb736c3e20c0568b67c701d7d
scsi: ufs: core: Add WB buffer resize support

Follow JESD220G, support a WB buffer resize function through sysfs. The
host can obtain resize hint and resize status, and enable the resize
operation. Add three sysfs nodes:

1. wb_resize_enable

2. wb_resize_hint

3. wb_resize_status

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

Signed-off-by: Huan Tang <tanghuan@vivo.com>
Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
Link: https://lore.kernel.org/r/20250411092924.1116-1-tanghuan@vivo.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
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
include/ufs/ufshcd.h