[PATCHv2] NVMe: write_long SCSI to NVMe translation implementation
Busch, Keith
keith.busch at intel.com
Wed Mar 18 08:24:31 PDT 2015
> > + case WRITE_LONG:
> > + case SERVICE_ACTION_OUT_16:
> > + retcode = nvme_trans_write_long(ns, hdr, cmd);
> > + break;
>
> >Umm ... SAO16 can be used for more commands than just Write Long 16. You
> need to check the Service Action in addition to the opcode.
>
> I missed the part of SAO16 being used for other commands.
>
> Currently there seems to be no SCSI macro defined for SOA16 corresponding to
> WRITE_LONG_16 or other commands. Any check for the service action out
> would have to be against hard coded value of 0x11(write_long_16).
Sounds good. The translation for SERVICE_ACTION_IN_16 in nvme-scsi.c
decodes the SAI_READ_CAPACITY_16, so this isn't any different.
It's probably okay to add a define for SAO_WRITE_LONG_16 to
include/scsi/scsi.h if you don't want to make it exclusive to
nvme-scsi.
More information about the Linux-nvme
mailing list