USB Power handling problem

In simple scenario my USB driver handles power requests as documented in DDK and everything looks fine.
The problem rises when I create root hub pdo in the driver - After finishing S query and D query power requests for FDO - there is no set S power request that should follow.

When my driver recevies power requets for root hub PDO it simple completes them with STATUS_SUCCESS.
Do I miss something?

Thanks for your help.

Just to mention that before completing PDO request PoStartNextPowerIrp is called.

Are you attaching to a root hub or are you emulating a root hub (e.g. a virtual usb hub driver)?

d

Yes, its a virtual one.

does the machine ever power down? what OS is this on? You can try to run !poreqlist (and look specifically for irps on your hub’s PDOs) and !poaction to see what the state of the power subsystem is. I would guess that there is an FDO loaded on top of your PDO which is pending the S0 IRP, sending a Dx irp and is stuck in the power down path in the driver. It coule be stuck b/c your driver is not completing some request that a nrmal hub would complete.

d

  1. Machine stucks when going to standby, I didn’t try to power it down, but I think it will be the same.
  2. WinXP.
  3. Thanks for the !poreqlist. I hope there is something similar in softice, cause thats what I have.
  4. Looking through the root hub interface is a good idea.

Thank you for the help.

Can you use Visual SoftICE? If so, you can load the extension that
publishes !poreqlist (or any other DbgEng extension, at least in theory)
directly. I can’t say that I have ever tried it with this one, and it
has been a long time since I did this with any extension, but I did find
it to work for the most part. If I recall correctly, the documentation
says something about being able to load DbgEng extensions in SI itself,
after some preprocessing of some sort by (I think) KD2SYS. I never got
this to work myself, but I only tried one time mostly just to see
whether it would work or not. Your mileage may vary.

Hope this helps,

mm

>> xxxxx@bezeqint.net 2007-02-20 12:16 >>>

  1. Machine stucks when going to standby, I didn’t try to power it down,
    but I think it will be the same.
  2. WinXP.
  3. Thanks for the !poreqlist. I hope there is something similar in
    softice, cause thats what I have.
  4. Looking through the root hub interface is a good idea.

Thank you for the help.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

If I remember correctly, some KD extensions worked in SI after translation. I never really used it, though.

In the mentioned case the easiest solution is to invoke manual crashdump; see WinDbg docs how to configure it (crash on Ctrl-Scroll). It can be analyzed and !poreqlist is usually very helpful. Unfortunately, it doesn’t seem to work at Vista. It doesn’t display anything useful there although there are some power IRPs which’d be displayed at XP.

Sometimes manual crashdump doesn’t work when OS is stuck. I just have such a case…

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Martin O’Brien[SMTP:xxxxx@evitechnology.com]
Reply To: Windows System Software Devs Interest List
Sent: Tuesday, February 20, 2007 9:39 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] USB Power handling problem

Can you use Visual SoftICE? If so, you can load the extension that
publishes !poreqlist (or any other DbgEng extension, at least in theory)
directly. I can’t say that I have ever tried it with this one, and it
has been a long time since I did this with any extension, but I did find
it to work for the most part. If I recall correctly, the documentation
says something about being able to load DbgEng extensions in SI itself,
after some preprocessing of some sort by (I think) KD2SYS. I never got
this to work myself, but I only tried one time mostly just to see
whether it would work or not. Your mileage may vary.

Hope this helps,

mm

>>> xxxxx@bezeqint.net 2007-02-20 12:16 >>>

  1. Machine stucks when going to standby, I didn’t try to power it down,
    but I think it will be the same.
  2. WinXP.
  3. Thanks for the !poreqlist. I hope there is something similar in
    softice, cause thats what I have.
  4. Looking through the root hub interface is a good idea.

Thank you for the help.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Michal, you are right, !poreqlist on Vista does not do anything. I was bitten by this as well. Instead, you have to use !poaction, which includes the old list that !poreqlist displayed for you.

d

Thanks Doron, I haven’t noticed !poaction displays this info.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of xxxxx@Microsoft.com[SMTP:xxxxx@Microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, February 21, 2007 12:44 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] USB Power handling problem

Michal, you are right, !poreqlist on Vista does not do anything. I was bitten by this as well. Instead, you have to use !poaction, which includes the old list that !poreqlist displayed for you.

d


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

>>> It coule be stuck b/c your driver is not completing some request that a nrmal hub would complete.

Thats it Doron! I just didn’t complete IRP that was cancelled by root hub.

Thank you all for the inputs.