storport miniport with an extra device object

I have a StorPort miniport driver and I need to add an additional
device object to handle private management tasks - ioctls. Is there a
safe way to create an extra device object from a miniport driver? If
feels like I’ve done this before but my mind is coming up blank…

Thanks,
Robert.


Robert Randall | xxxxx@gmail.com

Why do you need an extra Device object? You could use SCSI_PASS_THROUGH(IOCTL_SCSI_PASS_THROUGH) to send any private information to the driver.

Igor Sharovar

Thanks Igor, I didn’t think of that.

The other problem I have is determining if one of my devices is present from a different driver that needs to send those IOCTLs. Is there a simple way to determine if a PCI device is present? Or is there another method to discover if the device is present?

Best,
Robert.

On Nov 18, 2010, at 1:26 PM, xxxxx@hotmail.com wrote:

Why do you need an extra Device object? You could use SCSI_PASS_THROUGH(IOCTL_SCSI_PASS_THROUGH) to send any private information to the driver.

Igor Sharovar


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

The simplest way is to try to open a device. You could also to register a PnP notification on different PnP event. See the reference on IoRegisterPlugPlayNotification.
WDK contains a sample how to communicate with a miniport driver. Look at \WinDDK\XXXX\src\storage\tools\spti. The sample is a Windows application but you could convert it to kernel stuff also.

Igor Sharovar