Storport SRB_FUNCTION_PNP StorRemoveDevice

Hi

I am relatively new to windows driver development and would really appreciate some insight from the gurus.

In the storport driver which we are currently working on, driver is getting a direct call to startio bypassing HwInitialize.

The SRB function is SRB_FUNCTION_PNP with PnPAction set to StorRemoveDevice. There is no other SRB issued to the driver subsequently.

The DriverEntry and HwFindAdapter execute perfectly.

OS is Windows 2008 64-bit build 6001.18000

I found a similar topic on NTDEV, but I cannot post to that thread because of its timeline.
https://www.osronline.com/showThread.CFM?link=152676

Best regards,
Atul

Atul,

You should probably work with PSS on that one. While SRB_FUNCTION_PNP/StorRemoveDevice would be in direct response to Storport receiving an IRP_MN_REMOVE_DEVICE from PnP (which may be the result of something weird in your configuration), we should look into whether we should be passing that through to the miniport before its HwInitialize entry point is called.

– Keith

It’s been a while since I did Pnp, but as I recall, upon initial
install, it’s common to see an AddDevice, then a IRP_MN_REMOVE_DEVICE
(which makes the StorRemoveDevice) and a subsequent AddDevice as the
proper driver is installed. On any following boots, you’ll only see the
AddDevice. Could this be what you’re seeing?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@microsoft.com
Sent: Saturday, July 25, 2009 2:50 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Storport SRB_FUNCTION_PNP StorRemoveDevice

Atul,

You should probably work with PSS on that one. While
SRB_FUNCTION_PNP/StorRemoveDevice would be in direct response to
Storport receiving an IRP_MN_REMOVE_DEVICE from PnP (which may be the
result of something weird in your configuration), we should look into
whether we should be passing that through to the miniport before its
HwInitialize entry point is called.

– Keith


NTDEV is sponsored by OSR

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