On Sat, 10 Mar 2007, Mariusz Kozlowski wrote:

> Hello,
> 
> > > Right. Can't be 100% sure but without the patch it would have probably
> > > failed by now so I guess the patch is ok. Not sure how to make usb mouse
> > > plugging/unplugging process automatic ;-)
> > 
> >     echo FOO >/sys/bus/usb/drivers/usbhid/unbind
> > 
> > to simulate an unplug (actually, to do an unbind), and
> > 
> >     echo FOO >/sys/bus/usb/drivers/usbhid/unbind
>                                               ^^^^^^ bind I guess

Whoops, yes.  Cut & paste strikes again...

> > to do a bind, where FOO is the name of the USB mouse device link present
> > in the /sys/bus/usb/drivers/usbhid directory.
> 
> # ls -al /sys/bus/usb/drivers/usbhid
> total 0
> drwxr-xr-x 2 root root    0 Mar 10 17:30 .
> drwxr-xr-x 8 root root    0 Mar 10 17:14 ..
> lrwxrwxrwx 1 root root    0 Mar 10 17:30 2-2:1.0 -> 
> ../../../../devices/pci0000:00/0000:00:0c.0/usb2/2-2/2-2:1.0
> --w------- 1 root root 4096 Mar 10 17:17 bind
> lrwxrwxrwx 1 root root    0 Mar 10 17:17 module -> ../../../../module/usbhid
> --w------- 1 root root 4096 Mar 10 17:17 new_id
> --w------- 1 root root    0 Mar 10 17:22 unbind
> 
> # echo "2-2:1.0" > /sys/bus/usb/drivers/usbhid/unbind
> bash: echo: write error: No such device
> 
> Any thoughts?

Another mistake on my part.  The correct command is

        echo -n '2-2:1.0' >/sys/bus/usb/drivers/usbhid/unbind

Without the "-n", the system thinks that the newline character at the end 
of the line written by "echo" is part of the filename.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to