Skip to contentSkip to conversation

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

PATCH New harry 1 participant 1 message Nov 30, 2005

lore
Share & tools
lore

harry

author
#0 lore raw

PATCH 15/17 REV 2 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 0dab7be3b83a -r e95f0d5261d3 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 0dab7be3b83a -r e95f0d5261d3 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 0dab7be3b83a -r e95f0d5261d3 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 +36 -0
diff -r 0dab7be3b83a -r e95f0d5261d3 linux-2.6-xen-sparse/drivers/xen/usbback/usbback_assert.h
@@ -0,0 +1,36 @@
+/*****************************************************************************/
+/* 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(__FUNCTION__, __LINE__, #S))
+
+#endif
linux-2.6-xen-sparse/drivers/xen/usbback/usbback_device.c new file +363 -0

363 lines not on this page · raw message

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

41 lines not on this page · raw message

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

183 lines not on this page · raw message

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

55 lines not on this page · raw message

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

390 lines not on this page · raw message

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

66 lines not on this page · raw message

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

1,134 lines not on this page · raw message

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

146 lines not on this page · raw message

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

541 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 +62 -0

62 lines not on this page · raw message

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

41 lines not on this page · raw message

patches/linux-2.6.12/usb.patch new file +10 -0
diff -r 0dab7be3b83a -r e95f0d5261d3 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.