summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usbdi_util.h
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2004-10-31 12:10:52 +0000
committerdlg <dlg@openbsd.org>2004-10-31 12:10:52 +0000
commitc60274faa6e28955c0c40805d30823f2d63d0822 (patch)
treeb2a15cb744493ac373badb7528420163727960d2 /sys/dev/usb/usbdi_util.h
parentSimplify ldconfig handling: one single ensure_ldconfig routine that (diff)
downloadwireguard-openbsd-c60274faa6e28955c0c40805d30823f2d63d0822.tar.xz
wireguard-openbsd-c60274faa6e28955c0c40805d30823f2d63d0822.zip
from netbsd via freebsd via jsg@
usbdi_util.h (1.29), uhid.c (1.62), ugen.c (1.68), usb_subr.c (1.114) Yes, some devices return incorrect lengths in their string descriptors. Rather than losing, do what Windows does: just request the maximum size, and allow a shorter response. Obsoletes the need for UQ_NO_STRINGS, and therefore these "quirks" are removed. usb_subr.c (1.116) In the "seemed like a good idea until I found the fatal flaw" department... Attempting to read a maximum-size string descriptor causes my kue device to go completely apeshit. So, go back to the original method, but allow the device to return a shorter string than it claimed.
Diffstat (limited to 'sys/dev/usb/usbdi_util.h')
-rw-r--r--sys/dev/usb/usbdi_util.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/usbdi_util.h b/sys/dev/usb/usbdi_util.h
index 71d40301b67..020e034d1cd 100644
--- a/sys/dev/usb/usbdi_util.h
+++ b/sys/dev/usb/usbdi_util.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi_util.h,v 1.13 2004/07/21 00:01:08 dlg Exp $ */
+/* $OpenBSD: usbdi_util.h,v 1.14 2004/10/31 12:10:52 dlg Exp $ */
/* $NetBSD: usbdi_util.h,v 1.28 2002/07/11 21:14:36 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi_util.h,v 1.9 1999/11/17 22:33:50 n_hibma Exp $ */
@@ -71,7 +71,8 @@ usbd_status usbd_read_report_desc(usbd_interface_handle ifc, void **descp,
int *sizep, usb_malloc_type mem);
usbd_status usbd_get_config(usbd_device_handle dev, u_int8_t *conf);
usbd_status usbd_get_string_desc(usbd_device_handle dev, int sindex,
- int langid,usb_string_descriptor_t *sdesc);
+ int langid,usb_string_descriptor_t *sdesc,
+ int *sizep);
void usbd_delay_ms(usbd_device_handle, u_int);