linux/drivers/usb/usbip/stub_rx.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2003-2008 Takahiro Hirofuchi
 */

#include <asm/byteorder.h>
#include <linux/kthread.h>
#include <linux/usb.h>
#include <linux/usb/hcd.h>
#include <linux/scatterlist.h>

#include "usbip_common.h"
#include "stub.h"

static int is_clear_halt_cmd(struct urb *urb)
{}

static int is_set_interface_cmd(struct urb *urb)
{}

static int is_set_configuration_cmd(struct urb *urb)
{}

static int is_reset_device_cmd(struct urb *urb)
{}

static int tweak_clear_halt_cmd(struct urb *urb)
{}

static int tweak_set_interface_cmd(struct urb *urb)
{}

static int tweak_set_configuration_cmd(struct urb *urb)
{}

static int tweak_reset_device_cmd(struct urb *urb)
{}

/*
 * clear_halt, set_interface, and set_configuration require special tricks.
 * Returns 1 if request was tweaked, 0 otherwise.
 */
static int tweak_special_requests(struct urb *urb)
{}

/*
 * stub_recv_unlink() unlinks the URB by a call to usb_unlink_urb().
 * By unlinking the urb asynchronously, stub_rx can continuously
 * process coming urbs.  Even if the urb is unlinked, its completion
 * handler will be called and stub_tx will send a return pdu.
 *
 * See also comments about unlinking strategy in vhci_hcd.c.
 */
static int stub_recv_cmd_unlink(struct stub_device *sdev,
				struct usbip_header *pdu)
{}

static int valid_request(struct stub_device *sdev, struct usbip_header *pdu)
{}

static struct stub_priv *stub_priv_alloc(struct stub_device *sdev,
					 struct usbip_header *pdu)
{}

static int get_pipe(struct stub_device *sdev, struct usbip_header *pdu)
{}

static void masking_bogus_flags(struct urb *urb)
{}

static int stub_recv_xbuff(struct usbip_device *ud, struct stub_priv *priv)
{}

static void stub_recv_cmd_submit(struct stub_device *sdev,
				 struct usbip_header *pdu)
{}

/* recv a pdu */
static void stub_rx_pdu(struct usbip_device *ud)
{}

int stub_rx_loop(void *data)
{}