From 1f5739bd13d33baa13b3feb2c57b1736ca7c0641 Mon Sep 17 00:00:00 2001 From: joe Date: Tue, 26 Feb 2002 01:15:08 +0000 Subject: [PATCH] Merge from NetBSD: usb.h (rev 1.61): date: 2002/01/01 14:23:37; author: augustss; Add a missing subclass definition. usb.h (rev 1.63) and usb_port.h (rev 1.52): date: 2002/02/25 00:46:37; author: augustss; Some portability improvement. Add define for usb.h version. --- sys/dev/usb/usb.h | 20 ++++---------------- sys/dev/usb/usb_port.h | 9 +++++++++ 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index b300dd7546e6..dacae621c517 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -1,4 +1,4 @@ -/* $NetBSD: usb/usb.h,v 1.60 2001/12/29 15:44:11 augustss Exp $ */ +/* $NetBSD: usb.h,v 1.63 2002/02/25 00:46:37 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -47,26 +47,13 @@ #if defined(__NetBSD__) || defined(__OpenBSD__) #include +#endif #if defined(_KERNEL) #include #endif /* _KERNEL */ -#elif defined(__FreeBSD__) -#if defined(_KERNEL) -#include - -MALLOC_DECLARE(M_USB); -MALLOC_DECLARE(M_USBDEV); -MALLOC_DECLARE(M_USBHC); - -#include -#endif /* _KERNEL */ -#endif /* __FreeBSD__ */ - -/* these three defines are used by usbd to autoload the usb kld */ -#define USB_KLD "usb" /* name of usb module */ -#define USB_UHUB "usb/uhub" /* root hub */ +#define USB_STACK_VERSION 2 #define USB_MAX_DEVICES 128 #define USB_START_ADDR 0 @@ -474,6 +461,7 @@ typedef struct { #define UICLASS_FIRM_UPD 0x0c #define UICLASS_APPL_SPEC 0xfe +#define UISUBCLASS_FIRMWARE_DOWNLOAD 1 #define UISUBCLASS_IRDA 2 #define UIPROTO_IRDA 0 diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index e2ac72f97e0e..642b439bba68 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -284,6 +284,15 @@ __CONCAT(dname,_detach)(self, flags) \ #include "opt_usb.h" +#if defined(_KERNEL) +#include + +MALLOC_DECLARE(M_USB); +MALLOC_DECLARE(M_USBDEV); +MALLOC_DECLARE(M_USBHC); + +#endif + #define USBVERBOSE #define Static static