<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 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 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.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
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.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Times New Roman","serif";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></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"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";color:#1F497D">I’m reviewing this case you’ve brought up Alex.  I’ll send out a note in the next day or two.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";color:#1F497D">Ray<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> nvmewin-bounces@lists.openfabrics.org [mailto:nvmewin-bounces@lists.openfabrics.org]
<b>On Behalf Of </b>Luse, Paul E<br>
<b>Sent:</b> Tuesday, April 17, 2012 10:16 AM<br>
<b>To:</b> Chang, Alex; nvmewin@lists.openfabrics.org<br>
<b>Subject:</b> [nvmewin] potential issue with SntiTranslateSglToPrp<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">OK, thanks.  I’ll digest this a bit later, or maybe Ray will.  For now though I changed the subject line as your observation has nothing to do with the patch I have out for review. 
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">Thx<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">Paul<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Chang, Alex
<a href="mailto:[mailto:Alex.Chang@idt.com]">[mailto:Alex.Chang@idt.com]</a> <br>
<b>Sent:</b> Monday, April 16, 2012 5:09 PM<br>
<b>To:</b> Chang, Alex; Luse, Paul E; <a href="mailto:nvmewin@lists.openfabrics.org">
nvmewin@lists.openfabrics.org</a><br>
<b>Subject:</b> RE: [nvmewin] ***UNCHECKED*** NEW patch for review based on some recent HW bring up work<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">My typo the size of rest of the page should be
</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:red">0x600</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue"> instead of 0xa00.</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">
<hr size="3" width="100%" align="center">
</span></div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a href="mailto:nvmewin-bounces@lists.openfabrics.org">nvmewin-bounces@lists.openfabrics.org</a>
<a href="mailto:[mailto:nvmewin-bounces@lists.openfabrics.org]">[mailto:nvmewin-bounces@lists.openfabrics.org]</a>
<b>On Behalf Of </b>Chang, Alex<br>
<b>Sent:</b> Monday, April 16, 2012 5:03 PM<br>
<b>To:</b> Luse, Paul E; <a href="mailto:nvmewin@lists.openfabrics.org">nvmewin@lists.openfabrics.org</a><br>
<b>Subject:</b> Re: [nvmewin] ***UNCHECKED*** NEW patch for review based on some recent HW bring up work</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">Hi Paul,</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">I believe there is an error in SntiTranslateSglToPrp routine and it can be easily reproduced in non-quick drive format if the driver reports the size of LBA is 4096
 bytes. The failing request I've seen is :</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">1. Reading LBA0 for one LBA.</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">2. Only one SG element included.</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">3. The starting physical address is not page-aligned, i.e., 0x1`12345600</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">In SntiTranslateSglToPrp, numImplicitEntries is assigned as 1 (Line 4238). After entering 2nd for loop (Line 4248), pSrbExt->numberofPrpEntries becomes 1 (Line 4253),
 which causes pPrp1 is programmed as localPrpEntry (Line 4256) and then jumps out of the for loop without programming pPrp2. However, pPrp2 should be programmed as 0x1`12346000 to transfer the rest of the page (0xa00 bytes).</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">I am not sure why it works for us for such a long period. May be the different sizes of LBA, and 4096 is simply much easier to replicate the problem.</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">Thanks,<br>
Alex</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">
<hr size="3" width="100%" align="center">
</span></div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a href="mailto:nvmewin-bounces@lists.openfabrics.org">nvmewin-bounces@lists.openfabrics.org</a>
<a href="mailto:[mailto:nvmewin-bounces@lists.openfabrics.org]">[mailto:nvmewin-bounces@lists.openfabrics.org]</a>
<b>On Behalf Of </b>Luse, Paul E<br>
<b>Sent:</b> Monday, April 16, 2012 10:04 AM<br>
<b>To:</b> <a href="mailto:nvmewin@lists.openfabrics.org">nvmewin@lists.openfabrics.org</a><br>
<b>Subject:</b> [nvmewin] ***UNCHECKED*** NEW patch for review based on some recent HW bring up work</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">There’s only a few changes here that need to be reviewed, mostly this is Chatham specific and, again, the only reason we’re allowing these HW specific changes in the driver is because its currently the only
 HW vehicle available to Msft and to UNH who is working on some test suites.  We have an updated version of Chatham which required a few changes but also identified a few issues in the driver that I think are critical enough that I wanted to get them in before
 we build the release:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">We weren’t handling the CC register correctly in a few places.  Details are below, but this one is critical for new HW. 
<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">We were exposing LBA ranges that are identified by the controller as hidden<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">We weren’t correctly handing the report_luns command for multiple luns<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">We weren’t correctly checking status on init state machine completion handlers<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">As usual, pw is ofanvme123 and the faster folks can check this out the faster we can build our first release
</span><span style="font-size:10.0pt;font-family:Wingdings">J</span><span style="font-size:10.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Thx<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Paul<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Sources:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">New switch for chatham2, removed inclusion of chatham switch by default<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Nvmestd.h<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">Chatham stuff<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">Moved some NVME register defines to nvmereg.h<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">For DBG mode, changed the timeout state machine to something more reasonable (first it was too short, then too long)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Nvmestd.c<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">Chatham stuff<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">Added readback of CC before we write it again (to toggle EN for initial reset).  Without this some HW will surely fail to init correctly<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Nvmestat.c<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">Chatham stuff<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Nvmesnti.ch<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">Chatham stuff<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Nvmesnti.c<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">Changes to honor the ExposeNamespace field we learn from LBA ranges.  Previously we were not hiding namespaces that were supposed to be hidden<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">Fixes to SntiTranslateReportLuns() for multiple LUNs we were incorrectly failing the call when the allocated buffer was too small, the correct handling is to fill out what we can and return the size we needed in the response
 and we’ll get  second call with the correctly sized buffer.  Tested, of course, and it works as expected<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">Chatham stuff<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Nvmereg.h<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">Moved reg defines to here from the other .h file mentioned above<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Nveinit.c<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">In NVMeResetAdapter() we were clobbering the CC register, changed so we correctly read it, clear EN, and write it<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">In NVMeEnableAdapter() we were not fully setting up CC, added additional fields and deifnes<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">in</span> <span style="font-size:10.0pt">NVMeSetFeaturesCompletion(), I mentioned this before I think, I updated LBA range completion handler to assume that an all zero response means that we should expose it, also added
 a check for what we should be looking for to see if >1 ns is available, the NLB field.  Qemu I think is wrong with its LBA range response right now, once its fixed I’ll update this to remove the zero check<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">chatham stuff<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:10.0pt">-</span><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">        
</span><span style="font-size:10.0pt">in NVMeInitCallback() added checks for status code type as well as status code, just the status code is not sufficient in all cases to determine success or not<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">____________________________________</span><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Paul Luse<br>
Sr. Staff Engineer<br>
PCG Server Software Engineering <br>
Desk: 480.554.3688, Mobile: 480.334.4630</span><span style="font-size:12.0pt;font-family:"Arial","sans-serif""><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>