diff -u --label /home/riastradh/netbsd/hg/src/sys/dev/ic/bwi.c --label \#\ /home/riastradh/netbsd/hg/src/sys/dev/ic/bwi.c /tmp/riastradh/buffer-content-RLHXYd --- /home/riastradh/netbsd/hg/src/sys/dev/ic/bwi.c +++ # @@ -738,8 +738,7 @@ if (BWI_IS_SDIO(sc)) { intr_mask = 0xffffffff; } else { - /* XXX FIXME */ - intr_mask = CSR_READ_4(sc, BWI_MAC_INTR_MASK); + intr_mask = sc->sc_intr_mask; } DPRINTF(sc, BWI_DBG_INTR, "intr status 0x%08x mask 0x%08x -> 0x%08x\n", @@ -867,7 +866,11 @@ (ifp->if_flags & IFF_RUNNING) == 0) return (0); - /* Disable all interrupts */ + /* + * Save the interrupt mask for the softint handler, and disable + * all interrupts until the softint has completed. + */ + sc->sc_intr_mask = CSR_READ_4(sc, BWI_MAC_INTR_MASK); bwi_disable_intrs(sc, BWI_ALL_INTRS); if (BWI_IS_SDIO(sc)) { Diff finished. Tue Feb 18 23:25:35 2025