Jump-start your project by learning from devs who
write Windows drivers and file systems every day.
Take an OSR seminar!

OSR is Hiring! Click here to find out more.

Windows Internals & Software Drivers Lab, Santa Clara, CA 5-9 August, 2013
Kernel Debugging & Crash Analysis for Windows Lab, Santa Clara, CA 9-13 September, 2013
Upcoming OSR Seminars:
Writing WDF Drivers for Windows Lab, Boston, MA 7-11 October, 2013
Developing File Systems for Windows, Seattle, WA 5-8 November, 2013


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 26  
07 Aug 12 12:28
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
SelectInterfaces

Hi All, I am trying to load USB device driver (KMDF), however WdfUsbTargetDeviceSelectConfig is failing with C0000001 or C000000d error below is SelectInterfaces part of the code being used. --------------------------------------------------------- lTotalInterfaces = WdfUsbTargetDeviceGetNumInterfaces(pDeviceContext->UsbDevice); settingPairs = ExAllocatePoolWithTag( PagedPool, sizeof(WDF_USB_INTERFACE_SETTING_PAIR) * lTotalInterfaces, POOL_TAG); if (settingPairs == NULL){ return STATUS_INSUFFICIENT_RESOURCES; } for (i = 0; i < lTotalInterfaces; i++) { settingPairs[i].UsbInterface = WdfUsbTargetDeviceGetInterface(pDeviceContext->UsbDevice, (UCHAR)i); settingPairs[i].SettingIndex = 0; } if (lTotalInterfaces == 1){ WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_SINGLE_INTERFACE(&configParams); } else { WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_MULTIPLE_INTERFACES(&configParams, (UCHAR)lTotalInterfaces, settingPairs ); } status = WdfUsbTargetDeviceSelectConfig(pDeviceContext->UsbDevice, WDF_NO_OBJECT_ATTRIBUTES, &configParams); if(!NT_SUCCESS(status)) { ExFreePool(settingPairs); return status; } --------------------------------------------------------- Even tried simple logic for select interface: --------------------------------------------------------- WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_MULTIPLE_INTERFACES(&configParams, NULL, NULL); status = WdfUsbTargetDeviceSelectConfig(pDeviceContext->UsbDevice, NULL, &configParams); if(!NT_SUCCESS(status)) { return status; } --------------------------------------------------------- And the usb h/w details are: --------------------------------------------------------- Device Descriptor: bcdUSB: 0x0200 bDeviceClass: 0x02 bDeviceSubClass: 0x00 bDeviceProtocol: 0x00 bMaxPacketSize0: 0x08 (8) idVendor: 0x1CA1 idProduct: 0x0120 bcdDevice: 0x0212 iManufacturer: 0x01 0x0409: "usbgadget" iProduct: 0x02 0x0409: "Gadget Serial" iSerialNumber: 0x03 0x0409: "0" bNumConfigurations: 0x01 ConnectionStatus: DeviceConnected Current Config Value: 0x02 Device Bus Speed: Full Device Address: 0x01 Open Pipes: 3 Endpoint Descriptor: bEndpointAddress: 0x83 IN Transfer Type: Interrupt wMaxPacketSize: 0x0008 (8) bInterval: 0x20 Endpoint Descriptor: bEndpointAddress: 0x82 IN Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x00 Endpoint Descriptor: bEndpointAddress: 0x01 OUT Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x00 Configuration Descriptor: wTotalLength: 0x0043 bNumInterfaces: 0x02 bConfigurationValue: 0x02 iConfiguration: 0x05 0x0409: "Gadget Serial CDC ACM" bmAttributes: 0xC0 (Bus Powered Self Powered ) MaxPower: 0x01 (2 mA) Interface Descriptor: bInterfaceNumber: 0x00 bAlternateSetting: 0x00 bNumEndpoints: 0x01 bInterfaceClass: 0x02 bInterfaceSubClass: 0x02 bInterfaceProtocol: 0x01 iInterface: 0x06 0x0409: "Gadget Serial Control" Endpoint Descriptor: bEndpointAddress: 0x83 IN Transfer Type: Interrupt wMaxPacketSize: 0x0008 (8) bInterval: 0x20 Interface Descriptor: bInterfaceNumber: 0x01 bAlternateSetting: 0x00 bNumEndpoints: 0x02 bInterfaceClass: 0x0A bInterfaceSubClass: 0x00 bInterfaceProtocol: 0x00 iInterface: 0x07 0x0409: "Gadget Serial Data" Endpoint Descriptor: bEndpointAddress: 0x82 IN Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x00 Endpoint Descriptor: bEndpointAddress: 0x01 OUT Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x00 --------------------------------------------------------- Also, I tried selecting Interface Descriptor 0 and 1 indivisually using below code: --------------------------------------------------------- pairs.UsbInterface = WdfUsbTargetDeviceGetInterface(pDeviceContext->UsbDevice, 1); pairs.SettingIndex = 0; WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_MULTIPLE_INTERFACES(&configParams, 1, &pairs); status = WdfUsbTargetDeviceSelectConfig(pDeviceContext->UsbDevice, WDF_NO_OBJECT_ATTRIBUTES, &configParams); if(!NT_SUCCESS(status)) { DbgPrint("WdfUsbTargetDeviceSelectConfig failed %x...\n", status); return status; } --------------------------------------------------------- in all these cases WdfUsbTargetDeviceSelectConfig is returning status as C0000001 or C000000d. Do I need to try WDM approach Please suggest Thanks.
  Message 2 of 26  
07 Aug 12 12:52
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 8276
Re: SelectInterfaces

xxxxx@gmail.com wrote: > I am trying to load USB device driver (KMDF), > > however WdfUsbTargetDeviceSelectConfig is failing with C0000001 or C000000d error I'm going to take a guess, using my favorite USB initialization bug. My guess is that you installed the driver like this: devcon install "USB\VID_1CA1&PID_0120" xxx.inf If that's what you did, then this is the cause of your problem. "devcon install" creates a FAKE device, and then loads your driver to handle that fake device. Thus, as soon as KMDF tries to talk to the actual device, no one's home. There is no USB stack underneath you. If that's NOT what you did, then we'll have to explore other options. Does your INF file match the composite device (USB\VID_1CA1&PID_0120), or are you matching the individual interfaces? -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 3 of 26  
07 Aug 12 15:34
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Thanks Tim, I am using difx scripts and occassionally loading manually using device manager difxcmd.exe /p xxx.inf Is the above behavior similar to devcon? And in the INF file being used, only vid, pid is matched & no interface Below is the part of the working INF file ( it is actually wdm variant of the working driver and we do not have the source, INF part enhanced to include co-installer stuff and driver part being developed in KMDF) --------------------------------------------------------- [DeviceList] %DESCRIPTION%=DriverInstall,USB\VID_1CA1&PID_0120 [DeviceList.ntamd64] %DESCRIPTION%=DriverInstall.ntamd64,USB\VID_1CA1&PID_0120 ---------------------------------------------------------
  Message 4 of 26  
07 Aug 12 16:19
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 8276
Re: SelectInterfaces

xxxxx@gmail.com wrote: > I am using difx scripts and occassionally loading manually using device manager > difxcmd.exe /p xxx.inf > Is the above behavior similar to devcon? That's the right way to do it. Are you trying to select the configuration in your AddDevice callback? You aren't allowed to talk to USB hardware yet in AddDevice. You have to wait for later, like EvtPrepareHardware or EvtDeviceD0Entry (probably D0Entry). -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 5 of 26  
07 Aug 12 16:33
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

No I am calling in EvtPrepareHardware
  Message 6 of 26  
09 Aug 12 03:22
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Few updates: Tried appending with MI_00 and MI_01 in the Inf file, no luck, got the same result (WdfUsbTargetDeviceSelectConfig fails) One interesting observation: On XP VMware image, with 1st listed selectInterfaces logic, WdfUsbTargetDeviceSelectConfig returns STATUS_SUCCESS and I am able see Interrupt EP on Interface 0 and Bulk in and out EPs on Interface 1. And driver loads successfully. However on the REAL XP or 7 machine using dbgview I got WdfUsbTargetDeviceSelectConfig failed c0000001 and not able to proceed. Please advise any modification needs to be done to get the proper interface and EPs
  Message 7 of 26  
09 Aug 12 03:27
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 8294
RE: SelectInterfaces

Run !wdfkd.wdfdevice (your wdfdevice) from the output you will get your devobj, run !devstack (your device object) Do both before calling SelectConfig and send the output d debt from my phone ________________________________ From: xxxxx@gmail.com Sent: 8/9/2012 12:22 AM To: Windows System Software Devs Interest List Subject: RE:[ntdev] SelectInterfaces Few updates: Tried appending with MI_00 and MI_01 in the Inf file, no luck, got the same result (WdfUsbTargetDeviceSelectConfig fails) One interesting observation: On XP VMware image, with 1st listed selectInterfaces logic, WdfUsbTargetDeviceSelectConfig returns STATUS_SUCCESS and I am able see Interrupt EP on Interface 0 and Bulk in and out EPs on Interface 1. And driver loads successfully. However on the REAL XP or 7 machine using dbgview I got WdfUsbTargetDeviceSelectConfig failed c0000001 and not able to proceed. Please advise any modification needs to be done to get the proper interface and EPs --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
  Message 8 of 26  
13 Aug 12 02:47
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Doron, below is the output (both Real and Virtual Image, I did not find any difference) And sorry for reverting late, using 1394 cable debugging setup, somehow I was not getting symbols properly and resorted to null modem setup. =============================== output of Real XP-SP3 ============================================= kd> !wdfdriverinfo VUSBM ---------------------------------- Default driver image name: VUSBM WDF library image name: wdf01000 FxDriverGlobals 0x84f893f0 WdfBindInfo 0xba3cf044 Version v1.9 build(7600) ---------------------------------- WDFDRIVER: 0x7b2a7f30 !WDFDEVICE 0x7bb31ff8 (FDO) Pnp/Power State: WdfDevStatePnpHardwareAvailable, WdfDevStatePowerD0Starting, WdfDevStatePwrPolStarting context: dt 0x844ce1c8 DEVICE_EXTENSION (size is 0x18c8 bytes) EvtCleanupCallback ba3cfd90 VUSBM!UsbEvtDeviceContextCleanup ---------------------------------- kd> !WDFDEVICE 0x7bb31ff8 Dumping WDFDEVICE 0x7bb31ff8 ================================= WDM PDEVICE_OBJECTs: self 83bdba90, attached 84933030, pdo 84933030 Pnp state: 108 ( WdfDevStatePnpHardwareAvailable ) Power state: 30f ( WdfDevStatePowerD0Starting ) Power Pol state: 501 ( WdfDevStatePwrPolStarting ) Default WDFIOTARGET: 7c398bb8 Pended pnp(IRP_MN_START_DEVICE) irp 0x84507a40 Device is the power policy owner for the stack kd> !devstack 83bdba90 !DevObj !DrvObj !DevExt ObjectName 83c51cb0 *** ERROR: Module load completed but symbols could not be loaded for VEnum.sys \Driver\VEnum 83c51d68 > 83bdba90 \Driver\VUSBM 844ce1c8 V3SER0 84933030 \Driver\usbhub 849330e8 USBPDO-5 !DevNode 83c72600 : DeviceInst is "USB\Vid_1CA1&Pid_0120\0" ServiceName is "VUSBM" =================== output of XP Virtual machine ================================== kd> !wdfdriverinfo VUSBM ---------------------------------- Default driver image name: VUSBM WDF library image name: wdf01000 FxDriverGlobals 0x8203f570 WdfBindInfo 0xb209d044 Version v1.9 build(7600) ---------------------------------- WDFDRIVER: 0x7e0be238 !WDFDEVICE 0x7dfa1ff8 (FDO) Pnp/Power State: WdfDevStatePnpHardwareAvailable, WdfDevStatePowerD0Starting, WdfDevStatePwrPolStarting context: dt 0x8205e1c8 DEVICE_EXTENSION (size is 0x18c8 bytes) EvtCleanupCallback b209dd90 VUSBM!UsbEvtDeviceContextCleanup ---------------------------------- kd> !WDFDEVICE 0x7dfa1ff8 Dumping WDFDEVICE 0x7dfa1ff8 ================================= WDM PDEVICE_OBJECTs: self 81d4d040, attached 81fb07e0, pdo 81fb07e0 Pnp state: 108 ( WdfDevStatePnpHardwareAvailable ) Power state: 30f ( WdfDevStatePowerD0Starting ) Power Pol state: 501 ( WdfDevStatePwrPolStarting ) Default WDFIOTARGET: 7e0745a0 Pended pnp(IRP_MN_START_DEVICE) irp 0x82260d40 Device is the power policy owner for the stack kd> !devstack 81d4d040 !DevObj !DrvObj !DevExt ObjectName 82061030 \Driver\VEnum 820610e8 > 81d4d040 \Driver\VUSBM 8205e1c8 V45SER0 81fb07e0 \Driver\usbhub 81fb0898 USBPDO-4 !DevNode 81fa6a40 : DeviceInst is "USB\Vid_1CA1&Pid_0120\0" ServiceName is "VUSBM"
  Message 9 of 26  
13 Aug 12 06:15
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

below is the wdflogdump for further analysis: ======= logs befire selectConfig ================ kd> !wdflogdump VUSBM Trace searchpath is: Trace format prefix is: %7!u!: %!FUNC! - TMF file used for formatting log is: C:\WinDDK\7600.16385.1\tools\tracing\i386\Wdf01009.tmf *** ERROR: Module load completed but symbols could not be loaded for VEnum.sys Log at 83c6f000 Gather log: Please wait, this may take a moment (reading 4032 bytes). % read so far ... 100 There are 4 log entries --- start of log --- 1: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x7C3FEFF8 !devobj 0x83C37040 entering PnP State WdfDevStatePnpInit from WdfDevStatePnpObjectCreated 2: FxPkgPnp::Dispatch - WDFDEVICE 0x7C3FEFF8 !devobj 0x83C37040, IRP_MJ_PNP, 0x00000000(IRP_MN_START_DEVICE) IRP 0x84D375C0 3: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x7C3FEFF8 !devobj 0x83C37040 entering PnP State WdfDevStatePnpInitStarting from WdfDevStatePnpInit 4: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x7C3FEFF8 !devobj 0x83C37040 entering PnP State WdfDevStatePnpHardwareAvailable from WdfDevStatePnpInitStarting ---- end of log ---- ======= logs after selectConfig fails ================ kd> !wdflogdump VUSBM Trace searchpath is: Trace format prefix is: %7!u!: %!FUNC! - TMF file used for formatting log is: C:\WinDDK\7600.16385.1\tools\tracing\i386\Wdf01009.tmf Log at 83c6f000 Gather log: Please wait, this may take a moment (reading 4032 bytes). % read so far ... 100 There are 9 log entries --- start of log --- 1: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x7C3FEFF8 !devobj 0x83C37040 entering PnP State WdfDevStatePnpInit from WdfDevStatePnpObjectCreated 2: FxPkgPnp::Dispatch - WDFDEVICE 0x7C3FEFF8 !devobj 0x83C37040, IRP_MJ_PNP, 0x00000000(IRP_MN_START_DEVICE) IRP 0x84D375C0 3: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x7C3FEFF8 !devobj 0x83C37040 entering PnP State WdfDevStatePnpInitStarting from WdfDevStatePnpInit 4: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x7C3FEFF8 !devobj 0x83C37040 entering PnP State WdfDevStatePnpHardwareAvailable from WdfDevStatePnpInitStarting 5: FxIoTarget::SubmitLocked - ignoring WDFIOTARGET 7B9F9180 state, sending WDFREQUEST F7A12538, state WdfIoTargetStarted 6: FxUsbDevice::SelectConfig - USB core failed Select Configuration, 0xc0000001(STATUS_UNSUCCESSFUL) 7: FxIoTarget::WaitForDisposeEvent - WDFIOTARGET 7B251BC0, Waiting on Dispose event F7A1249C 8: FxIoTarget::WaitForDisposeEvent - WDFIOTARGET 7C31DCC0, Waiting on Dispose event F7A1249C 9: FxIoTarget::WaitForDisposeEvent - WDFIOTARGET 7B1FC480, Waiting on Dispose event F7A1249C ---- end of log ----
  Message 10 of 26  
13 Aug 12 23:28
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Hi All, Any clue, where I might be doing wrong Thanks
  Message 11 of 26  
14 Aug 12 12:13
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 8276
Re: SelectInterfaces

xxxxx@gmail.com wrote: > ======= logs after selectConfig fails ================ > kd> !wdflogdump VUSBM > Trace searchpath is: > ... > 4: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x7C3FEFF8 !devobj 0x83C37040 entering PnP State WdfDevStatePnpHardwareAvailable from WdfDevStatePnpInitStarting > 5: FxIoTarget::SubmitLocked - ignoring WDFIOTARGET 7B9F9180 state, sending WDFREQUEST F7A12538, state WdfIoTargetStarted > 6: FxUsbDevice::SelectConfig - USB core failed Select Configuration, 0xc0000001(STATUS_UNSUCCESSFUL) What host controller are you using? Is this a USB 3 host controller? Can you show us your descriptors? Have you tried this in other computers (that is, on other real hardware, not inside a VM)? -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 12 of 26  
14 Aug 12 12:34
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Thanks Tim, I tested on couple of other real machines, same result The controller "Intel 82801FB/FBM USB2 EHCI & UHCI" and it is not USB3 > Can you show us your descriptors? Are you referring "USB_CONFIGURATION_DESCRIPTOR"
  Message 13 of 26  
14 Aug 12 14:26
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 8276
Re: SelectInterfaces

xxxxx@gmail.com wrote: > Thanks Tim, > > I tested on couple of other real machines, same result > The controller "Intel 82801FB/FBM USB2 EHCI & UHCI" and it is not USB3 No, quite the opposite -- it's an antique. >> Can you show us your descriptors? > Are you referring "USB_CONFIGURATION_DESCRIPTOR" The device descriptor and configuration descriptor. are of interest. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 14 of 26  
15 Aug 12 17:07
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

More updates: Compared old driver with the KMDF using usb spy tool, below are the observations: 1. start device 2. query interface (not supported - KMDF; no request/response in OLD driver) 3. get descriptor from device (Dvc ) 4. get descriptor from device (cfg ind 0) 5. get descriptor from device (cfg ind 0) 6. get status from device (unsuccessful stall PID - KMDF; no request/response in OLD driver) 7. query interface (no request/response in OLD driver) 8. Select Config (unsuccessful set config failed - KMDF; SUCCESS in OLD driver) From the logs - 2, 6, 7 steps where not present with the OLD working driver. And Select Config URB details showed below difference in the packet between OLD and KMDF driver. Interface 0 PIPE[0] - MaximumTransferSize = 00001000h (OLD) MaximumTransferSize = FFFFFFFFh (KMDF) Interface 1 PIPE(0) - MaximumTransferSize = 00002000h (OLD) MaximumTransferSize = FFFFFFFFh (KMDF) PIPE(1) - MaximumTransferSize = 00002000h (OLD) MaximumTransferSize = FFFFFFFFh (KMDF) Now, HOW CAN I SET the MaximumTransferSize to 00001000h for Iface0, pipe0 and MaximumTransferSize to 00002000h Iface1, pipe0 and pipe1 in KMDF so that my select config succeeds???
  Message 15 of 26  
15 Aug 12 17:21
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 8294
RE: RE:SelectInterfaces

MaximumTransferSize is meaningless on XP and later OS's, it is not the root cause of your probelm -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com Sent: Wednesday, August 15, 2012 2:06 PM To: Windows System Software Devs Interest List Subject: RE:[ntdev] SelectInterfaces More updates: Compared old driver with the KMDF using usb spy tool, below are the observations: 1. start device 2. query interface (not supported - KMDF; no request/response in OLD driver) 3. get descriptor from device (Dvc ) 4. get descriptor from device (cfg ind 0) 5. get descriptor from device (cfg ind 0) 6. get status from device (unsuccessful stall PID - KMDF; no request/response in OLD driver) 7. query interface (no request/response in OLD driver) 8. Select Config (unsuccessful set config failed - KMDF; SUCCESS in OLD driver) From the logs - 2, 6, 7 steps where not present with the OLD working driver. And Select Config URB details showed below difference in the packet between OLD and KMDF driver. Interface 0 PIPE[0] - MaximumTransferSize = 00001000h (OLD) MaximumTransferSize = FFFFFFFFh (KMDF) Interface 1 PIPE(0) - MaximumTransferSize = 00002000h (OLD) MaximumTransferSize = FFFFFFFFh (KMDF) PIPE(1) - MaximumTransferSize = 00002000h (OLD) MaximumTransferSize = FFFFFFFFh (KMDF) Now, HOW CAN I SET the MaximumTransferSize to 00001000h for Iface0, pipe0 and MaximumTransferSize to 00002000h Iface1, pipe0 and pipe1 in KMDF so that my select config succeeds??? --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  Message 16 of 26  
15 Aug 12 17:30
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Thanks Doron, I found only this difference in the _URB_SELECT_CONFIGURATION, any suggestions where I am possibly going wrong
  Message 17 of 26  
15 Aug 12 18:44
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 8294
RE: RE:SelectInterfaces

Capture a usb core stack etw log trace and see what the differences are. http://blogs.msdn.com/b/usbcoreblog/archive/2009/12/04/etw-in-the-windows-7-usb-c ore-stack.aspx d -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com Sent: Wednesday, August 15, 2012 2:30 PM To: Windows System Software Devs Interest List Subject: RE:[ntdev] SelectInterfaces Thanks Doron, I found only this difference in the _URB_SELECT_CONFIGURATION, any suggestions where I am possibly going wrong --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  Message 18 of 26  
16 Aug 12 11:14
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Thanks Doron, after comparing both the usbtrace.etl files I can see extra GET_STATUS being issued in KMDF and completed with USBD_STATUS_STALL_PID. However this GET_STATUS is not logged in the OLD driver traces. ============================================= 258 7:07:09 PM 8/16/2012 3.8861921 (4) USBPort USBPort:Dispatch URB_FUNCTION_GET_STATUS_FROM_DEVICE 259 7:07:09 PM 8/16/2012 3.8871676 (2588) USBPort USBPort:Complete URB_FUNCTION_CONTROL_TRANSFER ============================================= From the old threads, I saw it is getting called during WdfUsbTargetDeviceCreate So any tweak needs to be done before WdfUsbTargetDeviceCreate? please advice
  Message 19 of 26  
16 Aug 12 12:00
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Also retried the config descriptor details : bConfigurationValue = 2 "Contains the value that is used to select a configuration. This value is passed to the USB SetConfiguration request , as described in version 1.1 of the Universal Serial Bus Specification. The port driver does not currently expose a service that allows higher-level drivers to set the configuration. " Is this the cause? normally we have seen the bConfigurationValue =1, where as this device is having only 1 configuration as indicated by above usbview "bNumConfigurations: 0x01"
  Message 20 of 26  
16 Aug 12 12:50
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 8294
RE: SelectInterfaces

Ni, fix your device not to stall on get status d debt from my phone ________________________________ From: xxxxx@gmail.com Sent: 8/16/2012 8:14 AM To: Windows System Software Devs Interest List Subject: RE:[ntdev] SelectInterfaces Thanks Doron, after comparing both the usbtrace.etl files I can see extra GET_STATUS being issued in KMDF and completed with USBD_STATUS_STALL_PID. However this GET_STATUS is not logged in the OLD driver traces. ==========================3D=================== 258 7:07:09 PM 8/16/2012 3.8861921 (4) USBPort USBPort:Dispatch URB_FUNCTION_GET_STATUS_FROM_DEVICE 259 7:07:09 PM 8/16/2012 3.8871676 (2588) USBPort USBPort:Complete URB_FUNCTION_CONTROL_TRANSFER ==========================3D=================== From the old threads, I saw it is getting called during WdfUsbTargetDeviceCreate So any tweak needs to be done before WdfUsbTargetDeviceCreate? please advice --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
  Message 21 of 26  
16 Aug 12 14:03
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Thanks Doron, I definitely convey this to firmware team. Just weighing other options, is there any ways to support (skip GET STATUS) from KMDF? considering this h/w is already sitting in numerous PoS devices which are currently present in the market and upgrading all these devices' firmware going to take considerable time.
  Message 22 of 26  
16 Aug 12 14:16
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 8294
RE: RE:SelectInterfaces

No, no way to tell kmdf to skip the get status. -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com Sent: Thursday, August 16, 2012 11:02 AM To: Windows System Software Devs Interest List Subject: RE:[ntdev] SelectInterfaces Thanks Doron, I definitely convey this to firmware team. Just weighing other options, is there any ways to support (skip GET STATUS) from KMDF? considering this h/w is already sitting in numerous PoS devices which are currently present in the market and upgrading all these devices' firmware going to take considerable time. --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  Message 23 of 26  
17 Aug 12 10:12
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Doron, I was reading below thread http://www.osronline.com/showthread.cfm?link=121176 using lower filter approach is it possible to skip the STALL_PID status, please advice
  Message 24 of 26  
17 Aug 12 10:20
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 8294
RE: SelectInterfaces

I guess you could fake out your function driver with a lower filter which intercepts the get_status request and completed it without sending it further down the stack. d debt from my phone ________________________________ From: xxxxx@gmail.com Sent: 8/17/2012 7:13 AM To: Windows System Software Devs Interest List Subject: RE:[ntdev] SelectInterfaces Doron, I was reading below thread http://www.osronline.com/showthread.cfm?link=121176 using lower filter approach is it possible to skip the STALL_PID status, please advice --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
  Message 25 of 26  
17 Aug 12 10:30
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Thanks, I will try with toaster-general-kmdf sample and update
  Message 26 of 26  
21 Aug 12 03:37
Steven
xxxxxx@gmail.com
Join Date: 25 Nov 2010
Posts To This List: 139
RE: SelectInterfaces

Doron, With toaster-general-KMDF-Filter, I was able to overcome this GET_STATUS hurdle and able to fake the response. Once again Many many thanks to Doron and Tim.
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 22:36.


Copyright ©2012, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license