From owner-svn-src-stable-8@FreeBSD.ORG Fri Jul 12 02:28:36 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3996A48A; Fri, 12 Jul 2013 02:28:36 +0000 (UTC) (envelope-from yongari@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 2BF191291; Fri, 12 Jul 2013 02:28:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6C2SaTj016402; Fri, 12 Jul 2013 02:28:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6C2SaO5016401; Fri, 12 Jul 2013 02:28:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201307120228.r6C2SaO5016401@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 12 Jul 2013 02:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r253246 - stable/8/sys/dev/hme X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jul 2013 02:28:36 -0000 Author: yongari Date: Fri Jul 12 02:28:35 2013 New Revision: 253246 URL: http://svnweb.freebsd.org/changeset/base/253246 Log: MFC r253134: Avoid controller reinitialization which could be triggered by dhclient(8) or alias addresses are added. Modified: stable/8/sys/dev/hme/if_hme.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/hme/ (props changed) Modified: stable/8/sys/dev/hme/if_hme.c ============================================================================== --- stable/8/sys/dev/hme/if_hme.c Fri Jul 12 02:28:01 2013 (r253245) +++ stable/8/sys/dev/hme/if_hme.c Fri Jul 12 02:28:35 2013 (r253246) @@ -742,6 +742,10 @@ hme_init_locked(struct hme_softc *sc) u_int32_t n, v; HME_LOCK_ASSERT(sc, MA_OWNED); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + /* * Initialization sequence. The numbered steps below correspond * to the sequence outlined in section 6.3.5.1 in the Ethernet @@ -1324,6 +1328,7 @@ hme_eint(struct hme_softc *sc, u_int sta /* check for fatal errors that needs reset to unfreeze DMA engine */ if ((status & HME_SEB_STAT_FATAL_ERRORS) != 0) { HME_WHINE(sc->sc_dev, "error signaled, status=%#x\n", status); + sc->sc_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; hme_init_locked(sc); } } @@ -1370,6 +1375,7 @@ hme_watchdog(struct hme_softc *sc) device_printf(sc->sc_dev, "device timeout (no link)\n"); ++ifp->if_oerrors; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; hme_init_locked(sc); hme_start_locked(ifp); return (EJUSTRETURN);