I have started acting over Greg's head already, and of course forgot
to cc: the list. Not a great start, but I'll be more careful with cc-ing
in the future.

-- Pete

Begin forwarded message:

Date: Wed, 17 Mar 2004 16:22:21 -0800
From: Pete Zaitcev <[EMAIL PROTECTED]>
To: Marcelo Tosatti <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: Re: Mosberger's patch for BTC keyboards


>From David Mosberger:

-------------------------------------
Below is a trivial but very important bug fix.  I suspect that bug
_might_ be the reason why the BTC keyboard would cause hangs [] 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.
-------------------------------------

So far I must admit we have just one user in Fedora with this problem
on 2.4 kernel. But it seems too obvious to hold.

-- Pete

On Wed, 17 Mar 2004 19:42:50 -0300 (BRT)
Marcelo Tosatti <[EMAIL PROTECTED]> wrote:

> 
> Hi Pete, 
> 
> A small changelog would be cool.
> 
> On Tue, 16 Mar 2004, Pete Zaitcev wrote:
> 
> > Marcelo, we need this. Blessed by Vojtech, obviously correct.
> > -- Pete
> > 
> > --- linux-2.4.22-1.2176/drivers/usb/hid-input.c     2003-08-25 04:44:42.000000000 
> > -0700
> > +++ linux-2.4.22-1.2176-u1/drivers/usb/hid-input.c  2004-03-16 20:07:36.000000000 
> > -0800
> > @@ -444,8 +444,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);
> > 


-------------------------------------------------------
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

Reply via email to