From owner-svn-src-releng@FreeBSD.ORG Fri Jun 28 05:22:00 2013 Return-Path: Delivered-To: svn-src-releng@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8AD5196C; Fri, 28 Jun 2013 05:22:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6B97012A2; Fri, 28 Jun 2013 05:22:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5S5M0Js024908; Fri, 28 Jun 2013 05:22:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5S5LxVO024852; Fri, 28 Jun 2013 05:21:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201306280521.r5S5LxVO024852@svn.freebsd.org> From: Xin LI Date: Fri, 28 Jun 2013 05:21:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r252334 - in releng/8.4: . sys/conf sys/dev/fxp sys/dev/virtio/network X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jun 2013 05:22:00 -0000 Author: delphij Date: Fri Jun 28 05:21:59 2013 New Revision: 252334 URL: http://svnweb.freebsd.org/changeset/base/252334 Log: Fix a problem where dhclient(8) utility tries to initilaize an fxp(4) forever because the driver resets the controller chip twice upon initialization. [EN-13:01] Fix a problem where frames sent to additional MAC addresses are not forwarded to the vtnet(4) interface. [EN-13:02] Approved by: so (delphij) Modified: releng/8.4/UPDATING releng/8.4/sys/conf/newvers.sh releng/8.4/sys/dev/fxp/if_fxp.c releng/8.4/sys/dev/virtio/network/if_vtnet.c Modified: releng/8.4/UPDATING ============================================================================== --- releng/8.4/UPDATING Fri Jun 28 05:21:21 2013 (r252333) +++ releng/8.4/UPDATING Fri Jun 28 05:21:59 2013 (r252334) @@ -15,6 +15,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20130628: p1 FreeBSD-EN-13:01.fxp + FreeBSD-EN-13:02.vtnet + Fix a problem where dhclient(8) utility tries to initilaize an + fxp(4) forever because the driver resets the controller chip + twice upon initialization. [EN-13:01] + + Fix a problem where frames sent to additional MAC addresses are + not forwarded to the vtnet(4) interface. [EN-13:02] + 20130429: Fix a bug that allows NFS clients to issue READDIR on files. Modified: releng/8.4/sys/conf/newvers.sh ============================================================================== --- releng/8.4/sys/conf/newvers.sh Fri Jun 28 05:21:21 2013 (r252333) +++ releng/8.4/sys/conf/newvers.sh Fri Jun 28 05:21:59 2013 (r252334) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.4" -BRANCH="RELEASE" +BRANCH="RELEASE-p1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/8.4/sys/dev/fxp/if_fxp.c ============================================================================== --- releng/8.4/sys/dev/fxp/if_fxp.c Fri Jun 28 05:21:21 2013 (r252333) +++ releng/8.4/sys/dev/fxp/if_fxp.c Fri Jun 28 05:21:59 2013 (r252334) @@ -1074,7 +1074,8 @@ fxp_suspend(device_t dev) pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; sc->flags |= FXP_FLAG_WOL; /* Reconfigure hardware to accept magic frames. */ - fxp_init_body(sc, 1); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + fxp_init_body(sc, 0); } pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2); } @@ -2140,8 +2141,10 @@ fxp_tick(void *xsc) */ if (sc->rx_idle_secs > FXP_MAX_RX_IDLE) { sc->rx_idle_secs = 0; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 1); + } return; } /* @@ -2239,6 +2242,7 @@ fxp_watchdog(struct fxp_softc *sc) device_printf(sc->dev, "device timeout\n"); sc->ifp->if_oerrors++; + sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 1); } @@ -2273,6 +2277,10 @@ fxp_init_body(struct fxp_softc *sc, int int i, prm; FXP_LOCK_ASSERT(sc, MA_OWNED); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + /* * Cancel any pending I/O */ @@ -2812,6 +2820,7 @@ fxp_miibus_statchg(device_t dev) */ if (sc->revision == FXP_REV_82557) return; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 0); } @@ -2835,9 +2844,10 @@ fxp_ioctl(struct ifnet *ifp, u_long comm if (ifp->if_flags & IFF_UP) { if (((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) && ((ifp->if_flags ^ sc->if_flags) & - (IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0) + (IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 0); - else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + } else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) fxp_init_body(sc, 1); } else { if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) @@ -2850,8 +2860,10 @@ fxp_ioctl(struct ifnet *ifp, u_long comm case SIOCADDMULTI: case SIOCDELMULTI: FXP_LOCK(sc); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 0); + } FXP_UNLOCK(sc); break; @@ -2941,8 +2953,10 @@ fxp_ioctl(struct ifnet *ifp, u_long comm ~(IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM); reinit++; } - if (reinit > 0 && ifp->if_flags & IFF_UP) + if (reinit > 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; fxp_init_body(sc, 0); + } FXP_UNLOCK(sc); VLAN_CAPABILITIES(ifp); break; Modified: releng/8.4/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- releng/8.4/sys/dev/virtio/network/if_vtnet.c Fri Jun 28 05:21:21 2013 (r252333) +++ releng/8.4/sys/dev/virtio/network/if_vtnet.c Fri Jun 28 05:21:59 2013 (r252334) @@ -2470,9 +2470,9 @@ vtnet_rx_filter_mac(struct vtnet_softc * sglist_init(&sg, 4, segs); error |= sglist_append(&sg, &hdr, sizeof(struct virtio_net_ctrl_hdr)); error |= sglist_append(&sg, &filter->vmf_unicast, - sizeof(struct vtnet_mac_table)); + sizeof(uint32_t) + filter->vmf_unicast.nentries * ETHER_ADDR_LEN); error |= sglist_append(&sg, &filter->vmf_multicast, - sizeof(struct vtnet_mac_table)); + sizeof(uint32_t) + filter->vmf_multicast.nentries * ETHER_ADDR_LEN); error |= sglist_append(&sg, &ack, sizeof(uint8_t)); KASSERT(error == 0 && sg.sg_nseg == 4, ("error adding MAC filtering message to sglist"));