HCD_GET_ROOT_HUB_NAME and USB_GET_NODE_INFORMATION functions

Online DDK stands for both of IOCTL_USB_GET_ROOT_HUB_NAME and
IOCTL_USB_GET_NODE_INFORMATION that “The USB host controller FDO is the
target of this request.”.

“User-Mode I/O Requests That USB Client Drivers Can Use”
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/buses_d/hh/Buses_d/usbirp_9d99ae23-ca5f-434e-a73f-ba4801049054.xml.asp

Could someone explain, how USB host controller driver recognizes them, since
they both have the same_numeric_value of 0x00220408 ?

#define HCD_GET_ROOT_HUB_NAME 258
#define USB_GET_NODE_INFORMATION 258

#define IOCTL_USB_GET_ROOT_HUB_NAME \
CTL_CODE(FILE_DEVICE_USB, HCD_GET_ROOT_HUB_NAME, METHOD_BUFFERED,
FILE_ANY_ACCESS)

#define IOCTL_USB_GET_NODE_INFORMATION \
CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_INFORMATION,
METHOD_BUFFERED, FILE_ANY_ACCESS)

Definitions are taken from usbioctl.h and usbiodef.h

IOCTL_USB_GET_ROOT_HUB_NAME - processed by the host controller’s FDO
IOCTL_USB_GET_NODE_INFORMATION - processed by the usbhub driver’s FDO

2 different drivers

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nikolay Korneev
Sent: Monday, October 23, 2006 4:59 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] HCD_GET_ROOT_HUB_NAME and USB_GET_NODE_INFORMATION functions

Online DDK stands for both of IOCTL_USB_GET_ROOT_HUB_NAME and IOCTL_USB_GET_NODE_INFORMATION that “The USB host controller FDO is the target of this request.”.
“User-Mode I/O Requests That USB Client Drivers Can Use”
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/buses_d/hh/Buses_d/usbirp_9d99ae23-ca5f-434e-a73f-ba4801049054.xml.asp

Could someone explain, how USB host controller driver recognizes them, since they both have the same_numeric_value of 0x00220408 ?
#define HCD_GET_ROOT_HUB_NAME??? 258
#define USB_GET_NODE_INFORMATION 258
#define IOCTL_USB_GET_ROOT_HUB_NAME \
??? CTL_CODE(FILE_DEVICE_USB, HCD_GET_ROOT_HUB_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_USB_GET_NODE_INFORMATION \
??? CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_INFORMATION, METHOD_BUFFERED, FILE_ANY_ACCESS)
Definitions are taken from usbioctl.h and usbiodef.h
— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thank you Doron for clarifying this!

BWT, the online DDK says the same “The USB host controller FDO is the target
of this request” for *ALL* user-mode I/O requests on this page:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/buses_d/hh/Buses_d/usbirp_9d99ae23-ca5f-434e-a73f-ba4801049054.xml.asp

I’m shure it’s wrong for many of them.

I’ve also found this in DDK headers:

// The following IOCTLS are always sent to the HCD symbolic name
IOCTL_USB_HCD_GET_STATS_1
IOCTL_USB_DIAGNOSTIC_MODE_ON
IOCTL_USB_DIAGNOSTIC_MODE_OFF
IOCTL_USB_GET_ROOT_HUB_NAME
IOCTL_GET_HCD_DRIVERKEY_NAME
IOCTL_USB_HCD_GET_STATS_2
IOCTL_USB_HCD_DISABLE_PORT
IOCTL_USB_HCD_ENABLE_PORT

// The following IOCTLS are always sent to symbolic names created by usbhub
IOCTL_USB_GET_NODE_INFORMATION
IOCTL_USB_GET_NODE_CONNECTION_INFORMATION
IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION
IOCTL_USB_GET_NODE_CONNECTION_NAME
IOCTL_USB_DIAG_IGNORE_HUBS_ON
IOCTL_USB_DIAG_IGNORE_HUBS_OFF
IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME
IOCTL_USB_GET_HUB_CAPABILITIES
IOCTL_USB_GET_NODE_CONNECTION_ATTRIBUTES
IOCTL_USB_HUB_CYCLE_PORT

I guess that info is also incorrect :frowning:

I’ve tried to send…
IOCTL_USB_DIAGNOSTIC_MODE_ON
IOCTL_USB_DIAGNOSTIC_MODE_OFF
IOCTL_USB_DIAG_IGNORE_HUBS_ON
IOCTL_USB_DIAG_IGNORE_HUBS_OFF

They all have been completed successfully by HC stack, but HUB stack has
failed all of them, at least on W2K.

So, it seems that IOCTL_USB_DIAG_IGNORE_HUBS_XXX are *NOT* always sent to
symbolic names created by usbhub.

Doron, probably you could point me to some place with 100% correct
information about which target the particular IOCTL is?

IOCTL_USB_GET_ROOT_HUB_NAME - processed by the host controller’s FDO
IOCTL_USB_GET_NODE_INFORMATION - processed by the usbhub driver’s FDO

2 different drivers

d