mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Fix alignment of RX bufs DMA map to be realistic. Maybe it works on
i386 (I don't know) but on amd64 at hand here, it paniced early at boot. (I'm pretty sure that PAGE_SIZE here was miscopied from another place during porting, where in OpenBSD bus_dmamem_alloc() is used, but there PAGE_SIZE means completely different thing.)
This commit is contained in:
parent
8b3ae668b1
commit
d0220c83e1
1 changed files with 2 additions and 2 deletions
|
|
@ -652,7 +652,7 @@ nfe_alloc_rx_ring(struct nfe_softc *sc, struct nfe_rx_ring *ring)
|
|||
physaddr = jbuf->physaddr;
|
||||
} else {
|
||||
error = bus_dma_tag_create(sc->nfe_parent_tag,
|
||||
PAGE_SIZE, 0, /* alignment, boundary */
|
||||
ETHER_ALIGN, 0, /* alignment, boundary */
|
||||
BUS_SPACE_MAXADDR_32BIT,/* lowaddr */
|
||||
BUS_SPACE_MAXADDR, /* highaddr */
|
||||
NULL, NULL, /* filter, filterarg */
|
||||
|
|
@ -681,7 +681,7 @@ nfe_alloc_rx_ring(struct nfe_softc *sc, struct nfe_rx_ring *ring)
|
|||
error = bus_dmamap_load(data->rx_data_tag, data->rx_data_map, mtod(data->m, void *),
|
||||
MCLBYTES, nfe_dma_map_segs, &data->rx_data_segs, BUS_DMA_NOWAIT);
|
||||
if (error != 0) {
|
||||
printf("nfe%d: could not load rx buf DMA map", sc->nfe_unit);
|
||||
printf("nfe%d: could not load rx buf DMA map\n", sc->nfe_unit);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue