Re: [usbip-devel] A strange problem happened.
Status: Alpha
Brought to you by:
hirofuchi
From: Takahiro H. <hir...@us...> - 2007-07-25 10:48:42
|
Hi Lun, I have fixed error messaging of bind_driver, and also added uid checking to usbipd. These changes are now in the trunk of the svn repository. Thank you, Takahiro 2007/7/25, Lun Jiang <wo...@gm...>: > Hi Takahiro, > I finally got everything working and found what was wrong. It was because > I missed the sudo part for usbipd -D. And from time to time I forgot this so > it's giving unstable results. > It's strongly recommended that a warning is given when it is not ran with > the root privilege. > > Lun > > On 7/24/07, Lun Jiang <wo...@gm...> wrote: > > Sorry I should have posted in mail list. > > Lun > > > > ---------- Forwarded message ---------- > > From: Lun Jiang < wo...@gm... > > > Date: Jul 24, 2007 6:29 PM > > Subject: Re: [usbip-devel] A strange problem happened. > > To: Takahiro Hirofuchi < hir...@us...> > > > > Hi Takahiro, > > I have done some further testing, > > > > In "static int bind_interface_busid(char *busid, char *driver)", > fd = open(bind_path, O_WRONLY); AND ret = write(fd, busid, > strnlen(busid, BUS_ID_SIZE)); are giving right values back(not <0). So I > think maybe the driver writing part is successful? > > Please give me more instructions to test it. > > Lun > > > > > > > > > > On 7/24/07, Lun Jiang <wo...@gm...> wrote: > > > Hi Takahiro, > > > I have confirmed the first step, it's working after I started usbipd > -D, bind_driver --list. > > > root@lun-laptop :/home/lun/work/usbip-0.1.4/src# cat > /sys/bus/usb/drivers/usbip/match_busid > > > 5-5 5-8.4 > > > In this case I'm binding 5-8.4:1.0 > > > > > > root@lun-laptop:/home/lun/work/usbip-0.1.4/src# echo 5-8.4:1.0 > > /sys/bus/usb/drivers/usbip/bind > > > bash: echo: write error: No such device > > > > > > and doing an ls gives: > > > root@lun-laptop:/home/lun/work/usbip-0.1.4/src# ls -laF > /sys/bus/usb/drivers/usbip/ > > > total 0 > > > drwxr-xr-x 2 root root 0 2007-07-24 16:02 ./ > > > drwxr-xr-x 14 root root 0 2007-07-24 15:41 ../ > > > lrwxrwxrwx 1 root root 0 2007-07-24 16:02 5-5:1.0 -> > ../../../../devices/pci0000:00/0000:00:1d.7/usb5/5-5/5-5:1.0/ > > > --w------- 1 root root 0 2007-07-24 16:06 bind > > > -rw------- 1 root root 4096 2007-07-24 15:46 match_busid > > > lrwxrwxrwx 1 root root 0 2007-07-24 15:46 module -> > ../../../../module/usbip/ > > > --w------- 1 root root 4096 2007-07-24 15:46 new_id > > > --w------- 1 root root 4096 2007-07-24 15:46 unbind > > > > > > Note:5-5:1.0 is a storage device I have successfully bound. > > > What might be the problem here? > > > Thanks for the help again. > > > Lun > > > > > > > > > On 7/22/07, Takahiro Hirofuchi <hir...@us...> wrote: > > > > Hi Lun, > > > > > > > > > > > > > > > > 2007/7/21, Lun Jiang <wo...@gm...>: > > > > > Hi Takahiro, > > > > > Thanks for the help, I tried compile kernel with CONFIG_USB_DEBUG > etc, > > > > > but before actually having that done, I realized that on the server > side I > > > > > couldn't see the device bound to usbip driver on the server side as > > > > > instructed in the src/README. Here is what happened for me. > > > > > > > > > > lun@lun-laptop:~/work/usbip-0.1.4/drivers/2.6.19$ sudo usbipd -D > > > > > Password: > > > > > usbip dbg: stub_server.c: 235 (log_addrinfo) listen at [::]:3240 > > > > > usbip dbg: stub_server.c: 306 (listen_all_addrinfo) listen 1 address > > > > > Bind usbip.ko to a usb device to be exportable! > > > > > usbipd start (usbip 0.1.4 ($Id: stub_server.c 97 2006-03-31 > 16:08:40Z > > > > > taka-hir $)) > > > > > > > > > > In another terminal: > > > > > > > > > > lun@lun-laptop:~/work/usbip-0.1.4/drivers/2.6.19$ bind_driver --list > > > > > List USB devices > > > > > - busid 3-1 (0403:6001) > > > > > 3-1:1.0 -> usbfs > > > > > > > > > > lun@lun-laptop:~/work/usbip-0.1.4/drivers/2.6.19$ sudo bind_driver > --usbip > > > > > 3-1 > > > > > Password: > > > > > ** (process:7246): DEBUG: 3-1: 1.0 -> none > > > > > ** (process:7246): DEBUG: write "add 3-1" to > > > > > /sys/bus/usb/drivers/usbip/match_busid > > > > > ** Message: bind 3-1 to usbip, complete! > > > > > lun@lun-laptop:~/work/usbip-0.1.4 /drivers/2.6.19$ bind_driver > --list > > > > > List USB devices > > > > > - busid 3-1 (0403:6001) > > > > > 3-1:1.0 -> none > > > > > > > > This means bind_driver correctly unbound 3-1 device, but failed to > > > > bind it to usbip driver. > > > > > > > > > > > > > > > > > > > > > > NOTE: Here it is bound to none, not usbip as said in the README. > > > > > On the usbipd terminal there is no change at all. > > > > > BTW, my device is a tmote(wireless sensor) so I wonder if usbip only > works > > > > > for printer etc. > > > > > > > > It basically supports all types of devices. > > > > > > > > > I went to read your paper again and now I have this question: > > > > > If usbip is an equivalent of USB HCD, will this be the same for all > the USB > > > > > devices, or it's behavior is still dependent on what kind of device > we > > > > > have(such as mouse, printer, or tmote). > > > > > My understanding here is if URB and TD abides by a universal > standard then > > > > > usb/ip's task as replacing the HCD shouldn't be much different for > > > > > different devices. I wonder what kind of test I can do to pin down > this > > > > > problem. > > > > > > > > Yes. USB/IP drivers process all types of I/O requests in the same > manner, > > > > so that all USB devices should be supported correctly, including your > > > > mote device. > > > > > > > > I think it only failed to bind the mote device to usbip driver. > > > > It may be a bug of bind_driver. > > > > > > > > To manually bind it to usbip driver, please do the following steps, > > > > changing busid in your test environment. > > > > > > > > > > > > 1. cat /sys/bus/usb/drivers/usbip/match_busid > > > > > > > > This file contains bind-able busids of usbip driver. Confirm it > > > > includes 3-1 in this case. > > > > > > > > 2. echo 3-1:1.0 > /sys/bus/usb/drivers/usbip/bind > > > > > > > > This binds your mote device to usbip driver. Specify the 1st > > > > interface busid 3-1:1.0 not 3-1. > > > > > > > > > > > > If this goes well or not, please report a result to usbip-devel ml > > > > > > > > Thanks, > > > > > > > > Takahiro > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > usbip-devel mailing list > usb...@li... > https://lists.sourceforge.net/lists/listinfo/usbip-devel > > |