From nobody@FreeBSD.org  Fri Nov 20 22:02:54 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BB9A2106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 20 Nov 2009 22:02:54 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id A9B268FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 20 Nov 2009 22:02:54 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKM2sJT001196
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 20 Nov 2009 22:02:54 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id nAKM2sji001195;
	Fri, 20 Nov 2009 22:02:54 GMT
	(envelope-from nobody)
Message-Id: <200911202202.nAKM2sji001195@www.freebsd.org>
Date: Fri, 20 Nov 2009 22:02:54 GMT
From: Tibor Vidok <tibor.vidok@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Fast irq registration in em driver
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         140728
>Category:       kern
>Synopsis:       [em] [patch] Fast irq registration in em driver
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    jfv
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 20 22:10:01 UTC 2009
>Closed-Date:    
>Last-Modified:  Sat Jun 23 21:52:39 UTC 2012
>Originator:     Tibor Vidok
>Release:        >=FreeBSD-7.0
>Organization:
>Environment:
>Description:
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.

>How-To-Repeat:
Configure your kernel to use em driver with fast interrupts and try to use it.
>Fix:

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,
 #else
 	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,
 #endif
 	    &adapter->tag[0])) != 0) {
 		device_printf(dev, "Failed to register fast interrupt "


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Nov 20 23:09:35 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140728 
Responsible-Changed-From-To: freebsd-net->jfv 
Responsible-Changed-By: andre 
Responsible-Changed-When: Mon Aug 23 17:43:51 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140728 
Responsible-Changed-From-To: jfv->eadler 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Tue Jun 19 06:55:07 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140728 
Responsible-Changed-From-To: eadler->jfv 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Sat Jun 23 21:52:38 UTC 2012 
Responsible-Changed-Why:  
oops back to jfv 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140728 
>Unformatted:
