summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2015-07-04 03:07:28 +0000
committeradrian <adrian@FreeBSD.org>2015-07-04 03:07:28 +0000
commit1977c162e96bc6a3b6737293ebd7c4af56e6ea0b (patch)
tree95642846016a730d9f35b606bb2ba5756cfa276f
parente44e1c10f7185e84afe97a0190e157df199c1bd6 (diff)
downloadFreeBSD-src-1977c162e96bc6a3b6737293ebd7c4af56e6ea0b.zip
FreeBSD-src-1977c162e96bc6a3b6737293ebd7c4af56e6ea0b.tar.gz
Call the WMAC DDR flush before handling an interrupt for the
Atheros AHB (internally) connected MAC. TODO: * verify the interrupt was for us before doing the DDR flush.
-rw-r--r--sys/dev/ath/if_ath_ahb.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/ath/if_ath_ahb.c b/sys/dev/ath/if_ath_ahb.c
index ffe825d..fe6420c 100644
--- a/sys/dev/ath/if_ath_ahb.c
+++ b/sys/dev/ath/if_ath_ahb.c
@@ -117,6 +117,14 @@ ath_ahb_probe(device_t dev)
return ENXIO;
}
+static void
+ath_ahb_intr(void *arg)
+{
+ /* XXX TODO: check if its ours! */
+ ar71xx_device_flush_ddr(AR71XX_CPU_DDR_FLUSH_WMAC);
+ ath_intr(arg);
+}
+
static int
ath_ahb_attach(device_t dev)
{
@@ -212,7 +220,7 @@ ath_ahb_attach(device_t dev)
}
if (bus_setup_intr(dev, psc->sc_irq,
INTR_TYPE_NET | INTR_MPSAFE,
- NULL, ath_intr, sc, &psc->sc_ih)) {
+ NULL, ath_ahb_intr, sc, &psc->sc_ih)) {
device_printf(dev, "could not establish interrupt\n");
goto bad2;
}
OpenPOWER on IntegriCloud