lkml.org 
[lkml]   [2005]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: usbmon, usb core, ARM
On Wed, 19 Jan 2005 09:08:34 -0800, David Brownell <david-b@pacbell.net> wrote:

> On Wednesday 19 January 2005 7:42 am, Pete Zaitcev wrote:
> > Relying on pipe makes
> > tests dependant on URB only. No references to bus or HCD, therefore no
> > extra refcounts or worries about oopses. Also, HC drivers zero out the
> > urb->dev in giveback sequence which is a royal pain when trying to identify
> > a root hub.
>
> That was a 2.4-ism, it should now be gone. So an inlined function to
> test whether urb->dev is the root hub should suffice; I know there's
> code that does that already.

I do not like to refer to a dev because I do not quite understand where
the necessary usb_dev_get/_put are now. But if you guarantee that the
urb->dev is refcounted properly while urb is processed by usb_hcd_giveback_urb,
I do not mind an extra indirection.

What would be the right test in usb_hcd_giveback_urb, then?
It looks to me that you want me to use this:

urb_is_for_root_hub(urb) {
return urb->dev == urb->dev->bus->hcpriv->self.root_hub;
}

This is just ... ewwwww. Can we use pipe for now or do you have
a better idea?

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.205 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site