summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/dev/usb/usb_device.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/dev/usb/usb_device.h')
-rw-r--r--freebsd/sys/dev/usb/usb_device.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/freebsd/sys/dev/usb/usb_device.h b/freebsd/sys/dev/usb/usb_device.h
index 1cf48ea1..691b2b38 100644
--- a/freebsd/sys/dev/usb/usb_device.h
+++ b/freebsd/sys/dev/usb/usb_device.h
@@ -2,7 +2,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
- * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
+ * Copyright (c) 2008-2019 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -177,10 +177,22 @@ union usb_device_scratch {
};
/*
+ * Helper structure to keep track of USB device statistics.
+ */
+struct usb_device_statistics {
+ uint32_t uds_requests[4];
+};
+
+/*
* The following structure defines an USB device. There exists one of
* these structures for every USB device.
*/
struct usb_device {
+ /* statistics */
+ struct usb_device_statistics stats_err;
+ struct usb_device_statistics stats_ok;
+ struct usb_device_statistics stats_cancelled;
+
/* generic clear stall message */
struct usb_udev_msg cs_msg[2];
struct sx enum_sx;