Continuation of "Looking for docs on storport virtual miniport driver" from last Marc

I just came across this thread.

We are actually still working on documentation for StorPort virtual miniports. That’s to be part of a larger overhaul of StorPort documentation, but it keeps getting pushed off in favor of more immediately pressing doc needs.

Anyway, IOCTL_MINIPORT_PROCESS_SERVICE_IRP is pretty much what the doc at http://msdn.microsoft.com/en-us/library/bb725960.aspx says. Which is basically, It’s up to you to give meaning to the IOCTL. The IOCTL would presumably be sent from user space (but could be from a kernel driver) and would get to StorPort if everything looks good. StorPort passes it to the miniport. What happens after that is up to the miniport; the miniport should eventually complete the IRP via IoCompleteRequest. The thought here was that the IOCTL would mean, Tell me when X happens; the miniport would complete the IOCTL when X happened, possibly with indicative information. But, as noted, handling the IOCTL is up to you.

James Antognini [MSFT]
Windows WDK Support

This posting is provided “AS IS” with no warranties, and confers no rights.

A few people have run into a problem with this IOCTL, specifically when completing the associated IRP in a StorPort virtual miniport. The statement at http://msdn.microsoft.com/en-us/library/bb986551.aspx that the IRP is to be completed via IoCompleteRequest is wrong. Completion should be done by StorPortCompleteServiceIrp; this API ensures that a remove lock on the HBA device object extension gets cleaned up. If this is not done, the miniport cannot be unloaded.

This will be documented in a future WDK (maybe that for Win7).

James Antognini [MSFT]
Windows WDK Support

This posting is provided “AS IS” with no warranties, and confers no rights.