[nvmewin] OFA Windows NVMe driver question/ feedback

Judy Brock-SSI judy.brock at ssi.samsung.com
Tue Jan 15 07:20:26 PST 2013


Hi,

I have a question and a little feedback:

1.      Currently, SntiBuildFirmwareImageDownloadCmd () always returns without generating  valid PRPs due to the following  code (numDwords is always zero):

                #define DEBUG_CHECK
                #ifdef DEBUG_CHECK
                if ((pSgl->NumberOfElements * sizeof(STOR_SCATTER_GATHER_ELEMENT)) >=
                    (numDwords/sizeof(UINT32))) {
                    /* In this case, must fail the command or create a temp buffer... */

                    ASSERT(FALSE);
                    return;
                }
                                 #endif /* DEBUG_CHECK */

               It looks like the intention was for numDwords to have a valid value that would have allowed the function to continue as long as  a temp buffer wasn't needed but it was never set...is that the correct?

2.      SntiBuildFirmwareImageDownloadCmd () also has no return value and the caller is  assuming success , resulting in a malformed NVMe command being generated (PRP1 and PRP2 set all zeros) and sent out on behalf of SCSI write buffer. I believe this function should be changed to return SNTI_TRANSLATION_STATUS and SntiTranslateWriteBuffer() should be modified to check for success/failure rather than forging blindly ahead.

3.      Seems like a few other routines which don't have any return value should also be changed to return SNTI_TRANSLATION_STATUS value( and all functions which call these routines be modified to check for success/failure):

                VOID SntiTranslateSglToPrp()
                VOID SntiBuildFirmwareActivateCmd()
                VOID SntiBuildSecuritySendReceiveCmd()

Thanks,
Judy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20130115/989e5c72/attachment.html>


More information about the nvmewin mailing list