Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2013 15:26:05 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r246122 - in head/sys/dev/usb: . controller storage template
Message-ID:  <201301301526.r0UFQ5rF083270@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Jan 30 15:26:04 2013
New Revision: 246122
URL: http://svnweb.freebsd.org/changeset/base/246122

Log:
  Modify the FreeBSD USB kernel code so that it can be compiled directly
  into the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systems
  or embedded platforms. This is also useful for out of the system compilation
  of the FreeBSD USB stack for various purposes. The USB kernel files can
  now optionally include a global header file which should include all needed
  definitions required to compile the FreeBSD USB stack. When the global USB
  header file is included, no other USB header files will be included by
  default.
  
  Add new file containing the USB stack configuration for the
  FreeBSD loader build.
  
  Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now all
  USB files follow the same style.
  
  Use cases:
   - console in loader via USB
   - loading kernel via USB
  
  Discussed with:		Hiroki Sato, hrs @ EuroBSDCon

Added:
  head/sys/dev/usb/usb_freebsd_loader.h   (contents, props changed)
Modified:
  head/sys/dev/usb/controller/at91dci.c
  head/sys/dev/usb/controller/atmegadci.c
  head/sys/dev/usb/controller/avr32dci.c
  head/sys/dev/usb/controller/dwc_otg.c
  head/sys/dev/usb/controller/ehci.c
  head/sys/dev/usb/controller/musb_otg.c
  head/sys/dev/usb/controller/ohci.c
  head/sys/dev/usb/controller/uhci.c
  head/sys/dev/usb/controller/usb_controller.c
  head/sys/dev/usb/controller/uss820dci.c
  head/sys/dev/usb/controller/xhci.c
  head/sys/dev/usb/storage/ustorage_fs.c
  head/sys/dev/usb/template/usb_template.c
  head/sys/dev/usb/template/usb_template_audio.c
  head/sys/dev/usb/template/usb_template_cdce.c
  head/sys/dev/usb/template/usb_template_kbd.c
  head/sys/dev/usb/template/usb_template_modem.c
  head/sys/dev/usb/template/usb_template_mouse.c
  head/sys/dev/usb/template/usb_template_msc.c
  head/sys/dev/usb/template/usb_template_mtp.c
  head/sys/dev/usb/usb.h
  head/sys/dev/usb/usb_busdma.c
  head/sys/dev/usb/usb_busdma.h
  head/sys/dev/usb/usb_compat_linux.c
  head/sys/dev/usb/usb_core.c
  head/sys/dev/usb/usb_debug.c
  head/sys/dev/usb/usb_dev.c
  head/sys/dev/usb/usb_dev.h
  head/sys/dev/usb/usb_device.c
  head/sys/dev/usb/usb_dynamic.c
  head/sys/dev/usb/usb_endian.h
  head/sys/dev/usb/usb_error.c
  head/sys/dev/usb/usb_freebsd.h
  head/sys/dev/usb/usb_generic.c
  head/sys/dev/usb/usb_handle_request.c
  head/sys/dev/usb/usb_hid.c
  head/sys/dev/usb/usb_hub.c
  head/sys/dev/usb/usb_ioctl.h
  head/sys/dev/usb/usb_lookup.c
  head/sys/dev/usb/usb_mbuf.c
  head/sys/dev/usb/usb_msctest.c
  head/sys/dev/usb/usb_parse.c
  head/sys/dev/usb/usb_pci.h
  head/sys/dev/usb/usb_pf.c
  head/sys/dev/usb/usb_process.c
  head/sys/dev/usb/usb_process.h
  head/sys/dev/usb/usb_request.c
  head/sys/dev/usb/usb_transfer.c
  head/sys/dev/usb/usb_util.c
  head/sys/dev/usb/usbdi.h
  head/sys/dev/usb/usbhid.h

Modified: head/sys/dev/usb/controller/at91dci.c
==============================================================================
--- head/sys/dev/usb/controller/at91dci.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/controller/at91dci.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2007-2008 Hans Petter Selasky. All rights reserved.
  *
@@ -44,6 +42,9 @@ __FBSDID("$FreeBSD$");
  * endpoints, Function-address and more.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -79,6 +80,8 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
+
 #include <dev/usb/controller/at91dci.h>
 
 #define	AT9100_DCI_BUS2SC(bus) \

Modified: head/sys/dev/usb/controller/atmegadci.c
==============================================================================
--- head/sys/dev/usb/controller/atmegadci.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/controller/atmegadci.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2009 Hans Petter Selasky. All rights reserved.
  *
@@ -36,6 +34,9 @@ __FBSDID("$FreeBSD$");
  * endpoints, Function-address and more.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -71,6 +72,8 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
+
 #include <dev/usb/controller/atmegadci.h>
 
 #define	ATMEGA_BUS2SC(bus) \

Modified: head/sys/dev/usb/controller/avr32dci.c
==============================================================================
--- head/sys/dev/usb/controller/avr32dci.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/controller/avr32dci.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2009 Hans Petter Selasky. All rights reserved.
  *
@@ -35,7 +33,9 @@ __FBSDID("$FreeBSD$");
  * NOTE: When the chip detects BUS-reset it will also reset the
  * endpoints, Function-address and more.
  */
-
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -71,6 +71,8 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
+
 #include <dev/usb/controller/avr32dci.h>
 
 #define	AVR32_BUS2SC(bus) \

Modified: head/sys/dev/usb/controller/dwc_otg.c
==============================================================================
--- head/sys/dev/usb/controller/dwc_otg.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/controller/dwc_otg.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
  * Copyright (c) 2010-2011 Aleksandr Rybalko. All rights reserved.
@@ -41,9 +42,9 @@
  * internal reset.
  */
 
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -79,6 +80,7 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 #include <dev/usb/controller/dwc_otg.h>
 #include <dev/usb/controller/dwc_otgreg.h>

Modified: head/sys/dev/usb/controller/ehci.c
==============================================================================
--- head/sys/dev/usb/controller/ehci.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/controller/ehci.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
  * Copyright (c) 2004 The NetBSD Foundation, Inc. All rights reserved.
@@ -43,9 +44,9 @@
  * 1) command failures are not recovered correctly
  */
 
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -81,6 +82,8 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
+
 #include <dev/usb/controller/ehci.h>
 #include <dev/usb/controller/ehcireg.h>
 

Modified: head/sys/dev/usb/controller/musb_otg.c
==============================================================================
--- head/sys/dev/usb/controller/musb_otg.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/controller/musb_otg.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -36,6 +36,9 @@
  * NOTE: The current implementation only supports Device Side Mode!
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -71,6 +74,8 @@
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
+
 #include <dev/usb/controller/musb_otg.h>
 
 #define	MUSBOTG_INTR_ENDPT 1

Modified: head/sys/dev/usb/controller/ohci.c
==============================================================================
--- head/sys/dev/usb/controller/ohci.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/controller/ohci.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
  * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
@@ -25,9 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
 /*
  * USB Open Host Controller driver.
  *
@@ -35,6 +33,9 @@ __FBSDID("$FreeBSD$");
  * USB spec:  http://www.usb.org/developers/docs/usbspec.zip
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -70,6 +71,8 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
+
 #include <dev/usb/controller/ohci.h>
 #include <dev/usb/controller/ohcireg.h>
 

Modified: head/sys/dev/usb/controller/uhci.c
==============================================================================
--- head/sys/dev/usb/controller/uhci.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/controller/uhci.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
  * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
@@ -25,9 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
 /*
  * USB Universal Host Controller driver.
  * Handles e.g. PIIX3 and PIIX4.
@@ -38,6 +36,9 @@ __FBSDID("$FreeBSD$");
  *             ftp://download.intel.com/design/intarch/datashts/29056201.pdf
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -73,6 +74,8 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
+
 #include <dev/usb/controller/uhci.h>
 #include <dev/usb/controller/uhcireg.h>
 

Modified: head/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- head/sys/dev/usb/controller/usb_controller.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/controller/usb_controller.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include "opt_ddb.h"
 
 #include <sys/stdint.h>
@@ -62,6 +65,7 @@
 #include <dev/usb/usb_bus.h>
 #include <dev/usb/usb_pf.h>
 #include "usb_if.h"
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 /* function prototypes  */
 
@@ -84,10 +88,12 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug
     "Debug level");
 #endif
 
+#if USB_HAVE_ROOT_MOUNT_HOLD
 static int usb_no_boot_wait = 0;
 TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait);
 SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RD|CTLFLAG_TUN, &usb_no_boot_wait, 0,
     "No USB device enumerate waiting at boot.");
+#endif
 
 static int usb_no_suspend_wait = 0;
 TUNABLE_INT("hw.usb.no_suspend_wait", &usb_no_suspend_wait);
@@ -144,6 +150,7 @@ usb_probe(device_t dev)
 	return (0);
 }
 
+#if USB_HAVE_ROOT_MOUNT_HOLD
 static void
 usb_root_mount_rel(struct usb_bus *bus)
 {
@@ -153,6 +160,7 @@ usb_root_mount_rel(struct usb_bus *bus)
 		bus->bus_roothold = NULL;
 	}
 }
+#endif
 
 /*------------------------------------------------------------------------*
  *	usb_attach
@@ -169,11 +177,12 @@ usb_attach(device_t dev)
 		return (ENXIO);
 	}
 
+#if USB_HAVE_ROOT_MOUNT_HOLD
 	if (usb_no_boot_wait == 0) {
 		/* delay vfs_mountroot until the bus is explored */
 		bus->bus_roothold = root_mount_hold(device_get_nameunit(dev));
 	}
-
+#endif
 	usb_attach_sub(dev, bus);
 
 	return (0);			/* return success */
@@ -196,8 +205,10 @@ usb_detach(device_t dev)
 	/* Stop power watchdog */
 	usb_callout_drain(&bus->power_wdog);
 
+#if USB_HAVE_ROOT_MOUNT_HOLD
 	/* Let the USB explore process detach all devices. */
 	usb_root_mount_rel(bus);
+#endif
 
 	USB_BUS_LOCK(bus);
 
@@ -363,7 +374,9 @@ usb_bus_explore(struct usb_proc_msg *pm)
 		(udev->hub->explore) (udev);
 		USB_BUS_LOCK(bus);
 	}
+#if USB_HAVE_ROOT_MOUNT_HOLD
 	usb_root_mount_rel(bus);
+#endif
 }
 
 /*------------------------------------------------------------------------*
@@ -630,7 +643,9 @@ usb_bus_attach(struct usb_proc_msg *pm)
 
 	default:
 		device_printf(bus->bdev, "Unsupported USB revision\n");
+#if USB_HAVE_ROOT_MOUNT_HOLD
 		usb_root_mount_rel(bus);
+#endif
 		return;
 	}
 
@@ -672,7 +687,9 @@ usb_bus_attach(struct usb_proc_msg *pm)
 	if (err) {
 		device_printf(bus->bdev, "Root HUB problem, error=%s\n",
 		    usbd_errstr(err));
+#if USB_HAVE_ROOT_MOUNT_HOLD
 		usb_root_mount_rel(bus);
+#endif
 	}
 
 	/* set softc - we are ready */

Modified: head/sys/dev/usb/controller/uss820dci.c
==============================================================================
--- head/sys/dev/usb/controller/uss820dci.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/controller/uss820dci.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -32,6 +32,9 @@
  * NOTE: The datasheet does not document everything.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -67,6 +70,8 @@
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
+
 #include <dev/usb/controller/uss820dci.h>
 
 #define	USS820_DCI_BUS2SC(bus) \

Modified: head/sys/dev/usb/controller/xhci.c
==============================================================================
--- head/sys/dev/usb/controller/xhci.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/controller/xhci.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
  *
@@ -38,9 +39,9 @@
  * way we avoid too much diveration among USB drivers.
  */
 
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -76,6 +77,8 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
+
 #include <dev/usb/controller/xhci.h>
 #include <dev/usb/controller/xhcireg.h>
 

Modified: head/sys/dev/usb/storage/ustorage_fs.c
==============================================================================
--- head/sys/dev/usb/storage/ustorage_fs.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/storage/ustorage_fs.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -36,6 +36,9 @@
  * Linux USB gadget stack.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -62,6 +65,7 @@
 
 #define	USB_DEBUG_VAR ustorage_fs_debug
 #include <dev/usb/usb_debug.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 #ifdef USB_DEBUG
 static int ustorage_fs_debug = 0;

Modified: head/sys/dev/usb/template/usb_template.c
==============================================================================
--- head/sys/dev/usb/template/usb_template.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/template/usb_template.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -29,6 +29,9 @@
  * USB templates.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -67,6 +70,7 @@
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
 #include <dev/usb/template/usb_template.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 MODULE_DEPEND(usb_template, usb, 1, 1, 1);
 MODULE_VERSION(usb_template, 1);

Modified: head/sys/dev/usb/template/usb_template_audio.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_audio.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/template/usb_template_audio.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
  *
@@ -30,6 +28,9 @@ __FBSDID("$FreeBSD$");
  * This file contains the USB template for an USB Audio Device.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -54,6 +55,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/usb/usb_cdc.h>
 
 #include <dev/usb/template/usb_template.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 enum {
 	INDEX_AUDIO_LANG,

Modified: head/sys/dev/usb/template/usb_template_cdce.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_cdce.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/template/usb_template_cdce.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2007 Hans Petter Selasky <hselasky@FreeBSD.org>
  * All rights reserved.
@@ -31,6 +29,9 @@ __FBSDID("$FreeBSD$");
  * This file contains the USB templates for a CDC USB ethernet device.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -55,6 +56,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/usb/usb_cdc.h>
 
 #include <dev/usb/template/usb_template.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 enum {
 	STRING_LANG_INDEX,

Modified: head/sys/dev/usb/template/usb_template_kbd.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_kbd.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/template/usb_template_kbd.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
  *
@@ -30,6 +28,9 @@ __FBSDID("$FreeBSD$");
  * This file contains the USB template for an USB Keyboard Device.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -54,6 +55,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/usb/usb_cdc.h>
 
 #include <dev/usb/template/usb_template.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 enum {
 	INDEX_LANG,

Modified: head/sys/dev/usb/template/usb_template_modem.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_modem.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/template/usb_template_modem.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
  *
@@ -30,6 +28,9 @@ __FBSDID("$FreeBSD$");
  * This file contains the USB template for an USB Modem Device.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -54,6 +55,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/usb/usb_cdc.h>
 
 #include <dev/usb/template/usb_template.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 enum {
 	INDEX_LANG,

Modified: head/sys/dev/usb/template/usb_template_mouse.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_mouse.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/template/usb_template_mouse.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
  *
@@ -30,6 +28,9 @@ __FBSDID("$FreeBSD$");
  * This file contains the USB template for an USB Mouse Device.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -54,6 +55,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/usb/usb_cdc.h>
 
 #include <dev/usb/template/usb_template.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 enum {
 	INDEX_LANG,

Modified: head/sys/dev/usb/template/usb_template_msc.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_msc.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/template/usb_template_msc.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2008 Hans Petter Selasky <hselasky@FreeBSD.org>
  * All rights reserved.
@@ -31,6 +29,9 @@ __FBSDID("$FreeBSD$");
  * This file contains the USB templates for an USB Mass Storage Device.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -54,6 +55,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/usb/usbdi.h>
 
 #include <dev/usb/template/usb_template.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 enum {
 	STRING_LANG_INDEX,

Modified: head/sys/dev/usb/template/usb_template_mtp.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_mtp.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/template/usb_template_mtp.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2008 Hans Petter Selasky <hselasky@FreeBSD.org>
  * All rights reserved.
@@ -38,6 +36,9 @@ __FBSDID("$FreeBSD$");
  * operating system the VID and PID of your device.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -60,6 +61,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/usb/usb.h>
 #include <dev/usb/usbdi.h>
 #include <dev/usb/template/usb_template.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 #define	MTP_BREQUEST 0x08
 

Modified: head/sys/dev/usb/usb.h
==============================================================================
--- head/sys/dev/usb/usb.h	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb.h	Wed Jan 30 15:26:04 2013	(r246122)
@@ -40,22 +40,28 @@
 #define	_USB_STANDARD_H_
 
 #if defined(_KERNEL)
+#ifndef USB_GLOBAL_INCLUDE_FILE
 #include "opt_usb.h"
+#endif
 
 /* Declare parent SYSCTL USB node. */
 #ifdef SYSCTL_DECL
 SYSCTL_DECL(_hw_usb);
 #endif
 
+#ifndef USB_GLOBAL_INCLUDE_FILE
 #include <sys/malloc.h>
+#endif
 
 MALLOC_DECLARE(M_USB);
 MALLOC_DECLARE(M_USBDEV);
 MALLOC_DECLARE(M_USBHC);
 #endif /* _KERNEL */
 
+#ifndef USB_GLOBAL_INCLUDE_FILE
 #include <dev/usb/usb_endian.h>
 #include <dev/usb/usb_freebsd.h>
+#endif
 
 #define	USB_STACK_VERSION 2000		/* 2.0 */
 

Modified: head/sys/dev/usb/usb_busdma.c
==============================================================================
--- head/sys/dev/usb/usb_busdma.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_busdma.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -59,6 +62,7 @@
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 #if USB_HAVE_BUSDMA
 static void	usb_dma_tag_create(struct usb_dma_tag *, usb_size_t, usb_size_t);

Modified: head/sys/dev/usb/usb_busdma.h
==============================================================================
--- head/sys/dev/usb/usb_busdma.h	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_busdma.h	Wed Jan 30 15:26:04 2013	(r246122)
@@ -27,10 +27,12 @@
 #ifndef _USB_BUSDMA_H_
 #define	_USB_BUSDMA_H_
 
+#ifndef USB_GLOBAL_INCLUDE_FILE
 #include <sys/uio.h>
 #include <sys/mbuf.h>
 
 #include <machine/bus.h>
+#endif
 
 /* defines */
 

Modified: head/sys/dev/usb/usb_compat_linux.c
==============================================================================
--- head/sys/dev/usb/usb_compat_linux.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_compat_linux.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -25,6 +25,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -61,6 +64,7 @@
 #include <dev/usb/usb_hub.h>
 #include <dev/usb/usb_request.h>
 #include <dev/usb/usb_debug.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 struct usb_linux_softc {
 	LIST_ENTRY(usb_linux_softc) sc_attached_list;

Modified: head/sys/dev/usb/usb_core.c
==============================================================================
--- head/sys/dev/usb/usb_core.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_core.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -30,6 +30,9 @@
  * http://www.usb.org/developers/devclass_docs/
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -51,6 +54,7 @@
 
 #include <dev/usb/usb.h>
 #include <dev/usb/usbdi.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 MALLOC_DEFINE(M_USB, "USB", "USB");
 MALLOC_DEFINE(M_USBDEV, "USBdev", "USB device");

Modified: head/sys/dev/usb/usb_debug.c
==============================================================================
--- head/sys/dev/usb/usb_debug.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_debug.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -55,6 +58,7 @@
 
 #include <ddb/ddb.h>
 #include <ddb/db_sym.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 /*
  * Define this unconditionally in case a kernel module is loaded that

Modified: head/sys/dev/usb/usb_dev.c
==============================================================================
--- head/sys/dev/usb/usb_dev.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_dev.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -27,6 +27,9 @@
  * usb_dev.c - An abstraction layer for creating devices under /dev/...
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -75,6 +78,7 @@
 #include <sys/syscallsubr.h>
 
 #include <machine/stdarg.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 #if USB_HAVE_UGEN
 

Modified: head/sys/dev/usb/usb_dev.h
==============================================================================
--- head/sys/dev/usb/usb_dev.h	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_dev.h	Wed Jan 30 15:26:04 2013	(r246122)
@@ -27,11 +27,13 @@
 #ifndef _USB_DEV_H_
 #define	_USB_DEV_H_
 
+#ifndef USB_GLOBAL_INCLUDE_FILE
 #include <sys/file.h>
 #include <sys/selinfo.h>
 #include <sys/poll.h>
 #include <sys/signalvar.h>
 #include <sys/proc.h>
+#endif
 
 struct usb_fifo;
 struct usb_mbuf;

Modified: head/sys/dev/usb/usb_device.c
==============================================================================
--- head/sys/dev/usb/usb_device.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_device.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -78,6 +81,7 @@
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 /* function prototypes  */
 

Modified: head/sys/dev/usb/usb_dynamic.c
==============================================================================
--- head/sys/dev/usb/usb_dynamic.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_dynamic.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -50,6 +53,7 @@
 #include <dev/usb/usb_process.h>
 #include <dev/usb/usb_device.h>
 #include <dev/usb/usb_dynamic.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 /* function prototypes */
 static usb_handle_req_t usb_temp_get_desc_w;

Modified: head/sys/dev/usb/usb_endian.h
==============================================================================
--- head/sys/dev/usb/usb_endian.h	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_endian.h	Wed Jan 30 15:26:04 2013	(r246122)
@@ -27,8 +27,10 @@
 #ifndef _USB_ENDIAN_H_
 #define	_USB_ENDIAN_H_
 
+#ifndef USB_GLOBAL_INCLUDE_FILE
 #include <sys/stdint.h>
 #include <sys/endian.h>
+#endif
 
 /*
  * Declare the basic USB record types. USB records have an alignment

Modified: head/sys/dev/usb/usb_error.c
==============================================================================
--- head/sys/dev/usb/usb_error.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_error.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -45,6 +48,7 @@
 
 #include <dev/usb/usb.h>
 #include <dev/usb/usbdi.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 static const char* usb_errstr_table[USB_ERR_MAX] = {
 	[USB_ERR_NORMAL_COMPLETION]	= "USB_ERR_NORMAL_COMPLETION",

Modified: head/sys/dev/usb/usb_freebsd.h
==============================================================================
--- head/sys/dev/usb/usb_freebsd.h	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_freebsd.h	Wed Jan 30 15:26:04 2013	(r246122)
@@ -42,6 +42,7 @@
 #define	USB_HAVE_POWERD 1
 #define	USB_HAVE_MSCTEST 1
 #define	USB_HAVE_PF 1
+#define	USB_HAVE_ROOT_MOUNT_HOLD 1
 
 #define	USB_TD_GET_PROC(td) (td)->td_proc
 #define	USB_PROC_GET_GID(td) (td)->p_pgid

Added: head/sys/dev/usb/usb_freebsd_loader.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/usb/usb_freebsd_loader.h	Wed Jan 30 15:26:04 2013	(r246122)
@@ -0,0 +1,83 @@
+/* $FreeBSD$ */
+/*-
+ * Copyright (c) 2013 Hans Petter Selasky. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Including this file is mandatory for all USB related c-files in the loader.
+ */
+
+#ifndef _USB_FREEBSD_LOADER_H_
+#define	_USB_FREEBSD_LOADER_H_
+
+/* Default USB configuration */
+#define	USB_HAVE_UGEN 0
+#define	USB_HAVE_DEVCTL 0
+#define	USB_HAVE_BUSDMA 1
+#define	USB_HAVE_COMPAT_LINUX 0
+#define	USB_HAVE_USER_IO 0
+#define	USB_HAVE_MBUF 0
+#define	USB_HAVE_TT_SUPPORT 1
+#define	USB_HAVE_POWERD 1
+#define	USB_HAVE_MSCTEST 0
+#define	USB_HAVE_PF 0
+#define	USB_HAVE_ROOT_MOUNT_HOLD 0
+
+#define	USB_TD_GET_PROC(td) (td)->td_proc
+#define	USB_PROC_GET_GID(td) (td)->p_pgid
+
+#if (!defined(USB_HOST_ALIGN)) || (USB_HOST_ALIGN <= 0)
+/* Use default value. */
+#undef USB_HOST_ALIGN
+#define	USB_HOST_ALIGN    8		/* bytes, must be power of two */
+#endif
+/* Sanity check for USB_HOST_ALIGN: Verify power of two. */
+#if ((-USB_HOST_ALIGN) & USB_HOST_ALIGN) != USB_HOST_ALIGN
+#error "USB_HOST_ALIGN is not power of two."
+#endif
+#define	USB_FS_ISOC_UFRAME_MAX 4	/* exclusive unit */
+#define	USB_BUS_MAX 256			/* units */
+#define	USB_MAX_DEVICES 128		/* units */
+#define	USB_IFACE_MAX 32		/* units */
+#define	USB_FIFO_MAX 128		/* units */
+#define	USB_MAX_EP_STREAMS 8		/* units */
+
+#define	USB_MAX_FS_ISOC_FRAMES_PER_XFER (120)	/* units */
+#define	USB_MAX_HS_ISOC_FRAMES_PER_XFER (8*120)	/* units */
+
+#define	USB_HUB_MAX_DEPTH	5
+#define	USB_EP0_BUFSIZE		1024	/* bytes */
+#define	USB_CS_RESET_LIMIT	20	/* failures = 20 * 50 ms = 1sec */
+
+#define	USB_MAX_AUTO_QUIRK	4	/* maximum number of dynamic quirks */
+
+typedef uint32_t usb_timeout_t;		/* milliseconds */
+typedef uint32_t usb_frlength_t;	/* bytes */
+typedef uint32_t usb_frcount_t;		/* units */
+typedef uint32_t usb_size_t;		/* bytes */
+typedef uint32_t usb_ticks_t;		/* system defined */
+typedef uint16_t usb_power_mask_t;	/* see "USB_HW_POWER_XXX" */
+typedef uint16_t usb_stream_t;		/* stream ID */
+
+#endif					/* _USB_FREEBSD_LOADER_H_ */

Modified: head/sys/dev/usb/usb_generic.c
==============================================================================
--- head/sys/dev/usb/usb_generic.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_generic.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -67,6 +70,7 @@
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 #if USB_HAVE_UGEN
 

Modified: head/sys/dev/usb/usb_handle_request.c
==============================================================================
--- head/sys/dev/usb/usb_handle_request.c	Wed Jan 30 15:21:18 2013	(r246121)
+++ head/sys/dev/usb/usb_handle_request.c	Wed Jan 30 15:26:04 2013	(r246122)
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
 #include <sys/stdint.h>
 #include <sys/stddef.h>
 #include <sys/param.h>
@@ -61,6 +64,7 @@
 
 #include <dev/usb/usb_controller.h>
 #include <dev/usb/usb_bus.h>
+#endif			/* USB_GLOBAL_INCLUDE_FILE */
 
 /* function prototypes */
 

Modified: head/sys/dev/usb/usb_hid.c
==============================================================================
--- head/sys/dev/usb/usb_hid.c	Wed Jan 30 15:21:18 2013	(r246121)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301301526.r0UFQ5rF083270>