Skip to contentSkip to conversation

USB virt 2.6 split driver---USB split driver back-end

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

lore
Share & tools
lore

harry

author
#0 lore raw

PATCH 15/17 USB virt 2.6 split driver---USB split driver back-end

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

linux-2.6-xen-sparse/arch/xen/Kconfig +23 -0
diff -r 941c7dbc1353 -r 5a90f01cb37e linux-2.6-xen-sparse/arch/xen/Kconfig
@@ -77,6 +77,29 @@
 	  The network-device backend driver allows the kernel to export its
 	  network devices to other guests via a high-performance shared-memory
 	  interface.
+
+config XEN_USBDEV_BACKEND
+	tristate "USB-device backend driver"
+	depends on XEN_PHYSDEV_ACCESS
+	select USB
+	default m
+	help
+	  The USB-device backend driver allows the kernel to export USB
+	  devices to USB-device frontend drivers running in other domains.
+	  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 this kernel to export a USB device to
+          another domain running a USB-device frontend driver.
+
+config XEN_USBDEV_BACKEND_TRACE
+	bool "USB-device backend driver tracing"
+	depends on XEN_USBDEV_BACKEND
+	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_TPMDEV_FRONTEND
         bool "TPM-device frontend driver"
linux-2.6-xen-sparse/drivers/xen/Makefile +1 -0
diff -r 941c7dbc1353 -r 5a90f01cb37e linux-2.6-xen-sparse/drivers/xen/Makefile
@@ -12,6 +12,7 @@
 obj-$(CONFIG_XEN_BLKDEV_BACKEND)	+= blkback/
 obj-$(CONFIG_XEN_NETDEV_BACKEND)	+= netback/
 obj-$(CONFIG_XEN_TPMDEV_BACKEND)	+= tpmback/
+obj-$(CONFIG_XEN_USBDEV_BACKEND)	+= usbback/
 obj-$(CONFIG_XEN_BLKDEV_FRONTEND)	+= blkfront/
 obj-$(CONFIG_XEN_NETDEV_FRONTEND)	+= netfront/
 obj-$(CONFIG_XEN_BLKDEV_TAP)    	+= blktap/
linux-2.6-xen-sparse/drivers/xen/usbback/Makefile new file +9 -0
diff -r 941c7dbc1353 -r 5a90f01cb37e linux-2.6-xen-sparse/drivers/xen/usbback/Makefile
@@ -0,0 +1,9 @@
+obj-$(CONFIG_XEN_USBDEV_BACKEND) += usbback.o
+
+usbback-objs :=                \
+usbback_device.o               \
+usbback_driver_backend.o       \
+usbback_driver.o               \
+usbback_driver_port.o          \
+usbback_driver_port_resource.o \
+usbback_module.o
linux-2.6-xen-sparse/drivers/xen/usbback/usbback_assert.h new file +38 -0
diff -r 941c7dbc1353 -r 5a90f01cb37e linux-2.6-xen-sparse/drivers/xen/usbback/usbback_assert.h
@@ -0,0 +1,38 @@
+/*****************************************************************************/
+/* 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 USBBACK_ASSERT_H
+#define USBBACK_ASSERT_H
+
+#include <linux/kernel.h>
+
+static inline void assert_failed
+    (const char *function, int line, const char *statement) {
+	printk
+	    (KERN_ERR "usbback 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/usbback/usbback_device.c new file +450 -0

450 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbback/usbback_device.h new file +42 -0

42 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbback/usbback_driver.c new file +240 -0

240 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbback/usbback_driver.h new file +53 -0

53 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbback/usbback_driver_backend.c new file +554 -0

554 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbback/usbback_driver_backend.h new file +61 -0

61 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbback/usbback_driver_port.c new file +1369 -0

1,369 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbback/usbback_driver_port.h new file +144 -0

144 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbback/usbback_driver_port_resource.c new file +1156 -0

4 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbback/usbback_driver_port_resource.h new file +83 -0

83 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbback/usbback_module.c new file +80 -0

80 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/usbback/usbback_trace.h new file +54 -0

54 lines not on this page · raw message

patches/linux-2.6.12/usb.patch new file +10 -0
diff -r 941c7dbc1353 -r 5a90f01cb37e patches/linux-2.6.12/usb.patch

Lines of this file are not shown. View the 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.