From: anton Date: Fri, 29 Oct 2021 15:43:55 +0000 (+0000) Subject: A USB HID report ID must be represented using a single byte ranging X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=57aafeb662d6fa7283aea71b4c3ea3ddb16bbd78;p=openbsd A USB HID report ID must be represented using a single byte ranging between 1-255 where 0 is reserved. The pseudo report ID UHIDEV_CLAIM_MULTIPLE_REPORTID is currently colliding with the valid report ID 255. Therefore crank it which gets rid of the collision and increase the related fields in order to cope with larger integers. Thanks to Damien Couderc for reporting and testing. --- diff --git a/sys/dev/usb/uhidev.h b/sys/dev/usb/uhidev.h index eb7894374cc..84730ca3a81 100644 --- a/sys/dev/usb/uhidev.h +++ b/sys/dev/usb/uhidev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidev.h,v 1.32 2021/09/12 06:58:08 anton Exp $ */ +/* $OpenBSD: uhidev.h,v 1.33 2021/10/29 15:43:55 anton Exp $ */ /* $NetBSD: uhidev.h,v 1.3 2002/10/08 09:56:17 dan Exp $ */ /* @@ -80,9 +80,9 @@ struct uhidev { struct uhidev_attach_arg { struct usb_attach_arg *uaa; struct uhidev_softc *parent; - uint8_t reportid; -#define UHIDEV_CLAIM_MULTIPLE_REPORTID 255 - uint8_t nreports; + u_int reportid; +#define UHIDEV_CLAIM_MULTIPLE_REPORTID 256 + u_int nreports; uint8_t *claimed; };