diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-03-10 19:35:41 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-03-10 19:35:41 +0000 |
commit | 8f54fa169eaeb121d8dc9b627831908e63b3d7e2 (patch) | |
tree | e851a78e066edb7a50071c223eef730136e45727 /sys/dev/usb | |
parent | 102dd06b502a155e7f7047908c2b92b2f093e33c (diff) | |
download | FreeBSD-src-8f54fa169eaeb121d8dc9b627831908e63b3d7e2.zip FreeBSD-src-8f54fa169eaeb121d8dc9b627831908e63b3d7e2.tar.gz |
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
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/usb_hid.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/usb/usb_hid.c b/sys/dev/usb/usb_hid.c index 3082749..3008184 100644 --- a/sys/dev/usb/usb_hid.c +++ b/sys/dev/usb/usb_hid.c @@ -283,14 +283,15 @@ hid_get_item(struct hid_data *s, struct hid_item *h) */ 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 */ |