From 3e1961268ecf12ff4ba5f522b3d6a8e185bdc1c0 Mon Sep 17 00:00:00 2001 From: Pyun YongHyeon Date: Mon, 26 Apr 2010 18:07:55 +0000 Subject: [PATCH] MFC r207071: Intialize interrupt moderation control register. The magic value was chosen by lots of trial and errors. The chosen value shows good interrupt moderation without additional latency. Without this change, controller can generate more than 140k interrupts per second under high network load. Submitted by: xclin cs dot nctu dot edu dot tw > --- sys/dev/sge/if_sge.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/sge/if_sge.c b/sys/dev/sge/if_sge.c index c4fb5c9bc8b..6c737bd3f42 100644 --- a/sys/dev/sge/if_sge.c +++ b/sys/dev/sge/if_sge.c @@ -1551,10 +1551,13 @@ sge_init_locked(struct sge_softc *sc) /* * XXX Try to mitigate interrupts. */ + CSR_WRITE_4(sc, IntrControl, 0x08880000); +#ifdef notyet if (sc->sge_intrcontrol != 0) CSR_WRITE_4(sc, IntrControl, sc->sge_intrcontrol); if (sc->sge_intrtimer != 0) CSR_WRITE_4(sc, IntrTimer, sc->sge_intrtimer); +#endif /* * Clear and enable interrupts.