Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Dec 2008 18:36:36 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 154128 for review
Message-ID:  <200812051836.mB5Iaaxe021354@repoman.freebsd.org>

index | next in thread | raw e-mail

http://perforce.freebsd.org/chv.cgi?CH=154128

Change 154128 by sam@sam_ebb on 2008/12/05 18:36:04

	handle attach failure properly; kill some old dead code

Affected files ...

.. //depot/projects/vap/sys/arm/xscale/ixp425/if_npe.c#9 edit

Differences ...

==== //depot/projects/vap/sys/arm/xscale/ixp425/if_npe.c#9 (text+ko) ====

@@ -389,9 +389,12 @@
 	ether_ifattach(ifp, eaddr);
 	return 0;
 out:
-	npe_deactivate(dev);
 	if (ifp != NULL)
 		if_free(ifp);
+	NPE_LOCK_DESTROY(sc);
+	npe_deactivate(dev);
+	if (sc->sc_npe != NULL)
+		ixpnpe_detach(sc->sc_npe);
 	return error;
 }
 
@@ -877,13 +880,6 @@
 	bus_generic_detach(sc->sc_dev);
 	if (sc->sc_mii != NULL)
 		device_delete_child(sc->sc_dev, sc->sc_mii);
-#if 0
-	/* XXX sc_ioh and sc_miih */
-	if (sc->mem_res)
-		bus_release_resource(dev, SYS_RES_IOPORT,
-		    rman_get_rid(sc->mem_res), sc->mem_res);
-	sc->mem_res = 0;
-#endif
 }
 
 /*


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812051836.mB5Iaaxe021354>