Re: How to implement multi-function device driver?



abei wrote:
We have an USB device which has some interfaces. Can I create device object for each interface in one function driver?
For example, USB device has 2 interfaces, interface A and interface B.
Then I create device object A for interface A and device object B for interface B in AddDevice().
But the problem is that I don't known how to start all device object for each interface when we handle IRP_MJ_PNP/IRP_MN_START_DEVICE.
Is this method correct?
How to implement multi-function device driver? Please help me, thank you!

Abei
2007-6-12


No. if your USB device is properly constructed with composite interfaces then you can use the "USB Common Class Generic Parent Driver". See the WDK documentation page with that title. You will have two separate function drivers (you could coerce this into one driver that manages two different functions as well) and two separate FDOs one for each interface. The generic parent driver will handle all the shared device state for you. KMDF would be the ideal way to handle this.
.



Relevant Pages

  • Re: Linux Firewall/LoadBalancer
    ... The bonding driver originally came from Donald Becker's beowulf patches for ... Build kernel with the bonding driver ... "Bonding driver support" in the "Network device support" section. ... so the bonding driver will automatically load when the bond0 interface is ...
    (Security-Basics)
  • [PATCH] IPMI driver updates, part 2
    ... It has been far too long since the last IPMI driver updates, ... This second part adds the "System Interface" driver. ...
    (Linux-Kernel)
  • [2.6 patch] remove comx driver docs
    ... info on the driver for Baycom style amateur radio modems ... -LMI) protocols are available as link-level protocol. ... -The COMX driver set has a new type of user interface based on the /proc ... -To create the interface 'comx0' which is the first channel of a COMX card: ...
    (Linux-Kernel)
  • [2.6 patch] remove the documentation for the legacy CDROM drivers
    ... This patch removes the documentation for the removed legacy CDROM drivers. ... SC1200 WDT DRIVER ... LaTeX document on standardizing the CD-ROM programming interface. ... THIS DRIVER WILL WORK WITH THE CD-ROM DRIVES LISTED, ...
    (Linux-Kernel)
  • Re: WinXP 64-bit Virtual DMA_ADAPTER
    ... Such interface abstracts from any internal ... driver, you don't have anybody to blame but you. ... system that runs without Verifier. ... If MSFT wants a black box OS, ...
    (microsoft.public.development.device.drivers)