On Tue, Mar 09, 2004 at 09:39:41PM -0800, David Mosberger wrote:
> Pavlik,
>
> Below is a trivial but very important bug fix. I suspect that bug
> _might_ be the reason why the BTC keyboard would cause hangs with any
> host-controller, not just the OHCI HCD (which, as I reported today,
> had another bug which caused machines to hang or crash). What happens
> is that the BTC has some INPUT reports with no fields. Not sure why
> this is so, but it definitely caused hidinput_connect() go get stuck
> in an infinite loop because it failed to advance the "list" pointer...
>
> FYI, here is the dump of the relevant reports:
>
> INPUT(1)[INPUT]
> INPUT(2)[INPUT]
> Field(0)
> Usage(3)
> GenericDesktop.0081
> GenericDesktop.0082
> GenericDesktop.0083
> Logical Minimum(0)
> Logical Maximum(1)
> Report Size(1)
> Report Count(3)
> Report Offset(0)
> Flags( Variable Relative )
> INPUT(3)[INPUT]
>
> So it looks like the interface for the System Power Down (81), Sleep
> (82), and Wake Up (83) usages has two extra report id's which aren't
> really used and that then triggered the infinite loop.
>
> If the patch looks fine, I'd appreciate it if you could forward it to
> Linus urgently so it can make it into 2.6.4.
Thanks for identifying the bug! I will forward the patch asap.
> ===== drivers/usb/input/hid-input.c 1.22 vs edited =====
> --- 1.22/drivers/usb/input/hid-input.c Wed Jan 21 00:29:52 2004
> +++ edited/drivers/usb/input/hid-input.c Tue Mar 9 21:21:11 2004
> @@ -567,8 +567,10 @@
> while (list != &report_enum->report_list) {
> report = (struct hid_report *) list;
>
> - if (!report->maxfield)
> + if (!report->maxfield) {
> + list = list->next;
> continue;
> + }
>
> if (!hidinput) {
> hidinput = kmalloc(sizeof(*hidinput), GFP_KERNEL);
>
--
Vojtech Pavlik
SuSE Labs, SuSE CR
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel