diff options
author | adrian <adrian@FreeBSD.org> | 2015-07-04 03:07:28 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2015-07-04 03:07:28 +0000 |
commit | 1977c162e96bc6a3b6737293ebd7c4af56e6ea0b (patch) | |
tree | 95642846016a730d9f35b606bb2ba5756cfa276f | |
parent | e44e1c10f7185e84afe97a0190e157df199c1bd6 (diff) | |
download | FreeBSD-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.c | 10 |
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; } |