Date: Sun, 21 Jul 2013 17:15:35 GMT From: bguan@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r255005 - soc2013/bguan/head/sys/dev/xen/usbfront Message-ID: <201307211715.r6LHFZs9054444@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bguan Date: Sun Jul 21 17:15:35 2013 New Revision: 255005 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=255005 Log: move usb_bus_methods to .c file Modified: soc2013/bguan/head/sys/dev/xen/usbfront/xenhci.h Modified: soc2013/bguan/head/sys/dev/xen/usbfront/xenhci.h ============================================================================== --- soc2013/bguan/head/sys/dev/xen/usbfront/xenhci.h Sun Jul 21 17:15:15 2013 (r255004) +++ soc2013/bguan/head/sys/dev/xen/usbfront/xenhci.h Sun Jul 21 17:15:35 2013 (r255005) @@ -30,22 +30,17 @@ #define _USBFRONT_H_ #define XENHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) -#define PCI_CBMEM 0x10 /* USB ports. This is arbitrary. * From USB 2.0 spec Table 11-13, offset 7, a hub can * have up to 255 ports. The most yet reported is 10. - * FIXME ?? + * FIXME ?? */ #define USB_MAXCHILDREN 31 #define USB_URB_RING_SIZE __RING_SIZE((usbif_urb_sring_t *)0, PAGE_SIZE) - -//FIXME:? -struct list_head { - struct list_head *next, *prev; -}; +LIST_HEAD(list_head, list_head); /* ring request shadow */ struct usb_shadow { @@ -68,9 +63,6 @@ enum usb_dev_speed speed; }; -///////////////////////////////////////////////// -// Moved to xenhci.h -///////////////////////////////////////////////// struct xenhci_softc { /* base device */ struct usb_bus sc_bus; @@ -80,19 +72,12 @@ struct usb_callout sc_callout; struct usb_device *sc_devices[XENHCI_MAX_DEVICES]; - struct resource *sc_io_res; - struct resource *sc_irq_res; - - void *sc_intr_hdl; - bus_size_t sc_io_size; - bus_space_tag_t sc_io_tag; - bus_space_handle_t sc_io_hdl; /* Virtual Host Controller has 4 urb queues */ - struct list_head pending_submit_list; //?? - struct list_head pending_unlink_list; //?? - struct list_head in_progress_list; //?? - struct list_head giveback_waiting_list; //?? + LIST_ENTRY(list_head) pending_submit_list; //?? + LIST_ENTRY(list_head) pending_unlink_list; //?? + LIST_ENTRY(list_head) in_progress_list; //?? + LIST_ENTRY(list_head) giveback_waiting_list; //?? //spinlock_t lock; @@ -105,7 +90,6 @@ struct rhport_status ports[USB_MAXCHILDREN]; struct vdevice_status devices[USB_MAXCHILDREN]; - /* Xen related staff */ /* shared ring */ device_t xb_dev; @@ -121,41 +105,11 @@ /* ring response thread */ struct task *ringthread;//struct task_struct *kthread; - struct list_head *wait_list; //wait_queue_head_t wq;???????? + LIST_ENTRY(list_head) *wait_list; //wait_queue_head_t wq;?? unsigned int waiting_resp;// }; -/* - * all bus methods are defined here -*/ - - - -extern struct usb_bus_methods xenhci_bus_methods; - -struct usb_bus_methods xenhci_bus_methods = { - .endpoint_init = NULL, //xhci_ep_init, - .endpoint_uninit = NULL, //xhci_ep_uninit, - .xfer_setup = NULL, //xhci_xfer_setup, - .xfer_unsetup = NULL, //xhci_xfer_unsetup, - .get_dma_delay = NULL, //xhci_get_dma_delay, - .device_init = NULL, //xhci_device_init, - .device_uninit = NULL, //xhci_device_uninit, - .device_resume = NULL, //xhci_device_resume, - .device_suspend = NULL, //xhci_device_suspend, - .set_hw_power = NULL, //xhci_set_hw_power, - .roothub_exec = NULL, //xhci_roothub_exec, - .xfer_poll = NULL, //xhci_do_poll, - .start_dma_delay = NULL, //xhci_start_dma_delay, - .set_address = NULL, //xhci_set_address, - .clear_stall = NULL, //xhci_ep_clear_stall, - .device_state_change = NULL, //xhci_device_state_change, - .set_hw_power_sleep = NULL, //xhci_set_hw_power_sleep, - .set_endpoint_mode = NULL, //xhci_set_endpoint_mode, -}; - - /* prototypes */ -//usb_error_t xenhci_init(struct xenhci_softc *, device_t); +usb_error_t xenhci_init(struct xenhci_softc *, device_t); #endif /* _USBFRONT_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307211715.r6LHFZs9054444>