HwProcessServiceRequest marking IRP as STATUS_PENDING for later completion

Hi All,

I’m implementing a Virtual StorPort MiniPort driver and I have requirement to mark a control command to STATUS_PENDING for later processing. Can I mark IRP coming to HwProcessServiceRequest as STATUS_PENDING with IoMarkIrpPending? If I do so can I send overlapped commands? What happens if the APP which sent the CMD crashes?

Thanks,
Sunil.

You don’t have to mark it pending. It’s already assumed. The IRP is completed by calling StorPortCompleteServiceIrp. You CANNOT use IoCompleteRequest.

Since you own the IRP now, you can set a cancel routine on it, to get a cancel request when the application crashes. All usual rules apply.

Thanks Greg. Yes, Im using StorPortCompleteServiceIrp only for completing the IRP.

Can I use IO_CSQ for managing this IRP queue? I see IO_CSQ will call IoMarkIrpPending for the IRPs we add to CSQ, will it have any effect?

I don’t think you can use IO_CSQ. The private list entry of this IRP may be already claimed by STORPORT.