USB driver crashes in VISTA OS when we run Sleep stress I/O

While running Sleep stress I/O using DTM set up in Windows VISTA the driver crashes with error message “0x9F: DRIVER_POWER_STATE_FAILURE” the parameter 1 of bug check is “0x3”, by referring the DDK the reason was stated as " The device driver did not properly set the IRP as “pending” or complete the IRP".

The above issue is seen only when the device is connected through a HUB to the host. The failure is not observed when we run the test by directly connecting the device to the HOST.

On Analysis:
The scenario is, the device resumes from S4 state and during that process the USB pipe gets stalled when it tries to send the vendor specific IOCTL and so the power device completion is never completed. In the mean time the DTM test tries to suspend the system again by passing a power down IRP.

FYI:
I am passing a vendor specific device IOCTL in the power device completion routine. (The power completion routine is executed at passive level).

Thanks,
Sudhakar

Which driver has the power irp pended? Your function driver or the
usbhub PDO?
d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@yahoo.co.in
Sent: Friday, June 08, 2007 2:23 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB driver crashes in VISTA OS when we run Sleep stress
I/O

While running Sleep stress I/O using DTM set up in Windows VISTA the
driver crashes with error message “0x9F: DRIVER_POWER_STATE_FAILURE” the
parameter 1 of bug check is “0x3”, by referring the DDK the reason was
stated as " The device driver did not properly set the IRP as “pending”
or complete the IRP".

The above issue is seen only when the device is connected through a HUB
to the host. The failure is not observed when we run the test by
directly connecting the device to the HOST.

On Analysis:
The scenario is, the device resumes from S4 state and during that
process the USB pipe gets stalled when it tries to send the vendor
specific IOCTL and so the power device completion is never completed.
In the mean time the DTM test tries to suspend the system again by
passing a power down IRP.

FYI:
I am passing a vendor specific device IOCTL in the power device
completion routine. (The power completion routine is executed at passive
level).

Thanks,
Sudhakar


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

Hi,

I feel that the functional driver is keeping the pending.
Other observations were:

When we remove the IOCTL the driver passes the test without any issue.
If we send the IOCTL in work item then the issue is not observed and the test passes.
When the next power IRP was not passed down to device by stopping it in the power handler the crash is not observed. But the PIPE is stalled, since the next IRP was not passed down we guess that there was sufficient time for the pipe to be cleared. Subsequently the next power down works fine.

Please suggest whether this type of fix is correct and would be happy if any one can explain the reason behind the stall.

Thanks,
Sudhakar

Honestly, I can’t tell from your description what is really going on.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@yahoo.co.in
Sent: Sunday, June 10, 2007 9:58 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] USB driver crashes in VISTA OS when we run Sleep
stress I/O

Hi,

I feel that the functional driver is keeping the pending.
Other observations were:

When we remove the IOCTL the driver passes the test without any issue.
If we send the IOCTL in work item then the issue is not observed and
the test passes.
When the next power IRP was not passed down to device by stopping it
in the power handler the crash is not observed. But the PIPE is stalled,
since the next IRP was not passed down we guess that there was
sufficient time for the pipe to be cleared. Subsequently the next power
down works fine.

Please suggest whether this type of fix is correct and would be happy if
any one can explain the reason behind the stall.

Thanks,
Sudhakar


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

We need to send TWO IOCTLs in the power device completion routine.
There are two problems ,whose combination leads to the crash of the system
1> stalling of the pipe on resuming from S1 state.
2> hanging of Powerdown IRP sent by the DTM test ( coz powerup is not complete )
This happens after a few iterations of suspend resume.

In the test when the system is resuming from S1 state the pipe gets stalled in powerdevicecompletion routine and not getting cleared when it is sending the IOCTL down to the device. The stall occurs only when two IOCTLs are sent. The status of the system call used to clear the PIPE is unsuccessful and the command timesout.

Then during this period DTM sends the system to S3 suspend state. Since the last Power Up IRP is not completed ( IRP is not completed after the stalling of the pipe dont know why??), the power down IRP hangs…

When the Power down IRP is blocked the test was passing…

Please tell if u need some more information…

Thanks,
Sudhakar.