if (d->sd_mbuf != NULL && f) { if (f) m_freem(d->sd_mbuf); }
if ((d->sd_mbuf != NULL) && freeit) m_freem(d->sd_mbuf);
hme_newbuf(sc, d, f)	struct hme_softc *sc;	struct hme_sxd *d;	int f;{	bus_dmamap_t map = NULL;	struct mbuf *m;	MGETHDR(m, M_DONTWAIT, MT_DATA);	if (m == NULL)		return (ENOBUFS);	m->m_pkthdr.rcvif = &sc->sc_arpcom.ac_if;	MCLGET(m, M_DONTWAIT);	if ((m->m_flags & M_EXT) == 0) {		m_freem(m);		return (ENOBUFS);	}	if (bus_dmamap_create(sc->sc_dmatag, MCLBYTES, 1, MCLBYTES, 0,	    BUS_DMA_NOWAIT, &map) != 0) {		m_freem(m);		return (ENOBUFS);	}	if (bus_dmamap_load(sc->sc_dmatag, map, mtod(m, caddr_t), MCLBYTES,	    NULL, BUS_DMA_NOWAIT) != 0) {		bus_dmamap_destroy(sc->sc_dmatag, map);		m_freem(m);		return (ENOBUFS);	}	bus_dmamap_sync(sc->sc_dmatag, map, 0, map->dm_mapsize,	    BUS_DMASYNC_PREREAD);	if (d->sd_mbuf != NULL && f) {		if (f)			m_freem(d->sd_mbuf);	}	if (d->sd_map != NULL) {		bus_dmamap_sync(sc->sc_dmatag, d->sd_map,		    0, d->sd_map->dm_mapsize, BUS_DMASYNC_POSTREAD);		bus_dmamap_unload(sc->sc_dmatag, d->sd_map);		bus_dmamap_destroy(sc->sc_dmatag, d->sd_map);	}	m->m_data += HME_RX_OFFSET;	d->sd_mbuf = m;	d->sd_map = map;	return (0);}