Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Dec 2004 04:29:22 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 66938 for review
Message-ID:  <200412130429.iBD4TM74004055@repoman.freebsd.org>

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

Change 66938 by sam@sam_ebb on 2004/12/13 04:28:39

	IFC @ 66937

Affected files ...

.. //depot/projects/wifi/Makefile#4 integrate
.. //depot/projects/wifi/UPDATING#6 integrate
.. //depot/projects/wifi/etc/rc.d/initdiskless#3 integrate
.. //depot/projects/wifi/libexec/ftpd/ftpd.c#7 integrate
.. //depot/projects/wifi/sbin/fsck_ffs/main.c#2 integrate
.. //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#31 integrate
.. //depot/projects/wifi/share/man/man4/man4.i386/cp.4#2 integrate
.. //depot/projects/wifi/sys/arm/arm/swtch.S#5 integrate
.. //depot/projects/wifi/sys/arm/arm/trap.c#7 integrate
.. //depot/projects/wifi/sys/conf/files.i386#7 integrate
.. //depot/projects/wifi/sys/conf/files.pc98#3 integrate
.. //depot/projects/wifi/sys/dev/acpi_support/acpi_ibm.c#2 integrate
.. //depot/projects/wifi/sys/dev/acpica/acpivar.h#2 integrate
.. //depot/projects/wifi/sys/dev/ata/atapi-cd.c#2 integrate
.. //depot/projects/wifi/sys/dev/fdc/fdc.c#5 integrate
.. //depot/projects/wifi/sys/dev/hme/if_hme_pci.c#3 integrate
.. //depot/projects/wifi/sys/dev/if_ndis/if_ndis.c#5 integrate
.. //depot/projects/wifi/sys/dev/mse/mse.c#2 integrate
.. //depot/projects/wifi/sys/dev/mse/mse_cbus.c#1 branch
.. //depot/projects/wifi/sys/dev/mse/mse_isa.c#1 branch
.. //depot/projects/wifi/sys/dev/mse/msevar.h#1 branch
.. //depot/projects/wifi/sys/dev/usb/ugen.c#2 integrate
.. //depot/projects/wifi/sys/dev/usb/ums.c#2 integrate
.. //depot/projects/wifi/sys/dev/usb/usbdevs#5 integrate
.. //depot/projects/wifi/sys/dev/usb/usbhid.h#2 integrate
.. //depot/projects/wifi/sys/dev/usb/uscanner.c#3 integrate
.. //depot/projects/wifi/sys/fs/ntfs/ntfs_vfsops.c#7 integrate
.. //depot/projects/wifi/sys/fs/ntfs/ntfs_vnops.c#5 integrate
.. //depot/projects/wifi/sys/geom/geom.h#4 integrate
.. //depot/projects/wifi/sys/geom/geom_bsd.c#2 integrate
.. //depot/projects/wifi/sys/geom/geom_dev.c#4 integrate
.. //depot/projects/wifi/sys/geom/geom_disk.c#2 integrate
.. //depot/projects/wifi/sys/geom/geom_mbr.c#4 integrate
.. //depot/projects/wifi/sys/geom/geom_pc98.c#3 integrate
.. //depot/projects/wifi/sys/i386/acpica/genwakecode.sh#2 integrate
.. //depot/projects/wifi/sys/i386/i386/identcpu.c#3 integrate
.. //depot/projects/wifi/sys/i386/i386/longrun.c#2 integrate
.. //depot/projects/wifi/sys/i386/isa/mse.c#2 delete
.. //depot/projects/wifi/sys/ia64/ia64/pmap.c#3 integrate
.. //depot/projects/wifi/sys/modules/Makefile#8 integrate
.. //depot/projects/wifi/sys/modules/acpi/acpi_asus/Makefile#3 integrate
.. //depot/projects/wifi/sys/modules/acpi/acpi_ibm/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/mse/Makefile#1 branch
.. //depot/projects/wifi/sys/net/if_sppp.h#2 integrate
.. //depot/projects/wifi/sys/net/if_spppsubr.c#2 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_crypto_wep.c#4 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#17 integrate
.. //depot/projects/wifi/sys/pc98/pc98/mse.c#2 delete
.. //depot/projects/wifi/sys/sys/mouse.h#2 integrate
.. //depot/projects/wifi/sys/sys/param.h#3 integrate
.. //depot/projects/wifi/sys/ufs/ffs/ffs_vfsops.c#9 integrate

Differences ...

==== //depot/projects/wifi/Makefile#4 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/Makefile,v 1.311 2004/12/07 14:41:16 harti Exp $
+# $FreeBSD: src/Makefile,v 1.312 2004/12/13 00:49:52 marcel Exp $
 #
 # The user-driven targets are:
 #
@@ -86,8 +86,7 @@
 
 PATH=	/sbin:/bin:/usr/sbin:/usr/bin
 MAKEOBJDIRPREFIX?=	/usr/obj
-_MAKEOBJDIRPREFIX!= /usr/bin/env -i \
-		PATH=${PATH} MAKEFLAGS="${.MAKEFLAGS}" ${MAKE} \
+_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} ${.MAKEFLAGS} \
 		-f /dev/null -V MAKEOBJDIRPREFIX dummy
 .if !empty(_MAKEOBJDIRPREFIX)
 .error MAKEOBJDIRPREFIX can only be set in environment, not as a global\

==== //depot/projects/wifi/UPDATING#6 (text+ko) ====

@@ -57,14 +57,6 @@
 	userland programs that read kmem for tcp sockets directly
 	(netstat, sockstat, etc.)
 
-20041018:
-	A major sweep over the tty drivers to elimnate approx 3100
-	lines of copy&pasted code have been performed.  As a part of
-	this change some tty devices have changed names:
-	sio devices are now named:	{tty,cua}d%d[.init,.lock]
-	ucom devices are now named:	{tty,cua}U%d[.init,.lock]
-	For other drivers see the commit logs.
-
 20041007:
 	The FreeBSD keyword is no longer a requirement for a valid
 	rc.d script. The rc(8) and rc.shutdown(8) scripts no longer check
@@ -79,6 +71,14 @@
 	changed, thus breaking ABI compatibility. Make sure you rebuild
 	this library with the kernel.
 
+20041004:
+	A major sweep over the tty drivers to elimnate approx 3100
+	lines of copy&pasted code have been performed.  As a part of
+	this change some tty devices have changed names:
+	sio devices are now named:	{tty,cua}d%d[.init,.lock]
+	ucom devices are now named:	{tty,cua}U%d[.init,.lock]
+	For other drivers see the commit logs.
+
 20041001:
 	The following libraries had their version number bumped up:
 		/lib/libm.so.2 -> libm.so.3
@@ -278,9 +278,11 @@
 	The console initialization on Alpha has been reworked and is now
 	identical to other platforms. This means that the hardcoding of
 	the serial console and the debug port has been removed. As such,
-	hints are now required for the sio(4) driver to become a console
-	or debug port. The NO_SIO option has been decommissioned because
-	of this.
+	hints (hint.sio.0.flags="0x10") are now required for the sio(4)
+	driver to become a console or debug port.  The NO_SIO option has
+	been decommissioned because of this.
+	Running mergemaster is the easiest way to ensure your
+	'boot/device.hints' has the needed line.
 
 20040710:
 	A revamp of the debugging code in the kernel with some visible
@@ -1975,4 +1977,4 @@
 Contact Warner Losh if you have any questions about your use of
 this document.
 
-$FreeBSD: src/UPDATING,v 1.381 2004/12/11 23:21:31 sam Exp $
+$FreeBSD: src/UPDATING,v 1.382 2004/12/12 07:22:16 obrien Exp $

==== //depot/projects/wifi/etc/rc.d/initdiskless#3 (text+ko) ====

@@ -24,7 +24,7 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/etc/rc.d/initdiskless,v 1.40 2004/11/05 07:35:31 mtm Exp $
+# $FreeBSD: src/etc/rc.d/initdiskless,v 1.41 2004/12/12 08:04:26 obrien Exp $
 #
 # PROVIDE: initdiskless
 # REQUIRE: preseedrandom
@@ -305,7 +305,7 @@
 	if [ -f $j ]; then
 	    create_md $subdir
 	    echo "Loading /$subdir from cpio archive $j"
-	    (cd / ; /stand/gzip -d < $j | /stand/cpio --extract -d )
+	    (cd / ; /rescue/pax -x cpio -r -z -p e -f $j)
 	fi
     done
     for j in /conf/$i/*.remove ; do

==== //depot/projects/wifi/libexec/ftpd/ftpd.c#7 (text+ko) ====

@@ -46,7 +46,7 @@
 #endif /* not lint */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/libexec/ftpd/ftpd.c,v 1.197 2004/11/22 11:10:04 yar Exp $");
+__FBSDID("$FreeBSD: src/libexec/ftpd/ftpd.c,v 1.198 2004/12/12 17:30:28 yar Exp $");
 
 /*
  * FTP server.
@@ -273,6 +273,19 @@
 	LastArgv = envp[-1] + strlen(envp[-1]);
 #endif /* OLD_SETPROCTITLE */
 
+	/*
+	 * Prevent diagnostic messages from appearing on stderr.
+	 * We run as a daemon or from inetd; in both cases, there's
+	 * more reason in logging to syslog.
+	 */
+	(void) freopen(_PATH_DEVNULL, "w", stderr);
+	opterr = 0;
+
+	/*
+	 * LOG_NDELAY sets up the logging connection immediately,
+	 * necessary for anonymous ftp's that chroot and can't do it later.
+	 */
+	openlog("ftpd", LOG_PID | LOG_NDELAY, LOG_FTP);
 
 	while ((ch = getopt(argc, argv,
 	                    "46a:AdDEhlmMoOp:P:rRSt:T:u:UvW")) != -1) {
@@ -367,7 +380,7 @@
 
 			val = strtol(optarg, &optarg, 8);
 			if (*optarg != '\0' || val < 0)
-				warnx("bad value for -u");
+				syslog(LOG_WARNING, "bad value for -u");
 			else
 				defumask = val;
 			break;
@@ -385,7 +398,7 @@
 			break;
 
 		default:
-			warnx("unknown flag -%c ignored", optopt);
+			syslog(LOG_WARNING, "unknown flag -%c ignored", optopt);
 			break;
 		}
 	}
@@ -393,13 +406,6 @@
 #ifdef VIRTUAL_HOSTING
 	inithosts();
 #endif
-	(void) freopen(_PATH_DEVNULL, "w", stderr);
-
-	/*
-	 * LOG_NDELAY sets up the logging connection immediately,
-	 * necessary for anonymous ftp's that chroot and can't do it later.
-	 */
-	openlog("ftpd", LOG_PID | LOG_NDELAY, LOG_FTP);
 
 	if (daemon_mode) {
 		int *ctl_sock, fd, maxfd = -1, nfds, i;

==== //depot/projects/wifi/sbin/fsck_ffs/main.c#2 (text+ko) ====

@@ -39,7 +39,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/fsck_ffs/main.c,v 1.42 2004/10/08 20:44:47 truckman Exp $");
+__FBSDID("$FreeBSD: src/sbin/fsck_ffs/main.c,v 1.43 2004/12/12 11:04:52 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -304,6 +304,7 @@
 		if (bkgrdflag) {
 			snprintf(snapname, sizeof snapname,
 			    "%s/.snap/fsck_snapshot", mntp->f_mntonname);
+			memset(&args, 0, sizeof args);
 			args.fspec = snapname;
 			while (mount("ffs", mntp->f_mntonname,
 			    mntp->f_flags | MNT_UPDATE | MNT_SNAPSHOT,

==== //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#31 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sbin/ifconfig/ifieee80211.c,v 1.11 2004/12/08 19:18:07 sam Exp $
+ * $FreeBSD: src/sbin/ifconfig/ifieee80211.c,v 1.12 2004/12/12 04:32:44 sam Exp $
  */
 
 /*-
@@ -1382,9 +1382,10 @@
 	ireq.i_type = IEEE80211_IOC_WEP;
 	if (ioctl(s, SIOCG80211, &ireq) != -1 &&
 	    ireq.i_val != IEEE80211_WEP_NOSUP) {
-		int firstkey;
+		int firstkey, wepmode;
 
-		switch (ireq.i_val) {
+		wepmode = ireq.i_val;
+		switch (wepmode) {
 			case IEEE80211_WEP_OFF:
 				LINE_CHECK("%cprivacy OFF", spacer);
 				break;
@@ -1396,7 +1397,7 @@
 				break;
 			default:
 				LINE_CHECK("%cprivacy UNKNOWN (0x%x)",
-					spacer, ireq.i_val);
+					spacer, wepmode);
 				break;
 		}
 
@@ -1412,7 +1413,7 @@
 		}
 		if (ireq.i_val != -1)
 			LINE_CHECK("%cdeftxkey %d", spacer, ireq.i_val+1);
-		else if (verbose)
+		else if (wepmode != IEEE80211_WEP_OFF || verbose)
 			LINE_CHECK("%cdeftxkey UNDEF", spacer);
 
 		ireq.i_type = IEEE80211_IOC_NUMWEPKEYS;

==== //depot/projects/wifi/share/man/man4/man4.i386/cp.4#2 (text+ko) ====

@@ -11,9 +11,9 @@
 .\" works or modified versions.
 .\"
 .\" Cronyx Id: cp.4,v 1.1.2.5 2004/06/21 17:47:40 rik Exp $
-.\" $FreeBSD: src/share/man/man4/man4.i386/cp.4,v 1.6 2004/07/07 19:41:42 simon Exp $
+.\" $FreeBSD: src/share/man/man4/man4.i386/cp.4,v 1.8 2004/12/12 12:32:50 rik Exp $
 .\"
-.Dd July 7, 2004
+.Dd December 12, 2004
 .Dt CP 4 i386
 .Os
 .Sh NAME
@@ -60,6 +60,10 @@
 V.35 and RS-232 interfaces
 .It Cronyx Tau-PCI/R
 RS-530(RS-449) and X.21 interfaces
+.It Cronyx Tau-PCI-L
+one V.35 and RS-232 interface, low profile
+.It Cronyx Tau-PCI-L/R
+one RS-530(RS-449) and X.21 interface, low profile
 .It Cronyx Tau-PCI-E1
 fractional E1 interfaces
 .It Cronyx Tau-PCI-G703
@@ -86,7 +90,9 @@
 The
 .Nm
 driver was added in
-.Fx 5.3 .
+.Fx 5.3
+and
+.Fx 4.11 .
 The
 .Nm
 driver for previous versions of

==== //depot/projects/wifi/sys/arm/arm/swtch.S#5 (text+ko) ====

@@ -83,7 +83,7 @@
 #include <machine/asm.h>
 #include <machine/asmacros.h>
 #include <machine/armreg.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.8 2004/12/05 22:46:59 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.9 2004/12/12 19:21:58 cognet Exp $");
 
 
 /*
@@ -128,11 +128,9 @@
 .Lcpu_do_powersave:
 	.word	_C_LABEL(cpu_do_powersave)
 ENTRY(cpu_throw)
-	mov	r4, r0
 	mov	r5, r1
 
 	/*
-	 * r4 = oldtd
 	 * r5 = newtd
 	 */
 
@@ -148,7 +146,6 @@
 	/*
 	 * r0 = Pointer to L1 slot for vector_page (or NULL)
 	 * r1 = lwp0's DACR
-	 * r4 = lwp we're switching from
 	 * r5 = lwp0
 	 * r6 = exit func
 	 * r7 = lwp0's PCB
@@ -200,9 +197,15 @@
 	ldr	r13, [r7, #(PCB_SP)]
 #endif
 
-	mov	r0, #0x00000000		/* r5 = old lwp = NULL */
-	mov	r1, r5
-	b	.Lswitch_resume
+	/* We have a new curthread now so make a note it */
+	ldr	r6, .Lcurthread
+	str	r5, [r6]
+
+	/* Hook in a new pcb */
+	ldr	r6, .Lcurpcb
+	str	r7, [r6]
+
+	ldmfd	sp, {r4-r7, pc}
 
 ENTRY(cpu_switch)
 	stmfd	sp!, {r4-r7, lr}
@@ -228,16 +231,6 @@
 	ldr	r2, [r1, #TD_PCB]
 	str	r2, [r7]
 
-
-	/*
-	 * If the old lwp on entry to cpu_switch was zero then the
-	 * process that called it was exiting. This means that we do
-	 * not need to save the current context. Instead we can jump
-	 * straight to restoring the context for the new process.
-	 */
-	teq	r0, #0x00000000
-	beq	.Lswitch_return
-
 	/* rem: r1 = new process */
 	/* rem: interrupts are enabled */
 
@@ -267,16 +260,15 @@
 
 	/* r1 now free! */
 
+        mrs	r3, cpsr
 	/*
-	 * This can be optimised... We know we want to go from SVC32
-	 * mode to UND32 mode
+	 * We can do that, since 
+	 * PSR_SVC32_MODE|PSR_UND32_MODE == MSR_UND32_MODE
 	 */
-        mrs	r3, cpsr
-	bic	r2, r3, #(PSR_MODE)
-	orr	r2, r2, #(PSR_UND32_MODE)
-        msr	cpsr_c, r2
+	orr	r8, r3, #(PSR_UND32_MODE)
+        msr	cpsr_c, r8
 
-	str	sp, [r8, #(PCB_UND_SP)]
+	str	sp, [r2, #(PCB_UND_SP)]
 
         msr	cpsr_c, r3		/* Restore the old mode */
 	/* rem: r8 = old PCB */
@@ -378,6 +370,10 @@
 	movne	r0, #0			/* We *know* vector_page's VA is 0x0 */
 	movne	lr, pc
 	ldrne	pc, [r10, #CF_TLB_FLUSHID_SE]
+	/*
+	 * We can do that, since 
+	 * PSR_SVC32_MODE|PSR_UND32_MODE == MSR_UND32_MODE
+	 */
 
 .Lcs_context_switched:
 
@@ -385,14 +381,13 @@
 
 	/* rem: r9 = new PCB */
 
+        mrs	r3, cpsr
 	/*
-	 * This can be optimised... We know we want to go from SVC32
-	 * mode to UND32 mode
+	 * We can do that, since 
+	 * PSR_SVC32_MODE|PSR_UND32_MODE == MSR_UND32_MODE
 	 */
-        mrs	r3, cpsr
-	bic	r2, r3, #(PSR_MODE)
-	orr	r2, r2, #(PSR_UND32_MODE)
-        msr	cpsr_c, r2
+	orr	r2, r3, #(PSR_UND32_MODE)
+	msr	cpsr_c, r2
 
 	ldr	sp, [r9, #(PCB_UND_SP)]
 

==== //depot/projects/wifi/sys/arm/arm/trap.c#7 (text+ko) ====

@@ -82,7 +82,7 @@
 #include "opt_ktrace.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.7 2004/12/11 23:54:03 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.8 2004/12/11 23:56:03 cognet Exp $");
 
 #include <sys/types.h>
 
@@ -921,43 +921,43 @@
 		td->td_retval[1] = 0;
 		error = (*callp->sy_call)(td, args);
 	}
-	  switch (error) {
-	  case 0: 
-		  frame->tf_r0 = td->td_retval[0];
-		  frame->tf_r1 = td->td_retval[1];
-		  
-		  frame->tf_spsr &= ~PSR_C_bit;   /* carry bit */
-		  break;
-		  
-	  case ERESTART:
-		  /*
- 		   * Reconstruct the pc to point at the swi.
-		   */
-		  frame->tf_pc -= INSN_SIZE;
-		  break;
-	  case EJUSTRETURN:                                       
-		  /* nothing to do */  
-		  break;
-	  default:
+	switch (error) {
+	case 0: 
+      		frame->tf_r0 = td->td_retval[0];
+		frame->tf_r1 = td->td_retval[1];
+		
+		frame->tf_spsr &= ~PSR_C_bit;   /* carry bit */
+		break;
+		
+	case ERESTART:
+		/*
+		 * Reconstruct the pc to point at the swi.
+		 */
+		frame->tf_pc -= INSN_SIZE;
+		break;
+	case EJUSTRETURN:                                       
+		/* nothing to do */  
+		break;
+	default:
 bad:
-		  frame->tf_r0 = error;
-		  frame->tf_spsr |= PSR_C_bit;    /* carry bit */
-		  break;
-	  }
-	  if (locked && (callp->sy_narg & SYF_MPSAFE) == 0)
-		  mtx_unlock(&Giant);
-	  
-	  
-	  userret(td, frame, sticks);
-	  CTR4(KTR_SYSC, "syscall exit thread %p pid %d proc %s code %d", td,
-	      td->td_proc->p_pid, td->td_proc->p_comm, code);
-
+		frame->tf_r0 = error;
+		frame->tf_spsr |= PSR_C_bit;    /* carry bit */
+		break;
+	}
+	if (locked && (callp->sy_narg & SYF_MPSAFE) == 0)
+		mtx_unlock(&Giant);
+	
+	
+	userret(td, frame, sticks);
+	CTR4(KTR_SYSC, "syscall exit thread %p pid %d proc %s code %d", td,
+	    td->td_proc->p_pid, td->td_proc->p_comm, code);
+	
 #ifdef KTRACE
-	  if (KTRPOINT(td, KTR_SYSRET))
-		  ktrsysret(code, error, td->td_retval[0]);
+      	if (KTRPOINT(td, KTR_SYSRET))
+		ktrsysret(code, error, td->td_retval[0]);
 #endif
-	  mtx_assert(&sched_lock, MA_NOTOWNED);
-	  mtx_assert(&Giant, MA_NOTOWNED);
+	mtx_assert(&sched_lock, MA_NOTOWNED);
+	mtx_assert(&Giant, MA_NOTOWNED);
 }
 
 void

==== //depot/projects/wifi/sys/conf/files.i386#7 (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.510 2004/12/08 18:20:52 sam Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.511 2004/12/12 20:05:49 imp Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -168,6 +168,8 @@
 dev/lnc/if_lnc_isa.c		optional	lnc isa
 dev/io/iodev.c			optional	io
 dev/mem/memutil.c		optional	mem
+dev/mse/mse.c			optional	mse
+dev/mse/mse_isa.c		optional	mse isa
 dev/ppc/ppc.c			optional	ppc
 dev/ppc/ppc_puc.c		optional	ppc puc pci
 dev/random/nehemiah.c		optional	random
@@ -290,7 +292,6 @@
 i386/isa/if_el.c		optional	el
 i386/isa/isa.c			optional	isa
 i386/isa/isa_dma.c		optional	isa
-i386/isa/mse.c			optional	mse
 i386/isa/nmi.c			standard
 i386/isa/npx.c			optional	npx
 i386/isa/pcf.c			optional	pcf

==== //depot/projects/wifi/sys/conf/files.pc98#3 (text+ko) ====

@@ -3,7 +3,7 @@
 #
 # modified for PC-9801
 #
-# $FreeBSD: src/sys/conf/files.pc98,v 1.307 2004/11/23 00:00:43 imp Exp $
+# $FreeBSD: src/sys/conf/files.pc98,v 1.308 2004/12/12 20:05:49 imp Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -111,6 +111,8 @@
 dev/lnc/if_lnc_cbus.c		optional	lnc isa
 dev/io/iodev.c			optional	io
 dev/mem/memutil.c		optional	mem
+dev/mse/mse.c			optional	mse
+dev/mse/mse_cbus.c		optional	mse isa
 dev/ppc/ppc_puc.c		optional	ppc puc pci
 dev/sbni/if_sbni.c		optional	sbni
 dev/sbni/if_sbni_pci.c		optional	sbni pci
@@ -332,7 +334,6 @@
 pc98/pc98/fd.c			optional	fdc
 pc98/pc98/fdc_cbus.c		optional	fdc isa
 pc98/pc98/isa_dma.c		optional	isa
-pc98/pc98/mse.c			optional	mse
 pc98/pc98/nmi.c			standard
 pc98/pc98/olpt.c		optional	olpt
 pc98/pc98/pc98gdc.c		optional	gdc

==== //depot/projects/wifi/sys/dev/acpi_support/acpi_ibm.c#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpi_support/acpi_ibm.c,v 1.1 2004/12/09 13:54:29 takawata Exp $
+ *	$FreeBSD: src/sys/dev/acpi_support/acpi_ibm.c,v 1.2 2004/12/13 03:22:11 scottl Exp $
  */
 
 #include "opt_acpi.h"
@@ -38,6 +38,9 @@
 #include <sys/sysctl.h>
 #include <machine/clock.h>
 
+#define _COMPONENT	ACPI_IBM
+ACPI_MODULE_NAME("IBM")
+
 #define IBM_RTC_MISCKEY 0x65
 #define IBM_RTC_BRIGHTNESS 0x6c
 #define   IBM_RTC_MASK_BRI 0x7
@@ -252,6 +255,8 @@
 static int
 acpi_ibm_detach(device_t dev)
 {
+	ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__);
+
 	struct acpi_ibm_softc *sc = device_get_softc(dev);
 	acpi_SetInteger(acpi_get_handle(dev), IBM_NAME_ENABLE, 0);
 	acpi_ibm_enable_mask(dev, sc->ibm_initialmask);

==== //depot/projects/wifi/sys/dev/acpica/acpivar.h#2 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.83 2004/10/08 17:56:47 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.84 2004/12/13 03:22:11 scottl Exp $
  */
 
 #include "acpi_if.h"
@@ -152,6 +152,7 @@
 #define	ACPI_THERMAL		0x01000000
 #define	ACPI_TIMER		0x02000000
 #define	ACPI_ASUS		0x04000000
+#define	ACPI_IBM		0x08000000
 
 /*
  * Constants for different interrupt models used with acpi_SetIntrModel().

==== //depot/projects/wifi/sys/dev/ata/atapi-cd.c#2 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.171 2004/08/24 10:39:00 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.172 2004/12/12 10:09:04 phk Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -63,7 +63,7 @@
 static void lba2msf(u_int32_t, u_int8_t *, u_int8_t *, u_int8_t *);
 static u_int32_t msf2lba(u_int8_t, u_int8_t, u_int8_t);
 static int acd_geom_access(struct g_provider *, int, int, int);
-static int acd_geom_ioctl(struct g_provider *, u_long, void *, struct thread *);
+static g_ioctl_t acd_geom_ioctl;
 static void acd_geom_start(struct bio *);
 static void acd_done(struct ata_request *);
 static void acd_read_toc(struct acd_softc *);
@@ -550,7 +550,7 @@
 }
 
 static int 
-acd_geom_ioctl(struct g_provider *pp, u_long cmd, void *addr, struct thread *td)
+acd_geom_ioctl(struct g_provider *pp, u_long cmd, void *addr, int fflag, struct thread *td)
 {
     struct acd_softc *cdp = pp->geom->softc;
     int error = 0;

==== //depot/projects/wifi/sys/dev/fdc/fdc.c#5 (text+ko) ====

@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.303 2004/11/21 16:25:21 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.304 2004/12/12 10:09:04 phk Exp $");
 
 #include "opt_fdc.h"
 
@@ -1407,7 +1407,7 @@
 }
 
 static int
-fd_ioctl(struct g_provider *pp, u_long cmd, void *data, struct thread *td)
+fd_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td)
 {
 	struct fd_data *fd;
 	struct fdc_status *fsp;
@@ -1422,6 +1422,8 @@
 		return (0);
 
 	case FD_STYPE:                  /* set drive type */
+		if (!fflag & FWRITE)
+			return (EPERM);
 		/*
 		 * Allow setting drive type temporarily iff
 		 * currently unset.  Used for fdformat so any
@@ -1443,6 +1445,8 @@
 		return (0);
 
 	case FD_SOPTS:			/* set drive options */
+		if (!fflag & FWRITE)
+			return (EPERM);
 		fd->options = *(int *)data;
 		return (0);
 
@@ -1464,6 +1468,8 @@
 		return (0);
 
 	case FD_FORM:
+		if (!fflag & FWRITE)
+			return (EPERM);
 		if (((struct fd_formb *)data)->format_version !=
 		    FD_FORMAT_VERSION)
 			return (EINVAL); /* wrong version of formatting prog */

==== //depot/projects/wifi/sys/dev/hme/if_hme_pci.c#3 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.16 2004/11/22 06:46:30 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.17 2004/12/12 00:32:51 marius Exp $");
 
 /*
  * PCI front-end device driver for the HME ethernet device.
@@ -157,22 +157,14 @@
 		PCI_PRODUCT_SUN_HMENETWORK >> 8
 	};
 #define	PROMDATA_PTR_VPD	0x08
-#define	PROMDATA_DATA2		0x0a
-	static const uint8_t promdat2[] = {
-		0x18, 0x00,		/* structure length */
-		0x00,			/* structure revision */
-		0x00,			/* interface revision */
-		PCIS_NETWORK_ETHERNET,	/* subclass code */
-		PCIC_NETWORK		/* class code */
-	};
-#define	PCI_VPDRES_ISLARGE(x)			((x) & 0x80)
-#define	PCI_VPDRES_LARGE_NAME(x)		((x) & 0x7f)
-#define	PCI_VPDRES_TYPE_VPD			0x10	/* large */
 	struct pci_vpd {
 		 uint8_t	vpd_key0;
 		 uint8_t	vpd_key1;
 		 uint8_t	vpd_len;
 	} *vpd;
+#define	PCI_VPDRES_ISLARGE(x)			((x) & 0x80)
+#define	PCI_VPDRES_LARGE_NAME(x)		((x) & 0x7f)
+#define	PCI_VPDRES_TYPE_VPD			0x10	/* large */
 #endif
 
 	pci_enable_busmaster(dev);
@@ -299,7 +291,6 @@
 	/* Read PCI expansion PROM data. */
 	bus_space_read_region_1(romt, romh, dataoff, buf, sizeof(buf));
 	if (memcmp(buf, promdat, sizeof(promdat)) != 0 ||
-	    memcmp(buf + PROMDATA_DATA2, promdat2, sizeof(promdat2)) != 0 ||
 	    (vpdoff = (buf[PROMDATA_PTR_VPD] |
 	    (buf[PROMDATA_PTR_VPD + 1] << 8))) < 0x1c) {
 		device_printf(dev, "unexpected PCI expansion PROM data\n");
@@ -309,15 +300,22 @@
 
 	/*
 	 * Read PCI VPD.
-	 * The VPD of HME is not in PCI 2.2 standard format. The length in
-	 * the resource header is in big endian, and resources are not
-	 * properly terminated (only one resource and no end tag).
+	 * SUNW,hme cards have a single large resource VPD-R tag
+	 * containing one NA. SUNW,qfe cards have four large resource
+	 * VPD-R tags containing one NA each.
+	 * The VPD used on both cards is not in PCI 2.2 standard format
+	 * however. The length in the resource header is in big endian
+	 * and the end tag is non-standard (0x79) and followed by an
+	 * all-zero "checksum" byte. Sun calls this a "Fresh Choice
+	 * Ethernet" VPD...
 	 */
-	bus_space_read_region_1(romt, romh, vpdoff, buf, sizeof(buf));
+	bus_space_read_region_1(romt, romh,
+	    vpdoff + slot * (3 + sizeof(struct pci_vpd) + ETHER_ADDR_LEN),
+	    buf, sizeof(buf));
 	vpd = (void *)(buf + 3);
 	if (PCI_VPDRES_ISLARGE(buf[0]) == 0 ||
 	    PCI_VPDRES_LARGE_NAME(buf[0]) != PCI_VPDRES_TYPE_VPD ||
-	    /* buf[1] != 0 || buf[2] != 9 || */ /*len*/
+	    (buf[1] << 8 | buf[2]) != sizeof(struct pci_vpd) + ETHER_ADDR_LEN ||
 	    vpd->vpd_key0 != 0x4e /* N */ ||
 	    vpd->vpd_key1 != 0x41 /* A */ ||
 	    vpd->vpd_len != ETHER_ADDR_LEN) {
@@ -325,12 +323,13 @@
 		error = ENXIO;
 		goto fail_rres;
 	}
-	if (buf + 6 == NULL) {
+	if (buf + 3 + sizeof(struct pci_vpd) == NULL) {
 		device_printf(dev, "could not read network address\n");
 		error = ENXIO;
 		goto fail_rres;
 	}
-	bcopy(buf + 6, sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN);
+	bcopy(buf + 3 + sizeof(struct pci_vpd), sc->sc_arpcom.ac_enaddr,
+	    ETHER_ADDR_LEN);
 
 fail_rres:
 	bus_release_resource(ebus_dev, SYS_RES_MEMORY, ebus_rrid, ebus_rres);

==== //depot/projects/wifi/sys/dev/if_ndis/if_ndis.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.73 2004/12/10 00:59:27 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.74 2004/12/12 07:45:42 sam Exp $");
 
 #include "opt_bdg.h"
 
@@ -1811,6 +1811,7 @@
 			    "unknown nettype %d\n", arg);
 			break;
 		}
+		IEEE80211_ADDR_COPY(ic->ic_bss->ni_bssid, bs->nwbx_macaddr);
 		free(bs, M_TEMP);
 	} else
 		return;

==== //depot/projects/wifi/sys/dev/mse/mse.c#2 (text+ko) ====

@@ -1,4 +1,34 @@
 /*
+ * Copyright (c) 2004 M. Warner Losh
+ * 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,
+ *    without modification, immediately at the beginning of the file.
+ * 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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/dev/mse/mse.c,v 1.69 2004/12/12 20:05:49 imp Exp $
+ */
+
+/*
  * Copyright 1992 by the University of Guelph
  *
  * Permission to use, copy and modify this
@@ -11,10 +41,6 @@
  * this software for any purpose.  It is provided "as is"
  * without express or implied warranty.
  */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mse/mse.c,v 1.68 2004/06/16 09:47:08 phk Exp $");
-
 /*
  * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
  * the X386 port, courtesy of
@@ -57,7 +83,6 @@
 #include <sys/uio.h>
 #include <sys/mouse.h>
 
-#include <machine/bus_pio.h>
 #include <machine/bus.h>
 #include <machine/clock.h>
 #include <machine/resource.h>
@@ -65,75 +90,10 @@
 
 #include <isa/isavar.h>
 
-/* driver configuration flags (config) */
-#define MSE_CONFIG_ACCEL	0x00f0  /* acceleration factor */
-#define MSE_CONFIG_FLAGS	(MSE_CONFIG_ACCEL)
+#include <dev/mse/msevar.h>
 
-/*
- * Software control structure for mouse. The sc_enablemouse(),
- * sc_disablemouse() and sc_getmouse() routines must be called spl'd().
- */
-typedef struct mse_softc {
-	int		sc_flags;
-	int		sc_mousetype;
-	struct selinfo	sc_selp;
-	struct resource	*sc_port;
-	struct resource	*sc_intr;
-	bus_space_tag_t	sc_iot;
-	bus_space_handle_t sc_ioh;
-	void		*sc_ih;
-	void		(*sc_enablemouse)(bus_space_tag_t t,
-			    bus_space_handle_t h);
-	void		(*sc_disablemouse)(bus_space_tag_t t,
-			    bus_space_handle_t h);
-	void		(*sc_getmouse)(bus_space_tag_t t, bus_space_handle_t h,
-			    int *dx, int *dy, int *but);
-	int		sc_deltax;
-	int		sc_deltay;
-	int		sc_obuttons;
-	int		sc_buttons;
-	int		sc_bytesread;
-	u_char		sc_bytes[MOUSE_SYS_PACKETSIZE];
-	struct		callout_handle sc_callout;
-	int		sc_watchdog;
-	struct cdev *sc_dev;
-	struct cdev *sc_ndev;
-	mousehw_t	hw;
-	mousemode_t	mode;
-	mousestatus_t	status;
-} mse_softc_t;
-
-static	devclass_t	mse_devclass;
-
-static	int		mse_probe(device_t dev);
-static	int		mse_attach(device_t dev);
-static	int		mse_detach(device_t dev);
-
-static	device_method_t	mse_methods[] = {
-	DEVMETHOD(device_probe,		mse_probe),
-	DEVMETHOD(device_attach,	mse_attach),
-	DEVMETHOD(device_detach,	mse_detach),
-	{ 0, 0 }
-};
-
-static	driver_t	mse_driver = {
-	"mse",
-	mse_methods,
-	sizeof(mse_softc_t),
-};
-
-DRIVER_MODULE(mse, isa, mse_driver, mse_devclass, 0, 0);
+devclass_t	mse_devclass;
 
-static struct isa_pnp_id mse_ids[] = {
-	{ 0x000fd041, "Bus mouse" },			/* PNP0F00 */
-	{ 0x020fd041, "InPort mouse" },			/* PNP0F02 */
-	{ 0x0d0fd041, "InPort mouse compatible" },	/* PNP0F0D */
-	{ 0x110fd041, "Bus mouse compatible" },		/* PNP0F11 */
-	{ 0x150fd041, "Logitech bus mouse" },		/* PNP0F15 */
-	{ 0x180fd041, "Logitech bus mouse compatible" },/* PNP0F18 */
-	{ 0 }
-};
-
 static	d_open_t	mseopen;
 static	d_close_t	mseclose;
 static	d_read_t	mseread;
@@ -154,191 +114,27 @@
 static	void		mseintr(void *);
 static	timeout_t	msetimeout;
 
-/* Flags */
-#define	MSESC_OPEN	0x1
-#define	MSESC_WANT	0x2
-
-/* and Mouse Types */
-#define	MSE_NONE	0	/* don't move this! */
-#define	MSE_LOGITECH	0x1
-#define	MSE_ATIINPORT	0x2
-#define	MSE_LOGI_SIG	0xA5
-
-#define	MSE_PORTA	0
-#define	MSE_PORTB	1
-#define	MSE_PORTC	2
-#define	MSE_PORTD	3
-#define MSE_IOSIZE	4
-
 #define	MSE_UNIT(dev)		(minor(dev) >> 1)
 #define	MSE_NBLOCKIO(dev)	(minor(dev) & 0x1)
 
-/*
- * Logitech bus mouse definitions
- */
-#define	MSE_SETUP	0x91	/* What does this mean? */
-				/* The definition for the control port */
-				/* is as follows: */
-
-				/* D7 	 =  Mode set flag (1 = active) 	*/
-				/* D6,D5 =  Mode selection (port A) 	*/
-				/* 	    00 = Mode 0 = Basic I/O 	*/
-				/* 	    01 = Mode 1 = Strobed I/O 	*/
-				/* 	    10 = Mode 2 = Bi-dir bus 	*/
-				/* D4	 =  Port A direction (1 = input)*/
-				/* D3	 =  Port C (upper 4 bits) 	*/
-				/*	    direction. (1 = input)	*/

>>> TRUNCATED FOR MAIL (1000 lines) <<<



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