PERFORCE change 106890 for review

Roman Divacky rdivacky at FreeBSD.org
Fri Sep 29 07:06:22 PDT 2006


http://perforce.freebsd.org/chv.cgi?CH=106890

Change 106890 by rdivacky at rdivacky_witten on 2006/09/29 14:05:26

	IFC
	
	Note: p4 told me that I have a conflict in linux_aio.c I didnt find anything
	and just accepted that. diff shows no difference between what I have and what
	was in repo before this commit.

Affected files ...

.. //depot/projects/linuxolator/src/sys/amd64/amd64/local_apic.c#3 integrate
.. //depot/projects/linuxolator/src/sys/amd64/conf/GENERIC#2 integrate
.. //depot/projects/linuxolator/src/sys/boot/common/merge_help.awk#2 integrate
.. //depot/projects/linuxolator/src/sys/boot/ficl/Makefile#2 integrate
.. //depot/projects/linuxolator/src/sys/boot/i386/Makefile.inc#2 integrate
.. //depot/projects/linuxolator/src/sys/boot/i386/btx/btx/btx.S#2 integrate
.. //depot/projects/linuxolator/src/sys/boot/i386/libi386/biossmap.c#2 integrate
.. //depot/projects/linuxolator/src/sys/boot/i386/loader/help.i386#2 integrate
.. //depot/projects/linuxolator/src/sys/boot/pc98/boot2/inode.h#2 integrate
.. //depot/projects/linuxolator/src/sys/bsm/audit_kevents.h#3 integrate
.. //depot/projects/linuxolator/src/sys/conf/NOTES#3 integrate
.. //depot/projects/linuxolator/src/sys/conf/files#3 integrate
.. //depot/projects/linuxolator/src/sys/conf/options#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/acpica/Osd/OsdHardware.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/ata/ata-chipset.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/atkbdc/atkbd.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/digi/digi.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/em/if_em.c#4 integrate
.. //depot/projects/linuxolator/src/sys/dev/exca/exca.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/ipmi/ipmi.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/isp/isp_freebsd.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/isp/isp_freebsd.h#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/kbdmux/kbdmux.c#4 integrate
.. //depot/projects/linuxolator/src/sys/dev/mfi/mfi.c#4 integrate
.. //depot/projects/linuxolator/src/sys/dev/mfi/mfi_debug.c#1 branch
.. //depot/projects/linuxolator/src/sys/dev/mfi/mfivar.h#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/smbus/smb.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/sound/midi/sequencer.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/sound/pcm/ac97.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/sound/pcm/ac97_patch.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/sound/pcm/ac97_patch.h#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/sound/pcm/channel.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/sound/pcm/dsp.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/sound/pcm/mixer.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/sound/pcm/mixer.h#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/sound/pcm/sound.h#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/sound/usb/uaudio_pcm.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/syscons/scvidctl.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/syscons/syscons.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/uart/uart_kbd_sun.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/usb/ukbd.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/vkbd/vkbd.c#2 integrate
.. //depot/projects/linuxolator/src/sys/fs/devfs/devfs_vfsops.c#3 integrate
.. //depot/projects/linuxolator/src/sys/fs/hpfs/hpfs_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/fs/msdosfs/msdosfs_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/fs/ntfs/ntfs_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/fs/nullfs/null_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/fs/nwfs/nwfs_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/fs/portalfs/portal_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/fs/procfs/procfs_ioctl.c#2 integrate
.. //depot/projects/linuxolator/src/sys/fs/smbfs/smbfs_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/fs/udf/udf_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/fs/umapfs/umap_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/fs/unionfs/union_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/gnu/fs/ext2fs/ext2_inode.c#2 integrate
.. //depot/projects/linuxolator/src/sys/gnu/fs/ext2fs/ext2_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/gnu/fs/reiserfs/reiserfs_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/i386/conf/GENERIC#2 integrate
.. //depot/projects/linuxolator/src/sys/i386/i386/busdma_machdep.c#3 integrate
.. //depot/projects/linuxolator/src/sys/i386/i386/local_apic.c#3 integrate
.. //depot/projects/linuxolator/src/sys/ia64/conf/GENERIC#2 integrate
.. //depot/projects/linuxolator/src/sys/isofs/cd9660/cd9660_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/kern/init_main.c#2 integrate
.. //depot/projects/linuxolator/src/sys/kern/kern_descrip.c#2 integrate
.. //depot/projects/linuxolator/src/sys/kern/kern_event.c#2 integrate
.. //depot/projects/linuxolator/src/sys/kern/kern_proc.c#4 integrate
.. //depot/projects/linuxolator/src/sys/kern/sys_generic.c#2 integrate
.. //depot/projects/linuxolator/src/sys/kern/tty_pts.c#2 integrate
.. //depot/projects/linuxolator/src/sys/kern/tty_pty.c#3 integrate
.. //depot/projects/linuxolator/src/sys/kern/tty_tty.c#3 integrate
.. //depot/projects/linuxolator/src/sys/kern/uipc_mqueue.c#2 integrate
.. //depot/projects/linuxolator/src/sys/kern/vfs_aio.c#4 integrate
.. //depot/projects/linuxolator/src/sys/kern/vfs_cluster.c#2 integrate
.. //depot/projects/linuxolator/src/sys/kern/vfs_export.c#2 integrate
.. //depot/projects/linuxolator/src/sys/kern/vfs_mount.c#3 integrate
.. //depot/projects/linuxolator/src/sys/kern/vfs_subr.c#2 integrate
.. //depot/projects/linuxolator/src/sys/kern/vfs_syscalls.c#3 integrate
.. //depot/projects/linuxolator/src/sys/modules/digi/digi/Makefile#2 integrate
.. //depot/projects/linuxolator/src/sys/modules/if_tap/Makefile#2 integrate
.. //depot/projects/linuxolator/src/sys/modules/kbdmux/Makefile#2 integrate
.. //depot/projects/linuxolator/src/sys/modules/libalias/Makefile#2 integrate
.. //depot/projects/linuxolator/src/sys/modules/libalias/libalias/Makefile#1 branch
.. //depot/projects/linuxolator/src/sys/modules/libalias/modules/Makefile#1 branch
.. //depot/projects/linuxolator/src/sys/modules/libalias/modules/Makefile.inc#1 branch
.. //depot/projects/linuxolator/src/sys/modules/libalias/modules/cuseeme/Makefile#1 branch
.. //depot/projects/linuxolator/src/sys/modules/libalias/modules/dummy/Makefile#1 branch
.. //depot/projects/linuxolator/src/sys/modules/libalias/modules/ftp/Makefile#1 branch
.. //depot/projects/linuxolator/src/sys/modules/libalias/modules/irc/Makefile#1 branch
.. //depot/projects/linuxolator/src/sys/modules/libalias/modules/modules.inc#1 branch
.. //depot/projects/linuxolator/src/sys/modules/libalias/modules/nbt/Makefile#1 branch
.. //depot/projects/linuxolator/src/sys/modules/libalias/modules/pptp/Makefile#1 branch
.. //depot/projects/linuxolator/src/sys/modules/libalias/modules/skinny/Makefile#1 branch
.. //depot/projects/linuxolator/src/sys/modules/libalias/modules/smedia/Makefile#1 branch
.. //depot/projects/linuxolator/src/sys/modules/mfi/Makefile#2 integrate
.. //depot/projects/linuxolator/src/sys/modules/procfs/Makefile#2 integrate
.. //depot/projects/linuxolator/src/sys/modules/ukbd/Makefile#2 integrate
.. //depot/projects/linuxolator/src/sys/modules/vkbd/Makefile#2 integrate
.. //depot/projects/linuxolator/src/sys/modules/wlan/Makefile#2 integrate
.. //depot/projects/linuxolator/src/sys/net/if_tap.c#2 integrate
.. //depot/projects/linuxolator/src/sys/net/if_tap.h#2 integrate
.. //depot/projects/linuxolator/src/sys/net80211/ieee80211_ioctl.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/in.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/in_var.h#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/ip_carp.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/ip_mroute.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/ip_output.c#3 integrate
.. //depot/projects/linuxolator/src/sys/netinet/ip_var.h#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias.h#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_cuseeme.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_db.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_dummy.c#1 branch
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_ftp.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_irc.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_local.h#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_mod.c#1 branch
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_mod.h#1 branch
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_nbt.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_old.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_pptp.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_proxy.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_skinny.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_smedia.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/alias_util.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/libalias/libalias.3#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/tcp_input.c#4 integrate
.. //depot/projects/linuxolator/src/sys/netinet/tcp_output.c#3 integrate
.. //depot/projects/linuxolator/src/sys/netinet/tcp_subr.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/tcp_timer.h#2 integrate
.. //depot/projects/linuxolator/src/sys/nfsclient/nfs_vfsops.c#3 integrate
.. //depot/projects/linuxolator/src/sys/nfsclient/nfs_vnops.c#3 integrate
.. //depot/projects/linuxolator/src/sys/pc98/cbus/pckbd.c#2 integrate
.. //depot/projects/linuxolator/src/sys/pc98/conf/GENERIC#2 integrate
.. //depot/projects/linuxolator/src/sys/pci/agp_i810.c#2 integrate
.. //depot/projects/linuxolator/src/sys/powerpc/conf/GENERIC#2 integrate
.. //depot/projects/linuxolator/src/sys/security/audit/audit_worker.c#4 integrate
.. //depot/projects/linuxolator/src/sys/sparc64/conf/GENERIC#2 integrate
.. //depot/projects/linuxolator/src/sys/sys/consio.h#2 integrate
.. //depot/projects/linuxolator/src/sys/sys/copyright.h#2 integrate
.. //depot/projects/linuxolator/src/sys/sys/digiio.h#2 integrate
.. //depot/projects/linuxolator/src/sys/sys/event.h#2 integrate
.. //depot/projects/linuxolator/src/sys/sys/ioccom.h#2 integrate
.. //depot/projects/linuxolator/src/sys/sys/kbio.h#2 integrate
.. //depot/projects/linuxolator/src/sys/sys/mount.h#3 integrate
.. //depot/projects/linuxolator/src/sys/sys/param.h#3 integrate
.. //depot/projects/linuxolator/src/sys/sys/pioctl.h#2 integrate
.. //depot/projects/linuxolator/src/sys/sys/ttycom.h#2 integrate
.. //depot/projects/linuxolator/src/sys/ufs/ffs/ffs_snapshot.c#2 integrate
.. //depot/projects/linuxolator/src/sys/ufs/ffs/ffs_softdep.c#3 integrate
.. //depot/projects/linuxolator/src/sys/ufs/ffs/ffs_vfsops.c#2 integrate
.. //depot/projects/linuxolator/src/sys/ufs/ufs/inode.h#2 integrate
.. //depot/projects/linuxolator/src/sys/ufs/ufs/ufs_quota.c#3 integrate
.. //depot/projects/linuxolator/src/sys/vm/vm_page.c#2 integrate

Differences ...

==== //depot/projects/linuxolator/src/sys/amd64/amd64/local_apic.c#3 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.29 2006/09/11 20:12:42 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.31 2006/09/27 22:09:35 sobomax Exp $");
 
 #include "opt_hwpmc_hooks.h"
 
@@ -613,13 +613,17 @@
 	/* Send EOI first thing. */
 	lapic_eoi();
 
-#ifdef SMP
+#if defined(SMP) && !defined(SCHED_ULE)
 	/*
 	 * Don't do any accounting for the disabled HTT cores, since it
 	 * will provide misleading numbers for the userland.
 	 *
 	 * No locking is necessary here, since even if we loose the race
 	 * when hlt_cpus_mask changes it is not a big deal, really.
+	 *
+	 * Don't do that for ULE, since ULE doesn't consider hlt_cpus_mask
+	 * and unlike other schedulers it actually schedules threads to
+	 * those CPUs.
 	 */
 	if ((hlt_cpus_mask & (1 << PCPU_GET(cpuid))) != 0)
 		return;

==== //depot/projects/linuxolator/src/sys/amd64/conf/GENERIC#2 (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.464 2006/07/09 16:39:21 mjacob Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.465 2006/09/26 12:36:33 ru Exp $
 
 cpu		HAMMER
 ident		GENERIC
@@ -49,6 +49,7 @@
 options 	COMPAT_IA32		# Compatible with i386 binaries
 options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
+options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
 options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
 options 	KTRACE			# ktrace(1) support
 options 	SYSVSHM			# SYSV-style shared memory

==== //depot/projects/linuxolator/src/sys/boot/common/merge_help.awk#2 (text+ko) ====

@@ -1,6 +1,6 @@
 #!/usr/bin/awk -f
 #
-# $FreeBSD: src/sys/boot/common/merge_help.awk,v 1.5 2001/11/07 17:53:25 fenner Exp $
+# $FreeBSD: src/sys/boot/common/merge_help.awk,v 1.6 2006/09/28 19:06:20 jhb Exp $
 #
 # Merge two boot loader help files for FreeBSD 3.0
 # Joe Abley <jabley at patho.gen.nz>
@@ -25,9 +25,12 @@
   match($0, " T[[:graph:]]+");
   T = substr($0, RSTART + 2, RLENGTH - 2);
   match($0, " S[[:graph:]]+");
+  SSTART = RSTART
   S = (RLENGTH == -1) ? "" : substr($0, RSTART + 2, RLENGTH - 2);
   match($0, " D[[:graph:]][[:print:]]*$");
   D = substr($0, RSTART + 2);
+  if (SSTART > RSTART)
+    S = "";
 
   # find a suitable place to store this one...
   ind++;

==== //depot/projects/linuxolator/src/sys/boot/ficl/Makefile#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/ficl/Makefile,v 1.43 2006/05/12 04:07:42 jhb Exp $
+# $FreeBSD: src/sys/boot/ficl/Makefile,v 1.44 2006/09/28 10:02:03 ru Exp $
 #
 .PATH: ${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/}
 BASE_SRCS=	dict.c ficl.c fileaccess.c float.c loader.c math64.c \
@@ -42,7 +42,7 @@
 #SOFTWORDS+=	oo.fr classes.fr
 
 .if ${MACHINE_ARCH} == "amd64"
-CFLAGS+=	-m32 -I.
+CFLAGS+=	-m32 -march=i386 -I.
 .endif
 
 CFLAGS+=	-I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/} \

==== //depot/projects/linuxolator/src/sys/boot/i386/Makefile.inc#2 (text+ko) ====

@@ -1,6 +1,6 @@
 # Common defines for all of /sys/boot/i386/
 #
-# $FreeBSD: src/sys/boot/i386/Makefile.inc,v 1.11 2005/07/15 12:22:14 ache Exp $
+# $FreeBSD: src/sys/boot/i386/Makefile.inc,v 1.12 2006/09/28 10:02:04 ru Exp $
 
 BINDIR?=	/boot
 
@@ -10,7 +10,7 @@
 LDFLAGS+=	-nostdlib
 
 .if ${MACHINE_ARCH} == "amd64"
-CFLAGS+=	-m32
+CFLAGS+=	-m32 -march=i386
 LDFLAGS+=	-m elf_i386_fbsd
 AFLAGS+=	--32
 .endif

==== //depot/projects/linuxolator/src/sys/boot/i386/btx/btx/btx.S#2 (text+ko) ====

@@ -12,7 +12,7 @@
  * warranties of merchantability and fitness for a particular
  * purpose.
  *
- * $FreeBSD: src/sys/boot/i386/btx/btx/btx.S,v 1.38 2004/11/24 14:54:33 jhb Exp $
+ * $FreeBSD: src/sys/boot/i386/btx/btx/btx.S,v 1.42 2006/09/28 19:42:10 jhb Exp $
  */
 
 /*
@@ -208,7 +208,7 @@
 #ifdef PAGING
 		or $0x80000001,%eax             #  mode and enable paging
 #else
-		or $0x01,%eax			#  mode
+		inc %ax				#  mode
 #endif
 		mov %eax,%cr0			#
 		ljmp $SEL_SCODE,$init.8		# To 32-bit code
@@ -493,9 +493,7 @@
 		je v86wrmsr			# Yes
 		cmpb $0x32,(%esi)		# Is it a RDMSR?
 		je v86rdmsr			# Yes
-		cmpb $0x20,(%esi)		# Is this a
-		jne v86mon.4			#  MOV EAX,CR0
-		cmpb $0xc0,0x1(%esi)		#  instruction?
+		cmpb $0x20,(%esi)		# Is this a MOV reg,CRx?
 		je v86mov			# Yes
 v86mon.4:	cmpb $0xfa,%al			# CLI?
 		je v86cli			# Yes
@@ -527,10 +525,24 @@
 		leal 0x8(%esp,1),%esp		# Discard int no, error
 		iret				# To V86 mode
 /*
- * Emulate MOV EAX,CR0.
+ * Emulate MOV reg,CRx.
  */
-v86mov: 	movl %cr0,%eax			# CR0 to
-		movl %eax,0x1c(%ebp)		#  saved EAX
+v86mov: 	movb 0x1(%esi),%bl		# Fetch Mod R/M byte
+		testb $0x10,%bl			# Read CR2 or CR3?
+		jnz v86mov.1			# Yes
+		movl %cr0,%eax			# Read CR0
+		testb $0x20,%bl			# Read CR4 instead?
+		jz v86mov.2			# No
+		movl %cr4,%eax			# Read CR4
+		jmp v86mov.2
+v86mov.1:	movl %cr2,%eax			# Read CR2
+		testb $0x08,%bl			# Read CR3 instead?
+		jz v86mov.2			# No
+		movl %cr3,%eax			# Read CR3
+v86mov.2:	andl $0x7,%ebx			# Compute offset in
+		shl $2,%ebx			#  frame of destination
+		neg %ebx			#  register
+		movl %eax,0x1c(%ebp,%ebx,1)	# Store CR to reg
 		incl %esi			# Adjust IP
 /*
  * Return from emulating a 0x0f prefixed instruction
@@ -606,41 +618,27 @@
  * reads count of words from saved %cx
  * returns success by setting %ah to 0
  */
-int15_87:	pushl %eax			# Save
-		pushl %ebx			#  some information
-		pushl %esi			#  onto the stack.
-		pushl %edi
-		xorl %eax,%eax			# clean EAX
-		xorl %ebx,%ebx			# clean EBX
-		movl 0x4(%ebp),%esi		# Get user's ESI
-		movl 0x3C(%ebp),%ebx		# store ES
-		movw %si,%ax			# store SI
-		shll $0x4,%ebx			# Make it a seg.
-		addl %eax,%ebx			# ebx=(es<<4)+si
-		movb 0x14(%ebx),%al		# Grab the
-		movb 0x17(%ebx),%ah		#  necessary
-		shll $0x10,%eax			#  information
-		movw 0x12(%ebx),%ax		#  from
-		movl %eax,%esi			#  the
-		movb 0x1c(%ebx),%al		#  GDT in order to
-		movb 0x1f(%ebx),%ah		#  have %esi offset
-		shll $0x10,%eax			#  of source and %edi
-		movw 0x1a(%ebx),%ax		#  of destination.
-		movl %eax,%edi
+int15_87:	pushl %esi			# Save 
+		pushl %edi			#  registers
+		movzwl 0x4(%ebp),%eax		# Load user's SI
+		movl 0x3C(%ebp),%edi		# Load ES
+		leal (%eax,%edi,4),%edi		# EDI = (ES << 4) + SI
+		movl 0x11(%edi),%eax		# Read base of
+		movb 0x17(%edi),%al		#  GDT entry
+		ror $8,%eax			#  for source
+		xchgl %eax,%esi			#  into %esi
+		movl 0x19(%edi),%eax		# Read base of
+		movb 0x1f(%edi),%al		#  GDT entry for
+		ror $8,%eax			#  destination
+		xchgl %eax,%edi			#  into %edi
 		pushl %ds			# Make:
 		popl %es			# es = ds
-		pushl %ecx			# stash ECX
-		xorl %ecx,%ecx			# highw of ECX is clear
-		movw 0x18(%ebp),%cx		# Get user's ECX
-		shll $0x1,%ecx			# Convert from num words to num
-						#  bytes
+		movzwl 0x18(%ebp),%ecx		# Get user's CX
+		shll $0x1,%ecx			# Convert count from words
 		rep				# repeat...
 		movsb				#  perform copy.
-		popl %ecx			# Restore
-		popl %edi
-		popl %esi			#  previous
-		popl %ebx			#  register
-		popl %eax			#  values.
+		popl %edi			# Restore
+		popl %esi			#  registers
 		movb $0x0,0x1d(%ebp)		# set ah = 0 to indicate
 						#  success
 		andb $0xfe,%dl			# clear CF
@@ -659,23 +657,16 @@
 		cmpb $0x19,%al			# is it int 19?
 		je reboot			#  yes, reboot the machine
 		cmpb $0x15,%al			# is it int 15?
-		jne v86intn.3			#  no, skip parse
-		pushl %eax                      # stash EAX
-		movl 0x1c(%ebp),%eax		# user's saved EAX
-		cmpb $0x87,%ah			# is it the memcpy subfunction?
-		jne v86intn.1			#  no, keep checking
-		popl %eax			# get the stack straight
-		jmp int15_87			# it's our cue
-v86intn.1:	cmpw $0x4f53,%ax		# is it the delete key callout?
-		jne v86intn.2			#  no, handle the int normally
-		movb BDA_KEYFLAGS,%al		# get the shift key state
-		andb $0xc,%al			# mask off just Ctrl and Alt
-		cmpb $0xc,%al			# are both Ctrl and Alt down?
-		jne v86intn.2			#  no, handle the int normally
-		popl %eax			# restore EAX
-		jmp reboot			# reboot the machine
-v86intn.2:	popl %eax			# restore EAX
-v86intn.3:	subl %edi,%esi			# From
+		jne v86intn.1			#  no, skip parse
+		cmpb $0x87,0x1d(%ebp)		# is it the memcpy subfunction?
+		je int15_87			#  yes
+		cmpw $0x4f53,0x1c(%ebp)		# is it the delete key callout?
+		jne v86intn.1			#  no, handle the int normally
+		movb BDA_KEYFLAGS,%ch		# get the shift key state
+		andb $0xc,%ch			# mask off just Ctrl and Alt
+		cmpb $0xc,%ch			# are both Ctrl and Alt down?
+		je reboot			# yes, reboot the machine
+v86intn.1:	subl %edi,%esi			# From
 		shrl $0x4,%edi			#  linear
 		movw %dx,-0x2(%ebx)		# Save flags
 		movw %di,-0x4(%ebx)		# Save CS
@@ -907,8 +898,7 @@
 dump.3: 	lodsl				# Set offset
 		xchgl %eax,%edx 		# Save
 		lodsl				# Get segment
-		shll $0x4,%eax			#  * 0x10
-		addl %edx,%eax			#  + offset
+		leal (%edx,%eax,4),%eax		#  * 0x10 + offset
 		xchgl %eax,%esi 		# Set pointer
 dump.4: 	movb $2,%dl			# Num lines
 dump.4a:	movb $0x10,%cl			# Bytes to dump

==== //depot/projects/linuxolator/src/sys/boot/i386/libi386/biossmap.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biossmap.c,v 1.4 2005/12/19 09:00:11 sobomax Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biossmap.c,v 1.5 2006/09/28 19:07:13 jhb Exp $");
 
 /*
  * Obtain memory configuration information from the BIOS
@@ -95,6 +95,7 @@
 			break;
 	} while (v86.ebx != 0 && smaplen < n);
 }
+
 void
 bios_addsmapdata(struct preloaded_file *kfp)
 {
@@ -105,3 +106,17 @@
 	len = smaplen * sizeof(*smapbase);
 	file_addmetadata(kfp, MODINFOMD_SMAP, len, smapbase);
 }
+
+COMMAND_SET(smap, "smap", "show BIOS SMAP", command_smap);
+
+static int
+command_smap(int argc, char *argv[])
+{
+	int i;
+
+	if (smapbase == 0 || smaplen == 0)
+		return;
+	for (i = 0; i < smaplen; i++)
+		printf("SMAP type=%02x base=%016llx len=%016llx\n",
+		    smapbase[i].type, smapbase[i].base, smapbase[i].length);
+}

==== //depot/projects/linuxolator/src/sys/boot/i386/loader/help.i386#2 (text+ko) ====

@@ -54,3 +54,10 @@
 	forced by setting this variable.
 
 ################################################################################
+# Tsmap DDisplay BIOS SMAP table
+
+	smap
+
+	Displays the BIOS SMAP (system memory map) table.
+
+################################################################################

==== //depot/projects/linuxolator/src/sys/boot/pc98/boot2/inode.h#2 (text+ko) ====

@@ -33,7 +33,7 @@
  *
  *	@(#)inode.h	8.9 (Berkeley) 5/14/95
  * %FreeBSD: src/sys/ufs/ufs/inode.h,v 1.28.2.2 2001/09/29 12:52:52 iedowse Exp %
- * $FreeBSD: src/sys/boot/pc98/boot2/inode.h,v 1.4 2004/06/16 18:21:22 phk Exp $
+ * $FreeBSD: src/sys/boot/pc98/boot2/inode.h,v 1.5 2006/09/26 04:15:57 tegge Exp $
  */
 
 #ifndef _UFS_UFS_INODE_H_
@@ -147,7 +147,7 @@
 
 /* Determine if soft dependencies are being done */
 #define DOINGSOFTDEP(vp)	((vp)->v_mount->mnt_flag & MNT_SOFTDEP)
-#define DOINGASYNC(vp)		((vp)->v_mount->mnt_flag & MNT_ASYNC)
+#define DOINGASYNC(vp)		((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC)
 
 /* This overlays the fid structure (see mount.h). */
 struct ufid {

==== //depot/projects/linuxolator/src/sys/bsm/audit_kevents.h#3 (text) ====

@@ -30,8 +30,8 @@
  *
  * @APPLE_BSD_LICENSE_HEADER_END@
  *
- * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#28 $
- * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.8 2006/09/21 07:27:02 rwatson Exp $
+ * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#29 $
+ * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.9 2006/09/25 12:22:07 rwatson Exp $
  */
 
 #ifndef _BSM_AUDIT_KEVENTS_H_
@@ -471,6 +471,10 @@
 #define	AUE_KENV		43114	/* FreeBSD. */
 #define	AUE_JAIL_ATTACH		43115	/* FreeBSD. */
 #define	AUE_SYSCTL_WRITE	43116	/* FreeBSD. */
+#define	AUE_IOPERM		43117	/* Linux. */
+#define	AUE_READDIR		43118	/* Linux. */
+#define	AUE_IOPL		43119	/* Linux. */
+#define	AUE_VM86		43120	/* Linux. */
 
 /*
  * Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the

==== //depot/projects/linuxolator/src/sys/conf/NOTES#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1381 2006/09/20 13:33:40 rwatson Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1383 2006/09/26 12:36:33 ru Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -273,6 +273,9 @@
 # Enable FreeBSD5 compatibility syscalls
 options 	COMPAT_FREEBSD5
 
+# Enable FreeBSD6 compatibility syscalls
+options 	COMPAT_FREEBSD6
+
 #
 # These three options provide support for System V Interface
 # Definition-style interprocess communication, in the form of shared
@@ -1544,6 +1547,7 @@
 device		mlx		# Mylex DAC960
 device		amr		# AMI MegaRAID
 device		mfi		# LSI MegaRAID SAS
+options		MFI_DEBUG
 
 #
 # 3ware ATA RAID

==== //depot/projects/linuxolator/src/sys/conf/files#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1142 2006/09/18 17:23:35 sam Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1144 2006/09/26 23:26:51 piso Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -713,6 +713,7 @@
 dev/md/md.c			optional md
 dev/mem/memdev.c		optional mem
 dev/mfi/mfi.c			optional mfi
+dev/mfi/mfi_debug.c		optional mfi
 dev/mfi/mfi_pci.c		optional mfi pci
 dev/mfi/mfi_disk.c		optional mfi
 dev/mfi/mfi_linux.c		optional mfi compat_linux
@@ -1743,16 +1744,11 @@
 netinet/tcp_usrreq.c		optional inet
 netinet/udp_usrreq.c		optional inet
 netinet/libalias/alias.c	optional libalias
-netinet/libalias/alias_cuseeme.c optional libalias
 netinet/libalias/alias_db.c	optional libalias
-netinet/libalias/alias_ftp.c	optional libalias
-netinet/libalias/alias_irc.c	optional libalias
-netinet/libalias/alias_nbt.c	optional libalias
-netinet/libalias/alias_pptp.c	optional libalias
 netinet/libalias/alias_proxy.c	optional libalias
-netinet/libalias/alias_skinny.c	optional libalias
-netinet/libalias/alias_smedia.c	optional libalias
 netinet/libalias/alias_util.c	optional libalias
+netinet/libalias/alias_old.c	optional libalias
+netinet/libalias/alias_mod.c	optional libalias
 netinet6/ah_aesxcbcmac.c	optional ipsec
 netinet6/ah_core.c		optional ipsec
 netinet6/ah_input.c		optional ipsec

==== //depot/projects/linuxolator/src/sys/conf/options#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.558 2006/09/20 13:33:40 rwatson Exp $
+# $FreeBSD: src/sys/conf/options,v 1.559 2006/09/26 12:36:33 ru Exp $
 #
 #        On the handling of kernel options
 #
@@ -67,6 +67,7 @@
 COMPAT_43TTY	opt_compat.h
 COMPAT_FREEBSD4	opt_compat.h
 COMPAT_FREEBSD5	opt_compat.h
+COMPAT_FREEBSD6	opt_compat.h
 COMPILING_LINT	opt_global.h
 CY_PCI_FASTINTR
 DIRECTIO

==== //depot/projects/linuxolator/src/sys/dev/acpica/Osd/OsdHardware.c#2 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/Osd/OsdHardware.c,v 1.20 2006/04/04 02:22:38 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/Osd/OsdHardware.c,v 1.21 2006/09/24 09:39:17 hrs Exp $");
 
 #include <contrib/dev/acpica/acpi.h>
 
@@ -126,7 +126,9 @@
 
     error = acpi_os_check_port(InPort, Width);
     if (error != 0) {
-	printf("acpi: bad read from port 0x%03x (%d)\n", (int)InPort, Width);
+	if (bootverbose)
+		printf("acpi: bad read from port 0x%03x (%d)\n",
+			(int)InPort, Width);
 	if (error == -1)
 	    return (AE_BAD_PARAMETER);
     }
@@ -159,8 +161,9 @@
 
     error = acpi_os_check_port(OutPort, Width);
     if (error != 0) {
-	printf("acpi: bad write to port 0x%03x (%d), val %#x\n", (int)OutPort,
-	    Width, Value);
+	if (bootverbose)
+		printf("acpi: bad write to port 0x%03x (%d), val %#x\n",
+			(int)OutPort, Width, Value);
 	if (error == -1)
 	    return (AE_BAD_PARAMETER);
     }

==== //depot/projects/linuxolator/src/sys/dev/ata/ata-chipset.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.175 2006/09/12 22:06:39 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.176 2006/09/25 11:26:29 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -985,6 +985,13 @@
 	ctlr->allocate = ata_ali_sata_allocate;
 	ctlr->setmode = ata_sata_setmode;
 
+	/* if we have a memory resource we can likely do AHCI */
+	ctlr->r_type2 = SYS_RES_MEMORY;
+	ctlr->r_rid2 = PCIR_BAR(5);
+	if ((ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,
+						   &ctlr->r_rid2, RF_ACTIVE)))
+	    return ata_ahci_chipinit(dev);
+
 	/* enable PCI interrupt */
 	pci_write_config(dev, PCIR_COMMAND,
 			 pci_read_config(dev, PCIR_COMMAND, 2) & ~0x0400, 2);

==== //depot/projects/linuxolator/src/sys/dev/atkbdc/atkbd.c#2 (text+ko) ====

@@ -26,8 +26,9 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbd.c,v 1.50 2006/05/17 09:33:07 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbd.c,v 1.51 2006/09/27 19:56:58 ru Exp $");
 
+#include "opt_compat.h"
 #include "opt_kbd.h"
 #include "opt_atkbd.h"
 
@@ -851,6 +852,10 @@
 	int error;
 	int s;
 	int i;
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+    defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+	int ival;
+#endif
 
 	s = spltty();
 	switch (cmd) {
@@ -858,6 +863,13 @@
 	case KDGKBMODE:		/* get keyboard mode */
 		*(int *)arg = state->ks_mode;
 		break;
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+    defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+	case _IO('K', 7):
+		ival = IOCPARM_IVAL(arg);
+		arg = (caddr_t)&ival;
+		/* FALLTHROUGH */
+#endif
 	case KDSKBMODE:		/* set keyboard mode */
 		switch (*(int *)arg) {
 		case K_XLATE:
@@ -883,6 +895,13 @@
 	case KDGETLED:		/* get keyboard LED */
 		*(int *)arg = KBD_LED_VAL(kbd);
 		break;
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+    defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+	case _IO('K', 66):
+		ival = IOCPARM_IVAL(arg);
+		arg = (caddr_t)&ival;
+		/* FALLTHROUGH */
+#endif
 	case KDSETLED:		/* set keyboard LED */
 		/* NOTE: lock key state in ks_state won't be changed */
 		if (*(int *)arg & ~LOCK_MASK) {
@@ -912,6 +931,13 @@
 	case KDGKBSTATE:	/* get lock key state */
 		*(int *)arg = state->ks_state & LOCK_MASK;
 		break;
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+    defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+	case _IO('K', 20):
+		ival = IOCPARM_IVAL(arg);
+		arg = (caddr_t)&ival;
+		/* FALLTHROUGH */
+#endif
 	case KDSKBSTATE:	/* set lock key state */
 		if (*(int *)arg & ~LOCK_MASK) {
 			splx(s);
@@ -935,6 +961,13 @@
 		}
 		return error;
 
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+    defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+	case _IO('K', 67):
+		ival = IOCPARM_IVAL(arg);
+		arg = (caddr_t)&ival;
+		/* FALLTHROUGH */
+#endif
 	case KDSETRAD:		/* set keyboard repeat rate (old interface) */
 		splx(s);
 		if (!KBD_HAS_DEVICE(kbd))

==== //depot/projects/linuxolator/src/sys/dev/digi/digi.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/digi/digi.c,v 1.62 2006/06/20 20:54:13 jhb Exp $
+ * $FreeBSD: src/sys/dev/digi/digi.c,v 1.63 2006/09/27 19:56:58 ru Exp $
  */
 
 /*-
@@ -913,6 +913,10 @@
 {
 	struct digi_softc *sc;
 	struct digi_p *port;
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+    defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+	int ival;
+#endif
 
 	port = tp->t_sc;
 	sc = port->sc;
@@ -942,8 +946,15 @@
 			}
 		}
 		return (0);
+#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
+    defined(COMPAT_FREEBSD4) || defined(COMPAT_43)
+	case _IO('e', 'C'):
+		ival = IOCPARM_IVAL(data);
+		data = &ival;
+		/* FALLTHROUGH */
+#endif
 	case DIGIIO_RING:
-		port->send_ring = *(u_char *)data;
+		port->send_ring = (u_char)*(int *)data;
 		break;
 	default:
 		return (ENOTTY);

==== //depot/projects/linuxolator/src/sys/dev/em/if_em.c#4 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.147 2006/09/21 19:14:51 andre Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.152 2006/09/29 13:47:38 andre Exp $*/
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_device_polling.h"
@@ -69,6 +69,7 @@
 #include <netinet/in.h>
 #include <netinet/if_ether.h>
 #include <netinet/ip.h>
+#include <netinet/ip6.h>
 #include <netinet/tcp.h>
 #include <netinet/udp.h>
 
@@ -911,8 +912,8 @@
 			ifp->if_capenable ^= IFCAP_HWCSUM;
 			reinit = 1;
 		}
-		if (mask & IFCAP_TSO) {
-			ifp->if_capenable ^= IFCAP_TSO;
+		if (mask & IFCAP_TSO4) {
+			ifp->if_capenable ^= IFCAP_TSO4;
 			reinit = 1;
 		}
 		if (mask & IFCAP_VLAN_HWTAGGING) {
@@ -1474,40 +1475,6 @@
 	}
 
 	/*
-	 * When operating in promiscuous mode, hardware encapsulation for
-	 * packets is disabled.  This means we have to add the vlan
-	 * encapsulation in the driver, since it will have come down from the
-	 * VLAN layer with a tag instead of a VLAN header.
-	 */
-	if ((m_head->m_flags & M_VLANTAG) && adapter->em_insert_vlan_header) {
-		struct ether_vlan_header *evl;
-		struct ether_header eh;
-
-		m_head = m_pullup(m_head, sizeof(eh));
-		if (m_head == NULL) {
-			*m_headp = NULL;
-			return (ENOBUFS);
-		}
-		eh = *mtod(m_head, struct ether_header *);
-		M_PREPEND(m_head, sizeof(*evl), M_DONTWAIT);
-		if (m_head == NULL) {
-			*m_headp = NULL;
-			return (ENOBUFS);
-		}
-		m_head = m_pullup(m_head, sizeof(*evl));
-		if (m_head == NULL) {
-			*m_headp = NULL;
-			return (ENOBUFS);
-		}
-		evl = mtod(m_head, struct ether_vlan_header *);
-		bcopy(&eh, evl, sizeof(*evl));
-		evl->evl_proto = evl->evl_encap_proto;
-		evl->evl_encap_proto = htons(ETHERTYPE_VLAN);
-		evl->evl_tag = htons(m_head->m_pkthdr.ether_vtag);
-		*m_headp = m_head;
-	}
-
-	/*
 	 * TSO workaround:
 	 *  If an mbuf is only header we need
 	 *     to pull 4 bytes of data into it.
@@ -1526,8 +1493,19 @@
 	tx_buffer = &adapter->tx_buffer_area[adapter->next_avail_tx_desc];
 	tx_buffer_last = tx_buffer;
 	map = tx_buffer->map;
+
 	error = bus_dmamap_load_mbuf_sg(adapter->txtag, map, *m_headp, segs,
 	    &nsegs, BUS_DMA_NOWAIT);
+
+	/*
+	 * There are two types of errors we can (try) to handle:
+	 * - EFBIG means the mbuf chain was too long and bus_dma ran
+	 *   out of segments.  Defragment the mbuf chain and try again.
+	 * - ENOMEM means bus_dma could not obtain enough bounce buffers
+	 *   at this point in time.  Defer sending and try again later.
+	 * All other errors, in particular EINVAL, are fatal and prevent the
+	 * mbuf chain from ever going through.  Drop it and report error.
+	 */
 	if (error == EFBIG) {
 		struct mbuf *m;
 
@@ -1540,22 +1518,27 @@
 			return (ENOBUFS);
 		}
 		*m_headp = m;
+
 		error = bus_dmamap_load_mbuf_sg(adapter->txtag, map, *m_headp,
 		    segs, &nsegs, BUS_DMA_NOWAIT);
-		if (error != 0) {
+
+		if (error == ENOMEM) {
+			adapter->no_tx_dma_setup++;
+			return (error);
+		} else if (error != 0) {
 			adapter->no_tx_dma_setup++;
 			m_freem(*m_headp);
 			*m_headp = NULL;
 			return (error);
 		}
+	} else if (error == ENOMEM) {
+		adapter->no_tx_dma_setup++;
+		return (error);
 	} else if (error != 0) {
 		adapter->no_tx_dma_setup++;
-		return (error);
-	}
-	if (nsegs == 0) {
 		m_freem(*m_headp);
 		*m_headp = NULL;
-		return (EIO);
+		return (error);
 	}
 
 	/*
@@ -1575,11 +1558,12 @@
 		bus_dmamap_unload(adapter->txtag, map);
 		return (ENOBUFS);
 	}
+	m_head = *m_headp;
 
 	/* Do hardware assists */
-	m_head = *m_headp;
-	if (ifp->if_hwassist > 0) {
-		if (em_tso_setup(adapter, m_head, &txd_upper, &txd_lower)) {
+	if (ifp->if_hwassist) {
+		if (do_tso &&
+		    em_tso_setup(adapter, m_head, &txd_upper, &txd_lower)) {
 			/* we need to make a final sentinel transmit desc */
 			tso_desc = TRUE;
 		} else
@@ -1847,9 +1831,12 @@
 	if (ifp->if_flags & IFF_PROMISC) {
 		reg_rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
 		E1000_WRITE_REG(&adapter->hw, RCTL, reg_rctl);
-		/* Disable VLAN stripping in promiscous mode
+		/*
+		 * Disable VLAN stripping in promiscous mode.
 		 * This enables bridging of vlan tagged frames to occur
-		 * and also allows vlan tags to be seen in tcpdump
+		 * and also allows vlan tags to be seen in tcpdump.
+		 * XXX: This is a bit bogus as tcpdump may be used
+		 * w/o promisc mode as well.
 		 */
 		if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING)
 			em_disable_vlans(adapter);
@@ -2340,8 +2327,8 @@
 	/* Enable TSO if available */
 	if ((adapter->hw.mac_type > em_82544) &&
 	    (adapter->hw.mac_type != em_82547)) {
-		ifp->if_capabilities |= IFCAP_TSO;
-		ifp->if_capenable |= IFCAP_TSO;
+		ifp->if_capabilities |= IFCAP_TSO4;
+		ifp->if_capenable |= IFCAP_TSO4;
 	}
 
 	/*
@@ -2777,66 +2764,126 @@
 {
 	struct em_context_desc *TXD;
 	struct em_buffer *tx_buffer;
-	int curr_txd;
+	struct ether_vlan_header *eh;
+	struct ip *ip;
+	struct ip6_hdr *ip6;
+	struct tcp_hdr *th;
+	int curr_txd, ehdrlen, hdr_len, ip_hlen;
+	uint32_t cmd = 0;
+	uint16_t etype;
+	uint8_t ipproto;
 
-	if (mp->m_pkthdr.csum_flags) {
+	/* Setup checksum offload context. */
+	curr_txd = adapter->next_avail_tx_desc;
+	tx_buffer = &adapter->tx_buffer_area[curr_txd];
+	TXD = (struct em_context_desc *) &adapter->tx_desc_base[curr_txd];
 
-		if (mp->m_pkthdr.csum_flags & CSUM_TCP) {
-			*txd_upper = E1000_TXD_POPTS_TXSM << 8;
-			*txd_lower = E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D;
-			if (adapter->active_checksum_context == OFFLOAD_TCP_IP)
-				return;
-			else
-				adapter->active_checksum_context = OFFLOAD_TCP_IP;
+	*txd_lower = E1000_TXD_CMD_DEXT |	/* Extended descr type */
+		     E1000_TXD_DTYP_D;		/* Data descr */
 
-		} else if (mp->m_pkthdr.csum_flags & CSUM_UDP) {
-			*txd_upper = E1000_TXD_POPTS_TXSM << 8;

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


More information about the p4-projects mailing list