+What: /sys/bus/platform/drivers/ufshcd/*/enable_wb_buf_resize +What: /sys/bus/platform/devices/*.ufs/enable_wb_buf_resize +Date: Sept 2023 +Contact: Lu Hongfei <luhongfei@xxxxxxxx> +Description: + The host can decrease or increase the WriteBooster Buffer size by setting + this file. + + ====== ====================================== + 00h Idle (There is no resize operation) + 01h Decrease WriteBooster Buffer Size + 02h Increase WriteBooster Buffer Size + Others Reserved + ====== ====================================== + + The file is write only.
The name "enable_wb_buf_resize" seems misleading to me. "wb_buf_resize_control" is probably a better name for this attribute since this attribute can be used to increase and decrease the WB buffer size.
+ if (hba->dev_info.wspecversion < 0x410 || + !hba->dev_info.b_presrv_uspc_en) { + dev_err(dev, "The WB buf resize is not allowed!\n"); + return -EINVAL; + }
Please leave out the version number check. There probably will be UFS 4.0 devices that will implement this feature.
Thanks, Bart.