[wdmaudiodev] Re: USB 3.0 issue when un-plug audio device

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 2 Jul 2012 11:12:16 -0700

Moore Zhang wrote:
> Thanks for reply. In fact, such logic already included in my completion 
> routine. Refer to below code snap which means in my completion routine, only 
> if the return code is success, else the IRP loop should be terminated. My 
> confusion is that, if I use system USBAudio driver, there will be a 
> delay(about 4s in my system) to receive the PnP/Power requests, but at last, 
> such requests are received. I have no idea now, and doubt it should be Intel 
> host controller's issue.
>     if ((ntStatus == STATUS_CANCELLED) ||
>        (ntStatus == STATUS_UNSUCCESSFUL)||
>        (ntStatus == USBD_STATUS_DEV_NOT_RESPONDING)||
>        (ntStatus == USBD_STATUS_DEVICE_GONE)||
>        (ntStatus == STATUS_DEVICE_NOT_CONNECTED))
>     {
>     } 

That code cannot be correct.  The USBD_STATUS_* codes will only be
returned in an URB header Status field.  You will never get a
USBD_STATUS_* code in an IoStatus structure, nor returned from
IoCallDriver.  So, you can never have a case where a single ntStatus
value could have both.

That's an important point, because the domains not unique.  There are
USBD_STATUS_ codes with the same number as STATUS_ codes that mean very
different things.

Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.


WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx


Other related posts: