From 1bb0c2b5f631561341dcd1a714b22acde0bde3f2 Mon Sep 17 00:00:00 2001 From: stsp Date: Fri, 20 Aug 2021 00:22:54 +0000 Subject: [PATCH] Revert previous; Turns out the start_hw() functions don't always work right during the resume path. To be revisited later. --- sys/dev/pci/if_iwm.c | 10 ++++++++-- sys/dev/pci/if_iwx.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index cfa97343e2f..c1e641f4456 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.359 2021/08/19 18:45:11 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.360 2021/08/20 00:22:54 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -11425,7 +11425,13 @@ iwm_resume(struct iwm_softc *sc) reg = pci_conf_read(sc->sc_pct, sc->sc_pcitag, 0x40); pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, reg & ~0xff00); - return iwm_start_hw(sc); + /* reconfigure the MSI-X mapping to get the correct IRQ for rfkill */ + iwm_conf_msix_hw(sc, 0); + + iwm_enable_rfkill_int(sc); + iwm_check_rfkill(sc); + + return iwm_prepare_card_hw(sc); } int diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index dfe5373d610..701d3028e5a 100644 --- a/sys/dev/pci/if_iwx.c +++ b/sys/dev/pci/if_iwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwx.c,v 1.93 2021/08/19 18:45:11 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.94 2021/08/20 00:22:54 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -9556,7 +9556,13 @@ iwx_resume(struct iwx_softc *sc) reg = pci_conf_read(sc->sc_pct, sc->sc_pcitag, 0x40); pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, reg & ~0xff00); - return iwx_start_hw(sc); + /* reconfigure the MSI-X mapping to get the correct IRQ for rfkill */ + iwx_conf_msix_hw(sc, 0); + + iwx_enable_rfkill_int(sc); + iwx_check_rfkill(sc); + + return iwx_prepare_card_hw(sc); } int -- 2.20.1