1184610Salfred/* $FreeBSD$ */ 2184610Salfred/*- 3184610Salfred * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4184610Salfred * 5184610Salfred * Redistribution and use in source and binary forms, with or without 6184610Salfred * modification, are permitted provided that the following conditions 7184610Salfred * are met: 8184610Salfred * 1. Redistributions of source code must retain the above copyright 9184610Salfred * notice, this list of conditions and the following disclaimer. 10184610Salfred * 2. Redistributions in binary form must reproduce the above copyright 11184610Salfred * notice, this list of conditions and the following disclaimer in the 12184610Salfred * documentation and/or other materials provided with the distribution. 13184610Salfred * 14184610Salfred * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15184610Salfred * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16184610Salfred * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17184610Salfred * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18184610Salfred * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19184610Salfred * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20184610Salfred * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21184610Salfred * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22184610Salfred * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23184610Salfred * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24184610Salfred * SUCH DAMAGE. 25184610Salfred */ 26184610Salfred 27184610Salfred/* 28184610Salfred * USB specifications and other documentation can be found at 29184610Salfred * http://www.usb.org/developers/docs/ and 30184610Salfred * http://www.usb.org/developers/devclass_docs/ 31184610Salfred */ 32184610Salfred 33246122Shselasky#ifdef USB_GLOBAL_INCLUDE_FILE 34246122Shselasky#include USB_GLOBAL_INCLUDE_FILE 35246122Shselasky#else 36194677Sthompsa#include <sys/stdint.h> 37194677Sthompsa#include <sys/stddef.h> 38194677Sthompsa#include <sys/param.h> 39194677Sthompsa#include <sys/queue.h> 40194677Sthompsa#include <sys/types.h> 41194677Sthompsa#include <sys/systm.h> 42194677Sthompsa#include <sys/kernel.h> 43194677Sthompsa#include <sys/bus.h> 44194677Sthompsa#include <sys/module.h> 45194677Sthompsa#include <sys/lock.h> 46194677Sthompsa#include <sys/mutex.h> 47194677Sthompsa#include <sys/condvar.h> 48194677Sthompsa#include <sys/sysctl.h> 49194677Sthompsa#include <sys/sx.h> 50194677Sthompsa#include <sys/unistd.h> 51194677Sthompsa#include <sys/callout.h> 52194677Sthompsa#include <sys/malloc.h> 53194677Sthompsa#include <sys/priv.h> 54184610Salfred 55194677Sthompsa#include <dev/usb/usb.h> 56194677Sthompsa#include <dev/usb/usbdi.h> 57246122Shselasky#endif /* USB_GLOBAL_INCLUDE_FILE */ 58194677Sthompsa 59246123Shselaskyconst struct usb_string_lang usb_string_lang_en = { 60246123Shselasky sizeof(usb_string_lang_en), UDESC_STRING, 61246123Shselasky { 0x09, 0x04 } /* American English */ 62246123Shselasky}; 63246123Shselasky 64184610SalfredMALLOC_DEFINE(M_USB, "USB", "USB"); 65184610SalfredMALLOC_DEFINE(M_USBDEV, "USBdev", "USB device"); 66184610SalfredMALLOC_DEFINE(M_USBHC, "USBHC", "USB host controller"); 67184610Salfred 68188942SthompsaMODULE_VERSION(usb, 1); 69