> From: David Brownell <[EMAIL PROTECTED]>
> Date: Thu, 17 Jul 2003 15:38:11 -0700

> >>A bug has turned up in the UHCI driver.  Briefly, when an URB completes,
> >>uhci_transfer_result() doesn't store the status in urb->status but only in
> >>urbp->status.  urb->status is set just before calling hcd_giveback_urb().
> >>
> >>However, the hcd glue layer uses urb->status == -EINPROGRESS as a test for 
> > 
> > It shouldn't use it. The clean way to fix this issue is to have an explicit
> > state field.
> 
> But urb->state ** IS ** an explicit state field.
> 
> It holds the first fault experienced by that request.  One of
> those fault codes is a software-induced "you're being unlinked"
> fault, which goes with an "unlink this asap" request from usbcore.

Oliver was misleading, I think. The problem is that peeking
into any urb fields before HC driver released it is racy.
There is just no way to read urb->status between a call
to usb_submit_urb and an enter to (*urb->complete) safely.
So the completion uses an extra field to indicate that
urb was released by HC driver to the uppper level.
It's not an explicit field, it's an extra field.

-- Pete


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to