#include <linux/module.h>
#include <linux/usb.h>
#include <linux/list.h>
#include <linux/usb/hcd.h>
#include <linux/io.h>
#include <xen/xen.h>
#include <xen/xenbus.h>
#include <xen/grant_table.h>
#include <xen/events.h>
#include <xen/page.h>
#include <xen/interface/io/usbif.h>
struct urb_priv { … };
struct rhport_status { … };
struct vdevice_status { … };
struct usb_shadow { … };
struct xenhcd_info { … };
#define XENHCD_RING_JIFFIES …
#define XENHCD_SCAN_JIFFIES …
enum xenhcd_timer_action { … };
static struct kmem_cache *xenhcd_urbp_cachep;
static inline struct xenhcd_info *xenhcd_hcd_to_info(struct usb_hcd *hcd)
{ … }
static inline struct usb_hcd *xenhcd_info_to_hcd(struct xenhcd_info *info)
{ … }
static void xenhcd_set_error(struct xenhcd_info *info, const char *msg)
{ … }
static inline void xenhcd_timer_action_done(struct xenhcd_info *info,
enum xenhcd_timer_action action)
{ … }
static void xenhcd_timer_action(struct xenhcd_info *info,
enum xenhcd_timer_action action)
{ … }
static void xenhcd_set_connect_state(struct xenhcd_info *info, int portnum)
{ … }
static int xenhcd_rhport_connect(struct xenhcd_info *info, __u8 portnum,
__u8 speed)
{ … }
static void xenhcd_rhport_suspend(struct xenhcd_info *info, int portnum)
{ … }
static void xenhcd_rhport_resume(struct xenhcd_info *info, int portnum)
{ … }
static void xenhcd_rhport_power_on(struct xenhcd_info *info, int portnum)
{ … }
static void xenhcd_rhport_power_off(struct xenhcd_info *info, int portnum)
{ … }
static void xenhcd_rhport_disable(struct xenhcd_info *info, int portnum)
{ … }
static void xenhcd_rhport_reset(struct xenhcd_info *info, int portnum)
{ … }
#ifdef CONFIG_PM
static int xenhcd_bus_suspend(struct usb_hcd *hcd)
{ … }
static int xenhcd_bus_resume(struct usb_hcd *hcd)
{ … }
#endif
static void xenhcd_hub_descriptor(struct xenhcd_info *info,
struct usb_hub_descriptor *desc)
{ … }
#define PORT_C_MASK …
static int xenhcd_hub_status_data(struct usb_hcd *hcd, char *buf)
{ … }
static int xenhcd_hub_control(struct usb_hcd *hcd, __u16 typeReq, __u16 wValue,
__u16 wIndex, char *buf, __u16 wLength)
{ … }
static void xenhcd_free_urb_priv(struct urb_priv *urbp)
{ … }
static inline unsigned int xenhcd_get_id_from_freelist(struct xenhcd_info *info)
{ … }
static inline void xenhcd_add_id_to_freelist(struct xenhcd_info *info,
unsigned int id)
{ … }
static inline int xenhcd_count_pages(void *addr, int length)
{ … }
static void xenhcd_gnttab_map(struct xenhcd_info *info, void *addr, int length,
grant_ref_t *gref_head,
struct xenusb_request_segment *seg,
int nr_pages, int flags)
{ … }
static __u32 xenhcd_pipe_urb_to_xenusb(__u32 urb_pipe, __u8 port)
{ … }
static int xenhcd_map_urb_for_request(struct xenhcd_info *info, struct urb *urb,
struct xenusb_urb_request *req)
{ … }
static void xenhcd_gnttab_done(struct xenhcd_info *info, unsigned int id)
{ … }
static int xenhcd_translate_status(int status)
{ … }
static void xenhcd_giveback_urb(struct xenhcd_info *info, struct urb *urb,
int status)
{ … }
static int xenhcd_do_request(struct xenhcd_info *info, struct urb_priv *urbp)
{ … }
static void xenhcd_kick_pending_urbs(struct xenhcd_info *info)
{ … }
static void xenhcd_cancel_all_enqueued_urbs(struct xenhcd_info *info)
{ … }
static void xenhcd_giveback_unlinked_urbs(struct xenhcd_info *info)
{ … }
static int xenhcd_submit_urb(struct xenhcd_info *info, struct urb_priv *urbp)
{ … }
static int xenhcd_unlink_urb(struct xenhcd_info *info, struct urb_priv *urbp)
{ … }
static void xenhcd_res_to_urb(struct xenhcd_info *info,
struct xenusb_urb_response *res, struct urb *urb)
{ … }
static int xenhcd_urb_request_done(struct xenhcd_info *info,
unsigned int *eoiflag)
{ … }
static int xenhcd_conn_notify(struct xenhcd_info *info, unsigned int *eoiflag)
{ … }
static irqreturn_t xenhcd_int(int irq, void *dev_id)
{ … }
static void xenhcd_destroy_rings(struct xenhcd_info *info)
{ … }
static int xenhcd_setup_rings(struct xenbus_device *dev,
struct xenhcd_info *info)
{ … }
static int xenhcd_talk_to_backend(struct xenbus_device *dev,
struct xenhcd_info *info)
{ … }
static int xenhcd_connect(struct xenbus_device *dev)
{ … }
static void xenhcd_disconnect(struct xenbus_device *dev)
{ … }
static void xenhcd_watchdog(struct timer_list *timer)
{ … }
static int xenhcd_setup(struct usb_hcd *hcd)
{ … }
static int xenhcd_run(struct usb_hcd *hcd)
{ … }
static void xenhcd_stop(struct usb_hcd *hcd)
{ … }
static int xenhcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
gfp_t mem_flags)
{ … }
static int xenhcd_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
{ … }
static int xenhcd_get_frame(struct usb_hcd *hcd)
{ … }
static struct hc_driver xenhcd_usb20_hc_driver = …;
static struct hc_driver xenhcd_usb11_hc_driver = …;
static struct usb_hcd *xenhcd_create_hcd(struct xenbus_device *dev)
{ … }
static void xenhcd_backend_changed(struct xenbus_device *dev,
enum xenbus_state backend_state)
{ … }
static void xenhcd_remove(struct xenbus_device *dev)
{ … }
static int xenhcd_probe(struct xenbus_device *dev,
const struct xenbus_device_id *id)
{ … }
static const struct xenbus_device_id xenhcd_ids[] = …;
static struct xenbus_driver xenhcd_driver = …;
static int __init xenhcd_init(void)
{ … }
module_init(…) …;
static void __exit xenhcd_exit(void)
{ … }
module_exit(xenhcd_exit);
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;