[nvmewin] SCSI Translation Issues

Chang, Alex Alex.Chang at idt.com
Mon Mar 4 17:03:26 PST 2013


Hi all,

After reviewing the translation codes from SCSI to NVMe more carefully, it seems there are some potential issues we might want to address sooner than later:
1. We don't handle buffer over/under run cases for read/write commands. For example, when the number of LBAs coded in CDB requires larger buffer size than indicated in DataTransferLength of SRB, the driver needs to return Check Condition and proper status. In under-run case, driver needs to mark down the actual transfer size in DataTransferLength before completing the request back to Storport.
2. How do we handle the case when the number of LBAs coded in CDB is zero? I think the number of LBAs for read/write commands is 0's based defined in NVMe specification. Is it a valid case?
3. For Read6/Write6, there is only one byte (byte 4) in CDB to indicate the transfer length. When the value of byte 4 is zero, it indicates the number of LBAs to transfer is 256. In that case, what driver does is subtracting 1 from 0 and assigning 0xFFFF to DW12. Apparently, it's a known bug.

I can fix the potential issues mentioned above. However, I need you inputs regarding how we are going to handle #2.

Thanks,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20130305/369fcb77/attachment.html>


More information about the nvmewin mailing list