summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2020-01-06 09:49:20 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2020-01-06 09:49:20 +0000
commit6c110e86118f714f4b1cf7b66b0fca845cd697d7 (patch)
tree5088c537765db5f9da9389740b7abc1b0672d1c3
parent79c9f9429a769c5cb179dee22da7ac1822cd5990 (diff)
Notes
-rw-r--r--sys/dev/usb/usb_device.h1
-rw-r--r--sys/dev/usb/usb_transfer.c5
-rw-r--r--sys/sys/param.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_device.h b/sys/dev/usb/usb_device.h
index 96f75cd832dc..691b2b3862f8 100644
--- a/sys/dev/usb/usb_device.h
+++ b/sys/dev/usb/usb_device.h
@@ -191,6 +191,7 @@ 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];
diff --git a/sys/dev/usb/usb_transfer.c b/sys/dev/usb/usb_transfer.c
index a64a4059e5cb..b943e70a456d 100644
--- a/sys/dev/usb/usb_transfer.c
+++ b/sys/dev/usb/usb_transfer.c
@@ -2593,7 +2593,10 @@ usbd_transfer_done(struct usb_xfer *xfer, usb_error_t error)
}
#endif
/* keep some statistics */
- if (xfer->error) {
+ if (xfer->error == USB_ERR_CANCELLED) {
+ info->udev->stats_cancelled.uds_requests
+ [xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE]++;
+ } else if (xfer->error != USB_ERR_NORMAL_COMPLETION) {
info->udev->stats_err.uds_requests
[xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE]++;
} else {
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 930d2005938e..b79e98eef0bc 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -60,7 +60,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1300074 /* Master, propagated to newvers */
+#define __FreeBSD_version 1300075 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,