From: stsp Date: Tue, 28 May 2024 09:26:55 +0000 (+0000) Subject: fix previous such that firmware crash recovery happens in non-debug builds X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a891b6723d2448438a948e245a6e48c566922a61;p=openbsd fix previous such that firmware crash recovery happens in non-debug builds --- diff --git a/sys/dev/pci/if_qwx_pci.c b/sys/dev/pci/if_qwx_pci.c index fdd710cd45b..f661822e4c7 100644 --- a/sys/dev/pci/if_qwx_pci.c +++ b/sys/dev/pci/if_qwx_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_qwx_pci.c,v 1.18 2024/05/28 09:07:32 stsp Exp $ */ +/* $OpenBSD: if_qwx_pci.c,v 1.19 2024/05/28 09:26:55 stsp Exp $ */ /* * Copyright 2023 Stefan Sperling @@ -4082,21 +4082,21 @@ qwx_pci_intr(void *arg) if (ee == MHI_EE_RDDM) { /* Firmware crash, e.g. due to invalid DMA memory access. */ psc->bhi_ee = ee; - if (!psc->rddm_triggered) { #ifdef QWX_DEBUG + if (!psc->rddm_triggered) { /* Write fw memory dump to root's home directory. */ task_add(systq, &psc->rddm_task); psc->rddm_triggered = 1; -#endif - } else { - printf("%s: fatal firmware error\n", - sc->sc_dev.dv_xname); - if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, sc->sc_flags)) { - /* Try to reset the device. */ - set_bit(ATH11K_FLAG_CRASH_FLUSH, sc->sc_flags); - task_add(systq, &sc->init_task); - } } +#else + printf("%s: fatal firmware error\n", + sc->sc_dev.dv_xname); + if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, sc->sc_flags)) { + /* Try to reset the device. */ + set_bit(ATH11K_FLAG_CRASH_FLUSH, sc->sc_flags); + task_add(systq, &sc->init_task); + } +#endif return 1; } else if (psc->bhi_ee == MHI_EE_PBL || psc->bhi_ee == MHI_EE_SBL) { int new_ee = -1, new_mhi_state = -1;