USB_DEVICEINFO.
devel/libusb1 requires this piece of information.
ok jcs@, mikeb@, jasper@, sthen@
-/* $OpenBSD: usb.h,v 1.60 2018/07/10 09:17:03 mpi Exp $ */
+/* $OpenBSD: usb.h,v 1.61 2018/07/19 12:35:14 mpi Exp $ */
/* $NetBSD: usb.h,v 1.69 2002/09/22 23:20:50 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */
#define USB_SPEED_FULL 2
#define USB_SPEED_HIGH 3
#define USB_SPEED_SUPER 4
+ u_int8_t udi_port;
int udi_power; /* power consumption in mA, 0 if selfpowered */
int udi_nports;
char udi_devnames[USB_MAX_DEVNAMES][USB_MAX_DEVNAMELEN];
-/* $OpenBSD: usb_subr.c,v 1.137 2018/07/10 09:17:03 mpi Exp $ */
+/* $OpenBSD: usb_subr.c,v 1.138 2018/07/19 12:35:14 mpi Exp $ */
/* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
di->udi_config = dev->config;
di->udi_power = dev->self_powered ? 0 : dev->power;
di->udi_speed = dev->speed;
+ di->udi_port = dev->powersrc ? dev->powersrc->portno : 0;
if (dev->subdevs != NULL) {
for (i = 0; dev->subdevs[i] && i < USB_MAX_DEVNAMES; i++) {