On Thursday 20 January 2005 11:35 am, Pete Zaitcev wrote: > On Wed, 19 Jan 2005 09:08:34 -0800, David Brownell <[EMAIL PROTECTED]> wrote: > 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.
We have no reason to suspect bugs there; if there were any, lots of things would have been breaking for a long time now. > 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) { Actually it'd be more like dev_is_root_hub(dev, bus), since both values are readily at hand -- you're basically just wanting to wrap "dev == hcd->self.root_hub" in most cases. Though I'm still not clear why you'd want to change that working code; nothing's broken now, after all. By the way ... on the topic of usbmon rather than changing usbcore, is there a brief writeup of what you want this new version to be doing -- and how? Like, why put the spy hooks in that location, rather than any of the other choices. (Many of them would be less surprising to me!) - Dave > 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 [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/