Date: Wed, 09 Jun 2004 12:04:53 -0700 From: "Jin Guojun [DSD]" <g_jin@lbl.gov> To: Markus Wild <mwild@vianetworks.ch> Cc: freebsd-hardware@freebsd.org Subject: Re: Fix for Logitech DiNovo cordless mouse Message-ID: <40C75F55.ABD6CBB8@lbl.gov> References: <200406091838.i59Icugc063061@smsgw.vianetworks.ch>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------9D32173A942671EC4455174F Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Markus Wild wrote: > Since yesterday I'm a happy owner of a Logitech dinovo > cordless USB keyboard/mouse. The keyboard works fine, however > the mouse didn't move a bit. I saw that other people had similar > "luck", so I enabled a bit of debugging. This is with FreeBSD-current, > btw. > > ... (skipped) > > With this, my current fix is simple: only set id if it's not > set already: > diff -u -r1.23 hid.c > --- hid.c 24 Aug 2003 17:55:54 -0000 1.23 > +++ hid.c 9 Jun 2004 18:34:23 -0000 > @@ -374,9 +374,10 @@ > int size, id; > > id = 0; > + bzero (&h, sizeof (h)); > for (d = hid_start_parse(buf, len, 1<<k); hid_get_item(d, &h); ) > - if (h.report_ID != 0) > - id = h.report_ID; > + if (h.report_ID != 0 && !id) > + id = h.report_ID; > hid_end_parse(d); > size = h.loc.pos; > if (id != 0) { > > I don't know whether this is any more correct or buggy than the > previous version, and I don't know whether it will break currently > working configurations, but it did get mine working. If your mouse > is currently of not much use, you might give it a try. By looking the code, the fix should be something like in attachment. Since I have not such device, I cannot test it. Let me know if attached patch works. -Jin --------------9D32173A942671EC4455174F Content-Type: text/plain; charset=us-ascii; name="hid.p" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="hid.p" *** dev/usb/hid.c Sun Feb 29 16:07:21 2004 --- hid.c Wed Jun 9 12:00:38 2004 *************** *** 364,369 **** --- 364,370 ---- break; } } + return 0; } int *************** *** 374,380 **** int size, id; id = 0; ! for (d = hid_start_parse(buf, len, 1<<k); hid_get_item(d, &h); ) if (h.report_ID != 0) id = h.report_ID; hid_end_parse(d); --- 375,381 ---- int size, id; id = 0; ! for (d = hid_start_parse(buf, len, 1<<k); !id && hid_get_item(d, &h); ) if (h.report_ID != 0) id = h.report_ID; hid_end_parse(d); --------------9D32173A942671EC4455174F--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40C75F55.ABD6CBB8>