Index | Thread | Search

From:
Brad Smith <brad@comstyle.com>
Subject:
iavf 64-bit dma
To:
tech@openbsd.org
Date:
Fri, 13 Mar 2026 06:34:52 -0400

Download raw body.

Thread
  • Brad Smith:

    iavf 64-bit dma

With iavf(4) the BUS_DMA_64BIT flag is missing from bus_dmamem_alloc().

Tested with

iavf0 at pci27 dev 0 function 0 "Intel XL710/X710 VF" rev 0x01, VF version 1.1, VF 0 VSI 26, msix, 4 queues, address 00:0c:29:4f:8c:3c


Index: if_iavf.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_iavf.c,v
retrieving revision 1.27
diff -u -p -u -p -U7 -r1.27 if_iavf.c
--- if_iavf.c	20 Nov 2025 01:48:52 -0000	1.27
+++ if_iavf.c	25 Feb 2026 22:40:05 -0000
@@ -3149,15 +3149,15 @@ iavf_dmamem_alloc(struct iavf_softc *sc,
 	if (bus_dmamap_create(sc->sc_dmat, ixm->ixm_size, 1,
 	    ixm->ixm_size, 0,
 	    BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW | BUS_DMA_64BIT,
 	    &ixm->ixm_map) != 0)
 		return (1);
 	if (bus_dmamem_alloc(sc->sc_dmat, ixm->ixm_size,
 	    align, 0, &ixm->ixm_seg, 1, &ixm->ixm_nsegs,
-	    BUS_DMA_WAITOK | BUS_DMA_ZERO) != 0)
+	    BUS_DMA_WAITOK | BUS_DMA_ZERO | BUS_DMA_64BIT) != 0)
 		goto destroy;
 	if (bus_dmamem_map(sc->sc_dmat, &ixm->ixm_seg, ixm->ixm_nsegs,
 	    ixm->ixm_size, &ixm->ixm_kva, BUS_DMA_WAITOK) != 0)
 		goto free;
 	if (bus_dmamap_load(sc->sc_dmat, ixm->ixm_map, ixm->ixm_kva,
 	    ixm->ixm_size, NULL, BUS_DMA_WAITOK) != 0)
 		goto unmap;