kern/116975: make buildkernel fails on dev/em/em_if.c (1.65.2.24)
when DEVICE_POLLING is set
Boris Lytochkin
boris.lytochkin at e-port.ru
Sat Oct 6 06:40:03 PDT 2007
>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 at 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:
More information about the freebsd-bugs
mailing list