Date: Fri, 20 Mar 2009 19:04:31 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r190174 - in head/sys/dev/usb: . controller net serial storage template Message-ID: <200903201904.n2KJ4Vpj011122@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: thompsa Date: Fri Mar 20 19:04:31 2009 New Revision: 190174 URL: http://svn.freebsd.org/changeset/base/190174 Log: MFp4 //depot/projects/usb @159430 - Move tunable defines into usb_core.h and dependancy towards usb_defs.h - Leave hardcoded defines in "usb_defs.h". - Allow overriding all tunable defines. - Add more customisable typedefs. - Correct maximum device number. Submitted by: Hans Petter Selasky Modified: head/sys/dev/usb/controller/at91dci.c head/sys/dev/usb/controller/at91dci_atmelarm.c head/sys/dev/usb/controller/atmegadci.c head/sys/dev/usb/controller/atmegadci_atmelarm.c head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/controller/ehci.h head/sys/dev/usb/controller/ehci_ixp4xx.c head/sys/dev/usb/controller/ehci_mbus.c head/sys/dev/usb/controller/ehci_pci.c head/sys/dev/usb/controller/musb_otg.c head/sys/dev/usb/controller/musb_otg_atmelarm.c head/sys/dev/usb/controller/ohci.c head/sys/dev/usb/controller/ohci.h head/sys/dev/usb/controller/ohci_atmelarm.c head/sys/dev/usb/controller/ohci_pci.c head/sys/dev/usb/controller/uhci.c head/sys/dev/usb/controller/uhci.h head/sys/dev/usb/controller/uhci_pci.c head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/controller/uss820dci.c head/sys/dev/usb/controller/uss820dci_atmelarm.c head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/serial/ubser.c head/sys/dev/usb/serial/ugensa.c head/sys/dev/usb/serial/umct.c head/sys/dev/usb/serial/umodem.c head/sys/dev/usb/storage/ustorage_fs.c head/sys/dev/usb/template/usb_template.c head/sys/dev/usb/usb_busdma.c head/sys/dev/usb/usb_compat_linux.c head/sys/dev/usb/usb_core.h head/sys/dev/usb/usb_debug.c head/sys/dev/usb/usb_defs.h head/sys/dev/usb/usb_dev.c head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_dynamic.c 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_msctest.c head/sys/dev/usb/usb_request.c head/sys/dev/usb/usb_sw_transfer.c head/sys/dev/usb/usb_transfer.c head/sys/dev/usb/usb_util.c Modified: head/sys/dev/usb/controller/at91dci.c ============================================================================== --- head/sys/dev/usb/controller/at91dci.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/at91dci.c Fri Mar 20 19:04:31 2009 (r190174) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR at91dcidebug Modified: head/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/at91dci_atmelarm.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/at91dci_atmelarm.c Fri Mar 20 19:04:31 2009 (r190174) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb_mfunc.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb.h> #include <dev/usb/usb_core.h> Modified: head/sys/dev/usb/controller/atmegadci.c ============================================================================== --- head/sys/dev/usb/controller/atmegadci.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/atmegadci.c Fri Mar 20 19:04:31 2009 (r190174) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR atmegadci_debug Modified: head/sys/dev/usb/controller/atmegadci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/atmegadci_atmelarm.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/atmegadci_atmelarm.c Fri Mar 20 19:04:31 2009 (r190174) @@ -26,7 +26,6 @@ __FBSDID("$FreeBSD$"); * SUCH DAMAGE. */ -#include <dev/usb/usb_defs.h> #include <dev/usb/usb.h> #include <dev/usb/usb_core.h> Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/ehci.c Fri Mar 20 19:04:31 2009 (r190174) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR ehcidebug @@ -3168,7 +3167,7 @@ ehci_root_ctrl_done(struct usb2_xfer *xf USETW(sc->sc_hub_desc.stat.wStatus, 0); break; case C(UR_SET_ADDRESS, UT_WRITE_DEVICE): - if (value >= USB_MAX_DEVICES) { + if (value >= EHCI_MAX_DEVICES) { std->err = USB_ERR_IOERROR; goto done; } Modified: head/sys/dev/usb/controller/ehci.h ============================================================================== --- head/sys/dev/usb/controller/ehci.h Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/ehci.h Fri Mar 20 19:04:31 2009 (r190174) @@ -38,7 +38,7 @@ #ifndef _EHCI_H_ #define _EHCI_H_ -#define EHCI_MAX_DEVICES USB_MAX_DEVICES +#define EHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) /* PCI config registers */ #define PCI_CBMEM 0x10 /* configuration base MEM */ Modified: head/sys/dev/usb/controller/ehci_ixp4xx.c ============================================================================== --- head/sys/dev/usb/controller/ehci_ixp4xx.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/ehci_ixp4xx.c Fri Mar 20 19:04:31 2009 (r190174) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include "opt_bus.h" #include <dev/usb/usb_mfunc.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb.h> #include <dev/usb/usb_core.h> Modified: head/sys/dev/usb/controller/ehci_mbus.c ============================================================================== --- head/sys/dev/usb/controller/ehci_mbus.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/ehci_mbus.c Fri Mar 20 19:04:31 2009 (r190174) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "opt_bus.h" #include <dev/usb/usb_mfunc.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb.h> #include <dev/usb/usb_core.h> Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/ehci_pci.c Fri Mar 20 19:04:31 2009 (r190174) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); */ #include <dev/usb/usb_mfunc.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb.h> #include <dev/usb/usb_core.h> Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/musb_otg.c Fri Mar 20 19:04:31 2009 (r190174) @@ -39,7 +39,6 @@ #include <dev/usb/usb.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR musbotgdebug Modified: head/sys/dev/usb/controller/musb_otg_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg_atmelarm.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/musb_otg_atmelarm.c Fri Mar 20 19:04:31 2009 (r190174) @@ -25,7 +25,6 @@ */ #include <dev/usb/usb_mfunc.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb.h> #include <dev/usb/usb_core.h> Modified: head/sys/dev/usb/controller/ohci.c ============================================================================== --- head/sys/dev/usb/controller/ohci.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/ohci.c Fri Mar 20 19:04:31 2009 (r190174) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR ohcidebug @@ -2256,7 +2255,7 @@ ohci_root_ctrl_done(struct usb2_xfer *xf USETW(sc->sc_hub_desc.stat.wStatus, 0); break; case C(UR_SET_ADDRESS, UT_WRITE_DEVICE): - if (value >= USB_MAX_DEVICES) { + if (value >= OHCI_MAX_DEVICES) { std->err = USB_ERR_IOERROR; goto done; } Modified: head/sys/dev/usb/controller/ohci.h ============================================================================== --- head/sys/dev/usb/controller/ohci.h Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/ohci.h Fri Mar 20 19:04:31 2009 (r190174) @@ -39,7 +39,7 @@ #ifndef _OHCI_H_ #define _OHCI_H_ -#define OHCI_MAX_DEVICES USB_MAX_DEVICES +#define OHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) /* PCI config registers */ #define PCI_CBMEM 0x10 /* configuration base memory */ Modified: head/sys/dev/usb/controller/ohci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/ohci_atmelarm.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/ohci_atmelarm.c Fri Mar 20 19:04:31 2009 (r190174) @@ -26,7 +26,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb_mfunc.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb.h> #include <dev/usb/usb_core.h> Modified: head/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ohci_pci.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/ohci_pci.c Fri Mar 20 19:04:31 2009 (r190174) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_core.h> #include <dev/usb/usb_busdma.h> Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/uhci.c Fri Mar 20 19:04:31 2009 (r190174) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR uhcidebug @@ -2626,7 +2625,7 @@ uhci_root_ctrl_done(struct usb2_xfer *xf USETW(sc->sc_hub_desc.stat.wStatus, 0); break; case C(UR_SET_ADDRESS, UT_WRITE_DEVICE): - if (value >= USB_MAX_DEVICES) { + if (value >= UHCI_MAX_DEVICES) { std->err = USB_ERR_IOERROR; goto done; } Modified: head/sys/dev/usb/controller/uhci.h ============================================================================== --- head/sys/dev/usb/controller/uhci.h Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/uhci.h Fri Mar 20 19:04:31 2009 (r190174) @@ -39,7 +39,7 @@ #ifndef _UHCI_H_ #define _UHCI_H_ -#define UHCI_MAX_DEVICES USB_MAX_DEVICES +#define UHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) /* PCI config registers */ #define PCI_USBREV 0x60 /* USB protocol revision */ Modified: head/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/uhci_pci.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/uhci_pci.c Fri Mar 20 19:04:31 2009 (r190174) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); */ #include <dev/usb/usb_mfunc.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb.h> #include <dev/usb/usb_core.h> Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/usb_controller.c Fri Mar 20 19:04:31 2009 (r190174) @@ -25,7 +25,6 @@ */ #include <dev/usb/usb_mfunc.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb.h> Modified: head/sys/dev/usb/controller/uss820dci.c ============================================================================== --- head/sys/dev/usb/controller/uss820dci.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/uss820dci.c Fri Mar 20 19:04:31 2009 (r190174) @@ -36,7 +36,6 @@ #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_revision.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR uss820dcidebug Modified: head/sys/dev/usb/controller/uss820dci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/uss820dci_atmelarm.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/controller/uss820dci_atmelarm.c Fri Mar 20 19:04:31 2009 (r190174) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); */ #include <dev/usb/usb_mfunc.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb.h> #include <dev/usb/usb_core.h> Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/net/if_cdce.c Fri Mar 20 19:04:31 2009 (r190174) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb_cdc.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR cdce_debug Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/serial/u3g.c Fri Mar 20 19:04:31 2009 (r190174) @@ -34,7 +34,6 @@ #include <dev/usb/usb.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR u3g_debug Modified: head/sys/dev/usb/serial/ubser.c ============================================================================== --- head/sys/dev/usb/serial/ubser.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/serial/ubser.c Fri Mar 20 19:04:31 2009 (r190174) @@ -80,7 +80,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb_cdc.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR ubser_debug Modified: head/sys/dev/usb/serial/ugensa.c ============================================================================== --- head/sys/dev/usb/serial/ugensa.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/serial/ugensa.c Fri Mar 20 19:04:31 2009 (r190174) @@ -47,7 +47,6 @@ #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb_cdc.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR usb2_debug Modified: head/sys/dev/usb/serial/umct.c ============================================================================== --- head/sys/dev/usb/serial/umct.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/serial/umct.c Fri Mar 20 19:04:31 2009 (r190174) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb_cdc.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR usb2_debug Modified: head/sys/dev/usb/serial/umodem.c ============================================================================== --- head/sys/dev/usb/serial/umodem.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/serial/umodem.c Fri Mar 20 19:04:31 2009 (r190174) @@ -86,7 +86,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb_error.h> #include <dev/usb/usb_cdc.h> #include <dev/usb/usb_ioctl.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR umodem_debug Modified: head/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- head/sys/dev/usb/storage/ustorage_fs.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/storage/ustorage_fs.c Fri Mar 20 19:04:31 2009 (r190174) @@ -39,7 +39,6 @@ #include <dev/usb/usb.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR ustorage_fs_debug Modified: head/sys/dev/usb/template/usb_template.c ============================================================================== --- head/sys/dev/usb/template/usb_template.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/template/usb_template.c Fri Mar 20 19:04:31 2009 (r190174) @@ -32,7 +32,6 @@ #include <dev/usb/usb.h> #include <dev/usb/usb_cdc.h> #include <dev/usb/usb_mfunc.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_error.h> #define USB_DEBUG_VAR usb2_debug Modified: head/sys/dev/usb/usb_busdma.c ============================================================================== --- head/sys/dev/usb/usb_busdma.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_busdma.c Fri Mar 20 19:04:31 2009 (r190174) @@ -27,7 +27,6 @@ #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR usb2_debug Modified: head/sys/dev/usb/usb_compat_linux.c ============================================================================== --- head/sys/dev/usb/usb_compat_linux.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_compat_linux.c Fri Mar 20 19:04:31 2009 (r190174) @@ -25,7 +25,6 @@ * SUCH DAMAGE. */ -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb.h> #include <dev/usb/usb_error.h> Modified: head/sys/dev/usb/usb_core.h ============================================================================== --- head/sys/dev/usb/usb_core.h Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_core.h Fri Mar 20 19:04:31 2009 (r190174) @@ -157,10 +157,40 @@ struct usb2_xfer_root; /* typedefs */ -typedef uint8_t usb2_error_t; - typedef void (usb2_callback_t)(struct usb2_xfer *); +#ifndef USB_HAVE_USB_ERROR_T +typedef uint8_t usb2_error_t; /* see "USB_ERR_XXX" */ +#endif + +#ifndef USB_HAVE_TIMEOUT_T +typedef uint32_t usb2_timeout_t; /* milliseconds */ +#endif + +#ifndef USB_HAVE_LENGTH_T +typedef uint32_t usb2_length_t; /* bytes */ +#endif + +#ifndef USB_HAVE_FRAMES_T +typedef uint32_t usb2_frames_t; /* units */ +#endif + +#ifndef USB_HAVE_INTERVAL_T +typedef uint32_t usb2_interval_t; /* milliseconds */ +#endif + +#ifndef USB_HAVE_SIZE_T +typedef uint32_t usb2_size_t; /* bytes */ +#endif + +#ifndef USB_HAVE_REFS_T +typedef uint32_t usb2_refs_t; /* units */ +#endif + +#ifndef USB_HAVE_TICKS_T +typedef uint32_t usb2_ticks_t; /* system defined */ +#endif + /* structures */ /* Modified: head/sys/dev/usb/usb_debug.c ============================================================================== --- head/sys/dev/usb/usb_debug.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_debug.c Fri Mar 20 19:04:31 2009 (r190174) @@ -25,7 +25,6 @@ */ #include <dev/usb/usb.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_core.h> #include <dev/usb/usb_debug.h> Modified: head/sys/dev/usb/usb_defs.h ============================================================================== --- head/sys/dev/usb/usb_defs.h Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_defs.h Fri Mar 20 19:04:31 2009 (r190174) @@ -27,22 +27,16 @@ #ifndef _USB2_DEFS_H_ #define _USB2_DEFS_H_ -/* Definition of some USB constants */ +/* Definition of some hardcoded USB constants. */ + +#define USB_MAX_IPACKET 8 /* initial USB packet size */ -#define USB_BUS_MAX 256 /* units */ -#define USB_DEV_MAX 128 /* units */ -#define USB_IFACE_MAX 32 /* units */ #define USB_EP_MAX (2*16) /* hardcoded */ -#define USB_FIFO_MAX (4 * USB_EP_MAX) #define USB_ROOT_HUB_ADDR 1 /* index */ #define USB_MIN_DEVICES 2 /* unused + root HUB */ -#define USB_MAX_DEVICES USB_DEV_MAX /* including virtual root HUB and - * address zero */ -#define USB_MAX_ENDPOINTS USB_EP_MAX /* 2 directions on 16 endpoints */ - #define USB_UNCONFIG_INDEX 0xFF /* internal use only */ #define USB_IFACE_INDEX_ANY 0xFF /* internal use only */ @@ -57,20 +51,10 @@ #define USB_FS_BYTES_PER_HS_UFRAME 188 /* bytes */ #define USB_HS_MICRO_FRAMES_MAX 8 /* units */ +#define USB_ISOC_TIME_MAX 128 /* ms */ + /* sanity checks */ -#if (USB_FIFO_MAX < USB_EP_MAX) -#error "There cannot be less FIFOs than USB endpoints." -#endif -#if (USB_FIFO_MAX & 1) -#error "Number of FIFOs must be odd." -#endif -#if (USB_EP_MAX < (2*16)) -#error "Number of hardware USB endpoints cannot be less than 32." -#endif -#if (USB_MAX_DEVICES < USB_MIN_DEVICES) -#error "Minimum number of devices is greater than maximum number of devices." -#endif #if (USB_ROOT_HUB_ADDR >= USB_MIN_DEVICES) #error "The root hub address must be less than USB_MIN_DEVICES." #endif Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_dev.c Fri Mar 20 19:04:31 2009 (r190174) @@ -29,7 +29,6 @@ #include <dev/usb/usb.h> #include <dev/usb/usb_ioctl.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_device.c Fri Mar 20 19:04:31 2009 (r190174) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb.h> Modified: head/sys/dev/usb/usb_dynamic.c ============================================================================== --- head/sys/dev/usb/usb_dynamic.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_dynamic.c Fri Mar 20 19:04:31 2009 (r190174) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb.h> Modified: head/sys/dev/usb/usb_generic.c ============================================================================== --- head/sys/dev/usb/usb_generic.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_generic.c Fri Mar 20 19:04:31 2009 (r190174) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb.h> #include <dev/usb/usb_ioctl.h> Modified: head/sys/dev/usb/usb_handle_request.c ============================================================================== --- head/sys/dev/usb/usb_handle_request.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_handle_request.c Fri Mar 20 19:04:31 2009 (r190174) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb.h> Modified: head/sys/dev/usb/usb_hid.c ============================================================================== --- head/sys/dev/usb/usb_hid.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_hid.c Fri Mar 20 19:04:31 2009 (r190174) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #include <dev/usb/usbhid.h> #define USB_DEBUG_VAR usb2_debug Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_hub.c Fri Mar 20 19:04:31 2009 (r190174) @@ -30,7 +30,6 @@ * USB spec: http://www.usb.org/developers/docs/usbspec.zip */ -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb.h> Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_msctest.c Fri Mar 20 19:04:31 2009 (r190174) @@ -32,7 +32,6 @@ * mass storage quirks for not supported SCSI commands! */ -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb.h> Modified: head/sys/dev/usb/usb_request.c ============================================================================== --- head/sys/dev/usb/usb_request.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_request.c Fri Mar 20 19:04:31 2009 (r190174) @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb.h> Modified: head/sys/dev/usb/usb_sw_transfer.c ============================================================================== --- head/sys/dev/usb/usb_sw_transfer.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_sw_transfer.c Fri Mar 20 19:04:31 2009 (r190174) @@ -27,7 +27,6 @@ #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb.h> #include <dev/usb/usb_error.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR usb2_debug Modified: head/sys/dev/usb/usb_transfer.c ============================================================================== --- head/sys/dev/usb/usb_transfer.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_transfer.c Fri Mar 20 19:04:31 2009 (r190174) @@ -27,7 +27,6 @@ #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb.h> -#include <dev/usb/usb_defs.h> #define USB_DEBUG_VAR usb2_debug Modified: head/sys/dev/usb/usb_util.c ============================================================================== --- head/sys/dev/usb/usb_util.c Fri Mar 20 18:59:53 2009 (r190173) +++ head/sys/dev/usb/usb_util.c Fri Mar 20 19:04:31 2009 (r190174) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include <dev/usb/usb_defs.h> #include <dev/usb/usb_mfunc.h> #include <dev/usb/usb_error.h> #include <dev/usb/usb.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903201904.n2KJ4Vpj011122>