From 8dd611f844cb9b64bffbd5731626cc101ec10ad7 Mon Sep 17 00:00:00 2001 From: dlg Date: Mon, 14 Mar 2022 23:41:42 +0000 Subject: [PATCH] unload the dmamap in bnxt_dmamem_free. this is technically not necessary, but it makes it feel symmetrical with bnxt_dmamem_alloc which loads it. ok jmatthew@ --- sys/dev/pci/if_bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/if_bnxt.c b/sys/dev/pci/if_bnxt.c index 47903b441d0..5cda9c1ff91 100644 --- a/sys/dev/pci/if_bnxt.c +++ b/sys/dev/pci/if_bnxt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnxt.c,v 1.35 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_bnxt.c,v 1.36 2022/03/14 23:41:42 dlg Exp $ */ /*- * Broadcom NetXtreme-C/E network driver. * @@ -452,6 +452,7 @@ bdmfree: void bnxt_dmamem_free(struct bnxt_softc *sc, struct bnxt_dmamem *m) { + bus_dmamap_unload(sc->sc_dmat, m->bdm_map); bus_dmamem_unmap(sc->sc_dmat, m->bdm_kva, m->bdm_size); bus_dmamem_free(sc->sc_dmat, &m->bdm_seg, 1); bus_dmamap_destroy(sc->sc_dmat, m->bdm_map); -- 2.20.1