vxlan: check return value of gro_cells_init()
[linux/fpc-iii.git] / tools / usb / usbip / libsrc / vhci_driver.h
blob6c9aca2167051cd5ee15674092c5aee31e0f895d
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) 2005-2007 Takahiro Hirofuchi
4 */
6 #ifndef __VHCI_DRIVER_H
7 #define __VHCI_DRIVER_H
9 #include <libudev.h>
10 #include <stdint.h>
12 #include "usbip_common.h"
14 #define USBIP_VHCI_BUS_TYPE "platform"
15 #define USBIP_VHCI_DEVICE_NAME "vhci_hcd.0"
17 enum hub_speed {
18 HUB_SPEED_HIGH = 0,
19 HUB_SPEED_SUPER,
22 struct usbip_imported_device {
23 enum hub_speed hub;
24 uint8_t port;
25 uint32_t status;
27 uint32_t devid;
29 uint8_t busnum;
30 uint8_t devnum;
32 /* usbip_class_device list */
33 struct usbip_usb_device udev;
36 struct usbip_vhci_driver {
38 /* /sys/devices/platform/vhci_hcd */
39 struct udev_device *hc_device;
41 int ncontrollers;
42 int nports;
43 struct usbip_imported_device idev[];
47 extern struct usbip_vhci_driver *vhci_driver;
49 int usbip_vhci_driver_open(void);
50 void usbip_vhci_driver_close(void);
52 int usbip_vhci_refresh_device_list(void);
55 int usbip_vhci_get_free_port(uint32_t speed);
56 int usbip_vhci_attach_device2(uint8_t port, int sockfd, uint32_t devid,
57 uint32_t speed);
59 /* will be removed */
60 int usbip_vhci_attach_device(uint8_t port, int sockfd, uint8_t busnum,
61 uint8_t devnum, uint32_t speed);
63 int usbip_vhci_detach_device(uint8_t port);
65 int usbip_vhci_imported_device_dump(struct usbip_imported_device *idev);
67 #endif /* __VHCI_DRIVER_H */