URB never completes

I’m trying to track down a problem with a USB driver. I’m building
URB_SELECT_CONFIGURATION and sending it down to the USB hub driver. This
request is never completing, because USBPORT_Wait never completes.

I don’t have any other IRPs sent down to the device. Any clues on debugging
this are appreciated. This call is being made during IRP_MN_START_DEVICE
processing.

ChildEBP RetAddr Args to Child
f78de69c 8050017a 865c40d8 865c4020 804f93fb nt!KiSwapContext+0x2e
f78de6a8 804f93fb 805418a8 8644ae18 00000000 nt!KiSwapThread+0x46
f78de6d4 bacc448a 00000000 00000000 f78de6e8 nt!KeDelayExecutionThread+0x1c9
f78de6f0 bacda7b2 8642a028 00000001 8642a0ec USBPORT!USBPORT_Wait+0x34
f78de748 bacdaac3 863c5f68 8642a028 8642a0ec
USBPORT!USBPORT_CloseEndpoint+0x5ca
f78de768 bace3d16 863c5f68 8642a028 57706970 USBPORT!USBPORT_ClosePipe+0xe1
f78de794 bace438a 863c5f68 8642a028 00000000
USBPORT!USBPORT_InternalCloseConfiguration+0x16c
f78de7d4 bacd7d5c 8642a028 86d2ef20 f78de930
USBPORT!USBPORT_SelectConfiguration+0x92
f78de800 bacdcdfe 86372030 8642a028 00000000
USBPORT!USBPORT_ProcessURB+0x3f4
f78de820 bacc61e2 86372030 86d2ef20 86372030
USBPORT!USBPORT_PdoInternalDeviceControlIrp+0x7e
f78de844 804eddf9 86d2efb4 86372188 806d02e8 USBPORT!USBPORT_Dispatch+0x148
f78de854 8064b5a8 86d2efd0 86d2eff4 85c6e7e8 nt!IopfCallDriver+0x31
f78de878 f769b368 86d2ef20 85c6e7e8 86371d50 nt!IovCallDriver+0xa0
f78de890 f769bafa 86371d50 86d2ef20 85c6e730 usbhub!USBH_PdoUrbFilter+0x14c
f78de8ac f76991d8 f78de930 86d2ef20 f78de8f0 usbhub!USBH_PdoDispatch+0x202
f78de8bc 804eddf9 85c6e730 86d2ef20 806d02e8 usbhub!USBH_HubDispatch+0x48
f78de8cc 8064b5a8 8643b020 865484e8 86cd2f00 nt!IopfCallDriver+0x31
f78de8f0 eec5477d 8004a101 00000000 f78de900 nt!IovCallDriver+0xa0
f78de918 eec4c035 85c6e730 f78de930 804e7f84
MYDRIVER!UsbSubmitUrbSynchronous+0xa8
f78de990 eec476c6 8643b020 8643b0d8 f78de9d0
MYDRIVER!RemoveConfiguration+0x74

Arlie Davis wrote:

I’m trying to track down a problem with a USB driver. I’m building
URB_SELECT_CONFIGURATION and sending it down to the USB hub driver. This
request is never completing, because USBPORT_Wait never completes.

I don’t have any other IRPs sent down to the device. Any clues on debugging
this are appreciated. This call is being made during IRP_MN_START_DEVICE
processing. …

f78de918 eec4c035 85c6e730 f78de930 804e7f84
MYDRIVER!UsbSubmitUrbSynchronous+0xa8
f78de990 eec476c6 8643b020 8643b0d8 f78de9d0
MYDRIVER!RemoveConfiguration+0x74

You’re calling something called RemoveConfiguration from your
IRP_MN_START_DEVICE handler?

Remember that you cannot send down any URBs until the
IRP_MN_START_DEVICE has gone all the way down the device stack and come
back. See, for example, HandleStartDevice in bulkpnp.c in the bulkusb
sample.


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