Comments (14)
Any update on this?
Does a new doc explained relations between the IOCTL_STORAGE_PROTOCOL_COMMAND and the Common Effect Log of NVMe v1.2 spec?
I think the document should explain a relation to NVMe v1.2 spec by the inbox driver (stornvme.sys). please refer below the link.
And, Dose the document explain how to use extended buffers([Data-to-Device Buffer] [Data-from-Device Buffer]) with vender command?
from windows-driver-samples.
Kouichi, thanks for bringing this to our attention. We're preparing a new doc page to describe the correct usage of this IOCTL. We'll share a link to that when it's live.
from windows-driver-samples.
Any updates on the new doc?
I found this:
https://msdn.microsoft.com/en-us/library/windows/hardware/dn932068(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/hardware/dn931814(v=vs.85).aspx
from windows-driver-samples.
I found already those documents when I opened this issue. Even if it was updated, I think it is not enough information to use this IOCTL.
I found out an important comment on the "ntddstor.h" file. (simler souce exist at "http://pastebin.com/VHxcWAbp".) according to that:
//
// Parameter for IOCTL_STORAGE_PROTOCOL_COMMAND
// Buffer layout: <STORAGE_PROTOCOL_COMMAND> [Error Info Buffer] [Data-to-Device Buffer] [Data-from-Device Buffer]
//
//
// Additional notes when STORAGE_PROTOCOL_TYPE is ProtocolTypeNvme:
// 1. When flag STORAGE_PROTOCOL_COMMAND_FLAG_ADAPTER_REQUEST is set, or the request is sent through adapter, namespace Id from "Command" field is used;
// otherwise, the underneath driver should determine namespace Id from the device that receives the command.
// 2. When a command fails, the "ErrorCode" field contains value from NVMe Completion Queue Entry - DW3 - Status Field.
// 3. "CommandLength" field must have value of 64. e.g. STORAGE_PROTOCOL_COMMAND_LENGTH_NVME.
// 4. "CommandSpecific" field must have value of either STORAGE_PROTOCOL_SPECIFIC_NVME_ADMIN_COMMAND, or STORAGE_PROTOCOL_SPECIFIC_NVME_NVM_COMMAND.
// 5. When a command succeeds, field "FixedProtocolReturnData" may contain value from NVMe Completion Queue Entry - DW0.
//
And I tried to make a sample program with these information but it was not working correctly.
I can't find out more detailed description than the MSDN except the "ntddstor.h" file yet.
I need a usage example, or more detail document.
from windows-driver-samples.
Hi, sirosiro
I am facing the same problem about IOCTL_STORAGE_PROTOCOL_COMMAND,have you solved this problem? and How? if you give me a usage of this ioctl, will help a lot. thanks.
from windows-driver-samples.
Hi, psycholliu,
Unfortunately, I don't resolve it yet. but I found out an information recently. that is below:
https://msdn.microsoft.com/en-us/library/windows/desktop/mt718131(v=vs.85).aspx
This page explaining to how to sending a vendor-specific command, but I don't tried it yet.
I hope it'll be helpful for you. :)
from windows-driver-samples.
Hi sirosiro,
Thanks for your reply. I have gone though https://msdn.microsoft.com/en-us/library/windows/desktop/mt718131(v=vs.85).aspx, and I have tried to send nvme IO Command(read command) with IOCTL_STORAGE_PROTOCOL_COMMAND, but failed with errorcode 87(parameter error)。thanks again!
from windows-driver-samples.
I too am stuck on the 0x87 error. The bug whether it be documentation or otherwise has been reported to Microsoft. It has just moved into the active state. I too tried many variations of the sample code with no luck. I get the 87 result with about anything I do which leads me to believe this command does not work at all meaning it is not coming down to command registers or buffers.
from windows-driver-samples.
IOCTL_STORAGE_PROTOCOL_COMMAND is intended for sending vendor-specific commands only.
•Vendor Specific Admin Commands (C0h – FFh)
•Vendor Specific NVMe Commands (80h – FFh)
Sending an NVMe read command (Opcode 02h) will generate an error from this IOCTL.
Also your NVMe drive must support CEL.
from windows-driver-samples.
markg1 highlighted the problem in your experiments. And they are documented at https://msdn.microsoft.com/en-us/library/windows/desktop/mt718131(v=vs.85).aspx
from windows-driver-samples.
IOCTL_STORAGE_PROTOCOL_COMMAND is intended for sending vendor-specific commands only.
•Vendor Specific Admin Commands (C0h – FFh)
•Vendor Specific NVMe Commands (80h – FFh)
How can I get a namespace list? You block pass-through Identify, and you don't support Identify CNS 02 with IOCTL_STORAGE_QUERY_PROPERTY.
Have you considered not blocking commands that don't do any damage, or do you actually have a rationale behind forcing the use of incomplete and needlessly complicated abstraction layers for completely harmless commands?
from windows-driver-samples.
I have not tried this, but based on nvme.h and provided info, I would suggest you try
following the Example: NVMe Identify query at https://msdn.microsoft.com/en-us/library/windows/desktop/mt718131(v=vs.85).aspx. But replace the line:
protocolData->ProtocolDataRequestValue = NVME_IDENTIFY_CNS_CONTROLLER;
with
protocolData->ProtocolDataRequestValue = NVME_IDENTIFY_CNS_ACTIVE_NAMESPACES;
Good luck.
from windows-driver-samples.
I have not tried this, but based on nvme.h and provided info, I would suggest you try
following the Example: NVMe Identify query at https://msdn.microsoft.com/en-us/library/windows/desktop/mt718131(v=vs.85).aspx. But replace the line:protocolData->ProtocolDataRequestValue = NVME_IDENTIFY_CNS_CONTROLLER;
with
protocolData->ProtocolDataRequestValue = NVME_IDENTIFY_CNS_ACTIVE_NAMESPACES;Good luck.
I try, but it can't work @@
from windows-driver-samples.
Please refer to https://docs.microsoft.com/en-us/windows-hardware/drivers/storage/nvme-features-supported-by-stornvme for any clarifications on command supported
Currently, IOCTL_STORAGE_QUERY_PROPERTY with identify option NVME_IDENTIFY_CNS_ACTIVE_NAMESPACES is not supported
from windows-driver-samples.
Related Issues (20)
- 【indirect display 】【IddSampleDriver】Idd Sample Driver repeatedly generates C++ Exception on Windows 10 22H2.
- 【SYSVAD】: devcon install TabletAudioSample.inf Root\Sysvad_TabletAudioSample failed
- Text files marked as binary
- ComponentizedApoSample.inx: HKR,Classes\CLSID versus HKR,AudioEngine HOT 5
- assign haredware id as devicedesc
- [sampledevicemft] Unable to get MFSampleExtension_CaptureMetadata from pSample
- simbatt: warning 1324: [Version] section should specify PnpLockdown=1 HOT 2
- Run AddFilter and reboot,PC BootFail and BlueScreen
- [sampledevicemft] HW Decoder cannot work on Intel Meteor Lake Platform if MEP enabled.
- While i build the Sample "Windows-driver-samples\audio\simpleaudiosample" getting Error "The build tools for WindowsKernelModeDriver10.0 Can not be found,to build using the WindowsKernelModeDriver 10.0 build tools,please install WindowsKernelModeDriver 10.0 build toold, Alternatively, you may upgrade to the current visual studio tools by selecting the Project menu or right -click the solution "Retarget solution"." HOT 1
- FAT should probably use CcSetFileSizes Ex
- AVSSAMP example not working
- [audio/simpleaudiosample] Blue Screen of Death after installing SimpleAudioSample HOT 2
- Cleanup Branch names HOT 1
- [filesys/fastfat] FASTFAT Errors on Surprise removal
- You are wicked Illuminates? 2FA my a$$
- tes_command_unix
- What exactly is the difference between Windows 10/11 and Malware? HOT 1
- The socket in WSK does‘t surpport SIO_KEEPALIVE_VALS option ,how can I achieve the same effect?
- general/ioctl kmdf sample requires wdfcoinstaller that is no longer part of the WDK
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windows-driver-samples.