Re: [PATCH 4/4] USB: add urb->unlinked field

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Tue, 21 Aug 2007, Greg KH wrote:

> On Tue, Aug 21, 2007 at 04:40:24PM -0400, Alan Stern wrote:
> > On Tue, 21 Aug 2007, Greg KH wrote:
> > 
> > > On Tue, Aug 21, 2007 at 03:40:36PM -0400, Alan Stern wrote:
> > > > This patch (as970) adds a new urb->unlinked field, which is used to
> > > > store the status of unlinked URBs since we can't use urb->status for
> > > > that purpose any more.  To help simplify the HCDs, usbcore will check
> > > > urb->unlinked before calling the completion handler; if the value is
> > > > set it will automatically override the status reported by the HCD.
> > > 
> > > Hm, is this field now safe to be used by drivers to determine if the urb
> > > is still being handled by the host controllers also?
> > 
> > You mean is the urb->status conversion finished?  Not yet.  I've got 
> > more patches still to test and submit.  It's getting there...
> 
> No, I mean is this something that drivers can use to check if the urb is
> finished with the HCD, like they currently check for -EINPROGRESS today.

Oh.  No, it isn't.  In fact, urb->unlinked won't take on a nonzero
value unless the URB actually is unlinked, so checking it won't
accomplish anything in the usual case where the USB completes normally.

Of course, drivers could _try_ using it to check if the URB is 
finished.  If they do, it'll quickly become obvious that the technique 
won't work.  :-)

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.