kern/140728: Fast irq registration in em driver

Tibor Vidok tibor.vidok at
Fri Nov 20 22:10:02 UTC 2009

>Number:         140728
>Category:       kern
>Synopsis:       Fast irq registration in em driver
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 20 22:10:01 UTC 2009
>Originator:     Tibor Vidok
>Release:        >=FreeBSD-7.0
I have noticed that parameters of bus_setup_intr() are not in the
correct order when em_allocate_legacy() registers the FAST IRQ handler.
I have found this error in FreeBSD-7.0 release, and is still exists in
HEAD version.

Configure your kernel to use em driver with fast interrupts and try to use it.

In the attachment you can find the patch which solves the problem for
the HEAD version.

Patch attached with submission follows:

Index: if_em.c
--- if_em.c	(revision 199611)
+++ if_em.c	(working copy)
@@ -2882,7 +2882,7 @@
 	    INTR_TYPE_NET | INTR_FAST, em_irq_fast, adapter,
 	if ((error = bus_setup_intr(dev, adapter->res[0],
-	    INTR_TYPE_NET, em_irq_fast, NULL, adapter,
+	    INTR_TYPE_NET, NULL, em_irq_fast, adapter,
 	    &adapter->tag[0])) != 0) {
 		device_printf(dev, "Failed to register fast interrupt "


More information about the freebsd-bugs mailing list