From f33820592ef25a2b03f3b8a6932eeff9d471557f Mon Sep 17 00:00:00 2001 From: hselasky Date: Fri, 13 Mar 2020 09:15:13 +0000 Subject: [PATCH] MFC r358838: Add support for the device statistics IOCTL, needed by the coming linux_libusb upgrade. Sponsored by: Mellanox Technologies git-svn-id: svn://svn.freebsd.org/base/stable/9@358946 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- 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 ce3e37ce3..90b1e4686 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -3408,6 +3408,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 68af906de..deeaf8c7e 100644 --- a/sys/compat/linux/linux_ioctl.h +++ b/sys/compat/linux/linux_ioctl.h @@ -747,8 +747,9 @@ int linux_ifname(struct ifnet *, char *, size_t); #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 #endif /* !_LINUX_IOCTL_H_ */ -- 2.45.0