diff options
| author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2020-01-13 11:33:03 +0000 |
|---|---|---|
| committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2020-01-13 11:33:03 +0000 |
| commit | ef82243a03edd8e0e290181ccdc78891b29df523 (patch) | |
| tree | f26401f6aea203918d56b7a5ccc29caf02f9412e /sys | |
| parent | 0b844fec0d36db3482e03b81ce87701e2c21e31d (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/usb/usb_device.h | 1 | ||||
| -rw-r--r-- | sys/dev/usb/usb_transfer.c | 5 | ||||
| -rw-r--r-- | sys/sys/param.h | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_device.h b/sys/dev/usb/usb_device.h index 9b928471f000..709823b3a370 100644 --- a/sys/dev/usb/usb_device.h +++ b/sys/dev/usb/usb_device.h @@ -189,6 +189,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 1ee82a1c1e86..4ee88efdf900 100644 --- a/sys/dev/usb/usb_transfer.c +++ b/sys/dev/usb/usb_transfer.c @@ -2592,7 +2592,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 73ab768b9bda..82870b171de3 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1004502 /* Master, propagated to newvers */ +#define __FreeBSD_version 1004503 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, |
