linux/drivers/usb/host/xhci-dbgcap.c

// SPDX-License-Identifier: GPL-2.0
/*
 * xhci-dbgcap.c - xHCI debug capability support
 *
 * Copyright (C) 2017 Intel Corporation
 *
 * Author: Lu Baolu <[email protected]>
 */
#include <linux/bug.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/errno.h>
#include <linux/kstrtox.h>
#include <linux/list.h>
#include <linux/nls.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/sysfs.h>
#include <linux/types.h>
#include <linux/workqueue.h>

#include <linux/io-64-nonatomic-lo-hi.h>

#include <asm/byteorder.h>

#include "xhci.h"
#include "xhci-trace.h"
#include "xhci-dbgcap.h"

static void dbc_free_ctx(struct device *dev, struct xhci_container_ctx *ctx)
{}

/* we use only one segment for DbC rings */
static void dbc_ring_free(struct device *dev, struct xhci_ring *ring)
{}

static u32 xhci_dbc_populate_strings(struct dbc_str_descs *strings)
{}

static void xhci_dbc_init_contexts(struct xhci_dbc *dbc, u32 string_length)
{}

static void xhci_dbc_giveback(struct dbc_request *req, int status)
	__releases(&dbc->lock)
	__acquires(&dbc->lock)
{}

static void xhci_dbc_flush_single_request(struct dbc_request *req)
{}

static void xhci_dbc_flush_endpoint_requests(struct dbc_ep *dep)
{}

static void xhci_dbc_flush_requests(struct xhci_dbc *dbc)
{}

struct dbc_request *
dbc_alloc_request(struct xhci_dbc *dbc, unsigned int direction, gfp_t flags)
{}

void
dbc_free_request(struct dbc_request *req)
{}

static void
xhci_dbc_queue_trb(struct xhci_ring *ring, u32 field1,
		   u32 field2, u32 field3, u32 field4)
{}

static int xhci_dbc_queue_bulk_tx(struct dbc_ep *dep,
				  struct dbc_request *req)
{}

static int
dbc_ep_do_queue(struct dbc_request *req)
{}

int dbc_ep_queue(struct dbc_request *req)
{}

static inline void xhci_dbc_do_eps_init(struct xhci_dbc *dbc, bool direction)
{}

static void xhci_dbc_eps_init(struct xhci_dbc *dbc)
{}

static void xhci_dbc_eps_exit(struct xhci_dbc *dbc)
{}

static int dbc_erst_alloc(struct device *dev, struct xhci_ring *evt_ring,
		    struct xhci_erst *erst, gfp_t flags)
{}

static void dbc_erst_free(struct device *dev, struct xhci_erst *erst)
{}

static struct xhci_container_ctx *
dbc_alloc_ctx(struct device *dev, gfp_t flags)
{}

static struct xhci_ring *
xhci_dbc_ring_alloc(struct device *dev, enum xhci_ring_type type, gfp_t flags)
{}

static int xhci_dbc_mem_init(struct xhci_dbc *dbc, gfp_t flags)
{}

static void xhci_dbc_mem_cleanup(struct xhci_dbc *dbc)
{}

static int xhci_do_dbc_start(struct xhci_dbc *dbc)
{}

static int xhci_do_dbc_stop(struct xhci_dbc *dbc)
{}

static int xhci_dbc_start(struct xhci_dbc *dbc)
{}

static void xhci_dbc_stop(struct xhci_dbc *dbc)
{}

static void
dbc_handle_port_status(struct xhci_dbc *dbc, union xhci_trb *event)
{}

static void dbc_handle_xfer_event(struct xhci_dbc *dbc, union xhci_trb *event)
{}

static void inc_evt_deq(struct xhci_ring *ring)
{}

static enum evtreturn xhci_dbc_do_handle_events(struct xhci_dbc *dbc)
{}

static void xhci_dbc_handle_events(struct work_struct *work)
{}

static const char * const dbc_state_strings[DS_MAX] =;

static ssize_t dbc_show(struct device *dev,
			struct device_attribute *attr,
			char *buf)
{}

static ssize_t dbc_store(struct device *dev,
			 struct device_attribute *attr,
			 const char *buf, size_t count)
{}

static ssize_t dbc_idVendor_show(struct device *dev,
			    struct device_attribute *attr,
			    char *buf)
{}

static ssize_t dbc_idVendor_store(struct device *dev,
			     struct device_attribute *attr,
			     const char *buf, size_t size)
{}

static ssize_t dbc_idProduct_show(struct device *dev,
			    struct device_attribute *attr,
			    char *buf)
{}

static ssize_t dbc_idProduct_store(struct device *dev,
			     struct device_attribute *attr,
			     const char *buf, size_t size)
{}

static ssize_t dbc_bcdDevice_show(struct device *dev,
				   struct device_attribute *attr,
				   char *buf)
{}

static ssize_t dbc_bcdDevice_store(struct device *dev,
				    struct device_attribute *attr,
				    const char *buf, size_t size)
{}

static ssize_t dbc_bInterfaceProtocol_show(struct device *dev,
				 struct device_attribute *attr,
				 char *buf)
{}

static ssize_t dbc_bInterfaceProtocol_store(struct device *dev,
				  struct device_attribute *attr,
				  const char *buf, size_t size)
{}

static ssize_t dbc_poll_interval_ms_show(struct device *dev,
					 struct device_attribute *attr,
					 char *buf)
{}

static ssize_t dbc_poll_interval_ms_store(struct device *dev,
					  struct device_attribute *attr,
					  const char *buf, size_t size)
{}

static DEVICE_ATTR_RW(dbc);
static DEVICE_ATTR_RW(dbc_idVendor);
static DEVICE_ATTR_RW(dbc_idProduct);
static DEVICE_ATTR_RW(dbc_bcdDevice);
static DEVICE_ATTR_RW(dbc_bInterfaceProtocol);
static DEVICE_ATTR_RW(dbc_poll_interval_ms);

static struct attribute *dbc_dev_attrs[] =;
ATTRIBUTE_GROUPS();

struct xhci_dbc *
xhci_alloc_dbc(struct device *dev, void __iomem *base, const struct dbc_driver *driver)
{}

/* undo what xhci_alloc_dbc() did */
void xhci_dbc_remove(struct xhci_dbc *dbc)
{}


int xhci_create_dbc_dev(struct xhci_hcd *xhci)
{}

void xhci_remove_dbc_dev(struct xhci_hcd *xhci)
{}

#ifdef CONFIG_PM
int xhci_dbc_suspend(struct xhci_hcd *xhci)
{}

int xhci_dbc_resume(struct xhci_hcd *xhci)
{}
#endif /* CONFIG_PM */

int xhci_dbc_init(void)
{}

void xhci_dbc_exit(void)
{}