Re: [PATCH RFC] drivers/rufs: add Rust UFS host controller driver

From: Bart Van Assche

Date: Sat Sep 12 2026 - 20:31:37 EST


On 9/12/26 8:45 AM, Andreas Hindborg wrote:
If we expected this new driver to be a strict subset of ufshcd, we would
not build it. The reason to do it is the features that do not fit the
scsi midlayer.

That's a super vague statement. What features do you want to implement
that do not fit the SCSI mid-layer? If this is about implementing non-
standard SCSI commands, REQ_OP_DRV_IN and REQ_OP_DRV_OUT should be
sufficient, isn't it? Please note that this is not an endorsement for
implementing non-standard commands in UFS devices. Non-standard storage
commands complicate filesystem development and maintenance, especially
if which commands are supported depends on both the manufacturer of the
storage device and the device model.

Here is what I count the midlayer doing for UFS today: sense to
retry/errno disposition (scsi_decide_disposition, scsi_check_sense,
sd_done), the abort to LU reset to host reset escalation in scsi_eh with
ufshcd supplying the handlers, the sd device model (capacity, write
cache, UNMAP, runtime PM), and the SG_IO ioctl plus the scsi_device
sysfs tree.
Logical unit scanning, DMA support, /dev/sg* support, /dev/bsg support,
timeout handling, pausing I/O while error handling is ongoing and zoned
storage support is missing from the above list.

Thanks,

Bart.