linux/drivers/usb/usbip/vudc_dev.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2015 Karol Kosik <[email protected]>
 * Copyright (C) 2015-2016 Samsung Electronics
 *               Igor Kotrasinski <[email protected]>
 *               Krzysztof Opasiak <[email protected]>
 */

#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/platform_device.h>
#include <linux/usb.h>
#include <linux/usb/gadget.h>
#include <linux/usb/hcd.h>
#include <linux/kthread.h>
#include <linux/file.h>
#include <linux/byteorder/generic.h>

#include "usbip_common.h"
#include "vudc.h"

#define VIRTUAL_ENDPOINTS

/* urb-related structures alloc / free */


static void free_urb(struct urb *urb)
{}

struct urbp *alloc_urbp(void)
{}

static void free_urbp(struct urbp *urb_p)
{}

void free_urbp_and_urb(struct urbp *urb_p)
{}


/* utilities ; almost verbatim from dummy_hcd.c */

/* called with spinlock held */
static void nuke(struct vudc *udc, struct vep *ep)
{}

/* caller must hold lock */
static void stop_activity(struct vudc *udc)
{}

struct vep *vudc_find_endpoint(struct vudc *udc, u8 address)
{}

/* gadget ops */

static int vgadget_get_frame(struct usb_gadget *_gadget)
{}

static int vgadget_set_selfpowered(struct usb_gadget *_gadget, int value)
{}

static int vgadget_pullup(struct usb_gadget *_gadget, int value)
{}

static int vgadget_udc_start(struct usb_gadget *g,
		struct usb_gadget_driver *driver)
{}

static int vgadget_udc_stop(struct usb_gadget *g)
{}

static const struct usb_gadget_ops vgadget_ops =;


/* endpoint ops */

static int vep_enable(struct usb_ep *_ep,
		const struct usb_endpoint_descriptor *desc)
{}

static int vep_disable(struct usb_ep *_ep)
{}

static struct usb_request *vep_alloc_request(struct usb_ep *_ep,
		gfp_t mem_flags)
{}

static void vep_free_request(struct usb_ep *_ep, struct usb_request *_req)
{}

static int vep_queue(struct usb_ep *_ep, struct usb_request *_req,
		gfp_t mem_flags)
{}

static int vep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
{}

static int
vep_set_halt_and_wedge(struct usb_ep *_ep, int value, int wedged)
{}

static int
vep_set_halt(struct usb_ep *_ep, int value)
{}

static int vep_set_wedge(struct usb_ep *_ep)
{}

static const struct usb_ep_ops vep_ops =;


/* shutdown / reset / error handlers */

static void vudc_shutdown(struct usbip_device *ud)
{}

static void vudc_device_reset(struct usbip_device *ud)
{}

static void vudc_device_unusable(struct usbip_device *ud)
{}

/* device setup / cleanup */

struct vudc_device *alloc_vudc_device(int devid)
{}

void put_vudc_device(struct vudc_device *udc_dev)
{}

static int init_vudc_hw(struct vudc *udc)
{}

static void cleanup_vudc_hw(struct vudc *udc)
{}

/* platform driver ops */

int vudc_probe(struct platform_device *pdev)
{}

void vudc_remove(struct platform_device *pdev)
{}