Re: usbmon, usb core, ARM
From: Pete Zaitcev
Date: Wed Jan 19 2005 - 10:46:11 EST
On Tue, 18 Jan 2005 22:14:24 -0800, David Brownell <david-b@xxxxxxxxxxx> wrote:
> > > Also, I don't like the idea of scattering knowledge all over the place
> > > that the root hub is always given address 1 ...
>
> which you didn't address yet.
Yes, I have to look why you do not like using the pipe. 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. I thought about adding an extra flag like URB_ROOT_HUB to split
this use from the abuse of URB_NO_TRANSFER_DMA_MAP, but pipe looks better
all around. If you look at it from the angle I did, it stands to reason
that excessive encapsulation only masks _why_ it was safer, e.g. if one sees
something like urb_is_root_hub(urb), one must look up the implementation
to know if it uses urb->dev or not. Relying on address 1 without any symbolic
constant is obviously a bad idea though, I'll fix that.
-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/