Skip to contentSkip to conversation

USB virt 2.6 split driver---USB split driver front-end

PATCH In review harry 1 participant 1 message Nov 21, 2005

lore
Share & tools
lore

harry

author
#0 lore raw

PATCH 16/17 USB virt 2.6 split driver---USB split driver front-end

This patch implements the front end of the USB split driver.

linux-2.6-xen-sparse/arch/xen/Kconfig +24 -0
diff -r 5a90f01cb37e -r 06d98ed0b6e5 linux-2.6-xen-sparse/arch/xen/Kconfig
@@ -159,6 +159,30 @@
 	  are unsure; or if you experience network hangs when this option is
 	  enabled; then you must say N here.
 
+config XEN_USBDEV_FRONTEND
+	tristate "USB-device frontend driver"
+	select USB
+	default m
+	help
+	  The USB-device frontend driver allows the kernel to access USB
+	  devices exported by a USB-device backend driver running in another
+	  domain.
+	  This is not required for USB device access in domain 0 or any domain
+	  given exclusive control over a USB host controller device at the PCI
+	  level.
+	  Say Y or M if you want to use a USB-device backend driver to export a
+	  USB device from another domain to the domain which will run this
+	  kernel.
+
+config XEN_USBDEV_FRONTEND_TRACE
+	bool "USB-device frontend driver tracing"
+	depends on XEN_USBDEV_FRONTEND
+	default n
+	help
+	  This option causes the driver to output a continual trace of its
+          activity.
+	  Say N here unless you are trying to debug the driver.
+
 config XEN_BLKDEV_TAP
 	bool "Block device tap driver"
 	default n
linux-2.6-xen-sparse/drivers/xen/Makefile +1 -1
diff -r 5a90f01cb37e -r 06d98ed0b6e5 linux-2.6-xen-sparse/drivers/xen/Makefile
@@ -17,4 +17,4 @@
 obj-$(CONFIG_XEN_NETDEV_FRONTEND)	+= netfront/
 obj-$(CONFIG_XEN_BLKDEV_TAP)    	+= blktap/
 obj-$(CONFIG_XEN_TPMDEV_FRONTEND)	+= tpmfront/
-
+obj-$(CONFIG_XEN_USBDEV_FRONTEND)	+= usbfront/
linux-2.6-xen-sparse/drivers/xen/usbfront/Makefile new file +7 -0
diff -r 5a90f01cb37e -r 06d98ed0b6e5 linux-2.6-xen-sparse/drivers/xen/usbfront/Makefile
@@ -0,0 +1,7 @@
+obj-$(CONFIG_XEN_USBDEV_FRONTEND) += usbfront.o
+
+usbfront-objs :=  \
+usbfront_hcd_resource.o \
+usbfront_driver.o \
+usbfront_device.o \
+usbfront_module.o
linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_assert.h new file +39 -0
diff -r 5a90f01cb37e -r 06d98ed0b6e5 linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_assert.h
@@ -0,0 +1,39 @@
+/*****************************************************************************/
+/* An implementation of the ASSERT macro.                                    */
+/*                                                                           */
+/* Copyright (c) 2005 Harry Butterworth IBM Corporation                      */
+/*                                                                           */
+/* This program is free software; you can redistribute it and/or modify it   */
+/* under the terms of the GNU General Public License as published by the     */
+/* Free Software Foundation; either version 2 of the License, or (at your    */
+/* option) any later version.                                                */
+/*                                                                           */
+/* This program is distributed in the hope that it will be useful, but       */
+/* WITHOUT ANY WARRANTY; without even the implied warranty of                */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General */
+/* Public License for more details.                                          */
+/*                                                                           */
+/* You should have received a copy of the GNU General Public License along   */
+/* with this program; if not, write to the Free Software Foundation, Inc.,   */
+/* 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                   */
+/*                                                                           */
+/*****************************************************************************/
+
+#ifndef USBFRONT_ASSERT_H
+#define USBFRONT_ASSERT_H
+
+#include <linux/kernel.h>
+
+static inline void assert_failed
+    (const char *function, int line, const char *statement) {
+	printk
+	    (KERN_ERR "usbfront assert failed: %s line %d, statement %s\n",
+	     function, line, statement);
+
+	BUG();
+}
+
+#define ASSERT( S ) \
+( ( S ) ? ( (void)0 ) : assert_failed( __PRETTY_FUNCTION__, __LINE__, #S ) )
+
+#endif
linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_device.c new file +1192 -0

1,192 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_device.h new file +82 -0

82 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_driver.c new file +812 -0

812 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_driver.h new file +35 -0
diff -r 5a90f01cb37e -r 06d98ed0b6e5 linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_driver.h
@@ -0,0 +1,35 @@
+/*****************************************************************************/
+/* A device driver for usbfront_device devices.                              */
+/*                                                                           */
+/* Copyright (c) 2005 Harry Butterworth IBM Corporation                      */
+/*                                                                           */
+/* This program is free software; you can redistribute it and/or modify it   */
+/* under the terms of the GNU General Public License as published by the     */
+/* Free Software Foundation; either version 2 of the License, or (at your    */
+/* option) any later version.                                                */
+/*                                                                           */
+/* This program is distributed in the hope that it will be useful, but       */
+/* WITHOUT ANY WARRANTY; without even the implied warranty of                */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General */
+/* Public License for more details.                                          */
+/*                                                                           */
+/* You should have received a copy of the GNU General Public License along   */
+/* with this program; if not, write to the Free Software Foundation, Inc.,   */
+/* 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                   */
+/*                                                                           */
+/*****************************************************************************/
+
+#ifndef USBFRONT_DRIVER_H
+#define USBFRONT_DRIVER_H
+
+#include "usbfront_device.h"
+
+extern int usbfront_driver_class_init(void);
+
+extern void usbfront_driver_class_exit(void);
+
+extern int usbfront_driver_probe(struct usbfront_device *device);
+
+extern void usbfront_driver_remove(struct usbfront_device *device);
+
+#endif
linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_hcd_resource.c new file +915 -0

798 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_hcd_resource.h new file +95 -0

95 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_module.c new file +88 -0

88 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_sll.h new file +116 -0

116 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront_trace.h new file +53 -0

53 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Part of the diff is not shown here. View the raw message.