Virtual Storport Miniport - Mutiple device addition/removal

In Virtual Storport Miniport, I get the situation where multiple devices get added/removed within time interval of 2-5 secs. I am calling StorPortNotification(BusChangeDetected,…) as soon as I see a device has been added/removed. This does not trigger the Bus Scan from Storport (Inquiry, Report Luns) and devices are not added/removed correctly.

Is there a miniumum time interval between consequetive calls to StorPortNotification(BusChangeDetected,…) OR is there a way to find previous Bus scan of Storport is complete and next one can be triggered?

Thanks in Advance,
-nirranjan

More details

  • The above issue is seen only if the OS (Windows 2008) is booted of the disk exposed by this virtual storport miniport driver.

  • In case of OS booted of disk belonging to different controller this issue is not seen. i.e StorPortNotification(BusChangeDetected,…) in the virtual storport miniport works as expected sending scsi inquiry & report luns.

-nirranjan