I am developing a storport miniport driver. In the device entry I have already set the following:
TaggedQueuing = TRUE;
MultipleRequestPerLu = TRUE;
In the find adpater, I also set the following:
SynchronizationModel = StorSynchronizeFullDuplex;
MaxIOsPerLun = 254;
MaxNumberOfIO = 1000;
When the driver is executing, SRBs are only passed after the previous SRB is finished. Is there anyone who knows, why is this happening?
Did you mean that storport is issuing an IO request to HwStorStartIo routine only after the previous IO request has been marked as complete and notified to the upper layer by calling StorPortNotification with a NotificationType of RequestComplete?
I hope this is really not the case assuming that you are doing parallel IO.
If you are asking about IO requests being initiated sequentially and not concurrently by storport, that’s how IO requests are supposed to come to the miniport driver in either of the synchronization models.
However, multiple calls to HwStorStartIo concurrently are possible only from windows 8 onward if the miniport driver supports the concurrent channels optimization.
- kk
Are you calling StorPortSetDeviceQueueDepth after an Inquiry?
Mark Roddy
On Wed, May 29, 2013 at 11:15 PM, wrote:
> I am developing a storport miniport driver. In the device entry I have
> already set the following:
> TaggedQueuing = TRUE;
> MultipleRequestPerLu = TRUE;
> In the find adpater, I also set the following:
> SynchronizationModel = StorSynchronizeFullDuplex;
> MaxIOsPerLun = 254;
> MaxNumberOfIO = 1000;
> When the driver is executing, SRBs are only passed after the previous SRB
> is finished. Is there anyone who knows, why is this happening?
>
>
>
> —
> NTDEV is sponsored by OSR
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
Are you setting the CmdQue field in the your INQUIRY response to 1? If memory serves, setting this to 0 causes Windows to issues requests serially.
>When the driver is executing, SRBs are only passed after the previous SRB is finished.
Where did you see that? If you see it in StartIO it is normal behavior. StartIO is protected by internal lock. And I am assume your hardware doesn’t support concurrent channels.
However, you could see parallel SRB’s in BuildIO.
You need to give more information about your test.
Igor Sharovar
Thank you very much for all your responses.
Jeff, you are right, CmdQue field in the Inquiry response setting to 1 solves the problem. Are there any documentation about what Storport checks in the SCSI command responses that might affect the settings that is set in the HW_INITIALIZATION_DATA or the PORT_CONFIGURATION_INFORMATION? Maybe like queue size (total and per lun), power states, etc.
>Are there any documentation about what Storport checks in the SCSI command responses that might >affect the settings that is set in the HW_INITIALIZATION_DATA or the >PORT_CONFIGURATION_INFORMATION? Maybe like queue size (total and per lun), power states, etc.
There is not such documentation. Only debugging and reverse engineering could help you.
Debugging includes using check build not only storport.sys but also others critical drivers, for examples pci.sys.
Igor Sharovar
This is an area where the documentation is definitely lacking. To my knowledge, Microsoft hasn’t documented which SCSI CDB’s and mode pages are required to get a functioning miniport that can pass WHQL.
After you get devices appearing in the “Storage controllers” and “Disk Drives” categories in Device Manager, make sure you run the “ScsiCompliance” and “ScsiCompliance 2.0” from the HCK to make sure you’re not missing something that’s required for logo but not required for enumeration.