From owner-freebsd-hardware@FreeBSD.ORG Wed Jun 9 19:04:57 2004 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12C2216A4CE for ; Wed, 9 Jun 2004 19:04:57 +0000 (GMT) Received: from mta1.lbl.gov (mta1.lbl.gov [128.3.41.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id E205D43D31 for ; Wed, 9 Jun 2004 19:04:56 +0000 (GMT) (envelope-from g_jin@lbl.gov) Received: from mta1.lbl.gov (localhost [127.0.0.1]) by mta1.lbl.gov (8.12.10/8.12.10) with ESMTP id i59J4sBv027870 for ; Wed, 9 Jun 2004 12:04:55 -0700 (PDT) Received: from lbl.gov (gracie.lbl.gov [131.243.2.175]) by mta1.lbl.gov (8.12.10/8.12.10) with ESMTP id i59J4slh027866; Wed, 9 Jun 2004 12:04:54 -0700 (PDT) Sender: jin@lbl.gov Message-ID: <40C75F55.ABD6CBB8@lbl.gov> Date: Wed, 09 Jun 2004 12:04:53 -0700 From: "Jin Guojun [DSD]" X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.10-RELEASE i386) X-Accept-Language: zh, zh-CN, en MIME-Version: 1.0 To: Markus Wild References: <200406091838.i59Icugc063061@smsgw.vianetworks.ch> Content-Type: multipart/mixed; boundary="------------9D32173A942671EC4455174F" cc: freebsd-hardware@freebsd.org Subject: Re: Fix for Logitech DiNovo cordless mouse X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2004 19:04:57 -0000 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< - 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<