PERFORCE change 121267 for review
Robert Watson
rwatson at FreeBSD.org
Sat Jun 9 12:49:51 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=121267
Change 121267 by rwatson at rwatson_zoo on 2007/06/09 12:49:37
- AUDIT in GENERIC
- Remove lots of FreeBSD 5.x ifdef cruft
- Calendar regressiontests (?)
Affected files ...
.. //depot/projects/trustedbsd/base/sys/amd64/conf/GENERIC#34 integrate
.. //depot/projects/trustedbsd/base/sys/conf/NOTES#88 integrate
.. //depot/projects/trustedbsd/base/sys/conf/options#84 integrate
.. //depot/projects/trustedbsd/base/sys/contrib/ipfilter/netinet/fil.c#20 integrate
.. //depot/projects/trustedbsd/base/sys/contrib/opensolaris/common/atomic/ia64/atomic.S#2 integrate
.. //depot/projects/trustedbsd/base/sys/dev/nve/if_nve.c#12 integrate
.. //depot/projects/trustedbsd/base/sys/dev/sound/usb/uaudio.c#16 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/if_axe.c#27 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/if_cdce.c#9 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/if_cdcereg.h#4 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/if_cue.c#26 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/if_kue.c#25 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/if_rue.c#22 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/if_rum.c#2 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/if_udav.c#15 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/if_ural.c#21 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/uark.c#2 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/ubsa.c#19 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/ubser.c#10 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/ucycom.c#4 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/udbp.c#16 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/ufm.c#19 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/ufoma.c#4 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/uftdi.c#16 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/ugen.c#29 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/uhid.c#26 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/uhub.c#21 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/uipaq.c#2 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/ukbd.c#24 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/ulpt.c#25 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/umass.c#51 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/umct.c#8 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/umodem.c#18 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/ums.c#26 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/uplcom.c#27 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/urio.c#20 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/uscanner.c#29 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/uvisor.c#21 integrate
.. //depot/projects/trustedbsd/base/sys/dev/usb/uvscom.c#24 integrate
.. //depot/projects/trustedbsd/base/sys/i386/conf/GENERIC#66 integrate
.. //depot/projects/trustedbsd/base/sys/ia64/conf/GENERIC#43 integrate
.. //depot/projects/trustedbsd/base/sys/ia64/ia64/machdep.c#67 integrate
.. //depot/projects/trustedbsd/base/sys/kern/kern_mutex.c#54 integrate
.. //depot/projects/trustedbsd/base/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#18 integrate
.. //depot/projects/trustedbsd/base/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#8 integrate
.. //depot/projects/trustedbsd/base/sys/netinet/tcp_hostcache.c#12 integrate
.. //depot/projects/trustedbsd/base/sys/pc98/conf/GENERIC#54 integrate
.. //depot/projects/trustedbsd/base/sys/powerpc/conf/GENERIC#38 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/conf/GENERIC#61 integrate
.. //depot/projects/trustedbsd/base/sys/sun4v/conf/GENERIC#6 integrate
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/calendar.calibrate#2 integrate
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.a2.out#2 integrate
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.a3.out#2 integrate
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.a4.out#2 integrate
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.b2.out#2 integrate
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.b3.out#2 integrate
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.b4.out#2 integrate
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.s1.out#2 integrate
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.s3.out#2 integrate
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.sh#2 integrate
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.w0-1.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.w0-2.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.w0-3.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.w0-4.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.w0-5.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.w0-6.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.w0-7.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.wn-1.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.wn-2.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.wn-3.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.wn-4.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.wn-5.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.wn-6.out#1 branch
.. //depot/projects/trustedbsd/base/tools/regression/usr.bin/calendar/regress.wn-7.out#1 branch
.. //depot/projects/trustedbsd/base/usr.bin/calendar/calendar.h#7 integrate
.. //depot/projects/trustedbsd/base/usr.bin/calendar/calendars/calendar.all#5 integrate
.. //depot/projects/trustedbsd/base/usr.bin/calendar/calendars/calendar.dutch#1 branch
.. //depot/projects/trustedbsd/base/usr.bin/calendar/day.c#11 integrate
.. //depot/projects/trustedbsd/base/usr.bin/calendar/io.c#6 integrate
.. //depot/projects/trustedbsd/base/usr.sbin/rpcbind/rpcbind.c#12 integrate
Differences ...
==== //depot/projects/trustedbsd/base/sys/amd64/conf/GENERIC#34 (text+ko) ====
@@ -16,7 +16,7 @@
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
-# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.478 2007/05/28 14:38:42 simokawa Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.479 2007/06/08 20:29:05 rwatson Exp $
cpu HAMMER
ident GENERIC
@@ -60,6 +60,7 @@
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options ADAPTIVE_GIANT # Giant mutex is adaptive.
options STOP_NMI # Stop CPUS using NMI instead of IPI
+options AUDIT # Security event auditing
# Debugging for use in -current
options KDB # Enable kernel debugger support.
==== //depot/projects/trustedbsd/base/sys/conf/NOTES#88 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1428 2007/06/05 00:12:36 jeff Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1429 2007/06/08 21:36:52 attilio Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -226,11 +226,6 @@
# and WITNESS options.
options MUTEX_NOINLINE
-# MUTEX_WAKE_ALL changes the mutex unlock algorithm to wake all waiters
-# when a contested mutex is released rather than just awaking the highest
-# priority waiter.
-options MUTEX_WAKE_ALL
-
# RWLOCK_NOINLINE forces rwlock operations to call functions to perform each
# operation rather than inlining the simple cases. This can be used to
# shrink the size of the kernel text segment. Note that this behavior is
==== //depot/projects/trustedbsd/base/sys/conf/options#84 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.590 2007/06/05 00:12:36 jeff Exp $
+# $FreeBSD: src/sys/conf/options,v 1.591 2007/06/08 21:36:52 attilio Exp $
#
# On the handling of kernel options
#
@@ -123,7 +123,6 @@
MFI_DECODE_LOG opt_mfi.h
MPROF_BUFFERS opt_mprof.h
MPROF_HASH_SIZE opt_mprof.h
-MUTEX_WAKE_ALL
NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h
NO_ADAPTIVE_RWLOCKS
NSWBUF_MIN opt_swap.h
==== //depot/projects/trustedbsd/base/sys/contrib/ipfilter/netinet/fil.c#20 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.51 2007/06/04 02:54:35 darrenr Exp $ */
+/* $FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.52 2007/06/09 09:28:36 darrenr Exp $ */
/*
* Copyright (C) 1993-2003 by Darren Reed.
@@ -155,7 +155,7 @@
#if !defined(lint)
static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed";
-static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.51 2007/06/04 02:54:35 darrenr Exp $";
+static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.52 2007/06/09 09:28:36 darrenr Exp $";
/* static const char rcsid[] = "@(#)$Id: fil.c,v 2.243.2.78 2006/03/29 11:19:54 darrenr Exp $"; */
#endif
@@ -766,6 +766,7 @@
* source of the original packet then this packet is
* not correct.
*/
+ icmp6 = fin->fin_dp;
ip6 = (ip6_t *)((char *)icmp6 + ICMPERR_ICMPHLEN);
if (IP6_NEQ(&fin->fin_fi.fi_dst,
(i6addr_t *)&ip6->ip6_src))
==== //depot/projects/trustedbsd/base/sys/contrib/opensolaris/common/atomic/ia64/atomic.S#2 (text+ko) ====
@@ -1,3 +1,31 @@
+/*-
+ * Copyright (c) 2007 Marcel Moolenaar
+ * 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 ``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 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.
+ *
+ * $FreeBSD: src/sys/contrib/opensolaris/common/atomic/ia64/atomic.S,v 1.2 2007/06/08 16:20:03 marcel Exp $
+ */
+
#include <machine/asm.h>
.text
==== //depot/projects/trustedbsd/base/sys/dev/nve/if_nve.c#12 (text+ko) ====
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/nve/if_nve.c,v 1.26 2007/05/07 09:45:31 yar Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/nve/if_nve.c,v 1.27 2007/06/08 22:00:56 dwhite Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1040,7 +1040,7 @@
default:
/* Everything else we forward to generic ether ioctl */
- error = ether_ioctl(ifp, (int)command, data);
+ error = ether_ioctl(ifp, command, data);
break;
}
==== //depot/projects/trustedbsd/base/sys/dev/sound/usb/uaudio.c#16 (text+ko) ====
@@ -1,5 +1,5 @@
/* $NetBSD: uaudio.c,v 1.91 2004/11/05 17:46:14 kent Exp $ */
-/* $FreeBSD: src/sys/dev/sound/usb/uaudio.c,v 1.29 2007/05/31 18:43:33 ariff Exp $ */
+/* $FreeBSD: src/sys/dev/sound/usb/uaudio.c,v 1.31 2007/06/09 11:07:07 ru Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -523,13 +523,14 @@
USB_ATTACH_START(uaudio, sc, uaa);
usb_interface_descriptor_t *id;
usb_config_descriptor_t *cdesc;
+#if !defined(__FreeBSD__)
char devinfo[1024];
+#endif
usbd_status err;
int i, j, found;
#if defined(__FreeBSD__)
- usbd_devinfo(uaa->device, 0, devinfo);
- USB_ATTACH_SETUP;
+ sc->sc_dev = self;
#else
usbd_devinfo(uaa->device, 0, devinfo, sizeof(devinfo));
printf(": %s\n", devinfo);
==== //depot/projects/trustedbsd/base/sys/dev/usb/if_axe.c#27 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_axe.c,v 1.44 2007/05/12 05:56:10 brueffer Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_axe.c,v 1.45 2007/06/09 06:31:07 imp Exp $");
/*
* ASIX Electronics AX88172 USB 2.0 ethernet driver. Used in the
@@ -407,14 +407,12 @@
USB_ATTACH(axe)
{
USB_ATTACH_START(axe, sc, uaa);
- char devinfo[1024];
u_char eaddr[ETHER_ADDR_LEN];
struct ifnet *ifp;
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
int i;
- bzero(sc, sizeof(struct axe_softc));
sc->axe_udev = uaa->device;
sc->axe_dev = self;
sc->axe_unit = device_get_unit(self);
@@ -436,10 +434,6 @@
id = usbd_get_interface_descriptor(sc->axe_iface);
- usbd_devinfo(uaa->device, 0, devinfo);
- device_set_desc_copy(self, devinfo);
- printf("%s: %s\n", device_get_nameunit(self), devinfo);
-
/* Find endpoints. */
for (i = 0; i < id->bNumEndpoints; i++) {
ed = usbd_interface2endpoint_descriptor(sc->axe_iface, i);
==== //depot/projects/trustedbsd/base/sys/dev/usb/if_cdce.c#9 (text+ko) ====
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_cdce.c,v 1.16 2006/10/07 17:35:37 flz Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_cdce.c,v 1.17 2007/06/09 06:31:07 imp Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -146,12 +146,7 @@
const usb_cdc_ethernet_descriptor_t *ue;
char eaddr_str[USB_MAX_STRING_LEN];
- bzero(sc, sizeof(struct cdce_softc));
sc->cdce_dev = self;
- usbd_devinfo(dev, 0, sc->devinfo);
- device_set_desc_copy(self, sc->devinfo);
- printf("%s: %s\n", device_get_nameunit(sc->cdce_dev), sc->devinfo);
-
sc->cdce_udev = uaa->device;
sc->cdce_unit = device_get_unit(self);
==== //depot/projects/trustedbsd/base/sys/dev/usb/if_cdcereg.h#4 (text+ko) ====
@@ -29,7 +29,7 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/usb/if_cdcereg.h,v 1.6 2005/09/26 05:29:46 sobomax Exp $
+ * $FreeBSD: src/sys/dev/usb/if_cdcereg.h,v 1.7 2007/06/09 06:31:07 imp Exp $
*/
#ifndef _USB_IF_CDCEREG_H_
@@ -66,8 +66,6 @@
struct mtx cdce_mtx;
struct usb_qdat q;
-
- char devinfo[1024];
};
/* We are still under Giant */
==== //depot/projects/trustedbsd/base/sys/dev/usb/if_cue.c#26 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_cue.c,v 1.64 2007/05/12 05:53:52 brueffer Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_cue.c,v 1.65 2007/06/09 06:31:07 imp Exp $");
/*
* CATC USB-EL1210A USB to ethernet driver. Used in the CATC Netmate
@@ -431,14 +431,12 @@
USB_ATTACH(cue)
{
USB_ATTACH_START(cue, sc, uaa);
- char devinfo[1024];
u_char eaddr[ETHER_ADDR_LEN];
struct ifnet *ifp;
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
int i;
- bzero(sc, sizeof(struct cue_softc));
sc->cue_dev = self;
sc->cue_iface = uaa->iface;
sc->cue_udev = uaa->device;
@@ -452,10 +450,6 @@
id = usbd_get_interface_descriptor(uaa->iface);
- usbd_devinfo(uaa->device, 0, devinfo);
- device_set_desc_copy(self, devinfo);
- printf("%s: %s\n", device_get_nameunit(self), devinfo);
-
/* Find endpoints. */
for (i = 0; i < id->bNumEndpoints; i++) {
ed = usbd_interface2endpoint_descriptor(uaa->iface, i);
==== //depot/projects/trustedbsd/base/sys/dev/usb/if_kue.c#25 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_kue.c,v 1.73 2007/05/12 05:56:58 brueffer Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_kue.c,v 1.74 2007/06/09 06:31:07 imp Exp $");
/*
* Kawasaki LSI KL5KUSB101B USB to ethernet adapter driver.
@@ -405,14 +405,12 @@
USB_ATTACH(kue)
{
USB_ATTACH_START(kue, sc, uaa);
- char devinfo[1024];
struct ifnet *ifp;
usbd_status err;
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
int i;
- bzero(sc, sizeof(struct kue_softc));
sc->kue_dev = self;
sc->kue_iface = uaa->iface;
sc->kue_udev = uaa->device;
@@ -420,10 +418,6 @@
id = usbd_get_interface_descriptor(uaa->iface);
- usbd_devinfo(uaa->device, 0, devinfo);
- device_set_desc_copy(self, devinfo);
- printf("%s: %s\n", device_get_nameunit(self), devinfo);
-
/* Find endpoints. */
for (i = 0; i < id->bNumEndpoints; i++) {
ed = usbd_interface2endpoint_descriptor(uaa->iface, i);
==== //depot/projects/trustedbsd/base/sys/dev/usb/if_rue.c#22 (text+ko) ====
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_rue.c,v 1.31 2007/05/12 05:53:53 brueffer Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_rue.c,v 1.32 2007/06/09 06:31:07 imp Exp $");
/*
* RealTek RTL8150 USB to fast ethernet controller driver.
@@ -575,7 +575,6 @@
USB_ATTACH(rue)
{
USB_ATTACH_START(rue, sc, uaa);
- char *devinfo;
u_char eaddr[ETHER_ADDR_LEN];
struct ifnet *ifp;
usbd_interface_handle iface;
@@ -585,11 +584,6 @@
int i;
struct rue_type *t;
- devinfo = malloc(1024, M_USBDEV, M_WAITOK);
-
- bzero(sc, sizeof (struct rue_softc));
- usbd_devinfo(uaa->device, 0, devinfo);
-
sc->rue_dev = self;
sc->rue_udev = uaa->device;
sc->rue_unit = device_get_unit(self);
@@ -621,10 +615,6 @@
id = usbd_get_interface_descriptor(sc->rue_iface);
- usbd_devinfo(uaa->device, 0, devinfo);
- device_set_desc_copy(self, devinfo);
- printf("%s: %s\n", device_get_nameunit(self), devinfo);
-
/* Find endpoints */
for (i = 0; i < id->bNumEndpoints; i++) {
ed = usbd_interface2endpoint_descriptor(iface, i);
@@ -692,7 +682,6 @@
sc->rue_dying = 0;
RUE_UNLOCK(sc);
- free(devinfo, M_USBDEV);
USB_ATTACH_SUCCESS_RETURN;
error2:
@@ -701,7 +690,6 @@
RUE_UNLOCK(sc);
mtx_destroy(&sc->rue_mtx);
error:
- free(devinfo, M_USBDEV);
USB_ATTACH_ERROR_RETURN;
}
==== //depot/projects/trustedbsd/base/sys/dev/usb/if_rum.c#2 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/usb/if_rum.c,v 1.3 2007/05/06 21:06:08 des Exp $ */
+/* $FreeBSD: src/sys/dev/usb/if_rum.c,v 1.4 2007/06/09 06:31:07 imp Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini at free.fr>
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_rum.c,v 1.3 2007/05/06 21:06:08 des Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_rum.c,v 1.4 2007/06/09 06:31:07 imp Exp $");
/*-
* Ralink Technology RT2501USB/RT2601USB chipset driver
@@ -374,14 +374,11 @@
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
usbd_status error;
- char devinfo[1024];
int i, ntries, size;
uint32_t tmp;
sc->sc_udev = uaa->device;
-
- usbd_devinfo(sc->sc_udev, 0, devinfo);
- USB_ATTACH_SETUP;
+ sc->sc_dev = self;
if (usbd_set_config_no(sc->sc_udev, RT2573_CONFIG_NO, 0) != 0) {
printf("%s: could not set configuration no\n",
==== //depot/projects/trustedbsd/base/sys/dev/usb/if_udav.c#15 (text+ko) ====
@@ -1,6 +1,6 @@
/* $NetBSD: if_udav.c,v 1.2 2003/09/04 15:17:38 tsutsui Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
-/* $FreeBSD: src/sys/dev/usb/if_udav.c,v 1.25 2007/05/12 05:53:53 brueffer Exp $ */
+/* $FreeBSD: src/sys/dev/usb/if_udav.c,v 1.26 2007/06/09 06:31:07 imp Exp $ */
/*-
* Copyright (c) 2003
* Shingo WATANABE <nabe at nabechan.org>. All rights reserved.
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_udav.c,v 1.25 2007/05/12 05:53:53 brueffer Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_udav.c,v 1.26 2007/06/09 06:31:07 imp Exp $");
#include "opt_inet.h"
#if defined(__NetBSD__)
@@ -284,7 +284,6 @@
usbd_status err;
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
- char devinfo[1024];
const char *devname ;
struct ifnet *ifp;
#if defined(__NetBSD__)
@@ -296,13 +295,8 @@
int s;
#endif
- bzero(sc, sizeof(struct udav_softc));
-
- usbd_devinfo(dev, 0, devinfo);
- USB_ATTACH_SETUP;
- devname = device_get_nameunit(sc->sc_dev);
- printf("%s: %s\n", devname, devinfo);
-
+ sc->sc_dev = self;
+ devname = device_get_nameunit(self);
/* Move the device into the configured state. */
err = usbd_set_config_no(dev, UDAV_CONFIG_NO, 1);
if (err) {
==== //depot/projects/trustedbsd/base/sys/dev/usb/if_ural.c#21 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/usb/if_ural.c,v 1.54 2007/05/29 20:05:13 imp Exp $ */
+/* $FreeBSD: src/sys/dev/usb/if_ural.c,v 1.55 2007/06/09 06:31:07 imp Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_ural.c,v 1.54 2007/05/29 20:05:13 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_ural.c,v 1.55 2007/06/09 06:31:07 imp Exp $");
/*-
* Ralink Technology RT2500USB chipset driver
@@ -357,13 +357,10 @@
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
usbd_status error;
- char devinfo[1024];
int i;
sc->sc_udev = uaa->device;
-
- usbd_devinfo(sc->sc_udev, 0, devinfo);
- USB_ATTACH_SETUP;
+ sc->sc_dev = self;
if (usbd_set_config_no(sc->sc_udev, RAL_CONFIG_NO, 0) != 0) {
printf("%s: could not set configuration no\n",
==== //depot/projects/trustedbsd/base/sys/dev/usb/uark.c#2 (text+ko) ====
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $FreeBSD: src/sys/dev/usb/uark.c,v 1.1 2006/11/15 09:13:24 maxim Exp $
+ * $FreeBSD: src/sys/dev/usb/uark.c,v 1.2 2007/06/09 06:39:43 imp Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
@@ -131,14 +131,10 @@
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
usbd_status error;
- char *devinfo;
const char *devname;
int i;
struct ucom_softc *ucom = &sc->sc_ucom;
- devinfo = malloc(1024, M_USBDEV, M_WAITOK);
-
- bzero(ucom, sizeof(struct ucom_softc));
ucom->sc_dev = self;
ucom->sc_udev = dev;
@@ -162,9 +158,6 @@
} else
iface = uaa->iface;
- usbd_devinfo(dev, 0, devinfo);
- printf("%s: %s\n", devname, devinfo);
-
id = usbd_get_interface_descriptor(iface);
ucom->sc_iface = iface;
@@ -197,15 +190,11 @@
DPRINTF(("uark: in=0x%x out=0x%x\n", ucom->sc_bulkin_no, ucom->sc_bulkout_no));
ucom_attach(&sc->sc_ucom);
- free(devinfo, M_USBDEV);
-
USB_ATTACH_SUCCESS_RETURN;
bad:
DPRINTF(("uftdi_attach: ATTACH ERROR\n"));
ucom->sc_dying = 1;
- free(devinfo, M_USBDEV);
-
USB_ATTACH_ERROR_RETURN;
}
==== //depot/projects/trustedbsd/base/sys/dev/usb/ubsa.c#19 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ubsa.c,v 1.24 2007/06/07 09:29:36 brueffer Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/ubsa.c,v 1.25 2007/06/09 06:39:43 imp Exp $");
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -283,17 +283,13 @@
usb_config_descriptor_t *cdesc;
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
- char *devinfo;
const char *devname;
usbd_status err;
int i;
dev = uaa->device;
- devinfo = malloc(1024, M_USBDEV, M_WAITOK);
ucom = &sc->sc_ucom;
- bzero(sc, sizeof (struct ubsa_softc));
-
/*
* initialize rts, dtr variables to something
* different from boolean 0, 1
@@ -301,17 +297,12 @@
sc->sc_dtr = -1;
sc->sc_rts = -1;
- usbd_devinfo(dev, 0, devinfo);
- /* USB_ATTACH_SETUP; */
ucom->sc_dev = self;
- device_set_desc_copy(self, devinfo);
- /* USB_ATTACH_SETUP; */
ucom->sc_udev = dev;
ucom->sc_iface = uaa->iface;
devname = device_get_nameunit(ucom->sc_dev);
- printf("%s: %s\n", devname, devinfo);
DPRINTF(("ubsa attach: sc = %p\n", sc));
@@ -414,12 +405,9 @@
TASK_INIT(&sc->sc_task, 0, ubsa_notify, sc);
ucom_attach(ucom);
-
- free(devinfo, M_USBDEV);
USB_ATTACH_SUCCESS_RETURN;
error:
- free(devinfo, M_USBDEV);
USB_ATTACH_ERROR_RETURN;
}
==== //depot/projects/trustedbsd/base/sys/dev/usb/ubser.c#10 (text+ko) ====
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ubser.c,v 1.21 2007/04/01 13:46:39 netchild Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/ubser.c,v 1.22 2007/06/09 06:39:43 imp Exp $");
/*
* BWCT serial adapter driver
@@ -225,7 +225,6 @@
usb_endpoint_descriptor_t *ed;
usb_interface_descriptor_t *id;
usb_device_request_t req;
- char *devinfo;
struct tty *tp;
usbd_status err;
int i;
@@ -233,9 +232,7 @@
uint8_t epcount;
struct ubser_port *pp;
- devinfo = malloc(1024, M_USBDEV, M_WAITOK);
- usbd_devinfo(udev, 0, devinfo);
- USB_ATTACH_SETUP;
+ sc->sc_dev = self;
DPRINTFN(10,("\nubser_attach: sc=%p\n", sc));
@@ -376,8 +373,6 @@
}
ubserstartread(sc);
-
- free(devinfo, M_USBDEV);
USB_ATTACH_SUCCESS_RETURN;
fail_4:
@@ -413,8 +408,6 @@
}
DPRINTF(("ubser_attach: ATTACH ERROR\n"));
- free(devinfo, M_USBDEV);
-
USB_ATTACH_ERROR_RETURN;
}
==== //depot/projects/trustedbsd/base/sys/dev/usb/ucycom.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/usb/ucycom.c,v 1.4 2005/10/16 20:22:56 phk Exp $
+ * $FreeBSD: src/sys/dev/usb/ucycom.c,v 1.5 2007/06/09 06:39:43 imp Exp $
*/
/*
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ucycom.c,v 1.4 2005/10/16 20:22:56 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/ucycom.c,v 1.5 2007/06/09 06:39:43 imp Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -177,7 +177,6 @@
struct ucycom_softc *sc;
struct ucycom_device *ud;
usb_endpoint_descriptor_t *ued;
- char *devinfo;
void *urd;
int error, urdlen;
@@ -188,14 +187,6 @@
sc->sc_dev = dev;
sc->sc_usbdev = uaa->device;
- /* get device description */
- /* XXX usb_devinfo() has little or no overflow protection */
- devinfo = malloc(1024, M_USBDEV, M_WAITOK);
- usbd_devinfo(sc->sc_usbdev, 0, devinfo);
- device_set_desc_copy(dev, devinfo);
- device_printf(dev, "%s\n", devinfo);
- free(devinfo, M_USBDEV);
-
/* get chip model */
for (ud = ucycom_devices; ud->model != 0; ++ud)
if (ud->vendor == uaa->vendor && ud->product == uaa->product)
==== //depot/projects/trustedbsd/base/sys/dev/usb/udbp.c#16 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/udbp.c,v 1.32 2007/06/07 09:29:37 brueffer Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/udbp.c,v 1.33 2007/06/09 06:39:43 imp Exp $");
/* Driver for arbitrary double bulk pipe devices.
* The driver assumes that there will be the same driver on the other side.
@@ -255,7 +255,6 @@
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed, *ed_bulkin = NULL, *ed_bulkout = NULL;
usbd_status err;
- char devinfo[1024];
int i;
static int ngudbp_done_init=0;
@@ -263,8 +262,7 @@
/* fetch the interface handle for the first interface */
(void) usbd_device2interface_handle(uaa->device, 0, &iface);
id = usbd_get_interface_descriptor(iface);
- usbd_devinfo(uaa->device, USBD_SHOW_INTERFACE_CLASS, devinfo);
- USB_ATTACH_SETUP;
+ sc->sc_dev = self;
/* Find the two first bulk endpoints */
for (i = 0 ; i < id->bNumEndpoints; i++) {
==== //depot/projects/trustedbsd/base/sys/dev/usb/ufm.c#19 (text+ko) ====
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 M. Warner Losh
+ * Copyright (c) 2001-2007 M. Warner Losh
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,21 +29,16 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ufm.c,v 1.26 2007/06/07 09:29:37 brueffer Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/ufm.c,v 1.27 2007/06/09 06:40:17 imp Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
-#if defined(__NetBSD__)
-#include <sys/device.h>
-#include <sys/ioctl.h>
-#elif defined(__FreeBSD__)
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/ioccom.h>
-#endif
#include <sys/fcntl.h>
#include <sys/filio.h>
#include <sys/conf.h>
@@ -73,13 +68,6 @@
#define DPRINTFN(n,x)
#endif
-#if defined(__NetBSD__) || defined(__OpenBSD__)
-int ufmopen(dev_t, int, int, usb_proc_ptr);
-int ufmclose(dev_t, int, int, usb_proc_ptr);
-int ufmioctl(dev_t, u_long, caddr_t, int, usb_proc_ptr);
-
-cdev_decl(ufm);
-#elif defined(__FreeBSD__)
d_open_t ufmopen;
d_close_t ufmclose;
d_ioctl_t ufmioctl;
@@ -92,7 +80,6 @@
.d_ioctl = ufmioctl,
.d_name = "ufm",
};
-#endif /*defined(__FreeBSD__)*/
#define FM_CMD0 0x00
#define FM_CMD_SET_FREQ 0x01
@@ -108,9 +95,6 @@
int sc_freq;
int sc_refcnt;
-#if defined(__NetBSD__) || defined(__OpenBSD__)
- u_char sc_dying;
-#endif
};
#define UFMUNIT(n) (minor(n))
@@ -139,46 +123,22 @@
USB_ATTACH(ufm)
{
USB_ATTACH_START(ufm, sc, uaa);
- char devinfo[1024];
usb_endpoint_descriptor_t *edesc;
usbd_device_handle udev;
usbd_interface_handle iface;
u_int8_t epcount;
-#if defined(__NetBSD__) || defined(__OpenBSD__)
- u_int8_t niface;
-#endif
usbd_status r;
char * ermsg = "<none>";
DPRINTFN(10,("ufm_attach: sc=%p\n", sc));
- usbd_devinfo(uaa->device, 0, devinfo);
- USB_ATTACH_SETUP;
-
+ sc->sc_dev = self;
sc->sc_udev = udev = uaa->device;
-#if defined(__FreeBSD__)
if ((!uaa->device) || (!uaa->iface)) {
ermsg = "device or iface";
goto nobulk;
}
sc->sc_iface = iface = uaa->iface;
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
- if (!udev) {
- ermsg = "device";
- goto nobulk;
- }
- r = usbd_interface_count(udev, &niface);
- if (r) {
- ermsg = "iface";
- goto nobulk;
- }
- r = usbd_device2interface_handle(udev, 0, &iface);
- if (r) {
- ermsg = "iface";
- goto nobulk;
- }
- sc->sc_iface = iface;
-#endif
sc->sc_opened = 0;
sc->sc_refcnt = 0;
@@ -195,18 +155,11 @@
}
sc->sc_epaddr = edesc->bEndpointAddress;
-#if defined(__FreeBSD__)
/* XXX no error trapping, no storing of struct cdev **/
(void) make_dev(&ufm_cdevsw, device_get_unit(self),
UID_ROOT, GID_OPERATOR,
0644, "ufm%d", device_get_unit(self));
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- USBDEV(sc->sc_dev));
-#endif
-
DPRINTFN(10, ("ufm_attach: %p\n", sc->sc_udev));
-
USB_ATTACH_SUCCESS_RETURN;
nobulk:
@@ -392,75 +345,10 @@
return error;
}
-
-#if defined(__NetBSD__) || defined(__OpenBSD__)
-int
-ufm_activate(device_t self, enum devact act)
-{
- struct ufm_softc *sc = (struct ufm_softc *)self;
-
- switch (act) {
- case DVACT_ACTIVATE:
- return (EOPNOTSUPP);
- break;
-
- case DVACT_DEACTIVATE:
- sc->sc_dying = 1;
- break;
- }
- return (0);
-}
-
-USB_DETACH(ufm)
-{
- USB_DETACH_START(ufm, sc);
- struct ufm_endpoint *sce;
- int i, dir;
- int s;
-#if defined(__NetBSD__) || defined(__OpenBSD__)
- int maj, mn;
-
- DPRINTF(("ufm_detach: sc=%p flags=%d\n", sc, flags));
-#elif defined(__FreeBSD__)
- DPRINTF(("ufm_detach: sc=%p\n", sc));
-#endif
-
- sc->sc_dying = 1;
-
- s = splusb();
- if (--sc->sc_refcnt >= 0) {
- /* Wait for processes to go away. */
- usb_detach_wait(USBDEV(sc->sc_dev));
- }
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list