From owner-svn-src-head@FreeBSD.ORG Sun Oct 14 23:00:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB9514E6; Sun, 14 Oct 2012 23:00:24 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3D138FC08; Sun, 14 Oct 2012 23:00:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9EN0OPr059742; Sun, 14 Oct 2012 23:00:24 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9EN0ONO059740; Sun, 14 Oct 2012 23:00:24 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210142300.q9EN0ONO059740@svn.freebsd.org> From: Tim Kientzle Date: Sun, 14 Oct 2012 23:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241563 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2012 23:00:24 -0000 Author: kientzle Date: Sun Oct 14 23:00:24 2012 New Revision: 241563 URL: http://svn.freebsd.org/changeset/base/241563 Log: Name cpsw_stop to cpsw_stop_locked consistently with other functions in this file that assume locks are already held. Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Sun Oct 14 22:58:12 2012 (r241562) +++ head/sys/arm/ti/cpsw/if_cpsw.c Sun Oct 14 23:00:24 2012 (r241563) @@ -93,7 +93,7 @@ static void cpsw_init(void *arg); static void cpsw_init_locked(void *arg); static void cpsw_start(struct ifnet *ifp); static void cpsw_start_locked(struct ifnet *ifp); -static void cpsw_stop(struct cpsw_softc *sc); +static void cpsw_stop_locked(struct cpsw_softc *sc); static int cpsw_ioctl(struct ifnet *ifp, u_long command, caddr_t data); static int cpsw_allocate_dma(struct cpsw_softc *sc); static int cpsw_free_dma(struct cpsw_softc *sc); @@ -397,7 +397,7 @@ cpsw_shutdown(device_t dev) CPSW_GLOBAL_LOCK(sc); - cpsw_stop(sc); + cpsw_stop_locked(sc); CPSW_GLOBAL_UNLOCK(sc); @@ -656,10 +656,12 @@ cpsw_start_locked(struct ifnet *ifp) } static void -cpsw_stop(struct cpsw_softc *sc) +cpsw_stop_locked(struct cpsw_softc *sc) { struct ifnet *ifp; + CPSW_GLOBAL_LOCK_ASSERT(sc) + ifp = sc->ifp; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) @@ -708,7 +710,7 @@ cpsw_ioctl(struct ifnet *ifp, u_long com } } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) - cpsw_stop(sc); + cpsw_stop_locked(sc); sc->cpsw_if_flags = ifp->if_flags; CPSW_GLOBAL_UNLOCK(sc); @@ -948,7 +950,7 @@ cpsw_watchdog(struct cpsw_softc *sc) ifp->if_oerrors++; if_printf(ifp, "watchdog timeout\n"); - cpsw_stop(sc); + cpsw_stop_locked(sc); cpsw_init_locked(sc); CPSW_GLOBAL_UNLOCK(sc);