From a2b83a5aea0a5c1c4fbd4a12bdb14def9354ea2e Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 30 Jan 2013 20:33:28 +0100 Subject: [PATCH] nusb/kb: increase maximum report descriptor size, non-continuous endpoints (from richard millars usbmouse-endpoint patch) Another band-aid fix to the usb mouse driver, to cope with a mouse which has an interrupt endpoint number 3 but no number 1 or 2, and a report descriptor more than 128 bytes long. --- sys/src/cmd/nusb/kb/kb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/src/cmd/nusb/kb/kb.c b/sys/src/cmd/nusb/kb/kb.c index 86a4bba77..dc37c337f 100644 --- a/sys/src/cmd/nusb/kb/kb.c +++ b/sys/src/cmd/nusb/kb/kb.c @@ -39,7 +39,7 @@ struct KDev /* report descriptor */ int nrep; - uchar rep[128]; + uchar rep[512]; }; /* @@ -806,7 +806,7 @@ threadmain(int argc, char* argv[]) ud = d->usb; for(i = 0; i < nelem(ud->ep); i++){ if((ep = ud->ep[i]) == nil) - break; + continue; if(ep->type == Eintr && ep->dir == Ein && ep->iface->csp == KbdCSP) kbstart(d, ep, "/dev/kbin", kbdwork); if(ep->type == Eintr && ep->dir == Ein && ep->iface->csp == PtrCSP)