[nvmewin] looking for help with IOCTL tool
Yong Chen
Yong.sc.Chen at huawei.com
Mon Oct 1 15:27:39 PDT 2012
Hi, everyone,
My team is starting to work on Windows driver based on nvmewin reference driver. Thanks for sharing such excellent work.
I have a question around IOCTL: which file path should I open in order to send the call to?
The PT_IOCTL.doc in the library suggests to open file handle on \\.\ScsiN<file:///\\.\ScsiN>: before sending DeviceIoControl() down. Unfortunately, our Windows driver never receives anything. The SPTI tool sample in WDK says ScsiN: only works when the device is unclaimed by a SCSI driver. In the case, proper PathId, TargetId, and Lun must be set in the SCSI pass thru structure, but NVME_PASS_THROUGH_IOCTL doesn’t have these fields.
According to MSDN<http://msdn.microsoft.com/en-us/library/windows/hardware/ff556013(v=vs.85).aspx>, IOCTL send to storage class drivers are mapped to SRBs with function set to SRB_FUNCTION_EXECUTE_SCSI. If I open \\.\PhysicalDriveN<file:///\\.\PhysicalDriveN>, then I do receive SRBs with such Execute SCSI function code. But the current driver code expects SRB_FUNCTION_IO_CONTROL.
How do you guys do it?
Many thanks in advance,
________________________________
Yong Chen
Storage Architect
华为技术有限公司 Huawei Technologies Co., Ltd
[Company_logo]Office: 408-330-5482
Mobile: 425-922-0658
Email: yong.sc.chen at huawei.com
2330 Central Expressway
Santa Clara, CA 95050
http://www.huawei.com
本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20121001/dfc6ec0b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 6737 bytes
Desc: image002.jpg
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20121001/dfc6ec0b/attachment.jpg>
More information about the nvmewin
mailing list