PERFORCE change 103339 for review

Paolo Pisati piso at FreeBSD.org
Sun Aug 6 13:57:06 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=103339

Change 103339 by piso at piso_newluxor on 2006/08/06 13:56:46

	Re got its filter too.

Affected files ...

.. //depot/projects/soc2006/intr_filter/dev/re/if_re.c#8 edit
.. //depot/projects/soc2006/intr_filter/pci/if_rlreg.h#4 edit

Differences ...

==== //depot/projects/soc2006/intr_filter/dev/re/if_re.c#8 (text+ko) ====

@@ -241,10 +241,10 @@
 static void re_poll		(struct ifnet *, enum poll_cmd, int);
 static void re_poll_locked	(struct ifnet *, enum poll_cmd, int);
 #endif
-static int re_intr		(void *);
+static int re_filter		(void *);
 static void re_tick		(void *);
 static void re_tx_task		(void *, int);
-static void re_int_task		(void *, int);
+static void re_int_task		(void *);
 static void re_start		(struct ifnet *);
 static int re_ioctl		(struct ifnet *, u_long, caddr_t);
 static void re_init		(void *);
@@ -1261,7 +1261,6 @@
 	IFQ_SET_READY(&ifp->if_snd);
 
 	TASK_INIT(&sc->rl_txtask, 1, re_tx_task, ifp);
-	TASK_INIT(&sc->rl_inttask, 0, re_int_task, sc);
 
 	/*
 	 * Call MI attach routine.
@@ -1288,7 +1287,7 @@
 
 	/* Hook interrupt last to avoid having to lock softc */
 	error = bus_setup_intr(dev, sc->rl_irq, INTR_TYPE_NET,
-	    re_intr, NULL, sc, &sc->rl_intrhand);
+	    re_filter, re_int_task, sc, &sc->rl_intrhand);
 	if (error) {
 		device_printf(dev, "couldn't set up irq\n");
 		ether_ifdetach(ifp);
@@ -1900,7 +1899,7 @@
 #endif /* DEVICE_POLLING */
 
 static int
-re_intr(arg)
+re_filter(arg)
 	void			*arg;
 {
 	struct rl_softc		*sc;
@@ -1915,15 +1914,12 @@
                 return(FILTER_STRAY);
 	CSR_WRITE_2(sc, RL_IMR, 0);
 
-	taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_inttask);
-
-	return(FILTER_HANDLED);
+	return(FILTER_HANDLED | FILTER_SCHEDULE_THREAD);
 }
 
 static void
-re_int_task(arg, npending)
+re_int_task(arg)
 	void			*arg;
-	int			npending;
 {
 	struct rl_softc		*sc;
 	struct ifnet		*ifp;
@@ -1976,11 +1972,6 @@
 
 	RL_UNLOCK(sc);
 
-        if ((CSR_READ_2(sc, RL_ISR) & RL_INTRS_CPLUS) || rval) {
-		taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_inttask);
-		return;
-	}
-
 	CSR_WRITE_2(sc, RL_IMR, RL_INTRS_CPLUS);
 
 	return;

==== //depot/projects/soc2006/intr_filter/pci/if_rlreg.h#4 (text+ko) ====

@@ -732,7 +732,6 @@
 #endif
 
 	struct task		rl_txtask;
-	struct task		rl_inttask;
 
 	struct mtx		rl_intlock;
 	int			rl_txstart;


More information about the p4-projects mailing list