<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:78723933;
        mso-list-type:hybrid;
        mso-list-template-ids:-135775916 -87527486 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;}
@list l0:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">All,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Summary:<o:p></o:p></b></p>
<p class="MsoNormal">I found a bug in the ProcessIo step for copying the PRP list. From the SNTI code, the variable numberOfPrpEntries in the SRB Extension was built as the total number of PRPs for the NVMe command. However, the code to copy over the PRP list
 uses this variable unaltered. This creates a bug where one too many PRP entries are copied. This bug hasn’t surfaced yet because creating an NVMe command with the maximum number of PRP entries in the list hasn’t been tested yet.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">See NVMe_PRP_fix.zip for source. Password: NVMe1234<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Changes:<o:p></o:p></b></p>
<p class="MsoNormal">nvmeStd.h :<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">       
</span></span><![endif]>The numberofPrpEntries variable in the SRB Extension is updated with a comment that clarifies that it holds the total number of PRPs, not just the PRP entries in the list<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">nvmeIo.c:<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">       
</span></span><![endif]>Instead of checking for a valid entry 0 in the list, the number of entries is checked<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">       
</span></span><![endif]>The amount of memory to copy is decreased by the size of 1 entry to account for the PRP that is in PRP1 of the command.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Code Sample:<o:p></o:p></b></p>
<p class="MsoNormal" style="text-autospace:none"><u><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">nvmeStd.h<o:p></o:p></span></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white">/* Temp PRP List */</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">UINT64                       prpList[MAX_TX_SIZE / PAGE_SIZE];<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:green;background:yellow;mso-highlight:yellow">/* Keep track of the total number of PRPs */</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">UINT32                       numberOfPrpEntries;</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="color:#1F497D">nvmeIo.c</span></u><u><span style="color:#1F497D"><o:p></o:p></span></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">if</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 (</span><span style="font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white">pSrbExtension</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:yellow;mso-highlight:yellow">numberOfPrpEntries
 > 2</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">    pNvmeCmd->PRP2 = pCmdInfo->prpListPhyAddr.QuadPart;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-size:9.5pt;color:#1F497D;background:yellow;mso-highlight:yellow">   /* Copy the PRP list pointed to by PRP2….
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-size:9.5pt;color:#1F497D;background:yellow;mso-highlight:yellow">    * Size of the copy is total num of PRPs -1 because
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-size:9.5pt;color:#1F497D;background:yellow;mso-highlight:yellow">    * PRP1 is not in the PRP list pointed to by PRP2<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-size:9.5pt;color:#1F497D;background:yellow;mso-highlight:yellow">    */<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">StorPortMoveMemory</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">((</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PVOID</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)pCmdInfo->pPRPList,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">                       (</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PVOID</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)&</span><span style="font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white">pSrbExtension</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">->prpList[0],<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">                       (</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:yellow;mso-highlight:yellow">(</span><span style="font-size:9.5pt;font-family:Consolas;color:gray;background:yellow;mso-highlight:yellow">pSrbExtension</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:yellow;mso-highlight:yellow">->numberOfPrpEntries
 - 1)</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> * </span>
<span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">sizeof</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">UINT64</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)));<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">}</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Testing (Logs attached):<o:p></o:p></b></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">       
</span></span><![endif]>IOMeter: PASS – See result.csv<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">       
</span></span><![endif]>PCMark7: PASS – See NVMe.pcmark-7-result<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">       
</span></span><![endif]>SCSI Compliance 2.0: 77 PASS, 36 WARN, 2 FAIL – See scsi_comp.txt<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">       
</span></span><![endif]>SD Stress: PASS – See SDSTRESS.LOG<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Kris Murray</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
</div>
</body>
</html>