PERFORCE change 183341 for review

Garrett Cooper gcooper at FreeBSD.org
Sat Sep 4 19:18:44 UTC 2010


http://p4web.freebsd.org/@@183341?ac=10

Change 183341 by gcooper at gcooper-bayonetta on 2010/09/04 19:18:20

	IFC

Affected files ...

.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/bin/sh/mksyntax.c#5 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/games/fortune/datfiles/fortunes#4 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libedit/common.c#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/Makefile#4 edit
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/file.c#23 edit
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/pkg.h#15 edit
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/plist.c#14 edit
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sbin/mount_nfs/mount_nfs.c#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/share/man/man4/sis.4#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/amd64/include/cpufunc.h#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/arm/include/bootinfo.h#2 delete
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/boot/ofw/libofw/ofw_copy.c#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/cam/ata/ata_da.c#5 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/cam/scsi/scsi_da.c#5 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c#6 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/acpica/acpi.c#7 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/ata/ata-all.h#5 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/ata/ata-lowlevel.c#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/ata/chipsets/ata-siliconimage.c#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/fb/vesa.c#8 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/iscsi/initiator/iscsi.c#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/iscsi/initiator/iscsivar.h#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/sis/if_sis.c#4 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/sis/if_sisreg.h#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/twa/tw_osl_freebsd.c#4 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/geom/geom_io.c#5 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/geom/sched/subr_disk.c#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/i386/include/cpufunc.h#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/kern/sched_ule.c#6 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/kern/subr_bus.c#6 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/kern/subr_disk.c#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/kern/subr_sbuf.c#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/net/if_epair.c#4 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/netinet/in.c#5 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/netinet/ip_input.c#5 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/netinet/ip_var.h#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/netinet6/ip6_input.c#6 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/netinet6/ip6_var.h#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/powerpc/conf/GENERIC64#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/powerpc/include/param.h#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/powerpc/powerpc/mp_machdep.c#4 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/sparc64/conf/GENERIC#4 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/sys/bio.h#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/sys/bus.h#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/sys/copyright.h#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/vm/vm_page.c#11 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/tools/regression/bin/sh/builtins/read2.0#1 branch
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/tools/regression/usr.sbin/Makefile#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/tools/tools/nanobsd/nanobsd.sh#5 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/tools/tools/sysbuild/sysbuild.sh#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.bin/calendar/calendars/fr_FR.ISO8859-1/calendar.fetes#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.bin/split/split.1#2 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/add/Makefile#7 edit
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/add/extract.c#6 edit
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/lib/Makefile#6 delete
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pmcstat/pmcpl_callgraph.c#4 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pmcstat/pmcpl_calltree.c#7 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pmcstat/pmcstat_log.c#6 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pmcstat/pmcstat_log.h#3 integrate
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/sysinstall/installUpgrade.c#3 integrate

Differences ...

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/bin/sh/mksyntax.c#5 (text+ko) ====

@@ -42,7 +42,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/sh/mksyntax.c,v 1.30 2010/08/08 21:04:27 jilles Exp $");
+__FBSDID("$FreeBSD: src/bin/sh/mksyntax.c,v 1.31 2010/09/03 22:13:54 jilles Exp $");
 
 /*
  * This program creates syntax.h and syntax.c.
@@ -338,12 +338,12 @@
  */
 
 static const char *macro[] = {
-	"#define is_digit(c)\t((is_type+SYNBASE)[c] & ISDIGIT)",
+	"#define is_digit(c)\t((is_type+SYNBASE)[(int)c] & ISDIGIT)",
 	"#define is_eof(c)\t((c) == PEOF)",
-	"#define is_alpha(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && isalpha((unsigned char) (c)))",
-	"#define is_name(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && ((c) == '_' || isalpha((unsigned char) (c))))",
-	"#define is_in_name(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && ((c) == '_' || isalnum((unsigned char) (c))))",
-	"#define is_special(c)\t((is_type+SYNBASE)[c] & (ISSPECL|ISDIGIT))",
+	"#define is_alpha(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER))",
+	"#define is_name(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER))",
+	"#define is_in_name(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER|ISDIGIT))",
+	"#define is_special(c)\t((is_type+SYNBASE)[(int)c] & (ISSPECL|ISDIGIT))",
 	NULL
 };
 

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/games/fortune/datfiles/fortunes#4 (text+ko) ====

@@ -1,5 +1,5 @@
 This fortune brought to you by:
-$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.289 2010/07/30 20:20:14 uqs Exp $
+$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.290 2010/09/03 03:20:34 jmg Exp $
 %
 =======================================================================
 ||								     ||
@@ -45221,7 +45221,7 @@
 	1: P-Q4, Kt-KB3
 	2: Kt-Q2, P-K4
 	3: PxP, Kt-Kt5
-	4: P-K6, Kt-K6/
+	4: P-KR3, Kt-K6/
 	White then resigns on realizing that a fifth move would involve
 either a Q-KR5 check or the loss of his queen.
 		-- Stephen Pile, "The Book of Heroic Failures"

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libedit/common.c#2 (text+ko) ====

@@ -36,7 +36,7 @@
 static char sccsid[] = "@(#)common.c	8.1 (Berkeley) 6/4/93";
 #endif /* not lint && not SCCSID */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libedit/common.c,v 1.12 2007/03/11 18:30:22 stefanf Exp $");
+__FBSDID("$FreeBSD: src/lib/libedit/common.c,v 1.13 2010/09/03 22:24:26 jilles Exp $");
 
 /*
  * common.c: Common Editor functions
@@ -163,15 +163,12 @@
 				return (CC_ERROR);
 #endif
 			}
-		} else {
-			if (el->el_line.cursor != el->el_line.buffer)
-				el->el_line.cursor--;
-			else
-				return (CC_ERROR);
-		}
+		} else
+			return (CC_ERROR);
 	}
 	c_delafter(el, el->el_state.argument);	/* delete after dot */
-	if (el->el_line.cursor >= el->el_line.lastchar &&
+	if (el->el_map.type == MAP_VI &&
+	    el->el_line.cursor >= el->el_line.lastchar &&
 	    el->el_line.cursor > el->el_line.buffer)
 			/* bounds check */
 		el->el_line.cursor = el->el_line.lastchar - 1;

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/Makefile#4 (text+ko) ====

@@ -20,7 +20,8 @@
 		version.c
 INCS=		pkg.h
 
-CFLAGS+=	-DYES_I_KNOW_THE_API_IS_RUBBISH_AND_IS_DOOMED_TO_CHANGE
+CFLAGS+=	-DYES_I_KNOW_THE_API_IS_RUBBISH_AND_IS_DOOMED_TO_CHANGE \
+		-DI_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
 
 DPADD=		${LIBARCHIVE} ${LIBFETCH} ${LIBMD} ${LIBUTIL}
 LDADD=		-larchive -lfetch -lmd -lutil

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/file.c#23 (text+ko) ====

@@ -228,6 +228,7 @@
 
 }
 
+/*#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS*/
 /*
  * Takes a filename and package name, returning (in "try") the
  * canonical "preserve" name for it.
@@ -262,6 +263,7 @@
     strncat(try, "backup", max -= 6);
     return TRUE;
 }
+/*#endif*/
 
 /* 
  * Write the contents of "str" to a file 

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/pkg.h#15 (text+ko) ====

@@ -107,12 +107,21 @@
 #define PLIST_FMT_VER_MINOR	1
 
 typedef enum _plist_t {
-	PLIST_FILE, PLIST_CWD, PLIST_CMD, PLIST_CHMOD,
-	PLIST_CHOWN, PLIST_CHGRP, PLIST_COMMENT, PLIST_IGNORE,
-	PLIST_NAME, PLIST_UNEXEC, PLIST_SRC, PLIST_DISPLAY,
+	PLIST_FILE, PLIST_CWD, PLIST_CMD,
+#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
+	PLIST_CHMOD, PLIST_CHOWN, PLIST_CHGRP,
+#endif
+	PLIST_COMMENT, PLIST_IGNORE,
+	PLIST_NAME,
+#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
+	PLIST_UNEXEC,
+#endif
+	PLIST_SRC, PLIST_DISPLAY,
 	PLIST_PKGDEP, PLIST_CONFLICTS, PLIST_MTREE, PLIST_DIR_RM,
 	PLIST_IGNORE_INST, PLIST_OPTION, PLIST_ORIGIN, PLIST_DEPORIGIN,
+#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
 	PLIST_NOINST
+#endif
 } plist_t;
 
 typedef enum _match_t {

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/plist.c#14 (text+ko) ====

@@ -145,6 +145,7 @@
 	return (NULL);
 }
 
+#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
 /* Look for a specific boolean option argument in the list */
 char *
 find_plist_option(Package *pkg, const char *name)
@@ -156,6 +157,7 @@
 			return (p->name);
 	return (NULL);
 }
+#endif
 
 /*
  * Delete plist item 'type' in the list (if 'name' is non-null, match it
@@ -273,6 +275,7 @@
 		return (PLIST_SRC);
 	else if (!strcmp(cmd, "cd"))
 		return (PLIST_CWD);
+#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
 	else if (!strcmp(cmd, "exec"))
 		return (PLIST_CMD);
 	else if (!strcmp(cmd, "unexec"))
@@ -285,6 +288,7 @@
 		return (PLIST_CHGRP);
 	else if (!strcmp(cmd, "noinst"))
 		return (PLIST_NOINST);
+#endif
 	else if (!strcmp(cmd, "comment")) {
 		if (!strncmp(*arg, "ORIGIN:", 7)) {
 			*arg += 7;
@@ -526,6 +530,7 @@
 			fprintf(fp, "%csrcdir %s\n", CMD_CHAR, plist->name);
 			break;
 
+#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
 		case PLIST_CMD:
 			fprintf(fp, "%cexec %s\n", CMD_CHAR, plist->name);
 			break;
@@ -548,15 +553,18 @@
 			fprintf(fp, "%cgroup %s\n",
 			    CMD_CHAR, plist->name ? plist->name : "");
 			break;
+#endif
 
 		case PLIST_COMMENT:
 			fprintf(fp, "%ccomment %s\n",
 			    CMD_CHAR, plist->name);
 			break;
 
+#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
 		case PLIST_NOINST:
 			fprintf(fp, "%cnoinst %s\n", CMD_CHAR, plist->name);
 			break;
+#endif
 
 		case PLIST_IGNORE:
 			/* FALLTHROUGH */
@@ -589,9 +597,11 @@
 			fprintf(fp, "%cdirrm %s\n", CMD_CHAR, plist->name);
 			break;
 
+#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
 		case PLIST_OPTION:
 			fprintf(fp, "%coption %s\n", CMD_CHAR, plist->name);
 			break;
+#endif
 
 		case PLIST_ORIGIN:
 			fprintf(fp, "%ccomment ORIGIN:%s\n",
@@ -627,14 +637,18 @@
 {
 	PackingList p;
 	Boolean fail = FALSE;
+#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
 	Boolean preserve;
+#endif
 	char tmp[FILENAME_MAX];
 	char *name = NULL;
 	char *prefix = NULL;
 	const char *Where = ".";
 	const char *last_file = "";
 
+#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
 	preserve = find_plist_option(pkg, "preserve") ? TRUE : FALSE;
+#endif
 
 	for (p = pkg->head; p != NULL; p = p->next) {
 
@@ -734,6 +748,7 @@
 					if (delete_hierarchy(tmp, ign_err,
 					    nukedirs))
 						fail = -1;
+#if I_CARE_ABOUT_BACKWARDS_COMPATIBILITY_MORE_THAN_PROGRESS
 					if (preserve && name) {
 						char tmp2[FILENAME_MAX];
 			    
@@ -748,6 +763,7 @@
 						}
 
 					}
+#endif
 
 				}
 

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sbin/mount_nfs/mount_nfs.c#2 (text+ko) ====

@@ -42,7 +42,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/mount_nfs/mount_nfs.c,v 1.92 2010/02/04 15:17:49 ume Exp $");
+__FBSDID("$FreeBSD: src/sbin/mount_nfs/mount_nfs.c,v 1.93 2010/09/04 08:42:19 kevlo Exp $");
 
 #include <sys/param.h>
 #include <sys/linker.h>
@@ -866,6 +866,7 @@
 	enum clnt_stat stat;
 	enum mountmode trymntmode;
 
+	sotype = 0;
 	trymntmode = mountmode;
 	errbuf[0] = '\0';
 	*errstr = errbuf;

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/share/man/man4/sis.4#2 (text+ko) ====

@@ -28,9 +28,9 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man4/sis.4,v 1.26 2010/01/15 16:01:22 ru Exp $
+.\" $FreeBSD: src/share/man/man4/sis.4,v 1.28 2010/09/02 20:43:01 yongari Exp $
 .\"
-.Dd October 28, 2006
+.Dd September 2, 2010
 .Dt SIS 4
 .Os
 .Sh NAME
@@ -145,6 +145,22 @@
 .It
 Soekris Engineering net45xx, net48xx, lan1621, and lan1641
 .El
+.Sh SYSCTL VARIABLES
+The following variable is available as both
+.Xr sysctl 8
+variable and
+.Xr loader 8
+tunable:
+.Bl -tag -width indent
+.It Va dev.sis.%unit.manual_pad
+This variable controls how to pad short frames for DP83815/DP83816
+controllers on the specified device.
+DP83815/DP83816 controllers are known to pad 0xFF for short frames
+which is violation of RFC 1042.
+Set this variable to a non-zero value to let driver manually pad
+each short frame with zeros at the cost of extra CPU cycles.
+The default value is 0 to let hardware perform automatic padding.
+.El
 .Sh DIAGNOSTICS
 .Bl -diag
 .It "sis%d: couldn't map ports/memory"
@@ -190,6 +206,7 @@
 .Xr netintro 4 ,
 .Xr ng_ether 4 ,
 .Xr polling 4 ,
+.Xr vlan 4 ,
 .Xr ifconfig 8
 .Rs
 .%T SiS 900 and SiS 7016 datasheets

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/amd64/include/cpufunc.h#2 (text+ko) ====

@@ -27,7 +27,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.156 2010/01/01 20:55:11 obrien Exp $
+ * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.157 2010/09/03 14:25:17 rdivacky Exp $
  */
 
 /*
@@ -421,40 +421,40 @@
 	__asm __volatile("invlpg %0" : : "m" (*(char *)addr) : "memory");
 }
 
-static __inline u_int
+static __inline u_short
 rfs(void)
 {
-	u_int sel;
-	__asm __volatile("mov %%fs,%0" : "=rm" (sel));
+	u_short sel;
+	__asm __volatile("movw %%fs,%0" : "=rm" (sel));
 	return (sel);
 }
 
-static __inline u_int
+static __inline u_short
 rgs(void)
 {
-	u_int sel;
-	__asm __volatile("mov %%gs,%0" : "=rm" (sel));
+	u_short sel;
+	__asm __volatile("movw %%gs,%0" : "=rm" (sel));
 	return (sel);
 }
 
-static __inline u_int
+static __inline u_short
 rss(void)
 {
-	u_int sel;
-	__asm __volatile("mov %%ss,%0" : "=rm" (sel));
+	u_short sel;
+	__asm __volatile("movw %%ss,%0" : "=rm" (sel));
 	return (sel);
 }
 
 static __inline void
-load_ds(u_int sel)
+load_ds(u_short sel)
 {
-	__asm __volatile("mov %0,%%ds" : : "rm" (sel));
+	__asm __volatile("movw %0,%%ds" : : "rm" (sel));
 }
 
 static __inline void
-load_es(u_int sel)
+load_es(u_short sel)
 {
-	__asm __volatile("mov %0,%%es" : : "rm" (sel));
+	__asm __volatile("movw %0,%%es" : : "rm" (sel));
 }
 
 static __inline void
@@ -476,10 +476,10 @@
 #define	MSR_FSBASE	0xc0000100
 #endif
 static __inline void
-load_fs(u_int sel)
+load_fs(u_short sel)
 {
 	/* Preserve the fsbase value across the selector load */
-	__asm __volatile("rdmsr; mov %0,%%fs; wrmsr"
+	__asm __volatile("rdmsr; movw %0,%%fs; wrmsr"
 	    : : "rm" (sel), "c" (MSR_FSBASE) : "eax", "edx");
 }
 
@@ -487,28 +487,28 @@
 #define	MSR_GSBASE	0xc0000101
 #endif
 static __inline void
-load_gs(u_int sel)
+load_gs(u_short sel)
 {
 	/*
 	 * Preserve the gsbase value across the selector load.
 	 * Note that we have to disable interrupts because the gsbase
 	 * being trashed happens to be the kernel gsbase at the time.
 	 */
-	__asm __volatile("pushfq; cli; rdmsr; mov %0,%%gs; wrmsr; popfq"
+	__asm __volatile("pushfq; cli; rdmsr; movw %0,%%gs; wrmsr; popfq"
 	    : : "rm" (sel), "c" (MSR_GSBASE) : "eax", "edx");
 }
 #else
 /* Usable by userland */
 static __inline void
-load_fs(u_int sel)
+load_fs(u_short sel)
 {
-	__asm __volatile("mov %0,%%fs" : : "rm" (sel));
+	__asm __volatile("movw %0,%%fs" : : "rm" (sel));
 }
 
 static __inline void
-load_gs(u_int sel)
+load_gs(u_short sel)
 {
-	__asm __volatile("mov %0,%%gs" : : "rm" (sel));
+	__asm __volatile("movw %0,%%gs" : : "rm" (sel));
 }
 #endif
 
@@ -692,8 +692,8 @@
 void	load_dr5(u_int64_t dr5);
 void	load_dr6(u_int64_t dr6);
 void	load_dr7(u_int64_t dr7);
-void	load_fs(u_int sel);
-void	load_gs(u_int sel);
+void	load_fs(u_short sel);
+void	load_gs(u_short sel);
 void	ltr(u_short sel);
 void	outb(u_int port, u_char data);
 void	outl(u_int port, u_int data);

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/boot/ofw/libofw/ofw_copy.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/ofw/libofw/ofw_copy.c,v 1.16 2005/07/22 23:22:29 grehan Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/ofw/libofw/ofw_copy.c,v 1.17 2010/09/02 22:26:49 nwhitehorn Exp $");
 
 /*
  * MD primitives supporting placement of module data 
@@ -68,7 +68,7 @@
 	/*
 	 * Trim area covered by existing mapping, if any
 	 */
-	if (dest < (last_dest + last_len)) {
+	if (dest < (last_dest + last_len) && dest >= last_dest) {
 		nlen -= (last_dest + last_len) - dest;
 		dest = last_dest + last_len;
 	}

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/cam/ata/ata_da.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.19 2010/07/25 15:43:52 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.20 2010/09/02 19:40:28 gibbs Exp $");
 
 #include <sys/param.h>
 
@@ -874,7 +874,8 @@
 		}
 		bioq_remove(&softc->bio_queue, bp);
 
-		if ((softc->flags & ADA_FLAG_NEED_OTAG) != 0) {
+		if ((bp->bio_flags & BIO_ORDERED) != 0
+		 || (softc->flags & ADA_FLAG_NEED_OTAG) != 0) {
 			softc->flags &= ~ADA_FLAG_NEED_OTAG;
 			softc->ordered_tag_count++;
 			tag_code = 0;

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/cam/scsi/scsi_da.c#5 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.251 2010/08/20 17:20:05 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.252 2010/09/02 19:40:28 gibbs Exp $");
 
 #include <sys/param.h>
 
@@ -1354,7 +1354,8 @@
 
 			bioq_remove(&softc->bio_queue, bp);
 
-			if ((softc->flags & DA_FLAG_NEED_OTAG) != 0) {
+			if ((bp->bio_flags & BIO_ORDERED) != 0
+			 || (softc->flags & DA_FLAG_NEED_OTAG) != 0) {
 				softc->flags &= ~DA_FLAG_NEED_OTAG;
 				softc->ordered_tag_count++;
 				tag_code = MSG_ORDERED_Q_TAG;
@@ -1368,7 +1369,8 @@
 						/*retries*/da_retry_count,
 						/*cbfcnp*/dadone,
 						/*tag_action*/tag_code,
-						/*read_op*/bp->bio_cmd == BIO_READ,
+						/*read_op*/bp->bio_cmd
+							== BIO_READ,
 						/*byte2*/0,
 						softc->minimum_cmd_size,
 						/*lba*/bp->bio_pblkno,
@@ -1377,17 +1379,24 @@
 						/*data_ptr*/ bp->bio_data,
 						/*dxfer_len*/ bp->bio_bcount,
 						/*sense_len*/SSD_FULL_SIZE,
-						/*timeout*/da_default_timeout*1000);
+						da_default_timeout * 1000);
 				break;
 			case BIO_FLUSH:
+				/*
+				 * BIO_FLUSH doesn't currently communicate
+				 * range data, so we synchronize the cache
+				 * over the whole disk.  We also force
+				 * ordered tag semantics the flush applies
+				 * to all previously queued I/O.
+				 */
 				scsi_synchronize_cache(&start_ccb->csio,
 						       /*retries*/1,
 						       /*cbfcnp*/dadone,
-						       MSG_SIMPLE_Q_TAG,
-						       /*begin_lba*/0,/* Cover the whole disk */
+						       MSG_ORDERED_Q_TAG,
+						       /*begin_lba*/0,
 						       /*lb_count*/0,
 						       SSD_FULL_SIZE,
-						       /*timeout*/da_default_timeout*1000);
+						       da_default_timeout*1000);
 				break;
 			}
 			start_ccb->ccb_h.ccb_state = DA_CCB_BUFFER_IO;

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c#6 (text+ko) ====

@@ -598,6 +598,7 @@
 		break;
 	case ZIO_TYPE_IOCTL:
 		bp->bio_cmd = BIO_FLUSH;
+		bp->bio_flags |= BIO_ORDERED;
 		bp->bio_data = NULL;
 		bp->bio_offset = cp->provider->mediasize;
 		bp->bio_length = 0;

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/acpica/acpi.c#7 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.284 2010/08/17 15:44:52 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.285 2010/09/03 08:07:04 avg Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -1690,10 +1690,10 @@
     ACPI_OBJECT_TYPE type;
 
     /*
-     * 1. I/O port and memory system resource holders
-     * 2. Embedded controllers (to handle early accesses)
-     * 3. PCI Link Devices
-     * 100000. CPUs
+     * 1. CPUs
+     * 2. I/O port and memory system resource holders
+     * 3. Embedded controllers (to handle early accesses)
+     * 4. PCI Link Devices
      */
     AcpiGetType(handle, &type);
     if (type == ACPI_TYPE_PROCESSOR)
@@ -1753,8 +1753,7 @@
 	     * placeholder so that the probe/attach passes will run
 	     * breadth-first.  Orders less than ACPI_DEV_BASE_ORDER
 	     * are reserved for special objects (i.e., system
-	     * resources).  CPU devices have a very high order to
-	     * ensure they are probed after other devices.
+	     * resources).
 	     */
 	    ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "scanning '%s'\n", handle_str));
 	    order = level * 10 + 100;

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/ata/ata-all.h#5 (text+ko) ====

@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.155 2010/07/03 14:14:42 mav Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.156 2010/09/02 11:18:43 mav Exp $
  */
 
 #include "opt_ata.h"
@@ -565,6 +565,7 @@
 #define         ATA_NO_ATAPI_DMA	0x40
 #define         ATA_SATA		0x80
 #define         ATA_DMA_BEFORE_CMD	0x100
+#define         ATA_KNOWN_PRESENCE	0x200
 
     int				pm_level;	/* power management level */
     int                         devices;        /* what is present */

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/ata/ata-lowlevel.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.87 2010/06/06 14:09:48 nwhitehorn Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.88 2010/09/02 11:18:43 mav Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -474,7 +474,8 @@
     ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_DEV(ATA_MASTER));
     DELAY(10);
     ostat0 = ATA_IDX_INB(ch, ATA_STATUS);
-    if ((ostat0 & 0xf8) != 0xf8 && ostat0 != 0xa5) {
+    if (((ostat0 & 0xf8) != 0xf8 || (ch->flags & ATA_KNOWN_PRESENCE)) &&
+	    ostat0 != 0xa5) {
 	stat0 = ATA_S_BUSY;
 	mask |= 0x01;
     }
@@ -484,7 +485,8 @@
 	ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_DEV(ATA_SLAVE));
 	DELAY(10);      
 	ostat1 = ATA_IDX_INB(ch, ATA_STATUS);
-	if ((ostat1 & 0xf8) != 0xf8 && ostat1 != 0xa5) {
+	if (((ostat1 & 0xf8) != 0xf8 || (ch->flags & ATA_KNOWN_PRESENCE)) &&
+		ostat1 != 0xa5) {
 	    stat1 = ATA_S_BUSY;
 	    mask |= 0x02;
 	}
@@ -570,22 +572,16 @@
 	    }
 	}
 
-	if (mask == 0x00)       /* nothing to wait for */
-	    break;
-	if (mask == 0x01)       /* wait for master only */
-	    if (!(stat0 & ATA_S_BUSY) || (stat0 == 0xff && timeout > 10))
-		break;
-	if (mask == 0x02)       /* wait for slave only */
-	    if (!(stat1 & ATA_S_BUSY) || (stat1 == 0xff && timeout > 10))
+	if ((ch->flags & ATA_KNOWN_PRESENCE) == 0 &&
+	    timeout > ((mask == 0x03) ? 20 : 10)) {
+		if ((mask & 0x01) && stat0 == 0xff)
+			mask &= ~0x01;
+		if ((mask & 0x02) && stat1 == 0xff)
+			mask &= ~0x02;
+	}
+	if (((mask & 0x01) == 0 || !(stat0 & ATA_S_BUSY)) &&
+	    ((mask & 0x02) == 0 || !(stat1 & ATA_S_BUSY)))
 		break;
-	if (mask == 0x03) {     /* wait for both master & slave */
-	    if (!(stat0 & ATA_S_BUSY) && !(stat1 & ATA_S_BUSY))
-		break;
-	    if ((stat0 == 0xff) && (timeout > 20))
-		mask &= ~0x01;
-	    if ((stat1 == 0xff) && (timeout > 20))
-		mask &= ~0x02;
-	}
 	ata_udelay(100000);
     }
 

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/ata/chipsets/ata-siliconimage.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-siliconimage.c,v 1.15 2010/07/10 15:36:27 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-siliconimage.c,v 1.17 2010/09/02 12:32:29 mav Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -316,6 +316,7 @@
 	ch->r_io[ATA_SCONTROL].offset = 0x100 + (unit01 << 7) + (unit10 << 8);
 	ch->flags |= ATA_NO_SLAVE;
 	ch->flags |= ATA_SATA;
+	ch->flags |= ATA_KNOWN_PRESENCE;
 
 	/* enable PHY state change interrupt */
 	ATA_OUTL(ctlr->r_res2, 0x148 + (unit01 << 7) + (unit10 << 8),(1 << 16));
@@ -364,7 +365,15 @@
 static void
 ata_sii_reset(device_t dev)
 {
+    struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
     struct ata_channel *ch = device_get_softc(dev);
+    int offset = ((ch->unit & 1) << 7) + ((ch->unit & 2) << 8);
+    uint32_t val;
+
+    /* Apply R_ERR on DMA activate FIS errata workaround. */
+    val = ATA_INL(ctlr->r_res2, 0x14c + offset);
+    if ((val & 0x3) == 0x1)
+	ATA_OUTL(ctlr->r_res2, 0x14c + offset, val & ~0x3);
 
     if (ata_sata_phy_reset(dev, -1, 1))
 	ata_generic_reset(dev);

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/fb/vesa.c#8 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fb/vesa.c,v 1.47 2010/08/31 20:21:52 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fb/vesa.c,v 1.48 2010/09/02 17:22:12 jkim Exp $");
 
 #include "opt_vga.h"
 #include "opt_vesa.h"
@@ -96,10 +96,10 @@
 static video_adapter_t *vesa_adp = NULL;
 
 SYSCTL_NODE(_debug, OID_AUTO, vesa, CTLFLAG_RD, NULL, "VESA debugging");
-static int vesa_shadow_rom = 1;
+static int vesa_shadow_rom = 0;
 TUNABLE_INT("debug.vesa.shadow_rom", &vesa_shadow_rom);
 SYSCTL_INT(_debug_vesa, OID_AUTO, shadow_rom, CTLFLAG_RDTUN, &vesa_shadow_rom,
-    1, "Enable video BIOS shadow");
+    0, "Enable video BIOS shadow");
 
 /* VESA functions */
 #if 0

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/iscsi/initiator/iscsi.c#3 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/iscsi/initiator/iscsi.c,v 1.6 2010/08/11 16:56:38 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/iscsi/initiator/iscsi.c,v 1.7 2010/09/02 14:13:43 des Exp $");
 
 #include "opt_iscsi_initiator.h"
 
@@ -295,12 +295,6 @@
 	  sprintf(buf, "%d/%d /---- free -----/\n", sc->npdu_alloc, sc->npdu_max);
 	  i = 0;
 	  uiomove(buf, strlen(buf), uio);
-	  TAILQ_FOREACH(pq, &sc->freepdu, pq_link) {
-	       if(uio->uio_resid == 0)
-		    return 0;
-	       sprintf(buf, "%03d] %06x\n", i++, ntohl(pq->pdu.ipdu.bhs.itt));
-	       uiomove(buf, strlen(buf), uio);
-	  }
      }
      else {
 	  int	i = 0;
@@ -704,15 +698,10 @@
 static void
 free_pdus(struct isc_softc *sc)
 {
-     pduq_t	*pq;
 
      debug_called(8);
 
      if(sc->pdu_zone != NULL) {
-	  TAILQ_FOREACH(pq, &sc->freepdu, pq_link) {
-	       TAILQ_REMOVE(&sc->freepdu, pq, pq_link);
-	       uma_zfree(sc->pdu_zone, pq);
-	  }
 	  uma_zdestroy(sc->pdu_zone);
 	  sc->pdu_zone = NULL;
      }
@@ -730,7 +719,6 @@
      isc->dev = make_dev(&iscsi_cdevsw, max_sessions, UID_ROOT, GID_WHEEL, 0600, "iscsi");
      isc->dev->si_drv1 = isc;
      mtx_init(&isc->isc_mtx, "iscsi", NULL, MTX_DEF);
-     mtx_init(&isc->pdu_mtx, "iscsi pdu pool", NULL, MTX_DEF);
 
      TAILQ_INIT(&isc->isc_sess);
      /*
@@ -744,7 +732,6 @@
 	  // XXX: should fail...
      }
      uma_zone_set_max(isc->pdu_zone, max_pdus);
-     TAILQ_INIT(&isc->freepdu);
      isc->unit = new_unrhdr(0, max_sessions-1, NULL);
      sx_init(&isc->unit_sx, "iscsi sx");
 
@@ -818,7 +805,6 @@
 	       ic_destroy(sp);
      }
      mtx_destroy(&isc->isc_mtx);
-     mtx_destroy(&isc->pdu_mtx);
      sx_destroy(&isc->unit_sx);
 
      free_pdus(isc);

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/iscsi/initiator/iscsivar.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/sys/dev/iscsi/initiator/iscsivar.h,v 1.3 2010/08/09 12:36:36 des Exp $
+ * $FreeBSD: src/sys/dev/iscsi/initiator/iscsivar.h,v 1.4 2010/09/02 14:13:43 des Exp $
  */
 
 /*
@@ -203,10 +203,7 @@
      struct unrhdr	*unit;
      struct sx 		unit_sx;
 
-     struct mtx		pdu_mtx;
      uma_zone_t		pdu_zone;	// pool of free pdu's
-     TAILQ_HEAD(,pduq)	freepdu;
-
 #ifdef  ISCSI_INITIATOR_DEBUG
      int		 npdu_alloc, npdu_max; // for instrumentation
 #endif
@@ -303,25 +300,15 @@
 {
      pduq_t	*pq;
 
-     mtx_lock(&isc->pdu_mtx);
-     if((pq = TAILQ_FIRST(&isc->freepdu)) == NULL) {
-	  mtx_unlock(&isc->pdu_mtx);
-	  pq = (pduq_t *)uma_zalloc(isc->pdu_zone, wait /* M_WAITOK or M_NOWAIT*/);
-     }
-     else {
-	  TAILQ_REMOVE(&isc->freepdu, pq, pq_link);
-	  mtx_unlock(&isc->pdu_mtx);
-     }
+     pq = (pduq_t *)uma_zalloc(isc->pdu_zone, wait /* M_WAITOK or M_NOWAIT*/);
      if(pq == NULL) {
 	  debug(7, "out of mem");
 	  return NULL;
      }
 #ifdef ISCSI_INITIATOR_DEBUG
-     mtx_lock(&isc->pdu_mtx);
      isc->npdu_alloc++;
      if(isc->npdu_alloc > isc->npdu_max)
 	  isc->npdu_max = isc->npdu_alloc;
-     mtx_unlock(&isc->pdu_mtx);
 #endif
      memset(pq, 0, sizeof(pduq_t));
 
@@ -337,12 +324,10 @@
      if(pq->buf != NULL)
 	  free(pq->buf, M_ISCSIBUF);
 #endif
-     mtx_lock(&isc->pdu_mtx);
-     TAILQ_INSERT_TAIL(&isc->freepdu, pq, pq_link);
 #ifdef ISCSI_INITIATOR_DEBUG
      isc->npdu_alloc--;
 #endif
-     mtx_unlock(&isc->pdu_mtx);
+     uma_zfree(isc->pdu_zone, pq);
 }
 
 static __inline void

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/sys/dev/sis/if_sis.c#4 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/sis/if_sis.c,v 1.21 2010/09/02 00:44:05 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/sis/if_sis.c,v 1.26 2010/09/03 18:00:17 yongari Exp $");
 
 /*
  * SiS 900/SiS 7016 fast ethernet PCI NIC driver. Datasheets are
@@ -73,6 +73,7 @@
 #include <sys/module.h>
 #include <sys/socket.h>
 #include <sys/sockio.h>
+#include <sys/sysctl.h>
 
 #include <net/if.h>
 #include <net/if_arp.h>
@@ -146,11 +147,15 @@
 static void sis_intr(void *);
 static int sis_ioctl(struct ifnet *, u_long, caddr_t);
 static int sis_newbuf(struct sis_softc *, struct sis_rxdesc *);
+static int sis_resume(device_t);
 static int sis_rxeof(struct sis_softc *);
 static void sis_start(struct ifnet *);
 static void sis_startl(struct ifnet *);
 static void sis_stop(struct sis_softc *);
+static int sis_suspend(device_t);
+static void sis_add_sysctls(struct sis_softc *);
 static void sis_watchdog(struct sis_softc *);
+static void sis_wol(struct sis_softc *);
 
 
 static struct resource_spec sis_res_spec[] = {
@@ -710,24 +715,24 @@
 	    (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
 		return;
 
-	sc->sis_link = 0;
+	sc->sis_flags &= ~SIS_FLAG_LINK;
 	if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) ==
 	    (IFM_ACTIVE | IFM_AVALID)) {
 		switch (IFM_SUBTYPE(mii->mii_media_active)) {
 		case IFM_10_T:
-			sc->sis_link++;
 			CSR_WRITE_4(sc, SIS_TX_CFG, SIS_TXCFG_10);
+			sc->sis_flags |= SIS_FLAG_LINK;
 			break;
 		case IFM_100_TX:
-			sc->sis_link++;
 			CSR_WRITE_4(sc, SIS_TX_CFG, SIS_TXCFG_100);
+			sc->sis_flags |= SIS_FLAG_LINK;
 			break;
 		default:
 			break;
 		}
 	}
 
-	if (sc->sis_link == 0) {
+	if ((sc->sis_flags & SIS_FLAG_LINK) == 0) {
 		/*
 		 * Stopping MACs seem to reset SIS_TX_LISTPTR and
 		 * SIS_RX_LISTPTR which in turn requires resetting

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


More information about the p4-projects mailing list