Date: Thu, 11 Jul 2013 08:18:46 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r253196 - stable/8/sys/dev/bge Message-ID: <201307110818.r6B8Ikvu087888@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Thu Jul 11 08:18:46 2013 New Revision: 253196 URL: http://svnweb.freebsd.org/changeset/base/253196 Log: MFC r245870: bge_attach() can fail before attaching mii(4). So make sure to check bge_miibus before detaching mii(4). Modified: stable/8/sys/dev/bge/if_bge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/bge/ (props changed) Modified: stable/8/sys/dev/bge/if_bge.c ============================================================================== --- stable/8/sys/dev/bge/if_bge.c Thu Jul 11 08:18:00 2013 (r253195) +++ stable/8/sys/dev/bge/if_bge.c Thu Jul 11 08:18:46 2013 (r253196) @@ -3924,9 +3924,9 @@ bge_detach(device_t dev) if (sc->bge_tq) taskqueue_drain(sc->bge_tq, &sc->bge_intr_task); - if (sc->bge_flags & BGE_FLAG_TBI) { + if (sc->bge_flags & BGE_FLAG_TBI) ifmedia_removeall(&sc->bge_ifmedia); - } else { + else if (sc->bge_miibus != NULL) { bus_generic_detach(dev); device_delete_child(dev, sc->bge_miibus); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307110818.r6B8Ikvu087888>