Samsung RFC pitches Rust UFS driver that skips SCSI midlayer
Maintainers warn the design duplicates midlayer work and may struggle for UFS contributor adoption.
A Samsung engineer has proposed a Rust UFS host controller driver that sits directly on the block layer and does not use the SCSI midlayer, drawing immediate objections from storage maintainers who see the approach as code duplication.
Jaemyung Lee's RFC, posted to the rust-for-linux list, would expose UFS logical units as native blk-mq block devices in the same style as NVMe namespaces. The driver handles host controller setup, UIC link startup, power-mode configuration, descriptor discovery, query operations, and ordinary read, write, flush, and discard I/O, with both single-doorbell and multi-circular-queue transfer backends. PCI and Qualcomm platform frontends are included; full timeout recovery, error handling, and power management are left for later work. Lee argues that UFS's historical dependence on SCSI has become friction as JEDEC adds features outside the T10 command set, and he reports substantially higher random-read rates than the existing C driver on Intel UFS 2.1 hardware under multi-job io_uring tests.
Bart Van Assche disagreed with decoupling UFS from SCSI. A kernel goal, he wrote, is not to duplicate code, and bypassing the midlayer means reimplementing its queuing, error handling, and related logic. He disputed the standards rationale, saying that in JEDEC meetings he had pressed to reuse T10-standardized commands rather than let vendors invent new ones, and that novel storage command sets would force block-layer and filesystem changes without a clear warrant. He also expected the Rust choice to make the driver unpopular among current UFS contributors.
Greg Kroah-Hartman recalled an earlier USB storage driver that bypassed the SCSI midlayer as a quick fix and was later dropped because parallel logic proved unsustainable. As long as UFS builds on SCSI commands, he advised against a separate stack, however simple it first appears.
Andreas Hindborg defended the RFC, saying the SCSI-related portion is a few hundred lines of structure packing rather than a full midlayer clone, and that the intent is to replace the existing ufshci driver. He finds the Rust implementation easier to read than the C driver together with the SCSI subsystem.
Comments on the midlayer bypass and the blk-mq model remain the open questions.