Child id in custom USB bus driver

Im writing a USB bus driver that uses the new KMDF 1.9 call WdfRequestForwardToParentDeviceIoQueue and it correctly forwards child PDO Requests to my usb bus default FDO queue. All my child pdo’s are identified by a simple unique serial number.

How do i get the id of the child device that the IRP was originally sent to? I dont have a reference to the original queue that it was sent on to the child PDO in the bus handler.

In other words i cant identify the child PDO in my bus IRP handler hence i dont know what device i need to initiaite a data retrieval from on my bus.

Anybody had experience with this?

Thanks.

Michael

Nevermind, i figured it out.

I have to create a context that holds my child device addess in the child pdo event queue handler routine. Then attach this context to the Request object then pass it to the bus handler by calling the WdfRequestForwardToParentDeviceIoQueue