HomeFreeBSD

ufshci: revisit controller reset path and add I/O timeout handling

Description

ufshci: revisit controller reset path and add I/O timeout handling

This patch revisits the controller reset path and introduces timeout
handling for I/O commands.

To support controller reset during driver operation, the controller’s
construct, destruct, enable, and disable functions are clearly
separated in ufshci_ctrlr.c. ufshci_ctrlr_hw_reset() function is
added to leverage enable/disable.

After initialization, ufshci_ctrlr_reset_task() is also introduced to
ensure controller resets are performed via the task queue.

Timeout handling is designed in five steps. This patch implements
Step 1 and Step 5, while the remaining steps will be added later.
The timeout mechanism follows the same shared timeout model used in
the NVMe driver.

Test: Intentionally delayed UPIU I/O in QEMU to trigger a timeout and
verify timeout handling.

Sponsored by: Samsung Electronics
Reviewed by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D52440

Details

Provenance
jaeyoonAuthored on Sep 18 2025, 2:37 PM
Reviewer
imp
Differential Revision
D52440: ufshci: revisit controller reset path and add I/O timeout handling
Parents
rG380e4a8233c8: committers-src: add myself (jaeyoon@)
Branches
Unknown
Tags
Unknown