]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PATCH] USB: update urb documentation
authorRoman Kagan <rkagan@mail.ru>
Thu, 5 May 2005 20:55:56 +0000 (00:55 +0400)
committerGreg KH <gregkh@suse.de>
Fri, 3 Jun 2005 07:04:30 +0000 (00:04 -0700)
commit719df469cb51199316ae2a11c75a8046be34b899
tree8f96e3713ad52b9308f22a464da14a1d7a685675
parent1724757e5ab5219b46876ac6e4e362a4b2dcfa86
[PATCH] USB: update urb documentation

On Wed, May 04, 2005 at 01:37:30PM -0700, David Brownell wrote:
> On Wednesday 04 May 2005 12:19 pm, Roman Kagan wrote:
> > struct urb {
> >  /* private, usb core and host controller only fields in the urb */
> >  ...
> >  struct list_head urb_list; /* list pointer to all active urbs */
> >  ...
> > };
> >
> > Is it safe to use it for driver's purposes when the driver owns the urb,
> > that is, starting from the completion routine until the urb is submitted
> > with usb_submit_urb()?
>
> Right now, it should be.

Great!  FWIW I've briefly tested a modified version of usbatm using
the list head in struct urb instead of creating a wrapper struct, and I
haven't seen any failures yet.  So I tend to believe that your "should
be" actually means "is" :)

> > If it is, can it be guaranteed in future, e.g.
> > by moving the list head into the public section of struct urb?
>
> In fact I'm not sure why it ever got called "private" to usbcore/hcds.
> I thought the idea was that it should be like urb->status, reserved for
> whoever controls the URB.

OK then how about the following (essentially documentation) patch?

Signed-off-by: Roman Kagan <rkagan@mail.ru>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/usb.h