Re: PCI card driver: enumeration and interfaces by Mark
Mark
Thu Mar 04 05:43:51 CST 2004
OK - this is what I would call the 'mux pattern'. It is unclear how you
have configured things from a PnP perspective. Your physical devices are
declared in an inf file someplace, I assume. You have a function driver for
these physical devices, right? Have you verified with a debugger that your
function driver registers its device interface for each instance? Does your
virtual device driver register of PnP notification? If not it should,
otherwise how do you know WHEN to call IoGetDeviceInterface.
There are other ways to implement a mux by using a bus driver that I think
end up being a bit cleaner, although the bus driver part is a little on the
under-documented side.
--
=====================
Mark Roddy
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com
"Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
news:Oar2kDbAEHA.580@TK2MSFTNGP11.phx.gbl...
> Sorry, your description didn't make sense to me. You have two devices and
> some how you made it to appear as a single card by writing a driver but
then
> you see two devices in the device manager. Confused.....Please restate
your
> problem.
>
> --
> --
> -Eliyas
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
>
>
> "JRoss" <jross@gmx.net> wrote in message
> news:%23exn3y7$DHA.2516@TK2MSFTNGP11.phx.gbl...
> > Hallo, thank you for your help with my previous problems :)
> > I'm developing a driver for a custom PCI card which exposes some
> > resources. We want to hide the number of the cards from user mode, so i
> > wrote another driver which enumerates the real devices and routes the
> > requests to the appropriate device, appearing as one single big card.
> >
> > I've got some problems here: when I try to enumerate the devices, I only
> > get the first device object, and I'm not able to obtain the other(s).
> > I've got two cards installed at the moment, and with Device Three i can
> > see both of them, but when i call IoGetDeviceInterfaces() I only get one
> > entry, and the device object obtained from that entry with
> > IoGetDeviceObjectPointer() has the NextDevice field set to null.
> > How can i get the full list of the devices given the class id or the
hwid
> ?
> >
> > Another thing: the two device types communicate through an interface.
> > The upper device opens the lower device and sends a
> > IRP_MN_QUERY_INTERFACE. in the lower device the request is handled
> > properly, and the Status field is set to STATUS success, but back in the
> > upper device i obtain an error in Status.
> > Before calling IoCallDriver i set the Status field to
> > STATUS_NOT_SUPPORTED and that (or whatever else i put in it) is the
> > value that I get back.
> >
> > Thank you again for your help,
> >
> > jross
>
>