Date: Sun, 28 Jul 2013 17:24:24 GMT From: bguan@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r255270 - soc2013/bguan/head/sys/dev/xen/usbfront Message-ID: <201307281724.r6SHOOPk090782@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bguan Date: Sun Jul 28 17:24:24 2013 New Revision: 255270 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=255270 Log: add struct mtx for usbfront 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 28 17:24:11 2013 (r255269) +++ soc2013/bguan/head/sys/dev/xen/usbfront/xenhci.h Sun Jul 28 17:24:24 2013 (r255270) @@ -35,6 +35,13 @@ #define XENHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) +#define XENHCI_PAGE_SIZE 4096 /* bytes */ + +//#define TASK_COMM_LEN 16 /* Task command name length */ + +#define GRANT_INVALID_REF 0 + + /* 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. @@ -50,6 +57,7 @@ #endif #define USB_URB_RING_SIZE __RING_SIZE((usbif_urb_sring_t *)0, PAGE_SIZE) +#define USB_CONN_RING_SIZE __RING_SIZE((usbif_conn_sring_t *)0, PAGE_SIZE) LIST_HEAD(list_head, list_head); @@ -74,7 +82,24 @@ enum usb_dev_speed speed; }; +/* + The "hardware" in Xen host controller is the shared ring to + the backend driver and the data you can send and receive across it +*/ +//struct xenhci_hw_softc { + //struct usb_page_cache root_pc; + //struct usb_page_cache ctx_pc; + //struct usb_page_cache scratch_pc[XHCI_MAX_SCRATCHPADS]; + + //struct usb_page root_pg; + //struct usb_page ctx_pg; + //struct usb_page scratch_pg[XHCI_MAX_SCRATCHPADS]; + + //struct xhci_hw_dev devs[XHCI_MAX_DEVICES + 1]; +//}; + struct xenhci_softc { + //struct xenhci_hw_softc sc_hw; /* base device */ struct usb_bus sc_bus; /* configure message */ @@ -90,7 +115,7 @@ LIST_ENTRY(list_head) in_progress_list; //?? LIST_ENTRY(list_head) giveback_waiting_list; //?? - //spinlock_t lock; + struct mtx lock; //spinlock_t lock; /* timer that kick pending and giveback waiting urbs */ //struct timer_list watchdog;//?? @@ -115,8 +140,9 @@ unsigned long shadow_free; /* ring response thread */ - struct task *ringthread;//struct task_struct *kthread; - LIST_ENTRY(list_head) *wait_list; //wait_queue_head_t wq;?? + struct task *kthread;//struct task_struct *kthread; + //LIST_ENTRY(list_head) *wait_list; //wait_queue_head_t wq;?? + struct taskqueue *wait_taskqueue; unsigned int waiting_resp;// };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307281724.r6SHOOPk090782>