On Fri, Nov 05, 2004 at 06:33:22PM -0500, Adam Kropelin wrote: > I have a buggy USB HID device (APC SmartUPS) in which the designers > forgot that ReportCount is a global item. Consequently, according to the > report descriptor, several reports have multiple copies of the same > usage in each field. When you actually query the device, however, only a > single copy of the usage is returned. hid-core catches the expected vs. > actual length mismatch and fails the transfer. This effectively makes > the buggy reports inaccessible even though enough data is present to > populate one usage (which is all userspace wants anyway). > > This patch changes hid-core to only warn (if debug is enabled) on such > reports rather than failing the transfer. > > Signed-off-by: Adam Kropelin <[EMAIL PROTECTED]>
Thanks; applied. > > > --- linux-2.6.9/drivers/usb/input/hid-core.c Mon Oct 18 19:21:26 2004 > +++ linux-2.6.9-adk/drivers/usb/input/hid-core.c Thu Nov 4 22:11:30 2004 > @@ -892,10 +892,8 @@ > > size = ((report->size - 1) >> 3) + 1; > > - if (len < size) { > + if (len < size) > dbg("report %d is too short, (%d < %d)", report->id, len, size); > - return -1; > - } > > if (hid->claimed & HID_CLAIMED_HIDDEV) > hiddev_report_event(hid, report); > > -- Vojtech Pavlik SuSE Labs, SuSE CR ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel