From owner-p4-projects@FreeBSD.ORG Tue Dec 12 19:55:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5220316A4C2; Tue, 12 Dec 2006 19:55:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 004B716A417 for ; Tue, 12 Dec 2006 19:55:27 +0000 (UTC) (envelope-from ticso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A1C44408D for ; Tue, 12 Dec 2006 19:24:36 +0000 (GMT) (envelope-from ticso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kBCJPsFT033225 for ; Tue, 12 Dec 2006 19:25:54 GMT (envelope-from ticso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kBCJPrnn033222 for perforce@freebsd.org; Tue, 12 Dec 2006 19:25:53 GMT (envelope-from ticso@freebsd.org) Date: Tue, 12 Dec 2006 19:25:53 GMT Message-Id: <200612121925.kBCJPrnn033222@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ticso@freebsd.org using -f From: Bernd Walter To: Perforce Change Reviews Cc: Subject: PERFORCE change 111568 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 19:55:28 -0000 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: