USB remote wakeup problem at Vista

Our USB device, fingerprint sensor, is the most of time suspended and it signals activity to the PC software using remote wakeup. It works well at XP and w2k3 and on the most Vista RC1 installations we have here. However, I have one computer where it doesn’t work and it also doesn’t work in VMware Vista RC1 workstations.

Driver works as usual. It sends WaitWake IRP and suspends device when selective suspend callback is called. WW IRP is normally completed as the result of remote wakeup which in turn causes device awake and signal to application. On the computer with the problem WW IRP is never completed until cancelled. I verified with USB analyser device works correctly. However, the log is a bit unusual after remote wakeup. First, I see two SET_FEATURE RemoteWakeup requests and then USB is suspended. When I touch sensor, device invokes remote wakeup which in turn causes USB activity. I can see SOFs for 2.8 sec. Then there is another SET_FEATURE RemoteWakeup request, suspend for 44 ms, 2 sec of SOFs and the next SET_FEATURE request. It repeats until I manually instruct app to wake the device. It calls driver which in turn send D0 down the stack. In the USB log it causes CLEAR_FEATURE RemoteWakeup and normal communication follows.

Any clue where can be the problem? The computer has rather new ASUS mb with VIA chipset. The problem was there with previous Vista builds, too. With VMware it behaves the same way, WW IRP isn’t completed.

Best regards,

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

More info: on the same computer (Asus A8V DeLuxe mb) there is no problem at XP. Also, problem disappears when I connect the device via (passive) hub. If I leave device in the problem state long enough which is about 20 sec since device invokes remote wakeup, OS gives up and re-enumerates the device. It is visible at USB analyser log. Driver receives surprise removal, is unloaded and the next instance is loaded again.

It seems as some race conditions in remote wakeup processing. The whole thing is probably damned :-/ Every OS version has different set of problems related to USB suspend and wakeup.

Well, I’d need to try it with check build USB drivers for Vista RC1. Is there some more efficient way than dowloading whole checked build installation (2.3 GB) and installing it somewhere?

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 Michal Vodicka[SMTP:xxxxx@upek.com]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, September 13, 2006 11:01 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB remote wakeup problem at Vista

Our USB device, fingerprint sensor, is the most of time suspended and it signals activity to the PC software using remote wakeup. It works well at XP and w2k3 and on the most Vista RC1 installations we have here. However, I have one computer where it doesn’t work and it also doesn’t work in VMware Vista RC1 workstations.

Driver works as usual. It sends WaitWake IRP and suspends device when selective suspend callback is called. WW IRP is normally completed as the result of remote wakeup which in turn causes device awake and signal to application. On the computer with the problem WW IRP is never completed until cancelled. I verified with USB analyser device works correctly. However, the log is a bit unusual after remote wakeup. First, I see two SET_FEATURE RemoteWakeup requests and then USB is suspended. When I touch sensor, device invokes remote wakeup which in turn causes USB activity. I can see SOFs for 2.8 sec. Then there is another SET_FEATURE RemoteWakeup request, suspend for 44 ms, 2 sec of SOFs and the next SET_FEATURE request. It repeats until I manually instruct app to wake the device. It calls driver which in turn send D0 down the stack. In the USB log it causes CLEAR_FEATURE RemoteWakeup and normal communication follows.

Any clue where can be the problem? The computer has rather new ASUS mb with VIA chipset. The problem was there with previous Vista builds, too. With VMware it behaves the same way, WW IRP isn’t completed.

Best regards,

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


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

Surprise removal after 20 sec is caused by our firmware, it is part of ESD protection (if fw doesn’t hear anything from host for 20 sec after remote wakeup, it presumes ESD disabled the port and resets USB to re-enable it). Memory corruption, I personally wrote this part of fw several years before :slight_smile:

However, the problem is HC falls to this loop and remote wakeup isn’t handled correctly. After all, the firmware solves the problem some way – host doesn’t react so it caused USB reset and device re-enumeration so app knows something happened with sensor :slight_smile:

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 Michal Vodicka[SMTP:xxxxx@upek.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, September 14, 2006 3:22 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB remote wakeup problem at Vista

More info: on the same computer (Asus A8V DeLuxe mb) there is no problem at XP. Also, problem disappears when I connect the device via (passive) hub. If I leave device in the problem state long enough which is about 20 sec since device invokes remote wakeup, OS gives up and re-enumerates the device. It is visible at USB analyser log. Driver receives surprise removal, is unloaded and the next instance is loaded again.

It seems as some race conditions in remote wakeup processing. The whole thing is probably damned :-/ Every OS version has different set of problems related to USB suspend and wakeup.

Well, I’d need to try it with check build USB drivers for Vista RC1. Is there some more efficient way than dowloading whole checked build installation (2.3 GB) and installing it somewhere?

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 Michal Vodicka[SMTP:xxxxx@upek.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Wednesday, September 13, 2006 11:01 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] USB remote wakeup problem at Vista
>
> Our USB device, fingerprint sensor, is the most of time suspended and it signals activity to the PC software using remote wakeup. It works well at XP and w2k3 and on the most Vista RC1 installations we have here. However, I have one computer where it doesn’t work and it also doesn’t work in VMware Vista RC1 workstations.
>
> Driver works as usual. It sends WaitWake IRP and suspends device when selective suspend callback is called. WW IRP is normally completed as the result of remote wakeup which in turn causes device awake and signal to application. On the computer with the problem WW IRP is never completed until cancelled. I verified with USB analyser device works correctly. However, the log is a bit unusual after remote wakeup. First, I see two SET_FEATURE RemoteWakeup requests and then USB is suspended. When I touch sensor, device invokes remote wakeup which in turn causes USB activity. I can see SOFs for 2.8 sec. Then there is another SET_FEATURE RemoteWakeup request, suspend for 44 ms, 2 sec of SOFs and the next SET_FEATURE request. It repeats until I manually instruct app to wake the device. It calls driver which in turn send D0 down the stack. In the USB log it causes CLEAR_FEATURE RemoteWakeup and normal communication follows.
>
> Any clue where can be the problem? The computer has rather new ASUS mb with VIA chipset. The problem was there with previous Vista builds, too. With VMware it behaves the same way, WW IRP isn’t completed.
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, > http://www.upek.com]
>
>
> —
> 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

If this is a Vista specific issue, of course it will affect VMware,
because all traffic to the devise passes thru it’s driver on the host.

–PA

"Michal Vodicka" <xxxxx> wrote in message news:xxxxx@ntdev...<br>Surprise removal after 20 sec is caused by our firmware, it is part of ESD protection (if fw doesn't hear anything from host for <br>20 sec after remote wakeup, it presumes ESD disabled the port and resets USB to re-enable it). Memory corruption, I personally <br>wrote this part of fw several years before :-)<br><br>However, the problem is HC falls to this loop and remote wakeup isn't handled correctly. After all, the firmware solves the <br>problem some way -- host doesn't react so it caused USB reset and device re-enumeration so app knows something happened with <br>sensor :)<br><br>Best regards,<br><br>Michal Vodicka<br>UPEK, Inc.<br>[xxxxx@upek.com, http://www.upek.com]<br><br>&gt; ----------<br>&gt; From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Michal <br>&gt; Vodicka[SMTP:xxxxx@upek.com]<br>&gt; Reply To: Windows System Software Devs Interest List<br>&gt; Sent: Thursday, September 14, 2006 3:22 AM<br>&gt; To: Windows System Software Devs Interest List<br>&gt; Subject: RE: [ntdev] USB remote wakeup problem at Vista<br>&gt;<br>&gt; More info: on the same computer (Asus A8V DeLuxe mb) there is no problem at XP. Also, problem disappears when I connect the <br>&gt; device via (passive) hub. If I leave device in the problem state long enough which is about 20 sec since device invokes remote <br>&gt; wakeup, OS gives up and re-enumerates the device. It is visible at USB analyser log. Driver receives surprise removal, is <br>&gt; unloaded and the next instance is loaded again.<br>&gt;<br>&gt; It seems as some race conditions in remote wakeup processing. The whole thing is probably damned :-/ Every OS version has <br>&gt; different set of problems related to USB suspend and wakeup.<br>&gt;<br>&gt; Well, I'd need to try it with check build USB drivers for Vista RC1. Is there some more efficient way than dowloading whole <br>&gt; checked build installation (2.3 GB) and installing it somewhere?<br>&gt;<br>&gt; Best regards,<br>&gt;<br>&gt; Michal Vodicka<br>&gt; UPEK, Inc.<br>&gt; [xxxxx@upek.com, http://www.upek.com]<br>&gt;<br>&gt;<br>&gt; &gt; ----------<br>&gt; &gt; From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Michal <br>&gt; &gt; Vodicka[SMTP:xxxxx@upek.com]<br>&gt; &gt; Reply To: Windows System Software Devs Interest List<br>&gt; &gt; Sent: Wednesday, September 13, 2006 11:01 PM<br>&gt; &gt; To: Windows System Software Devs Interest List<br>&gt; &gt; Subject: [ntdev] USB remote wakeup problem at Vista<br>&gt; &gt;<br>&gt; &gt; Our USB device, fingerprint sensor, is the most of time suspended and it signals activity to the PC software using remote <br>&gt; &gt; wakeup. It works well at XP and w2k3 and on the most Vista RC1 installations we have here. However, I have one computer <br>&gt; &gt; where it doesn't work and it also doesn't work in VMware Vista RC1 workstations.<br>&gt; &gt;<br>&gt; &gt; Driver works as usual. It sends WaitWake IRP and suspends device when selective suspend callback is called. WW IRP is <br>&gt; &gt; normally completed as the result of remote wakeup which in turn causes device awake and signal to application. On the <br>&gt; &gt; computer with the problem WW IRP is never completed until cancelled. I verified with USB analyser device works correctly. <br>&gt; &gt; However, the log is a bit unusual after remote wakeup. First, I see two SET_FEATURE RemoteWakeup requests and then USB is <br>&gt; &gt; suspended. When I touch sensor, device invokes remote wakeup which in turn causes USB activity. I can see SOFs for 2.8 sec. <br>&gt; &gt; Then there is another SET_FEATURE RemoteWakeup request, suspend for 44 ms, 2 sec of SOFs and the next SET_FEATURE request. <br>&gt; &gt; It repeats until I manually instruct app to wake the device. It calls driver which in turn send D0 down the stack. In the <br>&gt; &gt; USB log it causes CLEAR_FEATURE RemoteWakeup and normal communication follows.<br>&gt; &gt;<br>&gt; &gt; Any clue where can be the problem? The computer has rather new ASUS mb with VIA chipset. The problem was there with previous <br>&gt; &gt; Vista builds, too. With VMware it behaves the same way, WW IRP isn't completed.<br>&gt; &gt;<br>&gt; &gt; Best regards,<br>&gt; &gt;<br>&gt; &gt; Michal Vodicka<br>&gt; &gt; UPEK, Inc.<br>&gt; &gt; [xxxxx@upek.com, &gt; http://www.upek.com]<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ---<br>&gt; &gt; Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256<br>&gt; &gt;<br>&gt; &gt; To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer<br>&gt; &gt;<br>&gt;<br>&gt; ---<br>&gt; Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256<br>&gt;<br>&gt; To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer<br>&gt;</xxxxx>

No, it does occur in Vista VM machines and it doesn’t depend on the host OS. Currently, it seems the problem is reproducible on machines with VIA chipset only and in VMware VMs only.

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 Pavel A.[SMTP:xxxxx@writeme.com]
Reply To: Windows System Software Devs Interest List
Sent: Sunday, September 17, 2006 1:45 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] USB remote wakeup problem at Vista

If this is a Vista specific issue, of course it will affect VMware,
because all traffic to the devise passes thru it’s driver on the host.

–PA

"Michal Vodicka" <xxxxx> wrote in message news:xxxxx@ntdev...<br>&gt; Surprise removal after 20 sec is caused by our firmware, it is part of ESD protection (if fw doesn't hear anything from host for <br>&gt; 20 sec after remote wakeup, it presumes ESD disabled the port and resets USB to re-enable it). Memory corruption, I personally <br>&gt; wrote this part of fw several years before :-)<br>&gt; <br>&gt; However, the problem is HC falls to this loop and remote wakeup isn't handled correctly. After all, the firmware solves the <br>&gt; problem some way -- host doesn't react so it caused USB reset and device re-enumeration so app knows something happened with <br>&gt; sensor :)<br>&gt; <br>&gt; Best regards,<br>&gt; <br>&gt; Michal Vodicka<br>&gt; UPEK, Inc.<br>&gt; [xxxxx@upek.com, http://www.upek.com]<br>&gt; <br>&gt; <br>&gt; &gt; ----------<br>&gt; &gt; From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Michal <br>&gt; &gt; Vodicka[SMTP:xxxxx@upek.com]<br>&gt; &gt; Reply To: Windows System Software Devs Interest List<br>&gt; &gt; Sent: Thursday, September 14, 2006 3:22 AM<br>&gt; &gt; To: Windows System Software Devs Interest List<br>&gt; &gt; Subject: RE: [ntdev] USB remote wakeup problem at Vista<br>&gt; &gt;<br>&gt; &gt; More info: on the same computer (Asus A8V DeLuxe mb) there is no problem at XP. Also, problem disappears when I connect the <br>&gt; &gt; device via (passive) hub. If I leave device in the problem state long enough which is about 20 sec since device invokes remote <br>&gt; &gt; wakeup, OS gives up and re-enumerates the device. It is visible at USB analyser log. Driver receives surprise removal, is <br>&gt; &gt; unloaded and the next instance is loaded again.<br>&gt; &gt;<br>&gt; &gt; It seems as some race conditions in remote wakeup processing. The whole thing is probably damned :-/ Every OS version has <br>&gt; &gt; different set of problems related to USB suspend and wakeup.<br>&gt; &gt;<br>&gt; &gt; Well, I'd need to try it with check build USB drivers for Vista RC1. Is there some more efficient way than dowloading whole <br>&gt; &gt; checked build installation (2.3 GB) and installing it somewhere?<br>&gt; &gt;<br>&gt; &gt; Best regards,<br>&gt; &gt;<br>&gt; &gt; Michal Vodicka<br>&gt; &gt; UPEK, Inc.<br>&gt; &gt; [xxxxx@upek.com, http://www.upek.com]<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; &gt; ----------<br>&gt; &gt; &gt; From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Michal <br>&gt; &gt; &gt; Vodicka[SMTP:xxxxx@upek.com]<br>&gt; &gt; &gt; Reply To: Windows System Software Devs Interest List<br>&gt; &gt; &gt; Sent: Wednesday, September 13, 2006 11:01 PM<br>&gt; &gt; &gt; To: Windows System Software Devs Interest List<br>&gt; &gt; &gt; Subject: [ntdev] USB remote wakeup problem at Vista<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Our USB device, fingerprint sensor, is the most of time suspended and it signals activity to the PC software using remote <br>&gt; &gt; &gt; wakeup. It works well at XP and w2k3 and on the most Vista RC1 installations we have here. However, I have one computer <br>&gt; &gt; &gt; where it doesn't work and it also doesn't work in VMware Vista RC1 workstations.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Driver works as usual. It sends WaitWake IRP and suspends device when selective suspend callback is called. WW IRP is <br>&gt; &gt; &gt; normally completed as the result of remote wakeup which in turn causes device awake and signal to application. On the <br>&gt; &gt; &gt; computer with the problem WW IRP is never completed until cancelled. I verified with USB analyser device works correctly. &gt; <br>&gt; &gt; &gt; However, the log is a bit unusual after remote wakeup. First, I see two SET_FEATURE RemoteWakeup requests and then USB is <br>&gt; &gt; &gt; suspended. When I touch sensor, device invokes remote wakeup which in turn causes USB activity. I can see SOFs for 2.8 sec. <br>&gt; &gt; &gt; Then there is another SET_FEATURE RemoteWakeup request, suspend for 44 ms, 2 sec of SOFs and the next SET_FEATURE request. <br>&gt; &gt; &gt; It repeats until I manually instruct app to wake the device. It calls driver which in turn send D0 down the stack. In the <br>&gt; &gt; &gt; USB log it causes CLEAR_FEATURE RemoteWakeup and normal communication follows.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Any clue where can be the problem? The computer has rather new ASUS mb with VIA chipset. The problem was there with previous <br>&gt; &gt; &gt; Vista builds, too. With VMware it behaves the same way, WW IRP isn't completed.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Best regards,<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Michal Vodicka<br>&gt; &gt; &gt; UPEK, Inc.<br>&gt; &gt; &gt; [xxxxx@upek.com, &gt; http://www.upek.com]<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; ---<br>&gt; &gt; &gt; Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ---<br>&gt; &gt; Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256<br>&gt; &gt;<br>&gt; &gt; To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer<br>&gt; &gt;<br>&gt; <br>&gt; <br>&gt; <br>&gt; ---<br>&gt; Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256<br>&gt; <br>&gt; To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer<br>&gt;</xxxxx>