Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jul 2015 03:07:29 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r285122 - head/sys/dev/ath
Message-ID:  <201507040307.t6437Tq0028270@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sat Jul  4 03:07:28 2015
New Revision: 285122
URL: https://svnweb.freebsd.org/changeset/base/285122

Log:
  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.

Modified:
  head/sys/dev/ath/if_ath_ahb.c

Modified: head/sys/dev/ath/if_ath_ahb.c
==============================================================================
--- head/sys/dev/ath/if_ath_ahb.c	Sat Jul  4 03:05:57 2015	(r285121)
+++ head/sys/dev/ath/if_ath_ahb.c	Sat Jul  4 03:07:28 2015	(r285122)
@@ -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;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507040307.t6437Tq0028270>