Here is a kernel patch (against linux-2.6.13) that works around the
problem. The fundamental issue is an UPS firmware bug where the UPS
sends fewer bytes than advertised. This patch clears the underrun zone
on short reports before reporting them to userspace.

--Adam

--- linux-2.6.13/drivers/usb/input/hid-core.c   2005-08-29 09:04:10.000000000 
-0400
+++ linux-2.6.13-adk/drivers/usb/input/hid-core.c       2005-12-11 
09:43:32.000000000 -0500
@@ -892,8 +892,10 @@
 
        size = ((report->size - 1) >> 3) + 1;
 
-       if (len < size)
+       if (len < size) {
                dbg("report %d is too short, (%d < %d)", report->id, len, size);
+               memset(data+len, 0, size-len);
+       }
 
        if (hid->claimed & HID_CLAIMED_HIDDEV)
                hiddev_report_event(hid, report);



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to