From: jmatthew Date: Wed, 25 May 2022 09:49:17 +0000 (+0000) Subject: As with if_em.c r1.350, and for the same reasons (arm64 systems with non X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d59ec8ec863f11a2edb49678a450b26bd2a10941;p=openbsd As with if_em.c r1.350, and for the same reasons (arm64 systems with non cache coherent PCIe), map the rx and tx rings coherent. tested by kevlo@ on rockpro64 ok dlg@ --- diff --git a/sys/dev/pci/if_aq_pci.c b/sys/dev/pci/if_aq_pci.c index 2d1304f82f1..a3a75169eff 100644 --- a/sys/dev/pci/if_aq_pci.c +++ b/sys/dev/pci/if_aq_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aq_pci.c,v 1.16 2022/04/06 18:59:29 naddy Exp $ */ +/* $OpenBSD: if_aq_pci.c,v 1.17 2022/05/25 09:49:17 jmatthew Exp $ */ /* $NetBSD: if_aq.c,v 1.27 2021/06/16 00:21:18 riastradh Exp $ */ /* @@ -3178,7 +3178,8 @@ aq_dmamem_alloc(struct aq_softc *sc, struct aq_dmamem *aqm, BUS_DMA_WAITOK | BUS_DMA_ZERO) != 0) goto destroy; if (bus_dmamem_map(sc->sc_dmat, &aqm->aqm_seg, aqm->aqm_nsegs, - aqm->aqm_size, &aqm->aqm_kva, BUS_DMA_WAITOK) != 0) + aqm->aqm_size, &aqm->aqm_kva, + BUS_DMA_WAITOK | BUS_DMA_COHERENT) != 0) goto free; if (bus_dmamap_load(sc->sc_dmat, aqm->aqm_map, aqm->aqm_kva, aqm->aqm_size, NULL, BUS_DMA_WAITOK) != 0)