#include <linux/io.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/usb/hcd.h>
#include "common.h"
struct usbhsh_request { … };
struct usbhsh_device { … };
struct usbhsh_ep { … };
#define USBHSH_DEVICE_MAX …
#define USBHSH_PORT_MAX …
struct usbhsh_hpriv { … };
static const char usbhsh_hcd_name[] = …;
#define usbhsh_priv_to_hpriv(priv) …
#define __usbhsh_for_each_udev(start, pos, h, i) …
#define usbhsh_for_each_udev(pos, hpriv, i) …
#define usbhsh_for_each_udev_with_dev0(pos, hpriv, i) …
#define usbhsh_hcd_to_hpriv(h) …
#define usbhsh_hcd_to_dev(h) …
#define usbhsh_hpriv_to_priv(h) …
#define usbhsh_hpriv_to_dcp(h) …
#define usbhsh_hpriv_to_hcd(h) …
#define usbhsh_ep_to_uep(u) …
#define usbhsh_uep_to_pipe(u) …
#define usbhsh_uep_to_udev(u) …
#define usbhsh_uep_to_ep(u) …
#define usbhsh_urb_to_ureq(u) …
#define usbhsh_urb_to_usbv(u) …
#define usbhsh_usbv_to_udev(d) …
#define usbhsh_udev_to_usbv(h) …
#define usbhsh_udev_is_used(h) …
#define usbhsh_pipe_to_uep(p) …
#define usbhsh_device_parent(d) …
#define usbhsh_device_hubport(d) …
#define usbhsh_device_number(h, d) …
#define usbhsh_device_nth(h, d) …
#define usbhsh_device0(h) …
#define usbhsh_port_stat_init(h) …
#define usbhsh_port_stat_set(h, s) …
#define usbhsh_port_stat_clear(h, s) …
#define usbhsh_port_stat_get(h) …
#define usbhsh_pkt_to_ureq(p) …
static struct usbhsh_request *usbhsh_ureq_alloc(struct usbhsh_hpriv *hpriv,
struct urb *urb,
gfp_t mem_flags)
{ … }
static void usbhsh_ureq_free(struct usbhsh_hpriv *hpriv,
struct usbhsh_request *ureq)
{ … }
static int usbhsh_is_running(struct usbhsh_hpriv *hpriv)
{ … }
static void usbhsh_endpoint_sequence_save(struct usbhsh_hpriv *hpriv,
struct urb *urb,
struct usbhs_pkt *pkt)
{ … }
static struct usbhsh_device *usbhsh_device_get(struct usbhsh_hpriv *hpriv,
struct urb *urb);
static int usbhsh_pipe_attach(struct usbhsh_hpriv *hpriv,
struct urb *urb)
{ … }
static void usbhsh_pipe_detach(struct usbhsh_hpriv *hpriv,
struct usbhsh_ep *uep)
{ … }
static int usbhsh_endpoint_attach(struct usbhsh_hpriv *hpriv,
struct urb *urb,
gfp_t mem_flags)
{ … }
static void usbhsh_endpoint_detach(struct usbhsh_hpriv *hpriv,
struct usb_host_endpoint *ep)
{ … }
static void usbhsh_endpoint_detach_all(struct usbhsh_hpriv *hpriv,
struct usbhsh_device *udev)
{ … }
static int usbhsh_connected_to_rhdev(struct usb_hcd *hcd,
struct usbhsh_device *udev)
{ … }
static int usbhsh_device_has_endpoint(struct usbhsh_device *udev)
{ … }
static struct usbhsh_device *usbhsh_device_get(struct usbhsh_hpriv *hpriv,
struct urb *urb)
{ … }
static struct usbhsh_device *usbhsh_device_attach(struct usbhsh_hpriv *hpriv,
struct urb *urb)
{ … }
static void usbhsh_device_detach(struct usbhsh_hpriv *hpriv,
struct usbhsh_device *udev)
{ … }
static void usbhsh_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt)
{ … }
static int usbhsh_queue_push(struct usb_hcd *hcd,
struct urb *urb,
gfp_t mem_flags)
{ … }
static void usbhsh_queue_force_pop(struct usbhs_priv *priv,
struct usbhs_pipe *pipe)
{ … }
static void usbhsh_queue_force_pop_all(struct usbhs_priv *priv)
{ … }
static int usbhsh_is_request_address(struct urb *urb)
{ … }
static void usbhsh_setup_stage_packet_push(struct usbhsh_hpriv *hpriv,
struct urb *urb,
struct usbhs_pipe *pipe)
{ … }
static void usbhsh_data_stage_packet_done(struct usbhs_priv *priv,
struct usbhs_pkt *pkt)
{ … }
static int usbhsh_data_stage_packet_push(struct usbhsh_hpriv *hpriv,
struct urb *urb,
struct usbhs_pipe *pipe,
gfp_t mem_flags)
{ … }
static int usbhsh_status_stage_packet_push(struct usbhsh_hpriv *hpriv,
struct urb *urb,
struct usbhs_pipe *pipe,
gfp_t mem_flags)
{ … }
static int usbhsh_dcp_queue_push(struct usb_hcd *hcd,
struct urb *urb,
gfp_t mflags)
{ … }
static int usbhsh_dma_map_ctrl(struct device *dma_dev, struct usbhs_pkt *pkt,
int map)
{ … }
static int usbhsh_host_start(struct usb_hcd *hcd)
{ … }
static void usbhsh_host_stop(struct usb_hcd *hcd)
{ … }
static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
struct urb *urb,
gfp_t mem_flags)
{ … }
static int usbhsh_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
{ … }
static void usbhsh_endpoint_disable(struct usb_hcd *hcd,
struct usb_host_endpoint *ep)
{ … }
static int usbhsh_hub_status_data(struct usb_hcd *hcd, char *buf)
{ … }
static int __usbhsh_hub_hub_feature(struct usbhsh_hpriv *hpriv,
u16 typeReq, u16 wValue,
u16 wIndex, char *buf, u16 wLength)
{ … }
static int __usbhsh_hub_port_feature(struct usbhsh_hpriv *hpriv,
u16 typeReq, u16 wValue,
u16 wIndex, char *buf, u16 wLength)
{ … }
static int __usbhsh_hub_get_status(struct usbhsh_hpriv *hpriv,
u16 typeReq, u16 wValue,
u16 wIndex, char *buf, u16 wLength)
{ … }
static int usbhsh_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
u16 wIndex, char *buf, u16 wLength)
{ … }
static int usbhsh_bus_nop(struct usb_hcd *hcd)
{ … }
static const struct hc_driver usbhsh_driver = …;
static int usbhsh_irq_attch(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state)
{ … }
static int usbhsh_irq_dtch(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state)
{ … }
static int usbhsh_irq_setup_ack(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state)
{ … }
static int usbhsh_irq_setup_err(struct usbhs_priv *priv,
struct usbhs_irq_state *irq_state)
{ … }
static void usbhsh_pipe_init_for_host(struct usbhs_priv *priv)
{ … }
static int usbhsh_start(struct usbhs_priv *priv)
{ … }
static int usbhsh_stop(struct usbhs_priv *priv)
{ … }
int usbhs_mod_host_probe(struct usbhs_priv *priv)
{ … }
int usbhs_mod_host_remove(struct usbhs_priv *priv)
{ … }