1 /* 2 * This file and its contents are supplied under the terms of the 3 * Common Development and Distribution License ("CDDL"), version 1.0. 4 * You may only use this file in accordance with the terms of version 5 * 1.0 of the CDDL. 6 * 7 * A full copy of the text of the CDDL should have accompanied this 8 * source. A copy of the CDDL is also available via the Internet at 9 * http://www.illumos.org/license/CDDL. 10 */ 11 12 /* 13 * Copyright 2016 Joyent, Inc. 14 */ 15 16 #ifndef _SYS_USB_XHCI_XHCI_IOCTL_H 17 #define _SYS_USB_XHCI_XHCI_IOCTL_H 18 19 /* 20 * Private ioctls for the xhci driver. 21 */ 22 23 #include <sys/types.h> 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 #define XHCI_IOCTL (('x' << 24) | ('h' << 16 | ('i' << 8))) 30 31 #define XHCI_PORTSC_NPORTS 256 32 #define XHCI_IOCTL_PORTSC (XHCI_IOCTL | 0x01) 33 #define XHCI_IOCTL_SETPLS (XHCI_IOCTL | 0x02) 34 #define XHCI_IOCTL_CLEAR (XHCI_IOCTL | 0x03) 35 36 typedef struct xhci_ioctl_portsc { 37 uint32_t xhi_nports; 38 uint32_t xhi_pad; 39 uint32_t xhi_portsc[XHCI_PORTSC_NPORTS]; 40 } xhci_ioctl_portsc_t; 41 42 typedef struct xhci_ioctl_setpls { 43 uint32_t xis_port; 44 uint32_t xis_pls; 45 } xhci_ioctl_setpls_t; 46 47 typedef struct xhci_ioctl_clear { 48 uint32_t xic_port; 49 uint32_t xic_pad; 50 } xhci_ioctl_clear_t; 51 52 #ifdef __cplusplus 53 } 54 #endif 55 56 #endif /* _SYS_USB_XHCI_XHCI_IOCTL_H */ 57