USB device descriptor IOCTLs strangeness

Lower filtering a USB FDO I have noticed that the descriptor requests sent down come back with a different IOCTL code.

For example,

URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE, Irp FFFF9488B0D4E010 DOWN
URB_FUNCTION_CONTROL_TRANSFER, Irp FFFF9488B0D4E010 UP

Has anyone noticed this, and is there a reason for this odd behaviour? Why would the hub driver change the IOCTL?

If your filter doesn’t allocate a stack location, then you’re peeking at the stack location that belongs to the driver below you. Since the driver below you owns that stack location, it’s free to do whatever it wants to it (within the confines of behavior accepted by the IO manager).

If you would like to have the same value on the way back up the stack then you need to allocate a stack location of your own, and then take responsibility for setting up the stack location for the driver below you.

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Wednesday, January 18, 2017 9:17 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB device descriptor IOCTLs strangeness

Lower filtering a USB FDO I have noticed that the descriptor requests sent down come back with a different IOCTL code.

For example,

URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE, Irp FFFF9488B0D4E010 DOWN
URB_FUNCTION_CONTROL_TRANSFER, Irp FFFF9488B0D4E010 UP

Has anyone noticed this, and is there a reason for this odd behaviour? Why would the hub driver change the IOCTL?


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:</https:></https:></https:>

As a filter in the stack my driver has its stack location and it is this location it is looking at.

Tim corrected my description of the issue, it is the URB value that changes, not the IOCTL, bad use of terms on my part, however this change is normal according to Tim.