From owner-svn-src-stable-7@FreeBSD.ORG Fri Sep 24 19:22:41 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80C901065670; Fri, 24 Sep 2010 19:22:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F82B8FC20; Fri, 24 Sep 2010 19:22:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8OJMfPq036872; Fri, 24 Sep 2010 19:22:41 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8OJMfvT036870; Fri, 24 Sep 2010 19:22:41 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201009241922.o8OJMfvT036870@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 24 Sep 2010 19:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213127 - stable/7/sys/dev/vr X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2010 19:22:41 -0000 Author: yongari Date: Fri Sep 24 19:22:41 2010 New Revision: 213127 URL: http://svn.freebsd.org/changeset/base/213127 Log: MFC r211765: Remove unnecessary controller reinitialization. CAM filter handling was rewritten long time ago so it should not require controller reinitialization. PR: kern/87506 Modified: stable/7/sys/dev/vr/if_vr.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/vr/if_vr.c ============================================================================== --- stable/7/sys/dev/vr/if_vr.c Fri Sep 24 19:19:53 2010 (r213126) +++ stable/7/sys/dev/vr/if_vr.c Fri Sep 24 19:22:41 2010 (r213127) @@ -1557,6 +1557,7 @@ vr_tick(void *xsc) sc->vr_stat.num_restart++; vr_stop(sc); vr_reset(sc); + sc->vr_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; vr_init_locked(sc); sc->vr_flags &= ~VR_F_RESTART; } @@ -2008,6 +2009,9 @@ vr_init_locked(struct vr_softc *sc) ifp = sc->vr_ifp; mii = device_get_softc(sc->vr_miibus); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + /* Cancel pending I/O and free all RX/TX buffers. */ vr_stop(sc); vr_reset(sc); @@ -2279,6 +2283,7 @@ vr_watchdog(struct vr_softc *sc) if_printf(sc->vr_ifp, "watchdog timeout " "(missed link)\n"); ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; vr_init_locked(sc); return; } @@ -2288,6 +2293,7 @@ vr_watchdog(struct vr_softc *sc) vr_stop(sc); vr_reset(sc); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; vr_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))