Date: Thu, 19 Mar 2009 16:44:37 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r190082 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/bge dev/cxgb Message-ID: <200903191644.n2JGib4g069434@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Thu Mar 19 16:44:37 2009 New Revision: 190082 URL: http://svn.freebsd.org/changeset/base/190082 Log: MFC: r188164, r188457 - device_shutdown returns an int. - Don't reset the PHY probe retry counter within the loop so it will eventually terminate as intended. [1] Submitted by: Helen Zhang [1] Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/bge/if_bge.c stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/dev/bge/if_bge.c ============================================================================== --- stable/7/sys/dev/bge/if_bge.c Thu Mar 19 16:39:59 2009 (r190081) +++ stable/7/sys/dev/bge/if_bge.c Thu Mar 19 16:44:37 2009 (r190082) @@ -348,7 +348,7 @@ static void bge_init_locked(struct bge_s static void bge_init(void *); static void bge_stop(struct bge_softc *); static void bge_watchdog(struct bge_softc *); -static void bge_shutdown(device_t); +static int bge_shutdown(device_t); static int bge_ifmedia_upd_locked(struct ifnet *); static int bge_ifmedia_upd(struct ifnet *); static void bge_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -2674,11 +2674,11 @@ bge_attach(device_t dev) * if we get a conflict with the ASF firmware accessing * the PHY. */ + trys = 0; BGE_CLRBIT(sc, BGE_MODE_CTL, BGE_MODECTL_STACKUP); again: bge_asf_driver_up(sc); - trys = 0; if (mii_phy_probe(dev, &sc->bge_miibus, bge_ifmedia_upd, bge_ifmedia_sts)) { if (trys++ < 4) { @@ -4280,17 +4280,18 @@ bge_stop(struct bge_softc *sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void +static int bge_shutdown(device_t dev) { struct bge_softc *sc; sc = device_get_softc(dev); - BGE_LOCK(sc); bge_stop(sc); bge_reset(sc); BGE_UNLOCK(sc); + + return (0); } static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903191644.n2JGib4g069434>