mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
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:
parent
f51df9ed11
commit
c1b677aa80
2 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue