svn commit: r253196 - stable/8/sys/dev/bge

Pyun YongHyeon yongari at FreeBSD.org
Thu Jul 11 08:18:46 UTC 2013


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);
 	}


More information about the svn-src-stable-8 mailing list