The DC driver asks for an alignment of PAGE_SIZE for data buffers, but also

asks that each buffer be (2048 * 256) bytes long.  I suspect that alignment
isn't a real requirement since busdma only recently started honoring it.  The
size is also bogus.  Fix both of these and stop busdma from trying to
exhaust the system memory pool with bounce pages.

Submitted by: Kevin Oberman
MFC After: 7 days
This commit is contained in:
Scott Long 2005-03-08 23:25:46 +00:00
parent f51df9ed11
commit c1b677aa80
2 changed files with 6 additions and 6 deletions

View file

@ -2147,9 +2147,9 @@ dc_attach(device_t dev)
}
/* Allocate a busdma tag for mbufs. */
error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT,
BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * DC_TX_LIST_CNT,
DC_TX_LIST_CNT, MCLBYTES, 0, NULL, NULL, &sc->dc_mtag);
error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES DC_TX_LIST_CNT, MCLBYTES,
0, NULL, NULL, &sc->dc_mtag);
if (error) {
printf("dc%d: failed to allocate busdma tag\n", unit);
error = ENXIO;

View file

@ -2147,9 +2147,9 @@ dc_attach(device_t dev)
}
/* Allocate a busdma tag for mbufs. */
error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT,
BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * DC_TX_LIST_CNT,
DC_TX_LIST_CNT, MCLBYTES, 0, NULL, NULL, &sc->dc_mtag);
error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES DC_TX_LIST_CNT, MCLBYTES,
0, NULL, NULL, &sc->dc_mtag);
if (error) {
printf("dc%d: failed to allocate busdma tag\n", unit);
error = ENXIO;