[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree

zrouter-src-freebsd at zrouter.org zrouter-src-freebsd at zrouter.org
Sun Feb 12 14:47:04 UTC 2012


details:   http://zrouter.org/hg/FreeBSD/head//rev/7dbf1516e36b
changeset: 338:7dbf1516e36b
user:      ray at terran.dlink.ua
date:      Sun Feb 12 16:47:12 2012 +0200
description:
Mark BCM5325 as having 9 ports, because MII port have index 8.
TODO: have to do some port mask.
Remove initialization of switch, boot loader should set default for us.

diffstat:

 head/sys/dev/switch/bcm5325_switch.c |  14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diffs (34 lines):

diff -r 3c0fed8eac60 -r 7dbf1516e36b head/sys/dev/switch/bcm5325_switch.c
--- a/head/sys/dev/switch/bcm5325_switch.c	Fri Feb 03 17:31:23 2012 +0200
+++ b/head/sys/dev/switch/bcm5325_switch.c	Sun Feb 12 16:47:12 2012 +0200
@@ -269,13 +269,11 @@
 	switch (sc->devid) {
 	case 0x53118:
 	case 0x53115:	/* 53118 w/o ports 6-7 */
-		sc->caps->ports = sc->ports = 9;
-		break;
-	case 0x5325:
+	case 0x5325:	/* MII port is port8 */
 	case 0x5352:
 	case 0x5354:
 	case 0x5395:
-		sc->caps->ports = sc->ports = 6;
+		sc->caps->ports = sc->ports = 9;
 		break;
 	default:
 		/* XXX: trick, last digit of id + 1 MII port */
@@ -341,14 +339,6 @@
 	 * XXX: Avoid default configuration, bootloader must set it or we
 	 * must load user defined
 	 */
-	/* set_vid(swdev, Idx, VID) */
-	//set_vid(dev, 0, 1);
-
-	/* All ports are members of VLAN0 (VID1) */
-	//set_vlan_ports(dev, 0, 0x01ff);
-	/* Other VLANs have no members */
-	//for (i = 1; i < 9; i++)
-	//	set_vlan_ports(dev, i, 0x00);
 
 	return (0);
 }


More information about the Zrouter-src-freebsd mailing list