Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 2009 18:36:54 +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: r188945 - in head: etc/mtree include lib/libusb20 lib/libusbhid share/man/man7 usr.bin/usbhidaction usr.bin/usbhidctl usr.sbin/bluetooth/bcmfw
Message-ID:  <200902231836.n1NIasQM032661@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thompsa
Date: Mon Feb 23 18:36:54 2009
New Revision: 188945
URL: http://svn.freebsd.org/changeset/base/188945

Log:
  Build fixups for the new USB stack.

Modified:
  head/etc/mtree/BSD.include.dist
  head/include/Makefile
  head/lib/libusb20/libusb20_ugen20.c
  head/lib/libusbhid/descr.c
  head/lib/libusbhid/descr_compat.c
  head/lib/libusbhid/usbvar.h
  head/share/man/man7/hier.7
  head/usr.bin/usbhidaction/usbhidaction.c
  head/usr.bin/usbhidctl/usbhid.c
  head/usr.sbin/bluetooth/bcmfw/bcmfw.c

Modified: head/etc/mtree/BSD.include.dist
==============================================================================
--- head/etc/mtree/BSD.include.dist	Mon Feb 23 18:34:56 2009	(r188944)
+++ head/etc/mtree/BSD.include.dist	Mon Feb 23 18:36:54 2009	(r188945)
@@ -120,10 +120,6 @@
         ..
         usb
         ..
-        usb2
-            include
-            ..
-        ..
         utopia
         ..
         vkbd

Modified: head/include/Makefile
==============================================================================
--- head/include/Makefile	Mon Feb 23 18:34:56 2009	(r188944)
+++ head/include/Makefile	Mon Feb 23 18:36:54 2009	(r188945)
@@ -54,7 +54,7 @@ LSUBDIRS=	cam/scsi \
 	security/mac_mls security/mac_partition \
 	ufs/ffs ufs/ufs
 
-LSUBSUBDIRS=	dev/mpt/mpilib dev/usb2/include
+LSUBSUBDIRS=	dev/mpt/mpilib
 
 .if ${MACHINE_ARCH} == "powerpc"
 _dev_powermac_nvram=	dev/powermac_nvram

Modified: head/lib/libusb20/libusb20_ugen20.c
==============================================================================
--- head/lib/libusb20/libusb20_ugen20.c	Mon Feb 23 18:34:56 2009	(r188944)
+++ head/lib/libusb20/libusb20_ugen20.c	Mon Feb 23 18:36:54 2009	(r188945)
@@ -39,11 +39,11 @@
 #include "libusb20_desc.h"
 #include "libusb20_int.h"
 
-#include <dev/usb2/include/usb2_standard.h>
-#include <dev/usb2/include/usb2_ioctl.h>
-#include <dev/usb2/include/usb2_mfunc.h>
-#include <dev/usb2/include/usb2_error.h>
-#include <dev/usb2/include/usb2_revision.h>
+#include <dev/usb/usb.h>
+#include <dev/usb/usb_ioctl.h>
+#include <dev/usb/usb_mfunc.h>
+#include <dev/usb/usb_error.h>
+#include <dev/usb/usb_revision.h>
 
 static libusb20_init_backend_t ugen20_init_backend;
 static libusb20_open_device_t ugen20_open_device;

Modified: head/lib/libusbhid/descr.c
==============================================================================
--- head/lib/libusbhid/descr.c	Mon Feb 23 18:34:56 2009	(r188944)
+++ head/lib/libusbhid/descr.c	Mon Feb 23 18:36:54 2009	(r188945)
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/time.h>
 #include <sys/ioctl.h>
 
-#include <dev/usb2/include/usb2_ioctl.h>
+#include <dev/usb/usb_ioctl.h>
 
 #include "usbhid.h"
 #include "usbvar.h"
@@ -49,8 +49,10 @@ hid_set_immed(int fd, int enable)
 {
 	int ret;
 	ret = ioctl(fd, USB_SET_IMMED, &enable);
+#ifdef HID_COMPAT7
 	if (ret < 0)
 		ret = hid_set_immed_compat7(fd, enable);
+#endif
 	return (ret);
 }
 
@@ -61,9 +63,11 @@ hid_get_report_id(int fd)
 	int ret;
 
 	ret = ioctl(fd, USB_GET_REPORT_ID, &temp);
+#ifdef HID_COMPAT7
 	if (ret < 0)
 		ret = hid_get_report_id_compat7(fd);
 	else
+#endif
 		ret = temp;
 
 	return (ret);
@@ -81,11 +85,13 @@ hid_get_report_desc(int fd)
 	/* get actual length first */
 	ugd.ugd_data = NULL;
 	ugd.ugd_maxlen = 65535;
+#ifdef HID_COMPAT7
 	if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) {
 		/* could not read descriptor */
 		/* try FreeBSD 7 compat code */
 		return (hid_get_report_desc_compat7(fd));
 	}
+#endif
 
 	/*
 	 * NOTE: The kernel will return a failure if 

Modified: head/lib/libusbhid/descr_compat.c
==============================================================================
--- head/lib/libusbhid/descr_compat.c	Mon Feb 23 18:34:56 2009	(r188944)
+++ head/lib/libusbhid/descr_compat.c	Mon Feb 23 18:36:54 2009	(r188945)
@@ -28,6 +28,7 @@
  * This file contains fallback-compatibility code for the old FreeBSD
  * USB stack.
  */
+#ifdef HID_COMPAT7
 
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
@@ -75,3 +76,4 @@ hid_get_report_desc_compat7(int fd)
 
 	return (hid_use_report_desc(rep.ucrd_data, (unsigned int)rep.ucrd_size));
 }
+#endif	/* HID_COMPAT7 */

Modified: head/lib/libusbhid/usbvar.h
==============================================================================
--- head/lib/libusbhid/usbvar.h	Mon Feb 23 18:34:56 2009	(r188944)
+++ head/lib/libusbhid/usbvar.h	Mon Feb 23 18:36:54 2009	(r188945)
@@ -36,6 +36,8 @@ struct report_desc {
 
 /* internal backwards compatibility functions */
 
+#ifdef HID_COMPAT7
 int	hid_set_immed_compat7(int fd, int enable);
 int	hid_get_report_id_compat7(int fd);
 report_desc_t	hid_get_report_desc_compat7(int fd);
+#endif

Modified: head/share/man/man7/hier.7
==============================================================================
--- head/share/man/man7/hier.7	Mon Feb 23 18:34:56 2009	(r188944)
+++ head/share/man/man7/hier.7	Mon Feb 23 18:36:54 2009	(r188945)
@@ -232,8 +232,6 @@ see
 .Xr ppbus 4
 .It Pa usb/
 The USB subsystem
-.It Pa usb2/include
-The USB subsystem
 .It Pa utopia/
 Physical chip driver for ATM interfaces;
 see

Modified: head/usr.bin/usbhidaction/usbhidaction.c
==============================================================================
--- head/usr.bin/usbhidaction/usbhidaction.c	Mon Feb 23 18:34:56 2009	(r188944)
+++ head/usr.bin/usbhidaction/usbhidaction.c	Mon Feb 23 18:36:54 2009	(r188945)
@@ -46,7 +46,7 @@
 #include <limits.h>
 #include <unistd.h>
 #include <sys/types.h>
-#include <dev/usb2/include/usb2_hid.h>
+#include <dev/usb/usbhid.h>
 #include <usbhid.h>
 #include <syslog.h>
 #include <signal.h>

Modified: head/usr.bin/usbhidctl/usbhid.c
==============================================================================
--- head/usr.bin/usbhidctl/usbhid.c	Mon Feb 23 18:34:56 2009	(r188944)
+++ head/usr.bin/usbhidctl/usbhid.c	Mon Feb 23 18:36:54 2009	(r188945)
@@ -47,7 +47,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <usbhid.h>
-#include <dev/usb2/include/usb2_hid.h>
+#include <dev/usb/usbhid.h>
 
 int verbose = 0;
 int all = 0;

Modified: head/usr.sbin/bluetooth/bcmfw/bcmfw.c
==============================================================================
--- head/usr.sbin/bluetooth/bcmfw/bcmfw.c	Mon Feb 23 18:34:56 2009	(r188944)
+++ head/usr.sbin/bluetooth/bcmfw/bcmfw.c	Mon Feb 23 18:36:54 2009	(r188945)
@@ -35,6 +35,7 @@
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <dev/usb/usb.h>
+#include <dev/usb/usb_ioctl.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <netgraph.h>



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