race condition - RawDeviceOk Vs custom disk driver

with reference to this thread: http://www.osronline.com/showThread.cfm?link=199712

  1. I have written a scsi/ide port filter which translates the pnp-ids.
  2. I have a class driver which should load for the disk whose pnp ids I translated.

It works as expected for all (MS, Intel) but AMD driver. With AMD driver sometimes my class driver gets loaded and sometimes not. I suspect this is because of AMD port driver reports the capabilities flag as RawDeviceOk.

And I think there is a race condition - sometimes Pnp manager is starting the disk pdo (as port driver reported RawDeviceOk) before looking for the custom disk driver while sometimes it is loading the custom disk driver.

I tried clearing the RawDeviceOk flag in DEVICE_CAPABILITIES on the completion path of QUERY_CAPABILITIES but then neither pdo got a START call (which is expected) nor my custom driver got loaded. Probably Pnp manager remembers this?

Any help will be highly appreciated? Thank you.

It may depend on whether MPIO is enabled.

>I tried clearing the RawDeviceOk flag in DEVICE_CAPABILITIES on the completion path of >QUERY_CAPABILITIES but then neither pdo got a START call (which is expected) nor my custom >driver got loaded. Probably Pnp manager remembers this?
I worked on a project where we had also our custom disk class driver. And I observed that PnP manager remember the last booting sequences and tries to reproduce this on next boot. I spoke in DDK with a Microsoft guy who work on PnP stuff and he confirm that PnP manager tries to use a pattern of the previous boot.

Igor Sharovar

Hi Alex - It is on Win 7 client - so no MPIO.

Hi Igor - so may I know what you did to load your custom driver? Thanks.

>Hi Igor - so may I know what you did to load your custom driver? Thanks.
Another driver create a PDO of this disk class.

Igor Sharovar