Date: Tue, 2 Dec 2008 01:57:23 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 153931 for review Message-ID: <200812020157.mB21vNq5061715@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=153931 Change 153931 by sam@sam_ebb on 2008/12/02 01:56:38 o remove two bus_dmamap_destroy calls that were wrong; the memory was allocated with bus_dmamem_alloc and it manages the map so doing the explicit destroy calls resulted in duplicate free o compare ptr against NULL not zero o add comment Affected files ... .. //depot/projects/vap/sys/arm/xscale/ixp425/if_npe.c#7 edit Differences ... ==== //depot/projects/vap/sys/arm/xscale/ixp425/if_npe.c#7 (text+ko) ==== @@ -575,7 +575,6 @@ } bus_dmamap_unload(dma->buf_tag, dma->buf_map); bus_dmamem_free(dma->buf_tag, dma->hwbuf, dma->buf_map); - bus_dmamap_destroy(dma->buf_tag, dma->buf_map); } if (dma->buf != NULL) free(dma->buf, M_TEMP); @@ -870,14 +869,13 @@ bus_dmamap_unload(sc->sc_stats_tag, sc->sc_stats_map); bus_dmamem_free(sc->sc_stats_tag, sc->sc_stats, sc->sc_stats_map); - bus_dmamap_destroy(sc->sc_stats_tag, sc->sc_stats_map); } if (sc->sc_stats_tag != NULL) bus_dma_tag_destroy(sc->sc_stats_tag); npe_dma_destroy(sc, &sc->txdma); npe_dma_destroy(sc, &sc->rxdma); bus_generic_detach(sc->sc_dev); - if (sc->sc_mii) + if (sc->sc_mii != NULL) device_delete_child(sc->sc_dev, sc->sc_mii); #if 0 /* XXX sc_ioh and sc_miih */ @@ -1729,7 +1727,7 @@ struct npe_softc *sc = device_get_softc(dev); uint32_t v; - if (phy != sc->sc_phy) /* XXX */ + if (phy != sc->sc_phy) /* XXX should not happen */ return; v = (phy << NPE_MII_ADDR_SHL) | (reg << NPE_MII_REG_SHL) | data | NPE_MII_WRITE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812020157.mB21vNq5061715>