From owner-freebsd-bugs@FreeBSD.ORG Sat Oct 6 13:40:03 2007 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 8FB5216A417 for ; Sat, 6 Oct 2007 13:40:03 +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 6C53E13C465 for ; Sat, 6 Oct 2007 13:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l96De3qD019712 for ; Sat, 6 Oct 2007 13:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l96De2x3019709; Sat, 6 Oct 2007 13:40:03 GMT (envelope-from gnats) Resent-Date: Sat, 6 Oct 2007 13:40:03 GMT Resent-Message-Id: <200710061340.l96De2x3019709@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, Boris Lytochkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48C2116A41B for ; Sat, 6 Oct 2007 13:35:10 +0000 (UTC) (envelope-from boris@e-port.ru) Received: from apollo.e-port.ru (apollo.e-port.ru [195.128.68.230]) by mx1.freebsd.org (Postfix) with ESMTP id C829C13C48E for ; Sat, 6 Oct 2007 13:35:09 +0000 (UTC) (envelope-from boris@e-port.ru) Received: (from localhost user: 'boris' uid#1014 fake: STDIN (boris@apollo.lan)) by apollo.e-port.ru id S2498521AbXJFNWP for ; Sat, 6 Oct 2007 17:22:15 +0400 Message-Id: Date: Sat, 6 Oct 2007 17:22:15 +0400 From: Boris Lytochkin Sender: Boris Lytochkin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/116975: make buildkernel fails on dev/em/em_if.c (1.65.2.24) when DEVICE_POLLING is set X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Boris Lytochkin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2007 13:40:03 -0000 >Number: 116975 >Category: kern >Synopsis: make buildkernel fails on dev/em/em_if.c (1.65.2.24) when DEVICE_POLLING is set >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 06 13:40:02 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Boris Lytochkin >Release: FreeBSD 6.2-STABLE-200708 i386 >Organization: >Environment: System: FreeBSD host 6.2-STABLE-200708 FreeBSD 6.2-STABLE-200708 #0: Fri Aug 17 09:31:11 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: make buildkernel fails on dev/em/em_if.c (1.65.2.24) when DEVICE_POLLING is set in kernel config /usr/src>make buildkernel ... cc -c -O2 -pipe -fno-strict-aliasing -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/pf -I/usr/src/sys/dev/ath -I/usr/src/sys/contrib/ngatm -I/usr/src/sys/dev/twa -I/usr/src/sys/dev/em -I/usr/src/sys/dev/em -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Werror /usr/src/sys/dev/em/if_em.c -I/usr/src/sys/dev/em /usr/src/sys/dev/em/if_em.c: In function `em_allocate_intr': /usr/src/sys/dev/em/if_em.c:2647: warning: passing arg 6 of `bus_setup_intr' from incompatible pointer type /usr/src/sys/dev/em/if_em.c:2647: error: too many arguments to function `bus_setup_intr' /usr/src/sys/dev/em/if_em.c: At top level: /usr/src/sys/dev/em/if_em.c:3888: warning: 'em_tx_purge' defined but not used *** Error code 1 Stop in /usr/obj/usr/src/sys/SMP6. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. >How-To-Repeat: add "option DEVICE_POLLING" to kernel config file then try to compile kernel with new version of if_em driver: make -C /usr/src buildkernel >Fix: This patch eliminates errors while compile, but is totally untested --- /usr/src/sys/dev/em/if_em.c.orig 2007-10-06 16:57:08.000000000 +0400 +++ /usr/src/sys/dev/em/if_em.c 2007-10-06 16:58:37.000000000 +0400 @@ -244,7 +244,9 @@ static void em_free_receive_structures(struct adapter *); static void em_update_stats_counters(struct adapter *); static void em_txeof(struct adapter *); +#ifndef DEVICE_POLLING static void em_tx_purge(struct adapter *); +#endif static int em_allocate_receive_structures(struct adapter *); static int em_allocate_transmit_structures(struct adapter *); static int em_rxeof(struct adapter *, int); @@ -2643,7 +2645,7 @@ /* We do Legacy setup */ if (adapter->int_handler_tag == NULL && (error = bus_setup_intr(dev, adapter->res_interrupt, - INTR_TYPE_NET | INTR_MPSAFE, NULL, em_intr, adapter, + INTR_TYPE_NET | INTR_MPSAFE, em_intr, adapter, &adapter->int_handler_tag)) != 0) { device_printf(dev, "Failed to register interrupt handler"); return (error); @@ -3883,6 +3885,7 @@ * seens mostly with fiber adapters. * **********************************************************************/ +#ifndef DEVICE_POLLING static void em_tx_purge(struct adapter *adapter) { @@ -3894,7 +3897,7 @@ } } } - +#endif /********************************************************************* * * Get a buffer from system mbuf buffer pool. >Release-Note: >Audit-Trail: >Unformatted: