I've decided this probably a question better answered by the
community, so it's attached below.
The problem boils down to the fact that I can't use urb_list to keep a
list of urbs for later unlinking. I'm thinking the best solution is to
add a second list_head to struct urb.
..Stu
----- Original Message -----
From: "Stuart MacDonald" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: November 18, 2002 10:55 a
Subject: struct urb's urb_list
> struct urb contains a list_head urb_list. According to the 2.5.43
> headers this is for the use of the current owner of the urb. All fine
> and dandy.
>
> I'm trying to add some buffering to the driver in the way of having a
> preallocated pool of urbs to draw upon. Which I was going to manage
> via the handy urb_list. Except for one small problem. When you submit
> an urb, you can't be using urb_list as you give up ownership. That
> means you have to take it off your lists. Which means that you either
> save a reference to the urb somewhere else, or you just let it go.
>
> The letting it go option would be fine, except since you don't have a
> reference to the urb anymore, you can't unlink it. But if you save a
> reference (multiple refs for me), then you need a new, different list
> somewhere, so you might as well not be using urb_list at all.
>
> Would you consider bumping struct urb up a little by adding a second
> list_head? Then there'd be one for the internal use, and one for
> driver use.
>
> Otherwise I'll have to stick with
>
> struct whiteheat_wrap {
> struct list_head list;
> struct urb *urb;
> };
>
> which just doesn't seem right.
>
> The downside is that I'd be only the second driver using urb_list or
> the new additional list, so for the most part it would be 8 bytes of
> wasted space for everyone else.
>
> ...Stu
>
>
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel