Re: USB suspend issues

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks Vetzak.

I'm trying to use the microchip device driver and was hoping to avoid
writing my own (driver code seems to be pretty involved). There
doesn't appear to be a way to switch off selective suspend in the
microchip driver though so I might, in the end, have no choice but to
write my own.

Thanks for the heads up on the tricky stuff with xp.

Clint

Vetzak wrote:
Your driver decides when the device goes in and out USB selective
suspend. To do so, your driver has to send down the wait-wake power IRP
and then the IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION IRP (see ddk
docs and USB samples driver sources for details on these mechanisms).

If you don't want USB selective suspend, just don't implement it in
your driver. Also beware of the state of the "remote wake-up enable"
bit in the USB configuration descriptor. If set, the USBD will activate
RWU on te device, else it won't. Your driver doesn't send that
SetFeature, REMOTE_WAKEUP control request.

One more remark: USB selective suspend in WinXP sucks. Examples:
* The MS information sources are confusing. First they said selective
suspend wasn't supported for composite devices, afterwards tey said it
is. In my experience selective suspend doesn't work properly on all
systems. That's why we converted our composite devices into
non-composite devices and wrote bus drivers.
* The power mappings of root hubs are often wrong leading to strange
behavior after standby and resume (like the system disconnects USB
device but the driver isn't surprise-removed). Example wrong mapping:
S0->D0, S1->D2, S2->D3, S3->D2, S3->D3, S4->D2, S5->D3.
* If you manage to suspend a USB device, and connect a second device to
the same (root) hub, the selective suspend is cancelled on the first
one. So no selective suspend if 2 or more usb device are connected to
the same (root) hub.

I hope I didn't take the fun away ;-)


Clint wrote:
Vetzak,
I'm using a custom driver.

Any ideas how a custom driver indicates it doesn't support selective
suspend?

Thanks,
Clint

Vetzak wrote:
Are you using a system driver are a custom driver? A.f.a.i.k. Most
system drivers don't support selective suspend (for example, USB
sticks).

.



Relevant Pages

  • Re: Vista WHQL PnP failure question
    ... I'm quite positive that the device supports selective suspend, ... and Vista SP2. ... Mode Driver Architecture documents provided on-line at MSDN (I do not own the ... only remaining issue seems to be with this PnP test. ...
    (microsoft.public.development.device.drivers)
  • Re: Idle request IRP cancelled failed
    ... why MS doesn't support selective suspend for USB stream device in KS? ... Does AV stream driver support selective suspend? ... When I open verifier with I/O ...
    (microsoft.public.development.device.drivers)
  • Re: USB Selective suspend support by Vista?
    ... is it the same one for the in-box USB HID class driver? ... this device to save power" on it's Power Management tab. ... stack supports a modified version of the "selective suspend" feature ...
    (microsoft.public.development.device.drivers)
  • Re: USB Selective suspend support by Vista?
    ... should we just run our device by the in-box inf and driver.. ... this device to save power" on it's Power Management tab. ... stack supports a modified version of the "selective suspend" feature ... Selective suspension of USB devices is especially useful in ...
    (microsoft.public.development.device.drivers)
  • Re: Vista WHQL PnP failure question
    ... I'm selecting the same PnP DTM test on both XP and Vista. ... After the surprise removal test completes, my driver is reloaded. ... returning 0x00000000 for stack with PDO 0x85921030 ... it's part of the entry into selective suspend. ...
    (microsoft.public.development.device.drivers)