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

zrouter-src-freebsd at zrouter.org zrouter-src-freebsd at zrouter.org
Mon Apr 23 09:20:11 UTC 2012


details:   http://zrouter.org/hg/FreeBSD/head//rev/437201359ff8
changeset: 467:437201359ff8
user:      Aleksandr Rybalko <ray at ddteam.net>
date:      Mon Apr 23 12:20:02 2012 +0300
description:
remove debug printf on tick method

diffstat:

 head/sys/dev/switch/rtl830x_switch.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r 055030542b84 -r 437201359ff8 head/sys/dev/switch/rtl830x_switch.c
--- a/head/sys/dev/switch/rtl830x_switch.c	Mon Apr 23 12:19:35 2012 +0300
+++ b/head/sys/dev/switch/rtl830x_switch.c	Mon Apr 23 12:20:02 2012 +0300
@@ -43,6 +43,7 @@
 #include <dev/switch/rtl830x_switchreg.h>
 #include <dev/switch/rtl830x_switchvar.h>
 #include <dev/switch/switch_ioctl.h>
+#include <dev/mii/mii.h>
 
 #include "switch_if.h"
 #include "switchb_if.h"
@@ -83,12 +84,20 @@
 rtl830x_switch_attach(device_t dev)
 {
 	struct rtl830x_switch_softc *sc;
-	uint32_t reg;
-	int i;
+	struct switch_softc *ssc;
+	struct mii_softc *miisc;
+	uint32_t 	reg;
+	int 		i;
 
 	sc = device_get_softc(dev);
 	sc->parent = device_get_parent(dev);
 
+	/* 10/100 only, so no 1000baseT */
+	ssc = device_get_softc(sc->parent);
+	miisc = &ssc->sc_mii;
+	miisc->mii_capabilities &= ~BMSR_EXTCAP;
+	miisc->mii_extcapabilities = 0;
+
 	sc->caps = malloc(sizeof(struct switch_capability), M_DEVBUF,
 	    M_WAITOK | M_ZERO);
 
@@ -632,7 +641,6 @@
 	uint32_t reg;
 
 	sc = device_get_softc(dev);
-	printf("tick\n");
 	reg = READ4(sc, PHY0_CTL);
 
 	return;


More information about the Zrouter-src-freebsd mailing list