On Mon, 14 Aug 2006, Pete Zaitcev wrote: > BTW, I'm thinking about this: > > diff -urp -X dontdiff linux-2.6.18-rc1/drivers/usb/input/hid-core.c > linux-2.6.18-rc1-u/drivers/usb/input/hid-core.c > --- linux-2.6.18-rc1/drivers/usb/input/hid-core.c 2006-07-09 > 11:40:47.000000000 -0700 > +++ linux-2.6.18-rc1-u/drivers/usb/input/hid-core.c 2006-07-29 > 14:56:29.000000000 -0700 > @@ -1027,6 +1027,19 @@ static void hid_irq_in(struct urb *urb, > clear_bit(HID_IN_RUNNING, &hid->iofl); > hid_io_error(hid); > return; > + case -EOVERFLOW: > + if (urb->transfer_buffer_length == hid->bufsize) { > + /* > + * Persistent babble is a bad news. Most likely, > + * we will loop trying to reset the device. > + * But at least the box won't keel over. > + */ > + clear_bit(HID_IN_RUNNING, &hid->iofl); > + hid_io_error(hid); > + return; > + } > + urb->transfer_buffer_length = hid->bufsize; > + break; > default: /* error */ > warn("input irq status %d received", urb->status); > } > > The symptom is that Microsoft Natural keyboard loves to enter an > endless loop with -75. I suspect that it somehow pipelines its > reports. If we delay fetching one, the two get stuck together and > bubble forever.
There's a potential problem in the case where the report size is a multiple of the maxpacket length. Upon reaching the end of a report, the HCD won't realize that the transfer is over. Also, if you get several reports batched together, will the driver process any but the first one? And the toughest question of all: In the absence of any real testing, is there any reason to think this change will improve the behavior? In fact, might it be better to reset the keyboard immediately? Alan Stern ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel