From 8a2e22dec0bedd7ba9f517ec3e7804adf0046876 Mon Sep 17 00:00:00 2001 From: Scott Long Date: Tue, 19 Oct 2004 02:42:49 +0000 Subject: [PATCH] Use and alignment of 1 instead of ETHER_ALIGN for rx and tx buffers and jumbo frames. BGE hardware with the rx alignment bug will still be handled by the calls to m_adj() that already exist. m_adj() is probably better suited for this task anyways. Just as with if_em, this saves a malloc + several locks per packet and prevents unneeded data copying within busdma. --- sys/dev/bge/if_bge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 34341caf79f..35cf6cdb01b 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -1935,7 +1935,7 @@ bge_dma_alloc(dev) * Create tag for RX mbufs. */ nseg = 32; - error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, ETHER_ALIGN, + error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * nseg, nseg, MCLBYTES, 0, NULL, NULL, &sc->bge_cdata.bge_mtag); @@ -2024,7 +2024,7 @@ bge_dma_alloc(dev) */ error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, - ETHER_ALIGN, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, + 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * nseg, nseg, BGE_JLEN, 0, NULL, NULL, &sc->bge_cdata.bge_mtag_jumbo);