Hello

I'm stuck with strange behaviour of the USB subsystem preventing
requirements for WHQL certification of a laptop with an embedded USB
device.

First things first. Here's an interesting test:

I'm experiencing a strange phenomenon with USB devices that are
surprise-removed during standby. I've seen it happening with USB hubs,
USB sticks, USB hard drives and USB 3G devices. It happens in Win2000
and WinXP. These are the steps taken:

1. Plug in one of the mentioned USB devices.
2. In Bootvis, initiate standby test.
3. During standby, unplug the USB device -> surprise-removal.
4. Resume.
5. Wait for Bootvis to finish.

In Bootvis you can see that the device driver of the unplugged USB
device eats an extra +/- 3 seconds of resume time (compared with the
resume time in a situation where you do not unplug the device). The
exact device driver depends on the USB device; I've noticed the 3
extra seconds with usbhub.sys, usbcgpp.sys, usbstor.sys, and
gt72ubus.sys (3th party 3G driver).

When you unplug multiple USB device during standby, the system eats 3
seconds for each unplugged device.

I found out that during resume from standby, the USB subsystem eats 3
seconds for each unplugged device during standby. Technically: When a
USB function driver sends down the set D0 power request for an
unplugged device, some lower-level code happily sleeps for 3 seconds
and completes the request. At this point, the USB function driver
doesn't know of the surprise-removal yet; that event happens later.

Can anyone tell me why Win2000/XP behaves like this?

So in my case:

The laptop has a built-in embedded USB function, a MiniPCIe card. The
laptop de-powers the card during standby, hence a surprise-removal
happens and resume from standby takes an extra 3 seconds. As a result,
the total resume time for this laptop takes more than 5 seconds.

The laptop needs to be WHQL-certified (logo) for WinXP. Because of the
long resume time, the laptop doesn't meet the requirements. Pretty
annoying. Any suggestions?