From d845d3dc9a2e5208105242471fd15ef78a628be8 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Tue, 10 Mar 2020 15:56:49 +0000 Subject: [PATCH] Add support for the device statistics IOCTL, needed by the coming linux_libusb upgrade. MFC after: 3 days Sponsored by: Mellanox Technologies --- sys/compat/linux/linux_ioctl.c | 3 +++ sys/compat/linux/linux_ioctl.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 78a48f6586c0..6b46b29547d6 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -3488,6 +3488,9 @@ linux_ioctl_fbsd_usb(struct thread *td, struct linux_ioctl_args *args) case FBSD_LUSB_GET_POWER_USAGE: args->cmd = USB_GET_POWER_USAGE; break; + case FBSD_LUSB_DEVICESTATS: + args->cmd = USB_DEVICESTATS; + break; default: error = ENOIOCTL; } diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h index 011df41f29e4..15fd560e116b 100644 --- a/sys/compat/linux/linux_ioctl.h +++ b/sys/compat/linux/linux_ioctl.h @@ -743,9 +743,10 @@ #define FBSD_LUSB_FS_OPEN_STREAM 0xffdf #define FBSD_LUSB_GET_DEV_PORT_PATH 0xffde #define FBSD_LUSB_GET_POWER_USAGE 0xffdd +#define FBSD_LUSB_DEVICESTATS 0xffdc #define FBSD_LUSB_MAX 0xffff -#define FBSD_LUSB_MIN 0xffdd +#define FBSD_LUSB_MIN 0xffdc /* * Linux btrfs clone operation