16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 296c27377SValentina Manea /* 396c27377SValentina Manea * usbip.h 496c27377SValentina Manea * 596c27377SValentina Manea * USBIP uapi defines and function prototypes etc. 696c27377SValentina Manea */ 796c27377SValentina Manea 896c27377SValentina Manea #ifndef _UAPI_LINUX_USBIP_H 996c27377SValentina Manea #define _UAPI_LINUX_USBIP_H 1096c27377SValentina Manea 1196c27377SValentina Manea /* usbip device status - exported in usbip device sysfs status */ 1296c27377SValentina Manea enum usbip_device_status { 1396c27377SValentina Manea /* sdev is available. */ 1496c27377SValentina Manea SDEV_ST_AVAILABLE = 0x01, 1596c27377SValentina Manea /* sdev is now used. */ 1696c27377SValentina Manea SDEV_ST_USED, 1796c27377SValentina Manea /* sdev is unusable because of a fatal error. */ 1896c27377SValentina Manea SDEV_ST_ERROR, 1996c27377SValentina Manea 2096c27377SValentina Manea /* vdev does not connect a remote device. */ 2196c27377SValentina Manea VDEV_ST_NULL, 2296c27377SValentina Manea /* vdev is used, but the USB address is not assigned yet */ 2396c27377SValentina Manea VDEV_ST_NOTASSIGNED, 2496c27377SValentina Manea VDEV_ST_USED, 2596c27377SValentina Manea VDEV_ST_ERROR 2696c27377SValentina Manea }; 27*8f36b3b4SShuah Khan 28*8f36b3b4SShuah Khan /* USB URB Transfer flags: 29*8f36b3b4SShuah Khan * 30*8f36b3b4SShuah Khan * USBIP server and client (vchi) pack URBs in TCP packets. The following 31*8f36b3b4SShuah Khan * are the transfer type defines used in USBIP protocol. 32*8f36b3b4SShuah Khan */ 33*8f36b3b4SShuah Khan 34*8f36b3b4SShuah Khan #define USBIP_URB_SHORT_NOT_OK 0x0001 35*8f36b3b4SShuah Khan #define USBIP_URB_ISO_ASAP 0x0002 36*8f36b3b4SShuah Khan #define USBIP_URB_NO_TRANSFER_DMA_MAP 0x0004 37*8f36b3b4SShuah Khan #define USBIP_URB_ZERO_PACKET 0x0040 38*8f36b3b4SShuah Khan #define USBIP_URB_NO_INTERRUPT 0x0080 39*8f36b3b4SShuah Khan #define USBIP_URB_FREE_BUFFER 0x0100 40*8f36b3b4SShuah Khan #define USBIP_URB_DIR_IN 0x0200 41*8f36b3b4SShuah Khan #define USBIP_URB_DIR_OUT 0 42*8f36b3b4SShuah Khan #define USBIP_URB_DIR_MASK USBIP_URB_DIR_IN 43*8f36b3b4SShuah Khan 44*8f36b3b4SShuah Khan #define USBIP_URB_DMA_MAP_SINGLE 0x00010000 45*8f36b3b4SShuah Khan #define USBIP_URB_DMA_MAP_PAGE 0x00020000 46*8f36b3b4SShuah Khan #define USBIP_URB_DMA_MAP_SG 0x00040000 47*8f36b3b4SShuah Khan #define USBIP_URB_MAP_LOCAL 0x00080000 48*8f36b3b4SShuah Khan #define USBIP_URB_SETUP_MAP_SINGLE 0x00100000 49*8f36b3b4SShuah Khan #define USBIP_URB_SETUP_MAP_LOCAL 0x00200000 50*8f36b3b4SShuah Khan #define USBIP_URB_DMA_SG_COMBINED 0x00400000 51*8f36b3b4SShuah Khan #define USBIP_URB_ALIGNED_TEMP_BUFFER 0x00800000 52*8f36b3b4SShuah Khan 5396c27377SValentina Manea #endif /* _UAPI_LINUX_USBIP_H */ 54