Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Re: Dear Don,I follow the method, and have set symbol path to Microsoft

Reply
Thread Tools Display Modes

Re: Dear Don,I follow the method, and have set symbol path to Microsoft

 
 
Abdul Qader
Guest
Posts: n/a

 
      01-05-2011
ymhuang,

I am facing the same problem as you are(were?).
Did you resolve the issue of winusb not suspending?

Thaks
Abdul

> On Tuesday, August 04, 2009 10:03 PM Dean wrote:


> Hi there is a document describe how to Selective Suspend in a UMDF Function
> Driver. Here is the link
> http://www.microsoft.com/whdc/driver...lect-susp.mspx
>
> My question is if I set idle time-out to 10 seconds, and then I plug in a
> USB device, I do not open any client software to read or write to this USB
> device for 20 seconds, will this USB device suspend?



>> On Wednesday, August 05, 2009 7:21 PM Doron Holan [MSFT] wrote:


>> if the umdf driver enables selective suspend, yes
>>
>> d
>>
>> --
>>
>> This posting is provided "AS IS" with no warranties, and confers no rights.



>>> On Wednesday, August 05, 2009 11:36 PM Dean wrote:


>>> Hi again, I make a test.
>>>
>>> PC:
>>> Windows Vista sp2
>>> Intel Core2 Duo CPU E8300
>>> 4G RAM
>>> 32-bit Operating system
>>>
>>> WinUSB:
>>> WdfCoInstaller01007.dll
>>> WinUSBCoInstaller.dll
>>>
>>> WinUSB settings:
>>> HKR,,"DeviceIdleEnabled",0x00010001,1
>>> HKR,,"DeviceIdleIgnoreWakeEnable",0x00010001,1
>>> HKR,,"UserSetDeviceIdleEnabled",0x00010001,1
>>> HKR,,"DefaultIdleState",0x00010001,1
>>> HKR,,"DefaultIdleTimeout",0x00010001,5000
>>>
>>> USB firmware:
>>> Catch USB interrupt, and print the interrupt source to RS232.
>>> If value = 0x80, the interrupt source is Suspend signaling on the bus.
>>>
>>> Test senario 1:
>>> I plug in a USB device to my PC, later I disable the USB hub in device
>>> manager. (This senario simulate PC is standby or sleep.)
>>> Result:
>>> RS232 print 0x80, and the current of the usb device is power down, change
>>> from 25mA to 2.5mA. The selective suspend is working.
>>>
>>> Test senario 2:
>>> I plug in a USB device to my PC, I do not open any client software to read or
>>> write to this USB device for more than 5 seconds (I set the idle timeout to 5
>>> seconds:HKR,,"DefaultIdleTimeout",0x00010001,5000) .
>>> Result:
>>> RS232 print nothing, and the current of the usb device is remain 25mA. The
>>> selective suspend is not working.
>>>
>>> Test senario 3:
>>> I plug in a USB device to my PC, I open any client software write a message
>>> frame to this USB device, and read an expected message frame from the usb
>>> device. And then close my client software(close file handle). Do nothing for
>>> more than 20 seconds.
>>> Result:
>>> RS232 print nothing, and the current of the usb device is remain 25mA. The
>>> selective suspend is not working.
>>>
>>>
>>> Conclusion:
>>> Using WinUSB as my driver, I would like to make my USB device be able to
>>> suspend while PC is running normally. But when the USB device is idle, WinUSB
>>> does not generate suspend signal, so I could not execute suspend command(some
>>> save power command) in my USB device firmware. I can only do it when PC is
>>> standby. I think I miss something, I need help. Thank for any help.



>>>> On Wednesday, August 05, 2009 11:51 PM Dean wrote:


>>>> By the way, the mcu of USB device is Silicon Laboratories C8051F321.



>>>>> On Thursday, August 06, 2009 8:07 PM Don Miller[MS] wrote:


>>>>> Hi Dean,
>>>>>
>>>>> From your below info it looks like you have the correct settings assuming
>>>>> that winusb.sys is the power policy owner for your USB device. To make sure
>>>>> can you please do the below kernel debugger commands (I am assuming you are
>>>>> using WinDbg):
>>>>>
>>>>> 1) Break into the debugger and set your symbols to point to MS symbol
>>>>> server.
>>>>>
>>>>> 2) Do a !devnode 0 1 and find your USB device in the list. For example I
>>>>> have a OSR USB-FX2 device plugged in on my test system:
>>>>>
>>>>> !devnode 0 1
>>>>> .
>>>>> .
>>>>> .
>>>>>
>>>>> DevNode 0x89388e78 for PDO 0x89c35150
>>>>> InstancePath is "USB\VID_0547&PID_1002\5&f86e282&0&4"
>>>>> ServiceName is "WUDFRd"
>>>>> State = DeviceNodeStarted (0x308)
>>>>> Previous State = DeviceNodeEnumerateCompletion (0x30d)
>>>>>
>>>>> 3) Using the above PDO do the below:
>>>>>
>>>>> !devstack 0x89c35150
>>>>> .
>>>>> .
>>>>> .
>>>>> !DevObj !DrvObj !DevExt ObjectName
>>>>> 8930f9f8 \Driver\WUDFRd 8930fab0
>>>>> 8936c4b0 \Driver\WinUsb 98364f20
>>>>> !DevNode 89388e78 :
>>>>> DeviceInst is "USB\VID_0547&PID_1002\5&f86e282&0&4"
>>>>> ServiceName is "WUDFRd"
>>>>>
>>>>> 4) Using the WinUSB !DevExt value, do the below:
>>>>>
>>>>> dt 98364f20 winusb!_device_extension -r
>>>>> .
>>>>> .
>>>>> .
>>>>> +0x000 UsbDevice : 0x67c6d118 WDFUSBDEVICE__
>>>>> +0x000 unused : ??
>>>>> +0x004 UsbDeviceInformation : _WDF_USB_DEVICE_INFORMATION
>>>>> +0x000 Size : 0x14
>>>>> +0x004 UsbdVersionInformation : _USBD_VERSION_INFORMATION
>>>>> +0x000 USBDI_Version : 0x600
>>>>> +0x004 Supported_USB_Version : 0x200
>>>>> +0x00c HcdPortCapabilities : 0
>>>>> +0x010 Traits : 6
>>>>> +0x018 PowerPolicyLock : 0
>>>>> +0x01c DeviceDescriptor : 0x8930b328 _USB_DEVICE_DESCRIPTOR
>>>>> +0x000 bLength : 0x12 ''
>>>>> +0x001 bDescriptorType : 0x1 ''
>>>>> +0x002 bcdUSB : 2
>>>>> +0x004 bDeviceClass : 0 ''
>>>>> +0x005 bDeviceSubClass : 0 ''
>>>>> +0x006 bDeviceProtocol : 0 ''
>>>>> +0x007 bMaxPacketSize0 : 0x40 '@'
>>>>> +0x008 idVendor : 0x547
>>>>> +0x00a idProduct : 0x1002
>>>>> +0x00c bcdDevice : 0
>>>>> +0x00e iManufacturer : 0x1 ''
>>>>> +0x00f iProduct : 0x2 ''
>>>>> +0x010 iSerialNumber : 0 ''
>>>>> +0x011 bNumConfigurations : 0x1 ''
>>>>> +0x020 ConfigurationDescriptor : 0x89cd28c8 _USB_CONFIGURATION_DESCRIPTOR
>>>>> +0x000 bLength : 0x9 ''
>>>>> +0x001 bDescriptorType : 0x2 ''
>>>>> +0x002 wTotalLength : 0x27
>>>>> +0x004 bNumInterfaces : 0x1 ''
>>>>> +0x005 bConfigurationValue : 0x1 ''
>>>>> +0x006 iConfiguration : 0x4 ''
>>>>> +0x007 bmAttributes : 0xa0 ''
>>>>> +0x008 MaxPower : 0x32 '2'
>>>>> +0x024 ConfigurationHandle : (null)
>>>>> +0x028 InterfaceMutex : _FAST_MUTEX
>>>>> +0x000 Count : 1
>>>>> +0x004 Owner : (null)
>>>>> +0x008 Contention : 0
>>>>> +0x00c Event : _KEVENT
>>>>> +0x000 Header : _DISPATCHER_HEADER
>>>>> +0x01c OldIrql : 0
>>>>> +0x048 InterfaceCount : 0x1 ''
>>>>> +0x04c Interfaces : 0x892880f0 _WINUSB_INTERFACE
>>>>> +0x000 InterfaceNumber : 0 ''
>>>>> +0x001 CurrentAltSetting : 0 ''
>>>>> +0x004 WdfInterface : 0x67c6f060 WDFUSBINTERFACE__
>>>>> +0x000 unused : ??
>>>>> +0x008 PipeCount : 3
>>>>> +0x00c Pipes : [32] 0x89c7b6c0 _PIPE
>>>>> +0x000 PipeInformation : _WDF_USB_PIPE_INFORMATION
>>>>> +0x014 PipePolicy : _WINUSB_PIPE_POLICY
>>>>> +0x024 PipePolicyLock : 0
>>>>> +0x028 IoQueue : (null)
>>>>> +0x02c RemainderPacket : _PACKET
>>>>> +0x038 CurrentRequest : (null)



>>>>>> On Thursday, August 06, 2009 11:28 PM Dean wrote:


>>>>>> Thank you, Don. I do not really understand how to do below steps
>>>>>>
>>>>>>
>>>>>>
>>>>>> I download the Debugging Tools for Windows latest Release version 6.11.1.404
>>>>>> - March 27, 2009 from
>>>>>> http://www.microsoft.com/whdc/devtoo...nstallx86.mspx
>>>>>> After install, I launch WinDbg, I do not know how to "Break into the debugger
>>>>>> and set your symbols to point to MS symbol server."
>>>>>>
>>>>>> I find a file "C:\Program Files\Debugging Tools for Windows
>>>>>> (x86)\symsrv.dll", its description is "symbol server", so I use WinDbg open
>>>>>> symsrv.dll, but I do not know how to continue to type "!devnote 0 1".



>>>>>>> On Monday, August 10, 2009 9:38 PM Dean wrote:


>>>>>>> Thank you. I do not really understand how to do below steps
>>>>>>>
>>>>>>> 1) Break into the debugger and set your symbols to point to MS symbol
>>>>>>>
>>>>>>> 2) Do a !devnode 0 1 and find your USB device in the list. For example I
>>>>>>> have a OSR USB-FX2 device plugged in on my test system:
>>>>>>>
>>>>>>> I download the Debugging Tools for Windows latest Release version 6.11.1.404
>>>>>>> - March 27, 2009 from
>>>>>>> http://www.microsoft.com/whdc/devtoo...nstallx86.mspx
>>>>>>> After install, I launch WinDbg, I do not know how to "Break into the debugger
>>>>>>> and set your symbols to point to MS symbol server."
>>>>>>>
>>>>>>> I find a file "C:\Program Files\Debugging Tools for Windows
>>>>>>> (x86)\symsrv.dll", its description is "symbol server", so I use WinDbg open
>>>>>>> symsrv.dll, but I do not know how to continue to type "!devnote 0 1".
>>>>>>>
>>>>>>>
>>>>>>> "Don Miller[MS]" wrote:



>>>>>>>> On Wednesday, August 12, 2009 7:06 PM Don Miller[MS] wrote:


>>>>>>>> Dean,
>>>>>>>>
>>>>>>>> In order to best do kernel debugging you will need to have two systems
>>>>>>>> connected via a 1394 cable or a serial cable. The debugee system will be
>>>>>>>> the system you are debugging the issue on, ie, running WinUSB on. The
>>>>>>>> debugger system will typically be your dev box and is running the WinDbg
>>>>>>>> debugger client. The WinDbg help file has documentation on how to setup
>>>>>>>> this debug scenario. Once you have the debugger setup then you do a
>>>>>>>> Ctrl+Break to break into the WinDbg debugger client and perform the commands
>>>>>>>> that I have listed.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> -Don[MS]



>>>>>>>>> On Monday, September 07, 2009 6:07 AM Dean wrote:


>>>>>>>>> I download WDDK 7600.16385.0, and resolve the problem. This is a bug if use
>>>>>>>>> the old version WinUSB.



>>>>>>>>>> On Monday, October 12, 2009 8:29 PM ymhuang wrote:


>>>>>>>>>> Dear Don,
>>>>>>>>>>
>>>>>>>>>> I follow the method, and have set symbol path to Microsoft symbol
>>>>>>>>>> server, but no WinUSB symbol there.
>>>>>>>>>>
>>>>>>>>>> Any suggestion?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Connected to Windows XP 2600 x86 compatible target at (Mon Oct 12
>>>>>>>>>> 13:28:29.859 2009 (GMT+8)), ptr64 FALSE
>>>>>>>>>> Symbol search path is: SRV*C:\Symbols\Microsoft\Web*http://
>>>>>>>>>> msdl.microsoft.com/download/symbols
>>>>>>>>>>
>>>>>>>>>> ...
>>>>>>>>>>
>>>>>>>>>> lkd> dt 8599a9f8 winusb!_device_extension -r
>>>>>>>>>> ************************************************** ***********************
>>>>>>>>>> ***
>>>>>>>>>> ***
>>>>>>>>>> ***
>>>>>>>>>> ***
>>>>>>>>>> *** Your debugger is not using the correct symbols
>>>>>>>>>> ***
>>>>>>>>>> ***
>>>>>>>>>> ***
>>>>>>>>>> *** In order for this command to work properly, your symbol path
>>>>>>>>>> ***
>>>>>>>>>> *** must point to .pdb files that have full type information.
>>>>>>>>>> ***
>>>>>>>>>> ***
>>>>>>>>>> ***
>>>>>>>>>> *** Certain .pdb files (such as the public OS symbols) do not
>>>>>>>>>> ***
>>>>>>>>>> *** contain the required information. Contact the group that
>>>>>>>>>> ***
>>>>>>>>>> *** provided you with these symbols if you need this command to
>>>>>>>>>> ***
>>>>>>>>>> *** work.
>>>>>>>>>> ***
>>>>>>>>>> ***
>>>>>>>>>> ***
>>>>>>>>>> *** Type referenced: winusb!_device_extension
>>>>>>>>>> ***
>>>>>>>>>> ***
>>>>>>>>>> ***
>>>>>>>>>> ************************************************** ***********************
>>>>>>>>>> Symbol winusb!_device_extension not found.
>>>>>>>>>>
>>>>>>>>>> regards,
>>>>>>>>>> ymhuang



>>>>>>>>>> Submitted via EggHeadCafe
>>>>>>>>>> Microsoft LINQ Query Samples For Beginners
>>>>>>>>>> http://www.eggheadcafe.com/training-...Operators.aspx

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59