From 416e388ea3d8cffc788c2805f6194c51e0c5fe28 Mon Sep 17 00:00:00 2001 From: denis Date: Wed, 22 Mar 2023 17:01:07 +0000 Subject: [PATCH] Reverse bus_space_unmap(9) order When `unmap_1` is reached we should bus_space_unmap() sc_hwrm_* and not sc_db_*. ok miod@ --- sys/dev/pci/if_bnxt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/if_bnxt.c b/sys/dev/pci/if_bnxt.c index a85208a0113..4eb58b16c12 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.37 2022/06/27 10:02:20 bluhm Exp $ */ +/* $OpenBSD: if_bnxt.c,v 1.38 2023/03/22 17:01:07 denis Exp $ */ /*- * Broadcom NetXtreme-C/E network driver. * @@ -725,11 +725,11 @@ deintr: free_resp: bnxt_dmamem_free(sc, sc->sc_cmd_resp); unmap_2: - bus_space_unmap(sc->sc_hwrm_t, sc->sc_hwrm_h, sc->sc_hwrm_s); - sc->sc_hwrm_s = 0; -unmap_1: bus_space_unmap(sc->sc_db_t, sc->sc_db_h, sc->sc_db_s); sc->sc_db_s = 0; +unmap_1: + bus_space_unmap(sc->sc_hwrm_t, sc->sc_hwrm_h, sc->sc_hwrm_s); + sc->sc_hwrm_s = 0; } void -- 2.20.1