On Thursday 05 May 2005 1:55 pm, Roman Kagan wrote:
> On Wed, May 04, 2005 at 01:37:30PM -0700, David Brownell wrote:
> > On Wednesday 04 May 2005 12:19 pm, Roman Kagan wrote:

> 
> > > 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?
> 
> Cheers,
>   Roman.
> 
> Signed-off-by: Roman Kagan <[EMAIL PROTECTED]>

Looks good to me...

> --- linux-2.6.12-rc2/include/linux/usb.h.urb_list     2005-04-08 
> 16:58:56.000000000 +0400
> +++ linux-2.6.12-rc2/include/linux/usb.h      2005-05-06 00:46:23.000000000 
> +0400
> @@ -796,6 +796,10 @@ typedef void (*usb_complete_t)(struct ur
>   * of the iso_frame_desc array, and the number of errors is reported in
>   * error_count.  Completion callbacks for ISO transfers will normally
>   * (re)submit URBs to ensure a constant transfer rate.
> + *
> + * Note that even fields marked "public" should not be touched by the driver
> + * when the urb is owned by the hcd, that is, since the call to
> + * usb_submit_urb() till the entry into the completion routine.
>   */
>  struct urb
>  {
> @@ -803,12 +807,12 @@ struct urb
>       struct kref kref;               /* reference count of the URB */
>       spinlock_t lock;                /* lock for the URB */
>       void *hcpriv;                   /* private data for host controller */
> -     struct list_head urb_list;      /* list pointer to all active urbs */
>       int bandwidth;                  /* bandwidth for INT/ISO request */
>       atomic_t use_count;             /* concurrent submissions counter */
>       u8 reject;                      /* submissions will fail */
>  
>       /* public, documented fields in the urb that can be used by drivers */
> +     struct list_head urb_list;      /* list head for use by the urb owner */
>       struct usb_device *dev;         /* (in) pointer to associated device */
>       unsigned int pipe;              /* (in) pipe information */
>       int status;                     /* (return) non-ISO status */
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4 great events, 4
> opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
> _______________________________________________
> linux-usb-devel@lists.sourceforge.net
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
> 


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to