From owner-freebsd-bugs@FreeBSD.ORG Fri Nov 20 22:10:01 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDDDD10656A5 for ; Fri, 20 Nov 2009 22:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9FD1C8FC17 for ; Fri, 20 Nov 2009 22:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKMA11l084528 for ; Fri, 20 Nov 2009 22:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nAKMA1Gi084527; Fri, 20 Nov 2009 22:10:01 GMT (envelope-from gnats) Resent-Date: Fri, 20 Nov 2009 22:10:01 GMT Resent-Message-Id: <200911202210.nAKMA1Gi084527@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tibor Vidok Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB9A2106566C for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/140728: Fast irq registration in em driver X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2009 22:10:02 -0000 >Number: 140728 >Category: kern >Synopsis: Fast irq registration in em driver >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >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: >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: >Unformatted: