diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2008-05-14 21:07:25 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2008-05-14 21:07:25 +0000 |
| commit | ef307017cbd676bc3c55fd4367019a6f9e3de27d (patch) | |
| tree | 419a423b897d22a280fcfb27db899af3a1980d61 /sys/dev | |
| parent | bb134c884826274a43e3cc90a1d04028d7f5d824 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/bge/if_bge.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 66627deb681d..18c702db2384 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -1894,16 +1894,10 @@ bge_dma_alloc(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), /* parent */ - 1, 0, /* alignment, boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - MAXBSIZE, BGE_NSEG_NEW, /* maxsize, nsegments */ - BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ - 0, /* flags */ - NULL, NULL, /* lockfunc, lockarg */ - &sc->bge_cdata.bge_parent_tag); + error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), + 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, + NULL, BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, + 0, NULL, NULL, &sc->bge_cdata.bge_parent_tag); if (error != 0) { device_printf(sc->bge_dev, @@ -1912,7 +1906,7 @@ bge_dma_alloc(device_t dev) } /* - * Create tag for RX mbufs. + * Create tag for mbufs. */ error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, @@ -3393,7 +3387,7 @@ bge_encap(struct bge_softc *sc, struct mbuf **m_head, uint32_t *txidx) error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_mtag, map, m, segs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { - m = m_defrag(m, M_DONTWAIT); + m = m_collapse(m, M_DONTWAIT, BGE_NSEG_NEW); if (m == NULL) { m_freem(*m_head); *m_head = NULL; |
