On 9/15/23 00:19, Jeuk Kim wrote:
First, ufs-lu has a feature called "unit descriptor". This feature shows the status of the ufs-lu

and only works with UFS-specific "query request" commands, not SCSI commands.

This looks like something that can be implemented in the UFS subsystem.

UFS also has something called a well-known lu. Unlike typical SCSI devices, where each lu is independent,
UFS can control other lu's through the well-known lu.

This can also be implemented in UfsBus.

Finally, UFS-LU will have features that SCSI-HD does not have, such as the zone block command.

These should be implemented in scsi-hd as well.

In addition to this, I wanted some scsi commands to behave differently from scsi-hd, for example,
the Inquiry command should read "QEMU UFS" instead of "QEMU HARDDISK",
and the mode_sense_page command should have a different result.

Some of these don't have much justification, and others (such as the control page) could be done in scsi-hd as well.

We should look into cleaning this up and making ufs-lu share a lot more code with scsi-hd; possibly even supporting -device scsi-hd with UFS devices. I am not going to ask you for a revert, but if this is not done before 8.2 is out, I will ask you to disable it by default in hw/ufs/Kconfig.

In the future, please Cc the SCSI maintainers for UFS patches.

Paolo


Reply via email to