Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v4.15-rc9 68 lines 1.3 kB view raw
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (C) 2005-2007 Takahiro Hirofuchi 4 */ 5 6#ifndef __VHCI_DRIVER_H 7#define __VHCI_DRIVER_H 8 9#include <libudev.h> 10#include <stdint.h> 11 12#include "usbip_common.h" 13 14#define USBIP_VHCI_BUS_TYPE "platform" 15#define USBIP_VHCI_DEVICE_NAME "vhci_hcd.0" 16#define MAXNPORT 128 17 18enum hub_speed { 19 HUB_SPEED_HIGH = 0, 20 HUB_SPEED_SUPER, 21}; 22 23struct usbip_imported_device { 24 enum hub_speed hub; 25 uint8_t port; 26 uint32_t status; 27 28 uint32_t devid; 29 30 uint8_t busnum; 31 uint8_t devnum; 32 33 /* usbip_class_device list */ 34 struct usbip_usb_device udev; 35}; 36 37struct usbip_vhci_driver { 38 39 /* /sys/devices/platform/vhci_hcd */ 40 struct udev_device *hc_device; 41 42 int ncontrollers; 43 int nports; 44 struct usbip_imported_device idev[MAXNPORT]; 45}; 46 47 48extern struct usbip_vhci_driver *vhci_driver; 49 50int usbip_vhci_driver_open(void); 51void usbip_vhci_driver_close(void); 52 53int usbip_vhci_refresh_device_list(void); 54 55 56int usbip_vhci_get_free_port(uint32_t speed); 57int usbip_vhci_attach_device2(uint8_t port, int sockfd, uint32_t devid, 58 uint32_t speed); 59 60/* will be removed */ 61int usbip_vhci_attach_device(uint8_t port, int sockfd, uint8_t busnum, 62 uint8_t devnum, uint32_t speed); 63 64int usbip_vhci_detach_device(uint8_t port); 65 66int usbip_vhci_imported_device_dump(struct usbip_imported_device *idev); 67 68#endif /* __VHCI_DRIVER_H */