Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2006 19:25:53 GMT
From:      Bernd Walter <ticso@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 111568 for review
Message-ID:  <200612121925.kBCJPrnn033222@repoman.freebsd.org>

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

Change 111568 by ticso@ticso on 2006/12/12 19:25:13

	rework VLAN_MTU support
	- setup in the correct place
	- support for disabling the feature

Affected files ...

.. //depot/projects/arm/src/sys/arm/at91/if_ate.c#66 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/at91/if_ate.c#66 (text+ko) ====

@@ -308,9 +308,6 @@
 	}
 	IF_ADDR_UNLOCK(sc->ifp);
 
-	/* enable big packets */
-	WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) | ETH_CFG_BIG);
-
 	/*
 	 * Write the hash to the hash register.  This card can also
 	 * accept unicast packets as well as multicast packets using this
@@ -757,6 +754,9 @@
 	 */
 	ate_setmcast(sc);
 
+	/* enable big packets */
+	WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) | ETH_CFG_BIG);
+
 	/*
 	 * Set 'running' flag, and clear output active flag
 	 * and attempt to start the output
@@ -953,7 +953,13 @@
 		mask = ifp->if_capenable ^ ifr->ifr_reqcap;
 		if (mask & IFCAP_VLAN_MTU) {
 			ATE_LOCK(sc);
-			ifp->if_capenable ^= IFCAP_VLAN_MTU;
+			if (ifr->ifr_reqcap & IFCAP_VLAN_MTU) {
+				WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) | ETH_CFG_BIG);
+				ifp->if_capenable |= IFCAP_VLAN_MTU;
+			} else {
+				WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) & ~ETH_CFG_BIG);
+				ifp->if_capenable &= ~IFCAP_VLAN_MTU;
+			}
 			ATE_UNLOCK(sc);
 		}
 	default:



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