#include <linux/init.h>
#include <linux/file.h>
#include <linux/kernel.h>
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include "usbip_common.h"
#include "vhci.h"
#define DRIVER_AUTHOR …
#define DRIVER_DESC …
static int vhci_hub_status(struct usb_hcd *hcd, char *buff);
static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
u16 wIndex, char *buff, u16 wLength);
static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
gfp_t mem_flags);
static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status);
static int vhci_start(struct usb_hcd *vhci_hcd);
static void vhci_stop(struct usb_hcd *hcd);
static int vhci_get_frame_number(struct usb_hcd *hcd);
static const char driver_name[] = …;
static const char driver_desc[] = …;
int vhci_num_controllers = …;
struct vhci *vhcis;
static const char * const bit_desc[] = …;
static const char * const bit_desc_ss[] = …;
static void dump_port_status_diff(u32 prev_status, u32 new_status, bool usb3)
{ … }
void rh_port_connect(struct vhci_device *vdev, enum usb_device_speed speed)
{ … }
static void rh_port_disconnect(struct vhci_device *vdev)
{ … }
#define PORT_C_MASK …
static int vhci_hub_status(struct usb_hcd *hcd, char *buf)
{ … }
static struct { … } __packed usb3_bos_desc = …;
static inline void
ss_hub_descriptor(struct usb_hub_descriptor *desc)
{ … }
static inline void hub_descriptor(struct usb_hub_descriptor *desc)
{ … }
static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
u16 wIndex, char *buf, u16 wLength)
{ … }
static void vhci_tx_urb(struct urb *urb, struct vhci_device *vdev)
{ … }
static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
{ … }
static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
{ … }
static void vhci_cleanup_unlink_list(struct vhci_device *vdev,
struct list_head *unlink_list)
{ … }
static void vhci_device_unlink_cleanup(struct vhci_device *vdev)
{ … }
static void vhci_shutdown_connection(struct usbip_device *ud)
{ … }
static void vhci_device_reset(struct usbip_device *ud)
{ … }
static void vhci_device_unusable(struct usbip_device *ud)
{ … }
static void vhci_device_init(struct vhci_device *vdev)
{ … }
static int hcd_name_to_id(const char *name)
{ … }
static int vhci_setup(struct usb_hcd *hcd)
{ … }
static int vhci_start(struct usb_hcd *hcd)
{ … }
static void vhci_stop(struct usb_hcd *hcd)
{ … }
static int vhci_get_frame_number(struct usb_hcd *hcd)
{ … }
#ifdef CONFIG_PM
static int vhci_bus_suspend(struct usb_hcd *hcd)
{ … }
static int vhci_bus_resume(struct usb_hcd *hcd)
{ … }
#else
#define vhci_bus_suspend …
#define vhci_bus_resume …
#endif
static int vhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev,
struct usb_host_endpoint **eps, unsigned int num_eps,
unsigned int num_streams, gfp_t mem_flags)
{ … }
static int vhci_free_streams(struct usb_hcd *hcd, struct usb_device *udev,
struct usb_host_endpoint **eps, unsigned int num_eps,
gfp_t mem_flags)
{ … }
static const struct hc_driver vhci_hc_driver = …;
static int vhci_hcd_probe(struct platform_device *pdev)
{ … }
static void vhci_hcd_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM
static int vhci_hcd_suspend(struct platform_device *pdev, pm_message_t state)
{ … }
static int vhci_hcd_resume(struct platform_device *pdev)
{ … }
#else
#define vhci_hcd_suspend …
#define vhci_hcd_resume …
#endif
static struct platform_driver vhci_driver = …;
static void del_platform_devices(void)
{ … }
static int __init vhci_hcd_init(void)
{ … }
static void __exit vhci_hcd_exit(void)
{ … }
module_init(…) …;
module_exit(vhci_hcd_exit);
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;