From owner-svn-src-head@FreeBSD.ORG Tue Mar 10 19:35:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95E211065678; Tue, 10 Mar 2009 19:35:41 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 839558FC0A; Tue, 10 Mar 2009 19:35:41 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2AJZf62071777; Tue, 10 Mar 2009 19:35:41 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2AJZfd9071776; Tue, 10 Mar 2009 19:35:41 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200903101935.n2AJZfd9071776@svn.freebsd.org> From: Andrew Thompson Date: Tue, 10 Mar 2009 19:35:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189646 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2009 19:35:42 -0000 Author: thompsa Date: Tue Mar 10 19:35:41 2009 New Revision: 189646 URL: http://svn.freebsd.org/changeset/base/189646 Log: Make sure HID has a default usage, this fixes recent mouse problems. Tested by: Renato Botelho Tested by: beech (earlier version) Submitted by: Hans Petter Selasky Modified: head/sys/dev/usb/usb_hid.c Modified: head/sys/dev/usb/usb_hid.c ============================================================================== --- head/sys/dev/usb/usb_hid.c Tue Mar 10 19:35:37 2009 (r189645) +++ head/sys/dev/usb/usb_hid.c Tue Mar 10 19:35:41 2009 (r189646) @@ -283,14 +283,15 @@ hid_get_item(struct hid_data *s, struct */ c->loc.count = 1; } else { - /* make sure we have a usage */ - if (s->nusage == 0) { - s->usages_min[s->nusage] = 0; - s->usages_max[s->nusage] = 0; - s->nusage = 1; - } s->ncount = 1; } + /* make sure we have a usage */ + if (s->nusage == 0) { + /* use the undefined HID PAGE */ + s->usages_min[s->nusage] = 0x0000; + s->usages_max[s->nusage] = 0xFFFF; + s->nusage = s->ncount; + } goto top; case 9: /* Output */