UMDF USB Driver Doesn't Load

We have a UMDF USB driver, and one of our customers is having some problems that leaves me quite perplexed.

Our driver doesn’t load. In device manager, the device gets a yellow flag, and has error code 31. Our driver’s OnDeviceAdd callback is never called - I can tell because it has an unconditional OutputDebugString() call that never happens.

Poking around in process monitor, I see that wudfhost.exe doesn’t appear to make any accesses of our driver’s DLL, but I do see that it gets some ACCESS_DENIED when trying to open ntdll.dll, kernel32.dll, and a variety of other system DLLs. This is all on XP32, SP3.

An older, WDM-based driver, works fine, so I don’t suspect any hardware problems.

Any ideas on what might be causing this or how to debug it? I can’t debug our driver on a customers computer, but I could provide them with a more highly instrumented driver if I knew where to instrument - but it doesn’t look like its even getting to our driver.

Thanks,
Mike

Did you check the setupapi.dev.log and setupapi.app.log under Windows\inf dir?

Thanks,
Niraj

Windows\Inf\setup.*.log appear to only be created on Windows Vista and newer, while this is happening on Windows XP.

Snippet #1, at the bottom of this email, is from Windows\setupapi.log from when the driver was first installed, and snippet #2 is what you get if the installation is repeated. Our driver isn’t mentioned elsewhere in the log, and the only other mentions of the device appear to come from when the customer reverted to our older, WDM-based, driver.

Mike

On Jul 16, 2010, at 4:27 PM, wrote:
> Did you check the setupapi.dev.log and setupapi.app.log under Windows\inf dir?
>

> On Jul 16, 2010, at 1:19 PM, Mike Laiosa wrote:
>
>> We have a UMDF USB driver, and one of our customers is having some problems that leaves me quite perplexed.
>>
>> Our driver doesn’t load. In device manager, the device gets a yellow flag, and has error code 31. Our driver’s OnDeviceAdd callback is never called - I can tell because it has an unconditional OutputDebugString() call that never happens.
>>
>> Poking around in process monitor, I see that wudfhost.exe doesn’t appear to make any accesses of our driver’s DLL, but I do see that it gets some ACCESS_DENIED when trying to open ntdll.dll, kernel32.dll, and a variety of other system DLLs. This is all on XP32, SP3.
>>
>> An older, WDM-based driver, works fine, so I don’t suspect any hardware problems.
>>
>> Any ideas on what might be causing this or how to debug it? I can’t debug our driver on a customers computer, but I could provide them with a more highly instrumented driver if I knew where to instrument - but it doesn’t look like its even getting to our driver.

Snippet #1: Initial device installation. The computer was rebooted after installing.
[2010/05/19 11:09:32 580.1378 Driver Install]
#-019 Searching for hardware ID(s): usb\vid_0e1e&pid_0101&rev_0100,usb\vid_0e1e&pid_0101
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#-199 Executing “C:\GHS*REDACTED*\drivertool.exe” with command line: drivertool
#I022 Found “USB\VID_0E1E&PID_0101” in C:\WINDOWS\INF\oem27.inf; Device: “Green Hills Microprocessor Debug Device”; Driver: “Green Hills Microprocessor Debug Device”; Provider: “Green Hills Software, Inc”; Mfg: “Green Hills Software, Inc”; Section name: “ghsusbDev”.
#I023 Actual install section: [ghsusbDev.NT]. Rank: 0x00000001. Effective driver date: 07/30/2003.
#-019 Searching for hardware ID(s): usb\vid_0e1e&pid_0101&rev_0100,usb\vid_0e1e&pid_0101
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#I022 Found “USB\VID_0E1E&PID_0101” in c:\windows\system32\drvstore\greenhills_11e30a8c24e7442dcd9f62b75247640cc314e9ed\greenhillsprobe.inf; Device: “Green Hills Probe”; Driver: “Green Hills Probe”; Provider: “Green Hills Software, Inc.”; Mfg: “Green Hills Software, Inc.”; Section name: “GhsUsb_Install”.
#I023 Actual install section: [GhsUsb_Install.NT]. Rank: 0x00000001. Effective driver date: 01/13/2010.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [GhsUsb_Install] in “c:\windows\system32\drvstore\greenhills_11e30a8c24e7442dcd9f62b75247640cc314e9ed\greenhillsprobe.inf”.
#I062 Class GUID of device changed to: {0FFCDA5E-6B7B-11DE-996F-0019B977CDE3}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
[2010/05/19 11:09:33 580.1514]
#-199 Executing “C:\GHS*REDACTED*\drivertool.exe” with command line: drivertool
#I140 Installing device class: “GHS” {0ffcda5e-6b7b-11de-996f-0019b977cde3}.
#I141 Class install completed with no errors.
[2010/05/19 11:09:33 580.1512]
#-199 Executing “C:\GHS*REDACTED*\drivertool.exe” with command line: drivertool
#I060 Set selected driver.
#-019 Searching for hardware ID(s): usb\vid_0e1e&pid_0101&rev_0100,usb\vid_0e1e&pid_0101
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#I022 Found “USB\VID_0E1E&PID_0101” in c:\windows\system32\drvstore\greenhills_11e30a8c24e7442dcd9f62b75247640cc314e9ed\greenhillsprobe.inf; Device: “Green Hills Probe”; Driver: “Green Hills Probe”; Provider: “Green Hills Software, Inc.”; Mfg: “Green Hills Software, Inc.”; Section name: “GhsUsb_Install”.
#I023 Actual install section: [GhsUsb_Install.NT]. Rank: 0x00000001. Effective driver date: 01/13/2010.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [GhsUsb_Install] in “c:\windows\system32\drvstore\greenhills_11e30a8c24e7442dcd9f62b75247640cc314e9ed\greenhillsprobe.inf”.
#I320 Class GUID of device remains: {0FFCDA5E-6B7B-11DE-996F-0019B977CDE3}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-124 Doing copy-only install of “USB\VID_0E1E&PID_0101\15382”.
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [GhsUsb_Install.NT.Interfaces] from “c:\windows\system32\drvstore\greenhills_11e30a8c24e7442dcd9f62b75247640cc314e9ed\greenhillsprobe.inf”.
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of “USB\VID_0E1E&PID_0101\15382”.
#W165 Device “USB\VID_0E1E&PID_0101\15382” required reboot: Device not started (unknown reason).
#I121 Device install of “USB\VID_0E1E&PID_0101\15382” finished successfully.

Snippet #2: Repeating installation.
[2010/05/19 11:13:39 2508.834 Driver Install]
#-019 Searching for hardware ID(s): usb\vid_0e1e&pid_0101&rev_0100,usb\vid_0e1e&pid_0101
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#-199 Executing “C:\GHS*REDACTED*\drivertool.exe” with command line: drivertool
#I063 Selected driver installs from section [ghsusb.Dev] in “c:\windows\inf\ghsusb.inf”.
#I320 Class GUID of device remains: {36FC9E60-C465-11CF-8056-444553540000}.
#I060 Set selected driver.
#-124 Doing copy-only install of “USB\VID_0E1E&PID_0101\15345”.
#E256 SetupCloseFileQueue called while queue is in use (locked).


Mike Laiosa
Green Hills Software

You could try decoding the UMDF WPP traces from “%windir%\System32\LogFiles\WUDF\WudfTrace.etl” to see if there are any clues there. The tmf file (Wudf01009.tmf) should be in the WDK under the tools\tracing directory. Please see http://msdn.microsoft.com/en-us/library/ff544889(VS.85).aspx for more information.

“Mike Laiosa” wrote in message news:xxxxx@ntdev…
Windows\Inf\setup..log appear to only be created on Windows Vista and newer, while this is happening on Windows XP.

Snippet #1, at the bottom of this email, is from Windows\setupapi.log from when the driver was first installed, and snippet #2 is what you get if the installation is repeated. Our driver isn’t mentioned elsewhere in the log, and the only other mentions of the device appear to come from when the customer reverted to our older, WDM-based, driver.

Mike

On Jul 16, 2010, at 4:27 PM, wrote:
Did you check the setupapi.dev.log and setupapi.app.log under Windows\inf dir?

On Jul 16, 2010, at 1:19 PM, Mike Laiosa wrote:

We have a UMDF USB driver, and one of our customers is having some problems that leaves me quite perplexed.

Our driver doesn’t load. In device manager, the device gets a yellow flag, and has error code 31. Our driver’s OnDeviceAdd callback is never called - I can tell because it has an unconditional OutputDebugString() call that never happens.

Poking around in process monitor, I see that wudfhost.exe doesn’t appear to make any accesses of our driver’s DLL, but I do see that it gets some ACCESS_DENIED when trying to open ntdll.dll, kernel32.dll, and a variety of other system DLLs. This is all on XP32, SP3.

An older, WDM-based driver, works fine, so I don’t suspect any hardware problems.

Any ideas on what might be causing this or how to debug it? I can’t debug our driver on a customers computer, but I could provide them with a more highly instrumented driver if I knew where to instrument - but it doesn’t look like its even getting to our driver.

Snippet #1: Initial device installation. The computer was rebooted after installing.
[2010/05/19 11:09:32 580.1378 Driver Install]
#-019 Searching for hardware ID(s): usb\vid_0e1e&pid_0101&rev_0100,usb\vid_0e1e&pid_0101
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#-199 Executing "C:\GHS*REDACTED
\drivertool.exe" with command line: drivertool
#I022 Found “USB\VID_0E1E&PID_0101” in C:\WINDOWS\INF\oem27.inf; Device: “Green Hills Microprocessor Debug Device”; Driver: “Green Hills Microprocessor Debug Device”; Provider: “Green Hills Software, Inc”; Mfg: “Green Hills Software, Inc”; Section name: “ghsusbDev”.
#I023 Actual install section: [ghsusbDev.NT]. Rank: 0x00000001. Effective driver date: 07/30/2003.
#-019 Searching for hardware ID(s): usb\vid_0e1e&pid_0101&rev_0100,usb\vid_0e1e&pid_0101
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#I022 Found “USB\VID_0E1E&PID_0101” in c:\windows\system32\drvstore\greenhills_11e30a8c24e7442dcd9f62b75247640cc314e9ed\greenhillsprobe.inf; Device: “Green Hills Probe”; Driver: “Green Hills Probe”; Provider: “Green Hills Software, Inc.”; Mfg: “Green Hills Software, Inc.”; Section name: “GhsUsb_Install”.
#I023 Actual install section: [GhsUsb_Install.NT]. Rank: 0x00000001. Effective driver date: 01/13/2010.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [GhsUsb_Install] in “c:\windows\system32\drvstore\greenhills_11e30a8c24e7442dcd9f62b75247640cc314e9ed\greenhillsprobe.inf”.
#I062 Class GUID of device changed to: {0FFCDA5E-6B7B-11DE-996F-0019B977CDE3}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
[2010/05/19 11:09:33 580.1514]
#-199 Executing “C:\GHS*REDACTED*\drivertool.exe” with command line: drivertool
#I140 Installing device class: “GHS” {0ffcda5e-6b7b-11de-996f-0019b977cde3}.
#I141 Class install completed with no errors.
[2010/05/19 11:09:33 580.1512]
#-199 Executing “C:\GHS*REDACTED*\drivertool.exe” with command line: drivertool
#I060 Set selected driver.
#-019 Searching for hardware ID(s): usb\vid_0e1e&pid_0101&rev_0100,usb\vid_0e1e&pid_0101
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#I022 Found “USB\VID_0E1E&PID_0101” in c:\windows\system32\drvstore\greenhills_11e30a8c24e7442dcd9f62b75247640cc314e9ed\greenhillsprobe.inf; Device: “Green Hills Probe”; Driver: “Green Hills Probe”; Provider: “Green Hills Software, Inc.”; Mfg: “Green Hills Software, Inc.”; Section name: “GhsUsb_Install”.
#I023 Actual install section: [GhsUsb_Install.NT]. Rank: 0x00000001. Effective driver date: 01/13/2010.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [GhsUsb_Install] in “c:\windows\system32\drvstore\greenhills_11e30a8c24e7442dcd9f62b75247640cc314e9ed\greenhillsprobe.inf”.
#I320 Class GUID of device remains: {0FFCDA5E-6B7B-11DE-996F-0019B977CDE3}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-124 Doing copy-only install of “USB\VID_0E1E&PID_0101\15382”.
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [GhsUsb_Install.NT.Interfaces] from “c:\windows\system32\drvstore\greenhills_11e30a8c24e7442dcd9f62b75247640cc314e9ed\greenhillsprobe.inf”.
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of “USB\VID_0E1E&PID_0101\15382”.
#W165 Device “USB\VID_0E1E&PID_0101\15382” required reboot: Device not started (unknown reason).
#I121 Device install of “USB\VID_0E1E&PID_0101\15382” finished successfully.

Snippet #2: Repeating installation.
[2010/05/19 11:13:39 2508.834 Driver Install]
#-019 Searching for hardware ID(s): usb\vid_0e1e&pid_0101&rev_0100,usb\vid_0e1e&pid_0101
#-018 Searching for compatible ID(s): usb\class_ff&subclass_00&prot_00,usb\class_ff&subclass_00,usb\class_ff
#-199 Executing “C:\GHS*REDACTED*\drivertool.exe” with command line: drivertool
#I063 Selected driver installs from section [ghsusb.Dev] in “c:\windows\inf\ghsusb.inf”.
#I320 Class GUID of device remains: {36FC9E60-C465-11CF-8056-444553540000}.
#I060 Set selected driver.
#-124 Doing copy-only install of “USB\VID_0E1E&PID_0101\15345”.
#E256 SetupCloseFileQueue called while queue is in use (locked).


Mike Laiosa
Green Hills Software