Hi all,
I have implemented KMDF driver for PCI device.It is working fine.But i Want to support multiple PCI device in my driver.How can i achieve Muliplte board support?
Helps are appreciated…
Thanks,
Hi all,
I have implemented KMDF driver for PCI device.It is working fine.But i Want to support multiple PCI device in my driver.How can i achieve Muliplte board support?
Helps are appreciated…
Thanks,
It should “just work” – well, depending on whether you name your device or not (in which case, each instance of your device will need a unique name).
Is your driver not being called at its EvtDriverDeviceAdd event processing callback for the second device? It should be…
Peter
OSR
This is achieved automatically if the driver is written correctly.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntdev…
> Hi all,
> I have implemented KMDF driver for PCI device.It is working fine.But i Want to support multiple PCI device in my driver.How can i achieve Muliplte board support?
>
> Helps are appreciated…
>
> Thanks,
>
xxxxx@gmail.com wrote:
I have implemented KMDF driver for PCI device.It is working fine.But i Want to support multiple PCI device in my driver.How can i achieve Muliplte board support?
In general, as long as you haven’t done anything stupid (like use global
variables), this happens automatically. Each device will get its own
instance of the driver, with its own device context. As long as all of
the information you need to handle a particular device is in the device
context, they’ll all be kept neatly separate.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Sorry to be sort of anal… But I think that needs to be clarified. (I’m SURE Tim knows how this works, but I don’t want his post to accidentally leave the wrong impression in the archives).
The first time a device that’s supported by a given driver is discovered, the driver is loaded.
When subsequent device instances supported by the same driver are discovered, the SAME driver instance is informed of the existence of the new device (by invoking the driver’s EvtDriverDeviceAdd event processing callback).
There is not one instance of a driver loaded for each device discovered.
There ARE operating systems in which an entirely new driver instance is loaded for each device instance detected. Two serial ports would mean two copies of the serial port driver in memory. This is not how Windows works, of course.
Peter
OSR