Emulate the UFS HID extended feature. Host interacts via five
attributes (IDN 0x35-0x39):
bDefragOperation trigger: Disable / Analysis / Defrag
dHIDAvailableSize fragmented 4KB units (published by analysis)
dHIDSize host-requested defrag target (4KB units)
bHIDProgressRatio 0-100%; reading 100 resets HID
bHIDState current state; terminal-state read resets HID
Successful user-data SCSI WRITE commands increment an internal
fragment counter; HID analysis publishes the counter through
dHIDAvailableSize. Defrag operates on min(dHIDSize,
dHIDAvailableSize), so a small dHIDSize yields a partial defrag.
bDefragOperation auto-clears on terminal state. The state machine
advances from ufs_process_idle(); transitions occur only while the
device is idle.
Signed-off-by: Keoseong Park <keosung.park@samsung.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>