Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Mar 2007 21:27:57 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 116788 for review
Message-ID:  <200703282127.l2SLRvd6062303@repoman.freebsd.org>

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

Change 116788 by marcel@marcel_jnpr on 2007/03/28 21:27:26

	IFC @116786

Affected files ...

.. //depot/projects/uart/boot/arm/at91/boot2/boot2.c#3 integrate
.. //depot/projects/uart/boot/arm/at91/libat91/memcmp.c#2 integrate
.. //depot/projects/uart/boot/arm/at91/libat91/strlen.c#2 integrate
.. //depot/projects/uart/dev/fxp/if_fxp.c#27 integrate
.. //depot/projects/uart/dev/isp/isp_sbus.c#15 integrate
.. //depot/projects/uart/dev/re/if_re.c#22 integrate
.. //depot/projects/uart/dev/scc/scc_bfe.h#22 integrate
.. //depot/projects/uart/dev/scc/scc_core.c#29 integrate
.. //depot/projects/uart/dev/scc/scc_if.m#10 integrate
.. //depot/projects/uart/dev/sio/sio_pci.c#7 integrate
.. //depot/projects/uart/dev/uart/uart_core.c#58 integrate
.. //depot/projects/uart/dev/uart/uart_dev_ns8250.c#48 integrate
.. //depot/projects/uart/netgraph/netflow/ng_netflow.c#8 integrate
.. //depot/projects/uart/netgraph/netflow/ng_netflow.h#6 integrate
.. //depot/projects/uart/netinet/tcp_input.c#31 integrate

Differences ...

==== //depot/projects/uart/boot/arm/at91/boot2/boot2.c#3 (text+ko) ====

@@ -14,7 +14,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.3 2006/11/16 00:47:31 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.4 2007/03/28 21:18:45 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/disklabel.h>
@@ -114,12 +114,10 @@
     char *s;
 
     s = cmd;
-    if (c)
-	*s++ = c;
+    if (c == 0)
+	c = getc(10000);
     for (;;) {
-	c = getc(10000);
-
-	switch (c = getc(10000)) {
+	switch (c) {
 	case 0:
 	    break;
 	case '\177':
@@ -138,6 +136,7 @@
 		*s++ = c;
 	    xputchar(c);
 	}
+	c = getc(10000);
     }
 }
 
@@ -170,7 +169,8 @@
 
     /* Present the user with the boot2 prompt. */
 
-    strcpy(kname, PATH_KERNEL);
+    if (*kname == '\0')
+	strcpy(kname, PATH_KERNEL);
     for (;;) {
 	printf("\nDefault: %s\nboot: ", kname);
 	if (!autoboot || (c = getc(2)) != -1)
@@ -252,6 +252,7 @@
 		opts ^= OPT_SET(flags[i]);
 	    }
 	} else {
+	    arg--;
 	    if ((i = ep - arg)) {
 		if ((size_t)i >= sizeof(kname))
 		    return -1;

==== //depot/projects/uart/boot/arm/at91/libat91/memcmp.c#2 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/memcmp.c,v 1.2 2006/11/09 20:32:36 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/memcmp.c,v 1.3 2007/03/28 21:15:50 imp Exp $");
 
 #include "lib.h"
 
@@ -34,5 +34,5 @@
 	while ((--size) && (*to++ == *from++))
 		continue;
 
-	return (*to != *from);
+	return (size || (*to != *from));
 }

==== //depot/projects/uart/boot/arm/at91/libat91/strlen.c#2 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/strlen.c,v 1.2 2006/11/09 20:32:36 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/strlen.c,v 1.3 2007/03/28 21:12:43 imp Exp $");
 
 /******************************************************************************
  *
@@ -64,5 +64,5 @@
 	const char *ptr = buffer;
 	while (*ptr++)
 		continue;
-	return (ptr - buffer);
+	return (ptr - buffer - 1);
 }

==== //depot/projects/uart/dev/fxp/if_fxp.c#27 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.264 2007/02/23 12:18:41 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.265 2007/03/28 18:10:50 remko Exp $");
 
 /*
  * Intel EtherExpress Pro/100B PCI Fast Ethernet driver
@@ -178,6 +178,7 @@
     { 0x1065,	-1,	"Intel 82562ET/EZ/GT/GZ PRO/100 VE Ethernet" },
     { 0x1068,	-1,	"Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" },
     { 0x1069,	-1,	"Intel 82562EM/EX/GX Pro/100 Ethernet" },
+    { 0x1091,	-1,	"Intel 82562GX Pro/100 Ethernet" },
     { 0x1092,	-1,	"Intel Pro/100 VE Network Connection" },
     { 0x1093,	-1,	"Intel Pro/100 VM Network Connection" },
     { 0x1094,	-1,	"Intel Pro/100 946GZ (ICH7) Network Connection" },

==== //depot/projects/uart/dev/isp/isp_sbus.c#15 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/isp/isp_sbus.c,v 1.30 2007/03/13 06:46:08 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/isp/isp_sbus.c,v 1.31 2007/03/28 16:34:11 mjacob Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -193,8 +193,6 @@
 	sbs->sbus_dev = dev;
 	sbs->sbus_reg = regs;
 	sbs->sbus_mdvec = mdvec;
-	isp->isp_bus_tag = rman_get_bustag(regs);
-	isp->isp_bus_handle = rman_get_bushandle(regs);
 
 	sbs->sbus_poff[BIU_BLOCK >> _BLK_REG_SHFT] = BIU_REGS_OFF;
 	sbs->sbus_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = SBUS_MBOX_REGS_OFF;
@@ -202,6 +200,8 @@
 	sbs->sbus_poff[RISC_BLOCK >> _BLK_REG_SHFT] = SBUS_RISC_REGS_OFF;
 	sbs->sbus_poff[DMA_BLOCK >> _BLK_REG_SHFT] = DMA_REGS_OFF;
 	isp = &sbs->sbus_isp;
+	isp->isp_bus_tag = rman_get_bustag(regs);
+	isp->isp_bus_handle = rman_get_bushandle(regs);
 	isp->isp_mdvec = &sbs->sbus_mdvec;
 	isp->isp_bustype = ISP_BT_SBUS;
 	isp->isp_type = ISP_HA_SCSI_UNKNOWN;

==== //depot/projects/uart/dev/re/if_re.c#22 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.87 2007/03/04 03:38:07 csjp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.88 2007/03/28 18:07:12 remko Exp $");
 
 /*
  * RealTek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver
@@ -182,6 +182,8 @@
 		"RealTek 8169S Single-chip Gigabit Ethernet" },
 	{ RT_VENDORID, RT_DEVICEID_8169, RL_HWREV_8169_8110SB,
 		"RealTek 8169SB/8110SB Single-chip Gigabit Ethernet" },
+	{ RT_VENDORID, RT_DEVICEID_8169, RL_HWREV_8169_8110SC,
+		"RealTek 8169SC/8110SC Single-chip Gigabit Ethernet" },
 	{ RT_VENDORID, RT_DEVICEID_8169SC, RL_HWREV_8169_8110SC,
 		"RealTek 8169SC/8110SC Single-chip Gigabit Ethernet" },
 	{ RT_VENDORID, RT_DEVICEID_8169, RL_HWREV_8110S,

==== //depot/projects/uart/dev/scc/scc_bfe.h#22 (text) ====

@@ -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/scc/scc_bfe.h,v 1.5 2007/03/22 23:45:25 marcel Exp $
+ * $FreeBSD: src/sys/dev/scc/scc_bfe.h,v 1.6 2007/03/28 18:05:17 marcel Exp $
  */
 
 #ifndef _DEV_SCC_BFE_H_
@@ -92,6 +92,7 @@
 	struct scc_mode	ch_mode[SCC_NMODES];
 
 	u_int		ch_nr;
+	int		ch_enabled:1;
 	int		ch_sysdev:1;
 
 	uint32_t	ch_ipend;

==== //depot/projects/uart/dev/scc/scc_core.c#29 (text) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/scc/scc_core.c,v 1.9 2007/03/28 06:45:33 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/scc/scc_core.c,v 1.10 2007/03/28 18:05:17 marcel Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -162,6 +162,10 @@
 		resource_list_init(&ch->ch_rlist);
 		ch->ch_nr = c + 1;
 
+		if (!SCC_ENABLED(sc, ch))
+			goto next;
+
+		ch->ch_enabled = 1;
 		resource_list_add(&ch->ch_rlist, sc->sc_rtype, 0, start,
 		    start + sz - 1, sz);
 		rle = resource_list_find(&ch->ch_rlist, sc->sc_rtype, 0);
@@ -192,6 +196,7 @@
 			}
 		}
 
+	 next:
 		start += (cl->cl_range < 0) ? -size : size;
 		sysdev |= ch->ch_sysdev;
 	}

==== //depot/projects/uart/dev/scc/scc_if.m#10 (text) ====

@@ -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/scc/scc_if.m,v 1.1 2006/03/30 18:33:22 marcel Exp $
+# $FreeBSD: src/sys/dev/scc/scc_if.m,v 1.2 2007/03/28 18:05:17 marcel Exp $
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -38,6 +38,15 @@
 
 INTERFACE scc;
 
+# Default implementations of some methods.
+CODE {
+	static int
+	default_enabled(struct scc_softc *this, struct scc_chan *ch)
+	{
+		return (1);
+	}
+}
+
 # attach() - attach hardware.
 # This method is called when the device is being attached. All resources
 # have been allocated. The intend of this method is to setup the hardware
@@ -50,6 +59,13 @@
 	int reset;
 };
 
+# enabled()
+METHOD int enabled {
+	struct scc_softc *this;
+	struct scc_chan *chan;
+} DEFAULT default_enabled;
+
+# iclear()
 METHOD void iclear {
 	struct scc_softc *this;
 	struct scc_chan *chan;

==== //depot/projects/uart/dev/sio/sio_pci.c#7 (text+ko) ====

@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/sio/sio_pci.c,v 1.21 2005/05/29 04:42:25 nyan Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/sio/sio_pci.c,v 1.22 2007/03/28 18:56:27 maxim Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -78,6 +78,7 @@
 	{ 0x0000151f, "SmartLink 5634PCV SurfRider", 0x10 },
 	{ 0x0103115d, "Xircom Cardbus modem", 0x10 },
 	{ 0x432214e4, "Broadcom 802.11g/GPRS CardBus (Serial)", 0x10 },
+	{ 0x98359710, "MosChip MCS9835 PCI Dual UART", 0x10 },
 	{ 0x01c0135c, "Quatech SSCLP-200/300", 0x18 
 		/* 
 		 * NB: You must mount the "SPAD" jumper to correctly detect

==== //depot/projects/uart/dev/uart/uart_core.c#58 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/uart/uart_core.c,v 1.20 2007/02/23 12:18:57 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/uart/uart_core.c,v 1.21 2007/03/28 18:26:12 marcel Exp $");
 
 #ifndef KLD_MODULE
 #include "opt_comconsole.h"
@@ -371,7 +371,7 @@
 		    uart_cpu_eqres(&sc->sc_bas, &sysdev->bas)) {
 			/* XXX check if ops matches class. */
 			sc->sc_sysdev = sysdev;
-			break;
+			sysdev->bas.rclk = sc->sc_bas.rclk;
 		}
 	}
 

==== //depot/projects/uart/dev/uart/uart_dev_ns8250.c#48 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_ns8250.c,v 1.24 2007/01/18 22:01:19 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_ns8250.c,v 1.25 2007/03/28 18:34:59 marcel Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -81,7 +81,9 @@
 	uart_barrier(bas);
 
 	/* 1/10th the time to transmit 1 character (estimate). */
-	return (16000000 * divisor / bas->rclk);
+	if (divisor <= 134)
+		return (16000000 * divisor / bas->rclk);
+	return (16000 * divisor / (bas->rclk / 1000));
 }
 
 static int

==== //depot/projects/uart/netgraph/netflow/ng_netflow.c#8 (text+ko) ====

@@ -28,11 +28,12 @@
  */
 
 static const char rcs_id[] =
-    "@(#) $FreeBSD: src/sys/netgraph/netflow/ng_netflow.c,v 1.13 2006/10/11 15:27:13 glebius Exp $";
+    "@(#) $FreeBSD: src/sys/netgraph/netflow/ng_netflow.c,v 1.14 2007/03/28 13:59:13 glebius Exp $";
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
+#include <sys/limits.h>
 #include <sys/mbuf.h>
 #include <sys/socket.h>
 #include <sys/syslog.h>

==== //depot/projects/uart/netgraph/netflow/ng_netflow.h#6 (text+ko) ====

@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  *	 $SourceForge: ng_netflow.h,v 1.26 2004/09/04 15:44:55 glebius Exp $
- *	 $FreeBSD: src/sys/netgraph/netflow/ng_netflow.h,v 1.9 2006/02/09 11:42:17 glebius Exp $
+ *	 $FreeBSD: src/sys/netgraph/netflow/ng_netflow.h,v 1.10 2007/03/28 13:59:13 glebius Exp $
  */
 
 #ifndef	_NG_NETFLOW_H_
@@ -34,7 +34,7 @@
 #define NG_NETFLOW_NODE_TYPE	"netflow"
 #define NGM_NETFLOW_COOKIE	1137078102
 
-#define	NG_NETFLOW_MAXIFACES	2048
+#define	NG_NETFLOW_MAXIFACES	USHRT_MAX
 
 /* Hook names */
 

==== //depot/projects/uart/netinet/tcp_input.c#31 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)tcp_input.c	8.12 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.329 2007/03/24 22:15:02 maxim Exp $
+ * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.330 2007/03/28 12:58:13 andre Exp $
  */
 
 #include "opt_ipfw.h"		/* for ipfw_fwd	*/
@@ -726,7 +726,7 @@
 		 */
 		if ((blackhole == 1 && (thflags & TH_SYN)) ||
 		    blackhole == 2)
-			goto drop;
+			goto dropunlock;
 
 		rstreason = BANDLIM_RST_CLOSEDPORT;
 		goto dropwithreset;



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