Export to GitHub

plan9front - issue #145

‘Microsoft® SideWinder™ X5 Mouse’ duznt werk


Posted on Aug 10, 2012 by Quick Dog

When I attach my favorite USB mouse to 9front in VirtualBox, I get “nusb/kb: fatal: weird mouse maxpkt” sent to the console, and the mouse DUZNT WERK. I haven't figured out how to attach my modified nusb/kb to the mouse device yet, so I have no other information on this problem.

Comment #1

Posted on Aug 10, 2012 by Happy Hippo

nsub/kb is build into the kernel image (as is nusb/disk and nusb/usbd) to support usb devices before we mount the root filesystem. if theres no other usb driver hogging that endpoint, you can test and debug your modified nusb/kb passing it the device id. (cat /dev/usb/ctl or cat /dev/usbevent to get the id)

Comment #2

Posted on Aug 11, 2012 by Quick Dog

I had to kill bootfs's nusbrc to keep it from ever attaching to the device. (I had thought that I would be able to attach my patched driver after the other one exited, but that didn't work within VirtualBox.)

The fix is to change nusb/kb's buffer size from 32 to 64 (bytes). (The mouse's maxpkt is 64, and it stops working after a while if nusb/kb only does 32-byte reads.) I have a patch to fix this, and a patch to make nusb/kb print the weird maxpkt and try to cope with too-large values, but I can't transfer them out of my 9front VM.

Comment #3

Posted on Aug 12, 2012 by Quick Dog

See attached for my patches.

Attachments

Comment #4

Posted on Aug 13, 2012 by Happy Hippo

commited in rc657571d19d1

thank you very mutch! :)

Status: Fixed

Labels:
Type-Other Priority-Low