<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=gb2312">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@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:΢ÈíÑźÚ;
panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
{font-family:"\@ËÎÌå";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@΢ÈíÑźÚ";
panose-1:2 11 5 3 2 2 4 2 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:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;
font-weight:normal;
font-style:normal;}
span.EmailStyle19
{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:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
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="ZH-CN" link="#0563C1" vlink="#954F72" style="text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hi Ray<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Thanks for your reply.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">I have referenced the PT IOCTL document on the nvmewin repo<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">I find a related thread: https://www.osronline.com/showthread.cfm?link=249023<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">The code is following:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">int</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
nvme_fwdownload(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">int</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white">argc</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">char</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> **</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white">argv</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">{<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">int</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> c, option_index
= 0, fw_image = 0;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">int</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> error, slot_used
= 0, total_slots = 0, slot;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">int</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> activate = 1,
device_index = 0;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">HANDLE</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> fd, mapobj,
ssd;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">void</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> *mapped_file_addr;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">unsigned</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">long</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> size, len;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PNVME_PASS_THROUGH_IOCTL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
ioctl_buffer = </span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NULL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PNVMe_COMMAND</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> nvme_cmd
= </span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NULL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PADMIN_FIRMWARE_IMAGE_DOWNLOAD_COMMAND_DW10</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
cdw10;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white">/*</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white"> * firmware transfer works in units of Dwords,</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white"> * so we do check here to find the special case.</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white"> */</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">if</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> (size % 4) {<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> printf(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"Fwdownload:
size of the image file %llu bytes\n"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">, size);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> exit(1);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> }<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> mapobj =
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">CreateFileMapping</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(fd,<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NULL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">PAGE_READONLY</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> 0,<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> 0,<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NULL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">if</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> (mapobj ==
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NULL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">) {<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> error = GetLastError();<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> printf(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"Fwdownload:
CreateFileMapping fail, error %d\n"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">, error);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> exit(1);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> }<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> mapped_file_addr = MapViewOfFile(mapobj,<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">FILE_MAP_READ</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> 0,<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> 0,<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> size);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">if</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> (mapped_file_addr
== </span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NULL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">) {<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> error = GetLastError();<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> printf(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"Fwdownload:
MapViewofFile fail, error %d\n"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">, error);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> exit(1);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> }<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> len =
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">sizeof</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">NVME_PASS_THROUGH_IOCTL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)
+ size - 1;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> ioctl_buffer = (</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PNVME_PASS_THROUGH_IOCTL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)malloc(len);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> memset(ioctl_buffer, 0, len);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> memcpy(ioctl_buffer->DataBuffer, mapped_file_addr, size);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white">/*</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white"> * unmap it immediately after copying the fw to databuffer.</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white"> * In case there is somewhere modify the fw.</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white"> */</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> UnmapViewOfFile(mapped_file_addr);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> mapped_file_addr =
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NULL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> CloseHandle(mapobj);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> CloseHandle(fd);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> ioctl_buffer->SrbIoCtrl.HeaderLength =
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">sizeof</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">SRB_IO_CONTROL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> memcpy(ioctl_buffer->SrbIoCtrl.Signature,
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NVME_SIG_STR</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">sizeof</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NVME_SIG_STR</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">));<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> ioctl_buffer->SrbIoCtrl.Timeout= 30;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> ioctl_buffer->SrbIoCtrl.ControlCode = (</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ULONG</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NVME_PASS_THROUGH_SRB_IO_CODE</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> ioctl_buffer->SrbIoCtrl.Length = len -
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">sizeof</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">SRB_IO_CONTROL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> nvme_cmd = (</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PNVMe_COMMAND</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)ioctl_buffer->NVMeCmd;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> nvme_cmd->CDW0.OPC =
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">ADMIN_FIRMWARE_IMAGE_DOWNLOAD</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> nvme_cmd->NSID = 0;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> cdw10 = (</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PADMIN_FIRMWARE_IMAGE_DOWNLOAD_COMMAND_DW10</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">)&nvme_cmd->CDW10;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> cdw10->NUMD = size / 4 - 1;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> ioctl_buffer->QueueId = 0;
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green;background:white;mso-highlight:white">/* Admin queue */</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> ioctl_buffer->DataBufferLen = size;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> ioctl_buffer->Direction =
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NVME_FROM_HOST_TO_DEV</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> ioctl_buffer->ReturnBufferLen = len;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> printf(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"firmware
image size %llu\n"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">, size);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">if</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(nvme_ioctl(ssd,
ioctl_buffer, len, 0))<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> exit(1);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">if</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> (activate) {<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> printf(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"auto-activate
this firmware...\n"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> nvme_get_current_slot(&slot_used, &ssd);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> printf(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"slot
used: %d total_slots: %d\n"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">, slot_used, total_slots);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> slot = (slot_used + 1 > total_slots ? 2 : ++slot_used);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> activate_slot_action(&ssd, slot, 1);
<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> }<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">if</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> (ioctl_buffer)
{<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> free(ioctl_buffer);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> ioctl_buffer =
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NULL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> }<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> nvme_close_device(&ssd);<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> ssd =
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NULL</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">return</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> 0;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">}</span><span lang="EN-US" style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span style="font-size:11.0pt;font-family:"΢ÈíÑźÚ",sans-serif">·¢¼þÈË<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"΢ÈíÑźÚ",sans-serif"> Robles, Raymond C [mailto:raymond.c.robles@intel.com]
<br>
</span><b><span style="font-size:11.0pt;font-family:"΢ÈíÑźÚ",sans-serif">·¢ËÍʱ¼ä<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"΢ÈíÑźÚ",sans-serif"> Tuesday, June 23, 2015 5:33 AM<br>
</span><b><span style="font-size:11.0pt;font-family:"΢ÈíÑźÚ",sans-serif">ÊÕ¼þÈË<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"΢ÈíÑźÚ",sans-serif"> Cheng Peng; nvmewin@lists.openfabrics.org<br>
</span><b><span style="font-size:11.0pt;font-family:"΢ÈíÑźÚ",sans-serif">Ö÷Ìâ<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"΢ÈíÑźÚ",sans-serif"> RE: send ADMIN_FIRMWARE_IMAGE_DOWNLOAD command fail<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Hi Cheng,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Could you please provide contents of the pass through IOCTL structure you create? Also, any of the sample user space code you use to create the IOCTL would be helpful.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><br>
In addition, have you referenced the PT IOCTL document on the nvmewin repo? This document has sample code on how to construct pass through IOCTL¡¯s.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Ray
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt">From:</span></b><span lang="EN-US" style="font-size:11.0pt">
<a href="mailto:nvmewin-bounces@lists.openfabrics.org">nvmewin-bounces@lists.openfabrics.org</a> [<a href="mailto:nvmewin-bounces@lists.openfabrics.org">mailto:nvmewin-bounces@lists.openfabrics.org</a>]
<b>On Behalf Of </b>Cheng Peng<br>
<b>Sent:</b> Thursday, June 18, 2015 2:13 AM<br>
<b>To:</b> <a href="mailto:nvmewin@lists.openfabrics.org">nvmewin@lists.openfabrics.org</a><br>
<b>Subject:</b> [nvmewin] send ADMIN_FIRMWARE_IMAGE_DOWNLOAD command fail<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Hi all<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">When I send ADMIN_FIRMWARE_IMAGE_DOWNLOAD command to driver by DeviceIoControl, I get error code 1450 (ERROR_NO_SYSTEM_RESOURCES)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I find the driver don¡¯t receive the ioctl command.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">It is as if the size of firmware image is larger than pPCI->MaximumTransferLength.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">How to resolve the problem?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you<o:p></o:p></span></p>
</div>
</body>
</html>