Hi Doron,
I am refering to your article on “Formatting a WDFREQUEST for any IRP_MJ code” to send vendor commands on MS USB 2.0 stack to my custom Hub device (my driver is Hub device filter) which works fine. but same doesn’t work for USB 3.0 stack on windows 10.
I am wondering do i need to use new “URB Allocation APIs in Windows 8” such as USBD_UrbAllocate and others to send IOCTL_INTERNAL_USB_SUBMIT_URB to my Hub device.
Following is the windbg output on USB 3.0 stack in windows 10. My device is USB 2.0 custom Hub(my driver is Hub device filter)
2: kd> !usb3kd.device_info 0xc9c20068
Dumping Device Information c9c20068
dt USBHUB3!_DEVICE_CONTEXT 0xc9c20068
dt USBHUB3!_HUB_PDO_CONTEXT 0xfb8c27e8
!idle_info 0xfb8c2814 (dt USBHUB3!_ISM_CONTEXT 0xfb8c2814)
Parent !hub_info 0xb1e68850 (dt USBHUB3!_HUB_FDO_CONTEXT 0xb1e68850)
!hub_info 0x0 (dt USBHUB3!_HUB_FDO_CONTEXT 0x0)
!port_info 0x921ea580 (dt USBHUB3!_PORT_CONTEXT 0x921ea580)
!rcdrlogdump usbhub3 -a 0x90abe740
!ucx_device 0x93978908 !xhci_deviceslots 0x8d686dc0 20 !xhci_info 0x8d686dc0
U1Timeout: 0, U2Timeout: 0
DeviceFlags: DeviceIsHub MsOsDescriptorNotSupported UsbWakeupSupport DeviceSupportsSelectiveSuspend DeviceIsHighSpeedCapable
DeviceStateFlags: DeviceAttachSuccessful DeviceIsKnown ConfigurationIsValid DecorateSerialNumber
ConfigDescIsValid DeviceStarted InstallMSOSExtEventProcessed
DeviceHackFlags: DisableOnSoftRemove
Descriptors:
!configdescriptor 0x95b32270
dt _USB_INTERFACE_DESCRIPTOR 0x95b32279
DeviceDescriptor: VID xxxx PID yyyy REV 0004, Class: (9)Class_UsbHUB BcdUsb: 0200
UcxRequest: !wdfrequest 0x4e1dbc68,
ControlRequest: !wdfrequest 0x6a06f4f8, !irp 0x95b86008 !urb 0xc9c200f0, NumberOfBytes 0
Device working at FullSpeed
Current Device State: ConfiguredSuspended.SuspendedWithHubSuspended.SuspendedInHubSuspend
Device State History: NewState ((),…) :
[61] SuspendedInHubSuspend
[60] SuspendedWithHubSuspended
[59] Suspended
[58] ConfiguredSuspended
[57] ConfiguredSuspending
[56] ReturningOperationSuccessInSuspending
[55] SuspendingWithArmedForWake
[54] PurgingDeviceIoInSuspendingAfterArmingForWake
[53] ArmingDeviceForWake
[52] AbortingDeviceIoInSuspendingBeforeArmingForWakeFailure
[51] CheckingIfDeviceArmedForWakeOnSuspending
[50] ConfiguredSuspending
[49] CheckingIfBootDeviceOnD0Exit
[48] ConfiguredInD0
[47] CheckingIfDeviceHasReceivedFirstStart
[46] CompletingClientRequestInConfigured
[45] SettingConfigurationInformationInClientRequest
[44] ConfiguringOnSelectConfiguration
[43] ReturningOperationSuccessInReConfiguring
[42] ProgrammingEndpointsInControllerForDeviceConfigurationFor20Devices
[41] ProgrammingEndpointsAndSettingLPMValuesrForDeviceConfiguration
[40] CreatingNewEndpoints
[39] CheckingIfAnyAlternateInterfaceLeft
[38] ConfiguringDevice
[37] DeletingEndpointsForOldConfiguration
[36] DeconfiguringEndpointsInControllerForDeviceConfiguration
[35] ConfiguringOnSelectConfiguration
[34] PreparingEndpointAndInterfaceListsOnSelectConfiguration
[33] ValidatingSelectConfigUrbFromUnConfigured
[32] UnConfiguredInD0
[31] CompletingD0EntryInUnconfigured
[30] StoppedEnumerated
[29] WaitingForInstallMSOSExt
[28] SignalingPnpEventForMSOSExtInstall
[27] CheckingIfMsOs20RegistryValuesShouldBeInstalled
[26] CheckingIfMSOSExtendedPropertyDescriptorShouldBeQueried
[25] WaitingForInstallMSOSExt
[24] StoppedEnumerated
[23] AckingPdoPreStart
[22] StoppedEnumerated
[21] WaitingForInstallMSOSExt
[20] SignalingPnpEventForMSOSExtInstall
[19] CheckingIfMsOs20RegistryValuesShouldBeInstalled
[18] CheckingIfMSOSExtendedPropertyDescriptorShouldBeQueried
[17] WaitingForInstallMSOSExt
[16] StoppedEnumerated
[15] AckingPdoPreStart
[14] StoppedEnumerated
[13] WaitingForInstallMSOSExt
[12] StoppedEnumerated
[11] AckingPdoPreStart
[10] StoppedEnumerated
[9] WaitingForInstallMSOSExt
[8] StoppedEnumerated
[7] ReportingDeviceToPnp
[6] ReturningOperationSuccessInReportingToPnp
[5] CreatingChildPDOAndReportingToPnp
[4] AddingDeviceToGlobalChildList
[3] InitializingAddDeviceToGlobalListRetryCount
[2] ReportingDeviceToPnp
[1] ReleasingPowerReferenceOnHubOnDetachOnEnumSuccess
[0] Enumerating
[63] ReturningOperationSuccessInEnum
[62] CheckingIfDevicePDChargingPolicySupported
Device Event History:
[15] HubSuspend
[14] PortSuspended
[13] UCXIoctlSuccess
[12] TransferSuccess
[11] UCXIoctlSuccess
[10] PDOD0Exit
[9] UCXIoctlSuccess
[8] TransferSuccess
[7] UCXIoctlSuccess
[6] ClientRequestSelectConfiguration
[5] PDOD0Entry
[4] PDOInstallMSOSExt
[3] PDOPreStart
[2] PDOInstallMSOSExt
[1] PDOPreStart
[0] PDOPreStart
2: kd> !wdfkd.wdfrequest 0x6a06f4f8
Treating handle as a KMDF handle!
!irp 0x95b86008
State: Allocated by driver, IRP allocated by WDF
!wdfiotarget 0x760d6e80
2: kd> !irp 0x95b86008
Irp is active with 13 stacks 14 is current (= 0x95b8624c)
No Mdl: No System Buffer: Thread 00000000: Irp is completed.
cmd flg cl Device File Completion-Context
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000
Args: 00000000 00000000 00000000 00000000