PERFORCE change 153931 for review
Sam Leffler
sam at FreeBSD.org
Mon Dec 1 17:57:24 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=153931
Change 153931 by sam at 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
More information about the p4-projects
mailing list