deraadt@ pointed out that the resume code path only ran a small part
of the entire hardware init sequence which runs when the device is
first attached at boot time.
In particular, we didn't wait for device stabilization, and MSI-X
initialization was attempted too early, and the "persistence bit"
workaround was skipped (which, ironically, is supposed to address
a known hardware bug during resume).
Tested by jcs on AX201 and by myself on 8265 with no regressions seen.
-/* $OpenBSD: if_iwm.c,v 1.358 2021/08/19 06:02:04 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.359 2021/08/19 18:45:11 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
reg = pci_conf_read(sc->sc_pct, sc->sc_pcitag, 0x40);
pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, reg & ~0xff00);
- /* 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);
+ return iwm_start_hw(sc);
}
int
-/* $OpenBSD: if_iwx.c,v 1.92 2021/08/19 06:02:04 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.93 2021/08/19 18:45:11 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
reg = pci_conf_read(sc->sc_pct, sc->sc_pcitag, 0x40);
pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, reg & ~0xff00);
- /* 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);
+ return iwx_start_hw(sc);
}
int