PERFORCE change 111568 for review
Bernd Walter
ticso at FreeBSD.org
Tue Dec 12 11:55:28 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=111568
Change 111568 by ticso at 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:
More information about the p4-projects
mailing list