diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-01-22 11:56:42 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-01-22 11:56:42 +0000 |
commit | 47c0c195de310ee1a259512e54f7a241e657f47b (patch) | |
tree | f3c8c31b0c525200995e12765e2d52239f117435 /sys/dev/fdt/dwmmc.c | |
parent | 9a098f26fb7197fdc311d827a0bfbb4130b88954 (diff) |
Ack SDIO interrupts earlier on dwmmc(4). While handling an SDIO
interrupt it is possible that the card immediately raises another
one. Since the interrupt seems to be edge triggered, and we only
acked it after said handling, it was possible we lose the next one.
This heavily improves bwfm(4) on the Pinebook Pro.
ok kettenis@
Diffstat (limited to 'sys/dev/fdt/dwmmc.c')
-rw-r--r-- | sys/dev/fdt/dwmmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/fdt/dwmmc.c b/sys/dev/fdt/dwmmc.c index a9d3ee564f4..3ab2e9ab88e 100644 --- a/sys/dev/fdt/dwmmc.c +++ b/sys/dev/fdt/dwmmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwmmc.c,v 1.22 2020/01/09 14:35:20 mpi Exp $ */ +/* $OpenBSD: dwmmc.c,v 1.23 2020/01/22 11:56:41 patrick Exp $ */ /* * Copyright (c) 2017 Mark Kettenis * @@ -545,6 +545,7 @@ dwmmc_intr(void *arg) stat = HREAD4(sc, SDMMC_MINTSTS); if (stat & SDMMC_RINTSTS_SDIO) { + HWRITE4(sc, SDMMC_RINTSTS, SDMMC_RINTSTS_SDIO); HCLR4(sc, SDMMC_INTMASK, SDMMC_RINTSTS_SDIO); sdmmc_card_intr(sc->sc_sdmmc); handled = 1; @@ -569,7 +570,6 @@ dwmmc_card_intr_ack(sdmmc_chipset_handle_t sch) { struct dwmmc_softc *sc = sch; - HWRITE4(sc, SDMMC_RINTSTS, SDMMC_RINTSTS_SDIO); HSET4(sc, SDMMC_INTMASK, SDMMC_RINTSTS_SDIO); } |