Connection point from BusDriver and child PDOs

Hi,
I am a newbie and I am multiplexing USB to 3 serial ports of Bulk Transfer type.
I am creating 3 PDOs from Bus Driver.
I wonder what is the connection point that is linking from Parent driver to child PDOs?

Also looking at samples there are multiple GUIDs we have to provide, what are the GUIDs to be matched here?
ChildPDO
xxxxEvtDeviceAdd() method
WdfDeviceCreateDeviceInterface(…,GUID_1,…)
xxxEvtDeviceSelfManagedIoInit() method
WdfFdoQueryForInterface(…,GUID_2,…)
xxxxWmiRegistration() method
WDF_WMI_PROVIDER_CONFIG_INIT(…,GUID_3,…)

BusDriver
Bus_EvtDeviceAdd() method
WdfDeviceRetrieveDeviceInterface(…,GUID_4,…)
BusTypeGuid = GUID_5;
WdfDeviceSetBusInformationForChildren(…)
Bus_CreatePdo
WDF_QUERY_INTERFACE_CONFIG_INIT(…,GUID_6,…)

Thanks in advance

Aadhya wrote:

I wonder what is the connection point that is linking from
Parent driver to child PDOs?

I’m not sure if this is what you’re asking, but the idea is once you’ve called WdfDeviceCreate for your child PDO, you also create an I/O queue for that WDFDEVICE which will receive internal IOCTLs (i.e. URBs) from the child PDO.

I think you don’t need to know the connection point between them. There’s only one driver object in your driver, you can store and use it in anywhere. The relationship between WDFDRIVER and PDO is: Driver(Parent)->FDO(Parent)->PDO. The pre obj is the parent of the rear obj. You can get PDOs from bus driver FDO’s Child List.
1st GUID:The device interface GUID is used to create a device interface under a special class named by the GUID. The device interface is used by the user application to communicate with your kernel driver through read/write/io operations. If you create multiple device interfaces with a same GUID, you should support different reference string to distinguish them from each other.
2nd GUID:This is the GUID used by bus driver to identify the device interface type. Function driver can use this GUID to query device interface from bus driver. You would like to know what’s device interface, in most case, it’s a group of bus driver supported functions. By using those function, function driver can query bus info or communicate with bus driver. There’s no limitation what functions bus driver should support in device interface structure.

Date: Mon, 30 Jun 2014 08:22:08 -0400
From: xxxxx@gmail.com
To: xxxxx@lists.osr.com
Subject: [ntdev] Connection point from BusDriver and child PDOs

Hi,
I am a newbie and I am multiplexing USB to 3 serial ports of Bulk Transfer type.
I am creating 3 PDOs from Bus Driver.
I wonder what is the connection point that is linking from Parent driver to child PDOs?

Also looking at samples there are multiple GUIDs we have to provide, what are the GUIDs to be matched here?
ChildPDO
xxxxEvtDeviceAdd() method
WdfDeviceCreateDeviceInterface(…,GUID_1,…)
xxxEvtDeviceSelfManagedIoInit() method
WdfFdoQueryForInterface(…,GUID_2,…)
xxxxWmiRegistration() method
WDF_WMI_PROVIDER_CONFIG_INIT(…,GUID_3,…)

BusDriver
Bus_EvtDeviceAdd() method
WdfDeviceRetrieveDeviceInterface(…,GUID_4,…)
BusTypeGuid = GUID_5;
WdfDeviceSetBusInformationForChildren(…)
Bus_CreatePdo
WDF_QUERY_INTERFACE_CONFIG_INIT(…,GUID_6,…)

Thanks in advance


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

xxxxx@gmail.com wrote:

I am a newbie and I am multiplexing USB to 3 serial ports of Bulk Transfer type.
I am creating 3 PDOs from Bus Driver.
I wonder what is the connection point that is linking from Parent driver to child PDOs?

You still have a lot of reading to do. Each PDO has a hardware ID.
When the PDO pops into life, the Plug-and-Play system will go look in
its INF files to decide which driver will handle that hardware ID. It
loads said driver, and hands the PDO to it. That driver then creates an
FDO and attaches it to the PDO. Driver requests arrive at the FDO. The
driver sends its USB requests to the PDO.

Also looking at samples there are multiple GUIDs we have to provide, what are the GUIDs to be matched here?

PLEASE do not just blindly copy a sample without understanding what it
does. You don’t have to provide ANY of these, unless you need the
functions they provide. A “device interface” is just a way for one
driver to offer services to another driver, very much like a COM
interface, which uses GUIDs in a very similar way. If a driver needs to
offer services using a device interface, it creates a device interface
using a GUID. The driver that wants to use those services calls
QueryForInterface.

In your case, you will be communicating using URBs. You shouldn’t need
a device interface at all.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks Tim, Chris, Pei.
Got to study a lot on this.

Cheers.