<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=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style id="mysingle_style">v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<title>Samsung Enterprise Portal mySingle</title>
<style><!--
/* Font Definitions */
@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;}
@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
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";
mso-believe-normal-left:yes;}
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
{mso-style-priority:99;
margin-top:3.75pt;
margin-right:0in;
margin-bottom:3.75pt;
margin-left:0in;
font-size:9.0pt;
font-family:"Arial","sans-serif";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:3.75pt;
margin-right:0in;
margin-bottom:3.75pt;
margin-left:0in;
font-size:9.0pt;
font-family:"Arial","sans-serif";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.apple-style-span
{mso-style-name:apple-style-span;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle24
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.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;}
--></style><![if mso 9]><style>p.MsoNormal
{margin-left:7.5pt;}
</style><![endif]><!--[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" style="margin-left:7.5pt;margin-top:7.5pt;margin-right:7.5pt;margin-bottom:7.5pt">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If you haven’t review/test the patch, please do so and provide your feedback at your earliest convenience such that Suman can revise patch.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thank you!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Alex<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-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" style="margin:0in;margin-bottom:.0001pt"><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""> SUMAN PRAKASH B [mailto:suman.p@samsung.com]
<br>
<b>Sent:</b> Monday, September 08, 2014 4:26 AM<br>
<b>To:</b> Alex Chang; nvmewin@lists.openfabrics.org<br>
<b>Cc:</b> cpgs .<br>
<b>Subject:</b> Re: RE: Samsung Patch for Random bug fixes - Resubmit<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Hi Alex,<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>Is it OK if I take these 2 observations as review comments and update the Samsung patch once I get review comments from others too?<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>Thanks,<o:p></o:p></p>
<p>Suman<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>------- <b>Original Message</b> -------<o:p></o:p></p>
<p><b>Sender</b> : Alex Chang<Alex.Chang@pmcs.com><o:p></o:p></p>
<p><b>Date</b> : Sep 06, 2014 01:53 (GMT+05:00)<o:p></o:p></p>
<p><b>Title</b> : RE: Samsung Patch for Random bug fixes - Resubmit<o:p></o:p></p>
<p> <o:p></o:p></p>
<p class="MsoNormal" style="margin:0in;margin-bottom:.0001pt"><span style="font-size:9.0pt;font-family:"Arial","sans-serif""><!--[if mso 9]-->
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Suman,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I diffed between your patch and the most current source and found the castings of PSCSI_REQUEST_BLOCK I added for StorPortGetScatterGatherList are missing in
the following lines of nvmesnti.c:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">1727,2068,5225,5285,5396,5464 and 5635.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The reason I added the casting is to fix warning level issue that we need to use W3 and treat warnings as errors. Could you please add them back and make sure
you added changes on top of the most current sources?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">In line#1083 of nvmestd.c, the casting should be “PSTOR_DEVICE_CAPABILITIES</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:red">_EX</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">”
instead of “PSTOR_DEVICE_CAPABILITIES”. Again, if you changes the warning level to W3 and treat warnings as errors, you will see the compiling error.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks,<br>
Alex <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-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;border-image: none">
<p class="MsoNormal" style="margin:0in;margin-bottom:.0001pt"><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""> SUMAN PRAKASH B [mailto:suman.p@samsung.com]
<br>
<b>Sent:</b> Friday, September 05, 2014 6:56 AM<br>
<b>To:</b> nvmewin@lists.openfabrics.org<br>
<b>Cc:</b> Alex Chang; cpgs@samsung.com<br>
<b>Subject:</b> Samsung Patch for Random bug fixes - Resubmit<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<pre>Content-Type: text/plain; charset=UTF-8<o:p></o:p></pre>
<pre>Content-Transfer-Encoding: 8bit<o:p></o:p></pre>
<pre>Date: %%SENT_DATE%%<o:p></o:p></pre>
<pre>Subject: Suspect Message Quarantined <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>WARNING: The virus scanner was unable to scan an attachment in an email message sent to you. This attachment could possibly contain viruses or other malicious programs. The attachment could not be scanned for the following reasons:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>%%DESC%%<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>The full message and the attachment have been stored in the quarantine.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>The identifier for this message is '%%QID%%'.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Access the quarantine at: <o:p></o:p></pre>
<pre>https://puremessage.pmc-sierra.bc.ca:28443/<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>For more information on PMC's Anti-Spam system:<o:p></o:p></pre>
<pre>http://pmc-intranet/wiki/index.php/Outlook:Anti-Spam_FAQ<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>IT Services<o:p></o:p></pre>
<pre>PureMessage Admin <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">Hi Everyone,</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">We have a patch for the following random bug fixes. We have merged our changes over OFA Revision 106.</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">1) Handling return value for NVMeWaitForCtrlRDY. NVMeWaitForCtrlRDY should have a return value of type BOOLEAN that can be checked to see if it was successful or not.</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">2) Handling return value for NVMeCompleteCmd. NVMeCompleteCmd should have a return value that can be checked to see if it was successful or not. Right now, wherever it’s called from the code
forges ahead regardless of whether it succeeded or failed.</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">3) Fixing the NVMeResetAdapter issues to check if CC.EN is set to 1 before setting to 0.<br>
The routine NVMeResetAdapter() sets CC.EN to 0 without ever checking to make sure that CSTS.RDY is set to ‘1’ first. This check has to be included in this routine. Since it is not, there are many paths in the driver where there is no prior check for this condition:<br>
a) NVMeInitAdminQueues -> NVMeEnableAdapter -> NVMeResetAdapter<br>
b) NVMeNormalShutdown -> NVMeResetAdapter<br>
c) NVMeAdapterControlPowerDown -> NVMeResetAdapter<br>
d) NVMeSynchronizeReset -> NVMeResetAdapter<br>
<br>
4) Memory corruption while creating inquiry response data - In SntiTranslateStandardInquiryPage(), the following line of code is accessing a field way past the end of STANDARD_INQUIRY_LENGTH (36 bytes): pStdInquiry->Reserved3[0] = RESERVED_FIELD;<br>
<br>
5) Eliminate NVMeWaitOnReady and use only NVMeWaitForCtrlRDY. There is redundancy in the new routine NVMeWaitForCtrlRDY() and the old routine NVMeWaitOnReady(). We don’t need both – we can get rid of the old routine.<br>
<br>
6) Fixed the RecoveryDpcRoutine to avoid redundant setting of CC.EN bit to 0. The code does not need to set CC.EN to ‘0’ and then wait for CSTS.RDY to become 0 because right after it does so, it calls NVMeResetAdapter which does the exact same thing.<br>
<br>
7) Write Buffer implementation correction.<br>
a. Calculation of dword10 for DOWNLOAD_SAVE_ACTIVATE and DOWNLOAD_SAVE_DEFER_ACTIVATE is modified.
<br>
b. Set the SRB Status value for NVMe command failure condition in SntiCompletionCallbackRoutine.<br>
c. Prepare the Firmware Activate Command and issue the command in case of DOWNLOAD_SAVE_ACTIVATE mode in SntiTranslateWriteBufferResponse.<br>
d. Handled the scenario of SNTI_SEQUENCE_IN_PROGRESS for Write Data Buffer command.<br>
<br>
8) Enabling Eject option in the taskbar.</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">9) StorPortGetScatterGatherList() - The second parameter pSrb is typecasted to PSCSI_REQUEST_BLOCK. But as per msdn, for Win8/8.1 kernel, it will be PSTORAGE_REQUEST_BLOCK. So it is OK to
just pass pSrb which is already either PSCSI_REQUEST_BLOCK or PSTORAGE_REQUEST_BLOCK.</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">10) SntiTranslateReadCapacity10() - When the disk capacity is more than 2TB, according to the SCSI command spec (SBC-3), READ CAPACITY (10) command should return 0xFFFF FFFF as "Returned Logical
Block Address" if lba is greater than the DWORD unit. This specification is, of course, considered in SCSI translation code. However 'minus 1' code which should not be applied in this case is executed. This makes device capacity to be 2TB (0xFFFF FFFE x 0x200
= 2047.99GB).</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">11) SntiTranslateRequestSense() - No need to separately get pSenseData for win7 and Win8. The GET_DATA_BUFFER will be defined to (SrbGetDataBuffer((PVOID)pSrb)) for Win8 and (pSrb)->DataBuffer
for win7.</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">12) SntiBuildGetLogPageCmd() - The numDwords for ERROR_INFORMATION, SMART_HEALTH_INFORMATION and FIRMWARE_SLOT_INFORMATION is corrected to be number of dwords - 1 value.</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">13) NVMeProcessPublicIoctl() - For IOCTL_SCSI_MINIPORT_READ_SMART_THRESHOLDS, the pSrbExt->nvmeSqeUnit.CDW10 value is corrected to be number of dwords - 1 value.</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">14) With OFA Revision 106 driver, the SCSI Compliance test is failing in our setup (please find attached the scsicompliance test failure log)<br>
a) MODE SELECT 6: MODE SENSE (6) Checking Caching Mode Page Length.<br>
b) MODE SELECT 10: MODE SENSE (10) Checking Caching Mode Page Length.<br>
c) ASSERTION: INQUIRY Checking Identification Descriptors in VPD page 0x83.</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">for fixing a) and b), we have to use PMODE_CACHING_PAGE for Win7 kernel and PMODE_CACHING_PAGE_EX for Win8/8.1 kernel. We have corrected this in this patch.<br>
for c), the implementation is not as per NVMe-SCSI translation specification. But even if we follow the specification, we don t get a uniqueid. So Judy has proposed to change the SCSI Name format so that we get unique id for each device. This proposal in pending
for 30 day review. Once review is complete and approved, We will include the modifications in the next Samsung patch.</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">15) Invalid return value for NVMeAdapterControl<br>
NVMeAdapterControl miniport routine - sometimes returns illegal value. WDK specifies that the driver must always return ScsiAdapterControlSuccess. However, depending on execution, the driver may currently return ScsiAdapterControlUnsuccessful for ScsiStopAdapter
and ScsiRestartAdapter control types. <br>
As per msdn – </span><a href="http://msdn.microsoft.com/en-us/library/windows/hardware/ff557365(v=vs.85).aspx"><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">http://msdn.microsoft.com/en-us/library/windows/hardware/ff557365(v=vs.85).aspx</span></a><span style="font-size:12.0pt;font-family:"Calibri","sans-serif""><br>
<br>
16) Handling StartIo deadlock when MultipleCoresToSingleQueueFlag is set.</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><strong><span style="font-size:12.0pt;font-family:"Calibri","sans-serif";color:black">Unit tests:</span></strong><span style="font-size:12.0pt;font-family:"Calibri","sans-serif";color:black"><br>
<span class="apple-style-span">Tested the following on Win7 and Windows 2012R2.</span></span><o:p></o:p></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;text-indent:-.25in;line-height:12.0pt">
<span style="font-size:12.0pt;font-family:"Calibri","sans-serif";color:black">- Executed NVMe SCSI compliance tests</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;text-indent:-.25in;line-height:12.0pt">
<span style="font-size:12.0pt;font-family:"Calibri","sans-serif";color:black">- Executed IOmeter</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;text-indent:-.25in;line-height:12.0pt">
<span style="font-size:12.0pt;font-family:"Calibri","sans-serif";color:black">- Install/Uninstall, Enable/Disable driver, FS Format/hibernation.</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;text-indent:-.25in">
<span style="font-size:12.0pt;font-family:"Calibri","sans-serif";color:black">- Hot plug</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
<p> <o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">Thanks,</span><o:p></o:p></p>
<p><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">Suman</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p> <o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellpadding="0" id="confidentialsignimg">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p><img border="0" width="520" height="144" id="_x0000_i1025" src="cid:image001.gif@01CFCC52.52249EF0"><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0in;margin-bottom:.0001pt"><span style="border:solid windowtext 1.0pt;padding:0in"><img border="0" width="100" height="100" id="_x0000_i1026" src="cid:~WRD000.jpg" alt="Image removed by sender."></span><o:p></o:p></p>
</div>
</body>
</html>