On Tuesday 18 January 2005 1:23 am, Pete Zaitcev wrote:
>
> One last thing. The following part makes my life diffcult, so I removed it:
>
> if (urb->dev == hcd->self.root_hub) {
> /* NOTE: requirement on hub callers (usbfs and the hub
> * driver, for now) that URBs' urb->transfer_buffer be
> * valid and usb_buffer_{sync,unmap}() not be needed, since
> * they could clobber root hub response data.
> */
> urb->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP
> | URB_NO_SETUP_DMA_MAP);
> status = rh_urb_enqueue (hcd, urb);
Thereby breaking usb on various systems ... by overwriting the root hub
status message data as part of bounce buffer handling. NOT a good idea!
Those patches were added for important reasons. (Or did you add some
other solution to the issue described in that comment?)
Also, I don't like the idea of scattering knowledge all over the place
that the root hub is always given address 1 ... heck, I'd rather it use
address 128 so that Linux can eventually acesss all 127 devices!
If you want to add an inline function to test if a device is the root hub,
that'd be better; especially if it didn't use usb_pipedevice(). As a rule,
I'd rather abolish pipe operations rather than use them more often. That's
the only way we'll get rid of all the overhead of mapping to get to the real
endpoint data structures (which for usbcore is a usb_host_endpoint).
> +# In normal life, it makes little sense to have usbmon as a module, and in
> fact
> +# it is harmful, because there is no way to autoload the module.
> +# The 'm' option is allowed for hackers who debug the usbmon itself,
> +# and for those who have usbcore as a module.
> +config USB_MON
> + tristate "USB Monitor"
Then just make it a boolean. Anyone debugging at that level just has to get
used to the consequences ...
> @@ -676,8 +678,8 @@ static int init(void * unused)
> system_state = SYSTEM_RUNNING;
> numa_default_policy();
>
> - if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
> - printk("Warning: unable to open an initial console.\n");
> + if ((rc = sys_open((const char __user *) "/dev/console", O_RDWR, 0)) <
> 0)
> + printk("Warning: unable to open an initial console (%d).\n",
> rc);
>
> (void) sys_dup(0);
> (void) sys_dup(0);
>
>
There are a lot of non-usbmon patches mixed into this ...
- Dave
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel