linux/drivers/usb/host/ehci-dbg.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (c) 2001-2002 by David Brownell
 */

/* this file is part of ehci-hcd.c */

#ifdef CONFIG_DYNAMIC_DEBUG

/*
 * check the values in the HCSPARAMS register
 * (host controller _Structural_ parameters)
 * see EHCI spec, Table 2-4 for each value
 */
static void dbg_hcs_params(struct ehci_hcd *ehci, char *label)
{}

/*
 * check the values in the HCCPARAMS register
 * (host controller _Capability_ parameters)
 * see EHCI Spec, Table 2-5 for each value
 */
static void dbg_hcc_params(struct ehci_hcd *ehci, char *label)
{}

static void __maybe_unused
dbg_qtd(const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd)
{}

static void __maybe_unused
dbg_qh(const char *label, struct ehci_hcd *ehci, struct ehci_qh *qh)
{}

static void __maybe_unused
dbg_itd(const char *label, struct ehci_hcd *ehci, struct ehci_itd *itd)
{}

static void __maybe_unused
dbg_sitd(const char *label, struct ehci_hcd *ehci, struct ehci_sitd *sitd)
{}

static int __maybe_unused
dbg_status_buf(char *buf, unsigned len, const char *label, u32 status)
{}

static int __maybe_unused
dbg_intr_buf(char *buf, unsigned len, const char *label, u32 enable)
{}

static const char *const fls_strings[] =;

static int
dbg_command_buf(char *buf, unsigned len, const char *label, u32 command)
{}

static int
dbg_port_buf(char *buf, unsigned len, const char *label, int port, u32 status)
{}

static inline void
dbg_status(struct ehci_hcd *ehci, const char *label, u32 status)
{}

static inline void
dbg_cmd(struct ehci_hcd *ehci, const char *label, u32 command)
{}

static inline void
dbg_port(struct ehci_hcd *ehci, const char *label, int port, u32 status)
{}

/*-------------------------------------------------------------------------*/

/* troubleshooting help: expose state in debugfs */

static int debug_async_open(struct inode *, struct file *);
static int debug_bandwidth_open(struct inode *, struct file *);
static int debug_periodic_open(struct inode *, struct file *);
static int debug_registers_open(struct inode *, struct file *);

static ssize_t debug_output(struct file*, char __user*, size_t, loff_t*);
static int debug_close(struct inode *, struct file *);

static const struct file_operations debug_async_fops =;

static const struct file_operations debug_bandwidth_fops =;

static const struct file_operations debug_periodic_fops =;

static const struct file_operations debug_registers_fops =;

static struct dentry *ehci_debug_root;

struct debug_buffer {};

static inline char speed_char(u32 info1)
{}

static inline char token_mark(struct ehci_hcd *ehci, __hc32 token)
{}

static void qh_lines(struct ehci_hcd *ehci, struct ehci_qh *qh,
		char **nextp, unsigned *sizep)
{}

static ssize_t fill_async_buffer(struct debug_buffer *buf)
{}

static ssize_t fill_bandwidth_buffer(struct debug_buffer *buf)
{}

static unsigned output_buf_tds_dir(char *buf, struct ehci_hcd *ehci,
		struct ehci_qh_hw *hw, struct ehci_qh *qh, unsigned size)
{}

#define DBG_SCHED_LIMIT
static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
{}
#undef DBG_SCHED_LIMIT

static const char *rh_state_string(struct ehci_hcd *ehci)
{}

static ssize_t fill_registers_buffer(struct debug_buffer *buf)
{}

static struct debug_buffer *alloc_buffer(struct usb_bus *bus,
		ssize_t (*fill_func)(struct debug_buffer *))
{}

static int fill_buffer(struct debug_buffer *buf)
{}

static ssize_t debug_output(struct file *file, char __user *user_buf,
		size_t len, loff_t *offset)
{}

static int debug_close(struct inode *inode, struct file *file)
{}

static int debug_async_open(struct inode *inode, struct file *file)
{}

static int debug_bandwidth_open(struct inode *inode, struct file *file)
{}

static int debug_periodic_open(struct inode *inode, struct file *file)
{}

static int debug_registers_open(struct inode *inode, struct file *file)
{}

static inline void create_debug_files(struct ehci_hcd *ehci)
{}

static inline void remove_debug_files(struct ehci_hcd *ehci)
{}

#else /* CONFIG_DYNAMIC_DEBUG */

static inline void dbg_hcs_params(struct ehci_hcd *ehci, char *label) { }
static inline void dbg_hcc_params(struct ehci_hcd *ehci, char *label) { }

static inline void __maybe_unused dbg_qh(const char *label,
		struct ehci_hcd *ehci, struct ehci_qh *qh) { }

static inline int __maybe_unused dbg_status_buf(const char *buf,
		unsigned int len, const char *label, u32 status)
{ return 0; }

static inline int __maybe_unused dbg_command_buf(const char *buf,
		unsigned int len, const char *label, u32 command)
{ return 0; }

static inline int __maybe_unused dbg_intr_buf(const char *buf,
		unsigned int len, const char *label, u32 enable)
{ return 0; }

static inline int __maybe_unused dbg_port_buf(char *buf,
		unsigned int len, const char *label, int port, u32 status)
{ return 0; }

static inline void dbg_status(struct ehci_hcd *ehci, const char *label,
		u32 status) { }
static inline void dbg_cmd(struct ehci_hcd *ehci, const char *label,
		u32 command) { }
static inline void dbg_port(struct ehci_hcd *ehci, const char *label,
		int port, u32 status) { }

static inline void create_debug_files(struct ehci_hcd *bus) { }
static inline void remove_debug_files(struct ehci_hcd *bus) { }

#endif /* CONFIG_DYNAMIC_DEBUG */