summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb.c
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2016-05-18 18:28:58 +0000
committerpatrick <patrick@openbsd.org>2016-05-18 18:28:58 +0000
commit2261702e3e2071d9ebf81d37fead1cc3f6b7f5be (patch)
treed521e1a1cf935ff78975b372d18845939f2a4018 /sys/dev/usb/usb.c
parentupdate links; from ray (diff)
downloadwireguard-openbsd-2261702e3e2071d9ebf81d37fead1cc3f6b7f5be.tar.xz
wireguard-openbsd-2261702e3e2071d9ebf81d37fead1cc3f6b7f5be.zip
Cache vendor, product and serial info for each usb device. This allows
ioctl(USB_DEVICEINFO) not to issue any further requests to gather information. Thus reducing stress on connected usb devices. This fixes an issue where usbdevs called in a loop causes a USB mass storage device to halt operation. Adapted from a similar commit in NetBSD. ok mpi@
Diffstat (limited to 'sys/dev/usb/usb.c')
-rw-r--r--sys/dev/usb/usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 732ecfdbb27..e0d7992571c 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb.c,v 1.110 2016/03/03 18:13:24 stefan Exp $ */
+/* $OpenBSD: usb.c,v 1.111 2016/05/18 18:28:58 patrick Exp $ */
/* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */
/*
@@ -520,7 +520,7 @@ usb_fill_di_task(void *arg)
if (dev == NULL)
return;
- usbd_fill_deviceinfo(dev, di, 1);
+ usbd_fill_deviceinfo(dev, di, 0);
}
void