Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Aug 2008 14:02:42 GMT
From:      Ed Schouten <ed@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 147080 for review
Message-ID:  <200808101402.m7AE2gcP007058@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=147080

Change 147080 by ed@ed_dull on 2008/08/10 14:02:17

	IFC.

Affected files ...

.. //depot/projects/mpsafetty/games/random/random.c#3 integrate
.. //depot/projects/mpsafetty/games/random/randomize_fd.c#3 integrate
.. //depot/projects/mpsafetty/games/random/randomize_fd.h#3 integrate
.. //depot/projects/mpsafetty/lib/libarchive/archive_write_set_format_ar.c#2 integrate
.. //depot/projects/mpsafetty/lib/libarchive/archive_write_set_format_pax.c#2 integrate
.. //depot/projects/mpsafetty/lib/libarchive/test/test_read_format_zip.c#2 integrate
.. //depot/projects/mpsafetty/sbin/geom/class/virstor/geom_virstor.c#2 integrate
.. //depot/projects/mpsafetty/share/man/man4/man4.i386/Makefile#2 integrate
.. //depot/projects/mpsafetty/share/man/man4/man4.i386/glxsb.4#1 branch
.. //depot/projects/mpsafetty/sys/conf/files#10 integrate
.. //depot/projects/mpsafetty/sys/conf/files.i386#3 integrate
.. //depot/projects/mpsafetty/sys/crypto/via/padlock.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/glxsb/glxsb.c#1 branch
.. //depot/projects/mpsafetty/sys/dev/glxsb/glxsb.h#1 branch
.. //depot/projects/mpsafetty/sys/dev/glxsb/glxsb_hash.c#1 branch
.. //depot/projects/mpsafetty/sys/dev/pccbb/pccbb.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/sis/if_sis.c#1 branch
.. //depot/projects/mpsafetty/sys/dev/sis/if_sisreg.h#1 branch
.. //depot/projects/mpsafetty/sys/dev/usb/usb_quirks.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/usb/usbdevs#3 integrate
.. //depot/projects/mpsafetty/sys/dev/xl/if_xl.c#1 branch
.. //depot/projects/mpsafetty/sys/dev/xl/if_xlreg.h#1 branch
.. //depot/projects/mpsafetty/sys/i386/conf/NOTES#4 integrate
.. //depot/projects/mpsafetty/sys/kern/vfs_mount.c#4 integrate
.. //depot/projects/mpsafetty/sys/modules/Makefile#8 integrate
.. //depot/projects/mpsafetty/sys/modules/glxsb/Makefile#1 branch
.. //depot/projects/mpsafetty/sys/modules/sis/Makefile#2 integrate
.. //depot/projects/mpsafetty/sys/modules/xl/Makefile#2 integrate
.. //depot/projects/mpsafetty/sys/pci/if_sis.c#3 delete
.. //depot/projects/mpsafetty/sys/pci/if_sisreg.h#2 delete
.. //depot/projects/mpsafetty/sys/pci/if_xl.c#2 delete
.. //depot/projects/mpsafetty/sys/pci/if_xlreg.h#2 delete
.. //depot/projects/mpsafetty/sys/ufs/ffs/ffs_vfsops.c#4 integrate
.. //depot/projects/mpsafetty/tools/tools/nanobsd/nanobsd.sh#4 integrate
.. //depot/projects/mpsafetty/usr.bin/window/:tt#2 delete
.. //depot/projects/mpsafetty/usr.bin/window/:tty#2 delete
.. //depot/projects/mpsafetty/usr.bin/window/:var#2 delete
.. //depot/projects/mpsafetty/usr.bin/window/:ww#2 delete

Differences ...

==== //depot/projects/mpsafetty/games/random/random.c#3 (text+ko) ====

@@ -46,7 +46,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/games/random/random.c,v 1.22 2008/08/08 01:42:17 ache Exp $");
+__FBSDID("$FreeBSD: src/games/random/random.c,v 1.23 2008/08/10 11:31:56 ache Exp $");
 
 #include <sys/types.h>
 
@@ -162,7 +162,7 @@
 
 	/* Compute a random exit status between 0 and denom - 1. */
 	if (random_exit)
-		return (int)(denom * random() / RANDOM_MAX);
+		return (int)(denom * random() / RANDOM_MAX_PLUS1);
 
 	/*
 	 * Select whether to print the first line.  (Prime the pump.)
@@ -170,7 +170,7 @@
 	 * 0 (which has a 1 / denom chance of being true), we select the
 	 * line.
 	 */
-	selected = (int)(denom * random() / RANDOM_MAX) == 0;
+	selected = (int)(denom * random() / RANDOM_MAX_PLUS1) == 0;
 	while ((ch = getchar()) != EOF) {
 		if (selected)
 			(void)putchar(ch);
@@ -180,7 +180,7 @@
 				err(2, "stdout");
 
 			/* Now see if the next line is to be printed. */
-			selected = (int)(denom * random() / RANDOM_MAX) == 0;
+			selected = (int)(denom * random() / RANDOM_MAX_PLUS1) == 0;
 		}
 	}
 	if (ferror(stdin))

==== //depot/projects/mpsafetty/games/random/randomize_fd.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/games/random/randomize_fd.c,v 1.5 2008/08/08 02:46:47 ache Exp $");
+__FBSDID("$FreeBSD: src/games/random/randomize_fd.c,v 1.6 2008/08/10 11:31:56 ache Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -48,13 +48,10 @@
 {
 	struct rand_node *n;
 
-	n = (struct rand_node *)malloc(sizeof(struct rand_node));
+	n = (struct rand_node *)calloc(1, sizeof(struct rand_node));
 	if (n == NULL)
-		err(1, "malloc");
+		err(1, "calloc");
 
-	n->len = 0;
-	n->cp = NULL;
-	n->next = NULL;
 	return(n);
 }
 
@@ -175,9 +172,9 @@
 			    (type == RANDOM_TYPE_WORDS && isspace(buf[i])) ||
 			    (eof && i == buflen - 1)) {
 			make_token:
-				if (numnode == RANDOM_MAX) {
+				if (numnode == RANDOM_MAX_PLUS1) {
 					errno = EFBIG;
-					err(1, "too many lines");
+					err(1, "too many delimiters");
 				}
 				numnode++;
 				n = rand_node_allocate();
@@ -215,7 +212,7 @@
 				if (n->cp == NULL)
 					break;
 
-				if ((int)(denom * random() / RANDOM_MAX) == 0) {
+				if ((int)(denom * random() / RANDOM_MAX_PLUS1) == 0) {
 					ret = printf("%.*s", (int)n->len - 1, n->cp);
 					if (ret < 0)
 						err(1, "printf");

==== //depot/projects/mpsafetty/games/random/randomize_fd.h#3 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/games/random/randomize_fd.h,v 1.3 2008/08/08 01:42:17 ache Exp $
+ * $FreeBSD: src/games/random/randomize_fd.h,v 1.4 2008/08/10 11:31:56 ache Exp $
  */
 
 #ifndef __RANDOMIZE_FD__
@@ -33,7 +33,7 @@
  * The random() function is defined to return values between 0 and
  * 2^31 - 1 inclusive in random(3).
  */
-#define	RANDOM_MAX	0x80000000UL
+#define	RANDOM_MAX_PLUS1	0x80000000UL
 
 #define RANDOM_TYPE_UNSET 0
 #define RANDOM_TYPE_LINES 1

==== //depot/projects/mpsafetty/lib/libarchive/archive_write_set_format_ar.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_ar.c,v 1.7 2008/05/26 17:00:23 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_ar.c,v 1.8 2008/08/10 02:06:28 kientzle Exp $");
 
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
@@ -389,6 +389,9 @@
 
 	ar = (struct ar_w *)a->format_data;
 
+	if (ar == NULL)
+		return (ARCHIVE_OK);
+
 	if (ar->has_strtab > 0) {
 		free(ar->strtab);
 		ar->strtab = NULL;

==== //depot/projects/mpsafetty/lib/libarchive/archive_write_set_format_pax.c#2 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.47 2008/05/26 17:00:23 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.48 2008/08/10 02:06:28 kientzle Exp $");
 
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
@@ -1200,6 +1200,9 @@
 	struct pax *pax;
 
 	pax = (struct pax *)a->format_data;
+	if (pax == NULL)
+		return (ARCHIVE_OK);
+
 	archive_string_free(&pax->pax_header);
 	free(pax);
 	a->format_data = NULL;

==== //depot/projects/mpsafetty/lib/libarchive/test/test_read_format_zip.c#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "test.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_zip.c,v 1.5 2008/06/26 11:50:11 des Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_zip.c,v 1.6 2008/08/10 03:13:42 kientzle Exp $");
 
 DEFINE_TEST(test_read_format_zip)
 {
@@ -51,12 +51,14 @@
 	assertEqualString("file1", archive_entry_pathname(ae));
 	assertEqualInt(1179604289, archive_entry_mtime(ae));
 	assertEqualInt(18, archive_entry_size(ae));
+	failure("archive_read_data() returns number of bytes read");
 	assertEqualInt(18, archive_read_data(a, buff, 19));
 	assert(0 == memcmp(buff, "hello\nhello\nhello\n", 18));
 	assertA(0 == archive_read_next_header(a, &ae));
 	assertEqualString("file2", archive_entry_pathname(ae));
 	assertEqualInt(1179605932, archive_entry_mtime(ae));
 	assertEqualInt(18, archive_entry_size(ae));
+	failure("file2 has a bad CRC, so reading to end should fail");
 	assertEqualInt(ARCHIVE_WARN, archive_read_data(a, buff, 19));
 	assert(0 == memcmp(buff, "hello\nhello\nhello\n", 18));
 	assertA(archive_compression(a) == ARCHIVE_COMPRESSION_NONE);

==== //depot/projects/mpsafetty/sbin/geom/class/virstor/geom_virstor.c#2 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/geom/class/virstor/geom_virstor.c,v 1.2 2007/11/18 03:17:56 jb Exp $");
+__FBSDID("$FreeBSD: src/sbin/geom/class/virstor/geom_virstor.c,v 1.3 2008/08/09 16:47:30 ivoras Exp $");
 
 #include <sys/param.h>
 #include <errno.h>
@@ -157,7 +157,6 @@
 	off_t mediasize;
 	u_char *sector;
 	int error, fd;
-	ssize_t abc;
 
 	pathgen(name, path, sizeof(path));
 	sector = NULL;
@@ -183,7 +182,7 @@
 		goto out;
 	}
 	bcopy(md, sector, size);
-	if ((abc = pwrite(fd, sector, sectorsize, mediasize - sectorsize)) !=
+	if (pwrite(fd, sector, sectorsize, mediasize - sectorsize) !=
 	    (ssize_t)sectorsize) {
 		error = errno;
 		goto out;
@@ -273,7 +272,7 @@
 		    (size_t)(md.md_virsize/(1024 * 1024)));
 	}
 
-	msize = secsize = ssize = 0;
+	msize = secsize = 0;
 	for (i = 1; i < (unsigned)nargs; i++) {
 		snprintf(param, sizeof(param), "arg%u", i);
 		name = gctl_get_ascii(req, param);
@@ -291,6 +290,11 @@
 		}
 	}
 
+	if (secsize == 0) {
+		gctl_error(req, "Device not specified");
+		return;
+	}
+
 	if (md.md_chunk_size % secsize != 0) {
 		fprintf(stderr, "Error: chunk size is not a multiple of sector "
 		    "size.");

==== //depot/projects/mpsafetty/share/man/man4/man4.i386/Makefile#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/share/man/man4/man4.i386/Makefile,v 1.188 2008/07/04 21:06:57 jhb Exp $
+# $FreeBSD: src/share/man/man4/man4.i386/Makefile,v 1.189 2008/08/09 14:54:19 philip Exp $
 
 MAN=	acpi_aiboost.4 \
 	acpi_asus.4 \
@@ -22,6 +22,7 @@
 	ep.4 \
 	ex.4 \
 	fe.4 \
+	glxsb.4 \
 	ichwd.4 \
 	ie.4 \
 	io.4 \

==== //depot/projects/mpsafetty/sys/conf/files#10 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1321 2008/07/31 03:51:53 emax Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1323 2008/08/10 10:00:14 imp Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -1100,6 +1100,7 @@
 dev/si/si_eisa.c		optional si eisa
 dev/si/si_isa.c			optional si isa
 dev/si/si_pci.c			optional si pci
+dev/sis/if_sis.c		optional sis pci
 dev/sk/if_sk.c			optional sk pci
 dev/smbus/smb.c			optional smb
 dev/smbus/smbconf.c		optional smbus
@@ -1346,6 +1347,7 @@
 	clean		"wpi.fw"
 dev/xe/if_xe.c			optional xe
 dev/xe/if_xe_pccard.c		optional xe pccard
+dev/xl/if_xl.c			optional xl pci
 fs/coda/coda_fbsd.c		optional vcoda
 fs/coda/coda_psdev.c		optional vcoda
 fs/coda/coda_subr.c		optional vcoda
@@ -2086,11 +2088,9 @@
 pci/if_mn.c			optional mn pci
 pci/if_pcn.c			optional pcn pci
 pci/if_rl.c			optional rl pci
-pci/if_sis.c			optional sis pci
 pci/if_ste.c			optional ste pci
 pci/if_tl.c			optional tl pci
 pci/if_wb.c			optional wb pci
-pci/if_xl.c			optional xl pci
 pci/intpm.c			optional intpm pci
 pci/ncr.c			optional ncr pci
 pci/nfsmb.c			optional nfsmb pci

==== //depot/projects/mpsafetty/sys/conf/files.i386#3 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.i386,v 1.601 2008/08/08 16:26:53 stas Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.602 2008/08/09 14:52:31 philip Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -175,6 +175,8 @@
 dev/fdc/fdc_isa.c		optional fdc isa
 dev/fdc/fdc_pccard.c		optional fdc pccard
 dev/fe/if_fe_isa.c		optional fe isa
+dev/glxsb/glxsb.c		optional glxsb
+dev/glxsb/glxsb_hash.c		optional glxsb
 dev/hptmv/entry.c		optional hptmv
 dev/hptmv/mv.c			optional hptmv
 dev/hptmv/gui_lib.c		optional hptmv

==== //depot/projects/mpsafetty/sys/crypto/via/padlock.c#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2005-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
+ * Copyright (c) 2005-2008 Pawel Jakub Dawidek <pjd@FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.14 2008/07/20 07:34:00 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.20 2008/08/09 20:01:01 pjd Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -59,12 +59,14 @@
 struct padlock_softc {
 	int32_t		sc_cid;
 	uint32_t	sc_sid;
-	TAILQ_HEAD(, padlock_session) sc_sessions;
+	TAILQ_HEAD(padlock_sessions_head, padlock_session) sc_sessions;
 	struct rwlock	sc_sessions_lock;
 };
 
 static int padlock_newsession(device_t, uint32_t *sidp, struct cryptoini *cri);
 static int padlock_freesession(device_t, uint64_t tid);
+static void padlock_freesession_one(struct padlock_softc *sc,
+    struct padlock_session *ses, int locked);
 static int padlock_process(device_t, struct cryptop *crp, int hint __unused);
 
 MALLOC_DEFINE(M_PADLOCK, "padlock_data", "PadLock Data");
@@ -152,8 +154,7 @@
 			return (EBUSY);
 		}
 	}
-	for (ses = TAILQ_FIRST(&sc->sc_sessions); ses != NULL;
-	    ses = TAILQ_FIRST(&sc->sc_sessions)) {
+	while ((ses = TAILQ_FIRST(&sc->sc_sessions)) != NULL) {
 		TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next);
 		free(ses, M_PADLOCK);
 	}
@@ -214,35 +215,30 @@
 	 * allocate one.
 	 */
 	ses = TAILQ_FIRST(&sc->sc_sessions);
-	if (ses == NULL || ses->ses_used)
-		ses = NULL;
-	else {
-		TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next);
-		ses->ses_used = 1;
-		TAILQ_INSERT_TAIL(&sc->sc_sessions, ses, ses_next);
-	}
-	rw_wunlock(&sc->sc_sessions_lock);
-	if (ses == NULL) {
+	if (ses == NULL || ses->ses_used) {
 		ses = malloc(sizeof(*ses), M_PADLOCK, M_NOWAIT | M_ZERO);
-		if (ses == NULL)
+		if (ses == NULL) {
+			rw_wunlock(&sc->sc_sessions_lock);
 			return (ENOMEM);
-		ses->ses_used = 1;
-		rw_wlock(&sc->sc_sessions_lock);
+		}
 		ses->ses_id = sc->sc_sid++;
-		TAILQ_INSERT_TAIL(&sc->sc_sessions, ses, ses_next);
-		rw_wunlock(&sc->sc_sessions_lock);
+	} else {
+		TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next);
 	}
+	ses->ses_used = 1;
+	TAILQ_INSERT_TAIL(&sc->sc_sessions, ses, ses_next);
+	rw_wunlock(&sc->sc_sessions_lock);
 
 	error = padlock_cipher_setup(ses, encini);
 	if (error != 0) {
-		padlock_freesession(NULL, ses->ses_id);
+		padlock_freesession_one(sc, ses, 0);
 		return (error);
 	}
 
 	if (macini != NULL) {
 		error = padlock_hash_setup(ses, macini);
 		if (error != 0) {
-			padlock_freesession(NULL, ses->ses_id);
+			padlock_freesession_one(sc, ses, 0);
 			return (error);
 		}
 	}
@@ -251,6 +247,24 @@
 	return (0);
 }
 
+static void
+padlock_freesession_one(struct padlock_softc *sc, struct padlock_session *ses,
+    int locked)
+{
+	uint32_t sid = ses->ses_id;
+
+	if (!locked)
+		rw_wlock(&sc->sc_sessions_lock);
+	TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next);
+	padlock_hash_free(ses);
+	bzero(ses, sizeof(*ses));
+	ses->ses_used = 0;
+	ses->ses_id = sid;
+	TAILQ_INSERT_HEAD(&sc->sc_sessions, ses, ses_next);
+	if (!locked)
+		rw_wunlock(&sc->sc_sessions_lock);
+}
+
 static int
 padlock_freesession(device_t dev, uint64_t tid)
 {
@@ -259,7 +273,8 @@
 	uint32_t sid = ((uint32_t)tid) & 0xffffffff;
 
 	rw_wlock(&sc->sc_sessions_lock);
-	TAILQ_FOREACH(ses, &sc->sc_sessions, ses_next) {
+	TAILQ_FOREACH_REVERSE(ses, &sc->sc_sessions, padlock_sessions_head,
+	    ses_next) {
 		if (ses->ses_id == sid)
 			break;
 	}
@@ -267,11 +282,7 @@
 		rw_wunlock(&sc->sc_sessions_lock);
 		return (EINVAL);
 	}
-	TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next);
-	padlock_hash_free(ses);
-	bzero(ses, sizeof(*ses));
-	ses->ses_used = 0;
-	TAILQ_INSERT_HEAD(&sc->sc_sessions, ses, ses_next);
+	padlock_freesession_one(sc, ses, 1);
 	rw_wunlock(&sc->sc_sessions_lock);
 	return (0);
 }
@@ -323,7 +334,8 @@
 	}
 
 	rw_rlock(&sc->sc_sessions_lock);
-	TAILQ_FOREACH(ses, &sc->sc_sessions, ses_next) {
+	TAILQ_FOREACH_REVERSE(ses, &sc->sc_sessions, padlock_sessions_head,
+	    ses_next) {
 		if (ses->ses_id == (crp->crp_sid & 0xffffffff))
 			break;
 	}

==== //depot/projects/mpsafetty/sys/dev/pccbb/pccbb.c#3 (text+ko) ====

@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.169 2008/08/09 07:41:18 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.172 2008/08/10 09:55:14 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -158,7 +158,7 @@
 static void	cbb_insert(struct cbb_softc *sc);
 static void	cbb_removal(struct cbb_softc *sc);
 static uint32_t	cbb_detect_voltage(device_t brdev);
-static void	cbb_cardbus_reset(device_t brdev, int on);
+static void	cbb_cardbus_reset(device_t brdev, device_t child, int on);
 static int	cbb_cardbus_io_open(device_t brdev, int win, uint32_t start,
 		    uint32_t end);
 static int	cbb_cardbus_mem_open(device_t brdev, int win,
@@ -927,7 +927,7 @@
 /************************************************************************/
 
 static void
-cbb_cardbus_reset(device_t brdev, int on)
+cbb_cardbus_reset(device_t brdev, device_t child, int on)
 {
 	struct cbb_softc *sc = device_get_softc(brdev);
 	uint32_t b;
@@ -946,28 +946,30 @@
 	 */
 	if (on && CBB_CARD_PRESENT(cbb_get(sc, CBB_SOCKET_STATE))) {
 		/*
-		 * After clearing reset, wait up to 1.1s for the vendor of
-		 * device 0.0 to become != 0xffff.  The PCMCIA PC Card Host
-		 * System Specification says that when powering up the card,
-		 * the PCI Spec v2.1 must be followed.  In PCI spec v2.2 Table
-		 * 4-6, Trhfa (Reset High to first Config Access) is at most
-		 * 2^25 clocks, or just over 1s.  Secont 2.2.1 states any card
-		 * not ready to participate in bus transactions must tristate
-		 * its outputs.  Therefore, any access to its configuration
-		 * registers must be ignored.  In that state, the vendor will
-		 * read 0xffff.  Section 6.2.1 states a vendor id of 0xffff is
-		 * invalid, so this can never match a real card.  Print a
-		 * warning if it never returns a real id.  The PCMCIA PC Card
-		 * Electrical Spec Section 5.2.7.1 implies only device 0.
+		 * After clearing reset, wait up to 1.1s for the first
+		 * configuration register (vendor/product) configuration
+		 * register of device 0.0 to become != 0xffffffff.  The PCMCIA
+		 * PC Card Host System Specification says that when powering
+		 * up the card, the PCI Spec v2.1 must be followed.  In PCI
+		 * spec v2.2 Table 4-6, Trhfa (Reset High to first Config
+		 * Access) is at most 2^25 clocks, or just over 1s.  Section
+		 * 2.2.1 states any card not ready to participate in bus
+		 * transactions must tristate its outputs.  Therefore, any
+		 * access to its configuration registers must be ignored.  In
+		 * that state, the config reg will read 0xffffffff.  Section
+		 * 6.2.1 states a vendor id of 0xffff is invalid, so this can
+		 * never match a real card.  Print a warning if it never
+		 * returns a real id.  The PCMCIA PC Card Electrical Spec
+		 * Section 5.2.7.1 implies only device 0.
 		 */
 		PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL,
 		    &~CBBM_BRIDGECTRL_RESET, 2);
-		b = pcib_get_bus(brdev);
+		b = pcib_get_bus(child);
 		count = 1100 / 20;
 		do {
 			pause("cbbP4", hz * 2 / 100);
-		} while (PCIB_READ_CONFIG(brdev, b, 0, 0, PCIR_DEVVENDOR, 2) ==
-		    0xfffful && --count >= 0);
+		} while (PCIB_READ_CONFIG(brdev, b, 0, 0, PCIR_DEVVENDOR, 4) ==
+		    0xfffffffful && --count >= 0);
 		if (count < 0)
 			device_printf(brdev, "Warning: Bus reset timeout\n");
 	}
@@ -985,7 +987,7 @@
 	err = cbb_do_power(brdev);
 	if (err)
 		return (err);
-	cbb_cardbus_reset(brdev, 1);
+	cbb_cardbus_reset(brdev, child, 1);
 	return (0);
 }
 
@@ -993,7 +995,7 @@
 cbb_cardbus_power_disable_socket(device_t brdev, device_t child)
 {
 	cbb_power(brdev, CARD_OFF);
-	cbb_cardbus_reset(brdev, 0);
+	cbb_cardbus_reset(brdev, child, 0);
 }
 
 /************************************************************************/

==== //depot/projects/mpsafetty/sys/dev/usb/usb_quirks.c#2 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.65 2008/03/14 15:59:30 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.66 2008/08/09 22:25:13 brix Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -106,6 +106,10 @@
 	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS2,
 	ANY, { UQ_HID_IGNORE }},
+ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE,
+	ANY, { UQ_HID_IGNORE }},
+ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_3G,
+	ANY, { UQ_HID_IGNORE }},
 
  /* Devices which should be ignored by both ukbd and uhid */
  { USB_VENDOR_CYPRESS, USB_PRODUCT_CYPRESS_WISPY1A,

==== //depot/projects/mpsafetty/sys/dev/usb/usbdevs#3 (text+ko) ====

@@ -1,4 +1,4 @@
-$FreeBSD: src/sys/dev/usb/usbdevs,v 1.362 2008/08/02 12:15:18 remko Exp $
+$FreeBSD: src/sys/dev/usb/usbdevs,v 1.363 2008/08/09 22:25:13 brix Exp $
 /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */
 
 /*-
@@ -853,6 +853,8 @@
 product APPLE IPOD_08		0x1208	iPod '08'
 product APPLE IPODVIDEO		0x1209	iPod Video
 product APPLE IPODNANO		0x120a	iPod Nano
+product APPLE IPHONE		0x1290	iPhone
+product APPLE IPHONE_3G		0x1292	iPhone 3G
 product APPLE ETHERNET		0x1402	Ethernet A1277
 
 /* Arkmicro Technologies */

==== //depot/projects/mpsafetty/sys/i386/conf/NOTES#4 (text+ko) ====

@@ -4,7 +4,7 @@
 # This file contains machine dependent kernel configuration notes.  For
 # machine independent notes, look in /sys/conf/NOTES.
 #
-# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1260 2008/08/08 16:26:53 stas Exp $
+# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1261 2008/08/09 14:52:31 philip Exp $
 #
 
 #
@@ -687,6 +687,12 @@
 options 	SAFE_DEBUG	# enable debugging support: hw.safe.debug
 options 	SAFE_RNDTEST	# enable rndtest support
 
+#
+# glxsb is a driver for the Security Block in AMD Geode LX processors.
+# Requires 'device crypto'.
+#
+device		glxsb		# AMD Geode LX Security Block
+
 #####################################################################
 
 #

==== //depot/projects/mpsafetty/sys/kern/vfs_mount.c#4 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.286 2008/08/09 11:14:05 des Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.287 2008/08/10 12:15:36 kib Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -192,6 +192,8 @@
 {
 	struct vfsopt *opt, *temp;
 
+	if (opts == NULL)
+		return;
 	TAILQ_FOREACH_SAFE(opt, opts, link, temp)  {
 		if (strcmp(opt->name, name) == 0)
 			vfs_freeopt(opts, opt);

==== //depot/projects/mpsafetty/sys/modules/Makefile#8 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/modules/Makefile,v 1.582 2008/08/08 16:26:53 stas Exp $
+# $FreeBSD: src/sys/modules/Makefile,v 1.583 2008/08/09 14:52:31 philip Exp $
 
 .include <bsd.own.mk>
 
@@ -94,6 +94,7 @@
 	fxp \
 	gem \
 	geom \
+	${_glxsb} \
 	hatm \
 	hifn \
 	hme \
@@ -387,6 +388,7 @@
 _exca=		exca
 _ext2fs=	ext2fs
 _fe=		fe
+_glxsb=		glxsb
 _i2c=		i2c
 _ibcs2=		ibcs2
 _ie=		ie

==== //depot/projects/mpsafetty/sys/modules/sis/Makefile#2 (text+ko) ====

@@ -1,6 +1,6 @@
-# $FreeBSD: src/sys/modules/sis/Makefile,v 1.11 2005/09/27 18:10:38 mlaier Exp $
+# $FreeBSD: src/sys/modules/sis/Makefile,v 1.12 2008/08/10 10:00:14 imp Exp $
 
-.PATH: ${.CURDIR}/../../pci
+.PATH: ${.CURDIR}/../../dev/sis
 
 KMOD=	if_sis
 SRCS=	if_sis.c device_if.h bus_if.h pci_if.h

==== //depot/projects/mpsafetty/sys/modules/xl/Makefile#2 (text+ko) ====

@@ -1,6 +1,6 @@
-# $FreeBSD: src/sys/modules/xl/Makefile,v 1.14 2005/09/27 18:10:41 mlaier Exp $
+# $FreeBSD: src/sys/modules/xl/Makefile,v 1.15 2008/08/10 09:45:52 imp Exp $
 
-.PATH: ${.CURDIR}/../../pci
+.PATH: ${.CURDIR}/../../dev/xl
 
 KMOD=	if_xl
 SRCS=	if_xl.c device_if.h bus_if.h pci_if.h

==== //depot/projects/mpsafetty/sys/ufs/ffs/ffs_vfsops.c#4 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_vfsops.c,v 1.344 2008/08/06 14:47:19 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_vfsops.c,v 1.345 2008/08/10 12:15:36 kib Exp $");
 
 #include "opt_mac.h"
 #include "opt_quota.h"
@@ -169,8 +169,7 @@
 		 * persist "snapshot" in the options list.
 		 */
 		vfs_deleteopt(mp->mnt_optnew, "snapshot");
-		if (mp->mnt_opt != NULL)
-			vfs_deleteopt(mp->mnt_opt, "snapshot");
+		vfs_deleteopt(mp->mnt_opt, "snapshot");
 	}
 
 	MNT_ILOCK(mp);

==== //depot/projects/mpsafetty/tools/tools/nanobsd/nanobsd.sh#4 (text+ko) ====

@@ -24,7 +24,7 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/tools/tools/nanobsd/nanobsd.sh,v 1.34 2008/08/09 09:37:44 phk Exp $
+# $FreeBSD: src/tools/tools/nanobsd/nanobsd.sh,v 1.35 2008/08/09 21:51:57 sam Exp $
 #
 
 set -e
@@ -650,6 +650,7 @@
 		;;
 	-i)
 		do_image=false
+		;;
 	-w)
 		shift;
 		do_world=false



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