svn commit: r253195 - stable/9/sys/dev/bge

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


Author: yongari
Date: Thu Jul 11 08:18:00 2013
New Revision: 253195
URL: http://svnweb.freebsd.org/changeset/base/253195

Log:
  MFC r245870:
    bge_attach() can fail before attaching mii(4). So make sure to check
    bge_miibus before detaching mii(4).

Modified:
  stable/9/sys/dev/bge/if_bge.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bge/if_bge.c
==============================================================================
--- stable/9/sys/dev/bge/if_bge.c	Thu Jul 11 07:17:03 2013	(r253194)
+++ stable/9/sys/dev/bge/if_bge.c	Thu Jul 11 08:18:00 2013	(r253195)
@@ -3911,9 +3911,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-all mailing list