Date: Thu, 12 Aug 2004 03:43:44 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 59468 for review Message-ID: <200408120343.i7C3hiPk002518@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=59468 Change 59468 by rwatson@rwatson_paprika on 2004/08/12 03:43:11 Integrate netperf_socket from CVS: if_axe added to NOTES pcic disappears ngatm updates acpi pci interrupt routing magic g_mirror, g_stripe enhancements, etc. elf64 per-thread core dumping route allocation now uses a UMA zone in_localip() now centralized ip fast forwarding speaks altq 0/NULL cleanup in TCP/IP if_vr locking fixes if_fwe now IFF_NEEDSGIANT merged from rwatson_netperf lockless check of entropy harvest fifo overflow merged from rwatson_netperf USB ethernet IFF_NEEDSGIANT merged from rwatson_netperf in_pcbconnect() and in_pcbconnect_setup() inpcb locking assertions merged from rwatson_netperf udp_usrreq free of control mbuf on udp_send() fix merged from rwatson_netperf Affected files ... .. //depot/projects/netperf_socket/sys/alpha/alpha/elf_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/elf_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/vm_machdep.c#10 integrate .. //depot/projects/netperf_socket/sys/arm/arm/elf_machdep.c#2 integrate .. //depot/projects/netperf_socket/sys/compat/ia32/ia32_sysvec.c#5 integrate .. //depot/projects/netperf_socket/sys/conf/NOTES#33 integrate .. //depot/projects/netperf_socket/sys/conf/files#44 integrate .. //depot/projects/netperf_socket/sys/contrib/ngatm/FREEBSD-Xlist#1 branch .. //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/api/cc_conn.c#2 integrate .. //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/api/cc_dump.c#2 integrate .. //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/api/cc_user.c#2 integrate .. //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/msg/uni_ie.c#3 integrate .. //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/msg/unistruct.h#3 integrate .. //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_call.c#3 integrate .. //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_coord.c#3 integrate .. //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_party.c#3 integrate .. //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_print.c#3 integrate .. //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_reset.c#3 integrate .. //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_uni.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pci_link.c#8 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcib.c#10 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcib_acpi.c#8 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcib_pci.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcibvar.h#2 integrate .. //depot/projects/netperf_socket/sys/dev/firewire/if_fwe.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/fxp/if_fxp.c#12 integrate .. //depot/projects/netperf_socket/sys/dev/pcf/envctrl.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/pcf/pcf_ebus.c#2 integrate .. //depot/projects/netperf_socket/sys/dev/pcf/pcf_isa.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/pcf/pcfvar.h#3 integrate .. //depot/projects/netperf_socket/sys/dev/pcic/i82365.c#3 delete .. //depot/projects/netperf_socket/sys/dev/pcic/i82365_isa.c#3 delete .. //depot/projects/netperf_socket/sys/dev/pcic/i82365reg.h#2 delete .. //depot/projects/netperf_socket/sys/dev/pcic/i82365var.h#2 delete .. //depot/projects/netperf_socket/sys/dev/random/randomdev_soft.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/usb/if_aue.c#8 integrate .. //depot/projects/netperf_socket/sys/dev/usb/if_axe.c#9 integrate .. //depot/projects/netperf_socket/sys/dev/usb/if_cue.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/usb/if_kue.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/usb/if_rue.c#8 integrate .. //depot/projects/netperf_socket/sys/dev/usb/if_udav.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/vx/if_vx_eisa.c#3 integrate .. //depot/projects/netperf_socket/sys/geom/geom_io.c#6 integrate .. //depot/projects/netperf_socket/sys/geom/mirror/g_mirror.c#5 integrate .. //depot/projects/netperf_socket/sys/geom/mirror/g_mirror.h#5 integrate .. //depot/projects/netperf_socket/sys/geom/stripe/g_stripe.c#8 integrate .. //depot/projects/netperf_socket/sys/i386/i386/elf_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/elf_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/machdep.c#9 integrate .. //depot/projects/netperf_socket/sys/ia64/include/md_var.h#4 integrate .. //depot/projects/netperf_socket/sys/kern/imgact_elf.c#11 integrate .. //depot/projects/netperf_socket/sys/kern/sched_4bsd.c#12 integrate .. //depot/projects/netperf_socket/sys/kern/uipc_socket.c#36 integrate .. //depot/projects/netperf_socket/sys/net/route.c#11 integrate .. //depot/projects/netperf_socket/sys/netinet/in.c#4 integrate .. //depot/projects/netperf_socket/sys/netinet/in.h#5 integrate .. //depot/projects/netperf_socket/sys/netinet/in_pcb.c#14 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_divert.c#12 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_fastfwd.c#8 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_fw2.c#13 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_input.c#18 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_output.c#15 integrate .. //depot/projects/netperf_socket/sys/netinet/raw_ip.c#11 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_hostcache.c#3 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_subr.c#16 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_syncache.c#11 integrate .. //depot/projects/netperf_socket/sys/netinet/udp_usrreq.c#11 integrate .. //depot/projects/netperf_socket/sys/pci/if_vr.c#13 integrate .. //depot/projects/netperf_socket/sys/powerpc/powermac/grackle.c#6 integrate .. //depot/projects/netperf_socket/sys/powerpc/powermac/hrowpic.c#5 integrate .. //depot/projects/netperf_socket/sys/powerpc/powermac/macio.c#4 integrate .. //depot/projects/netperf_socket/sys/powerpc/powermac/openpic_macio.c#6 integrate .. //depot/projects/netperf_socket/sys/powerpc/powermac/uninorth.c#4 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/elf_machdep.c#5 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/openpic.c#3 integrate .. //depot/projects/netperf_socket/sys/powerpc/psim/iobus.c#4 integrate .. //depot/projects/netperf_socket/sys/powerpc/psim/openpic_iobus.c#5 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/elf_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/sys/imgact_elf.h#2 integrate .. //depot/projects/netperf_socket/sys/sys/socket.h#9 integrate Differences ... ==== //depot/projects/netperf_socket/sys/alpha/alpha/elf_machdep.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/elf_machdep.c,v 1.18 2004/05/16 20:00:27 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/elf_machdep.c,v 1.19 2004/08/11 02:35:04 marcel Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -106,6 +106,13 @@ &freebsd_brand_oinfo); +void +elf64_dump_thread(struct thread *td __unused, void *dst __unused, + size_t *off __unused) +{ +} + + /* Process one elf relocation with addend. */ static int elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, ==== //depot/projects/netperf_socket/sys/amd64/amd64/elf_machdep.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.21 2004/05/17 21:16:49 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.22 2004/08/11 02:35:04 marcel Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -102,6 +102,14 @@ (sysinit_cfunc_t) elf64_insert_brand_entry, &freebsd_brand_oinfo); + +void +elf64_dump_thread(struct thread *td __unused, void *dst __unused, + size_t *off __unused) +{ +} + + /* Process one elf relocation with addend. */ static int elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, ==== //depot/projects/netperf_socket/sys/amd64/amd64/vm_machdep.c#10 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.235 2004/05/26 12:09:36 tmm Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.236 2004/08/11 23:23:05 davidxu Exp $"); #include "opt_isa.h" #include "opt_cpu.h" @@ -317,6 +317,7 @@ td->td_frame->tf_rsp = ((register_t)ku->ku_stack.ss_sp + ku->ku_stack.ss_size) & ~0x0f; td->td_frame->tf_rsp -= 8; + td->td_frame->tf_rbp = 0; td->td_frame->tf_rip = (register_t)ku->ku_func; /* ==== //depot/projects/netperf_socket/sys/arm/arm/elf_machdep.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/elf_machdep.c,v 1.2 2004/05/16 20:00:27 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/elf_machdep.c,v 1.3 2004/08/11 02:35:04 marcel Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -102,6 +102,14 @@ (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_oinfo); + +void +elf32_dump_thread(struct thread *td __unused, void *dst __unused, + size_t *off __unused) +{ +} + + /* Process one elf relocation with addend. */ static int elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, ==== //depot/projects/netperf_socket/sys/compat/ia32/ia32_sysvec.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/ia32/ia32_sysvec.c,v 1.18 2004/07/16 20:53:00 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ia32/ia32_sysvec.c,v 1.19 2004/08/11 02:35:05 marcel Exp $"); #include "opt_compat.h" @@ -157,6 +157,14 @@ (sysinit_cfunc_t) elf32_insert_brand_entry, &ia32_brand_oinfo); + +void +elf32_dump_thread(struct thread *td __unused, void *dst __unused, + size_t *off __unused) +{ +} + + /* XXX may be freebsd32 MI */ static register_t * ia32_copyout_strings(struct image_params *imgp) ==== //depot/projects/netperf_socket/sys/conf/NOTES#33 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1254 2004/08/03 19:24:53 markm Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1256 2004/08/11 17:22:37 imp Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -2066,9 +2066,6 @@ device cbb device pccard device cardbus -#device pcic ISA attachment currently busted -#hint.pcic.0.at="isa" -#hint.pcic.1.at="isa" # # SMB bus @@ -2274,6 +2271,12 @@ # and the SMC 2202USB. Also works with the ADMtek AN986 Pegasus # eval board. device aue + +# ASIX Electronics AX88172 USB 2.0 ethernet driver. Used in the +# LinkSys USB200M and various other adapters. + +device axe + # # CATC USB-EL1201A USB ethernet. Supports the CATC Netmate # and Netmate II, and the Belkin F5U111. ==== //depot/projects/netperf_socket/sys/conf/files#44 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.936 2004/08/03 19:24:53 markm Exp $ +# $FreeBSD: src/sys/conf/files,v 1.937 2004/08/11 17:23:32 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -608,8 +608,6 @@ dev/pci/pci_pci.c optional pci dev/pci/pci_user.c optional pci dev/pci/pcib_if.m standard -dev/pcic/i82365.c optional pcic pccard -dev/pcic/i82365_isa.c optional pcic pccard isa dev/pdq/if_fea.c optional fea eisa dev/pdq/if_fpa.c optional fpa pci dev/pdq/pdq.c optional fea eisa nowerror ==== //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/api/cc_conn.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Begemot: libunimsg/netnatm/api/cc_conn.c,v 1.1 2004/07/08 08:21:49 brandt Exp $ + * $Begemot: libunimsg/netnatm/api/cc_conn.c,v 1.2 2004/07/16 18:45:11 brandt Exp $ * * ATM API as defined per af-saa-0108 * @@ -139,7 +139,7 @@ if (r == NULL) { if (msg != NULL) uni_msg_destroy(msg); - cc_conn_log(conn, "no memory for cookie"); + cc_conn_log(conn, "no memory for cookie op=%u", op); return; } ==== //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/api/cc_dump.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Begemot: libunimsg/netnatm/api/cc_dump.c,v 1.1 2004/07/08 08:21:51 brandt Exp $ + * $Begemot: libunimsg/netnatm/api/cc_dump.c,v 1.3 2004/08/05 07:10:56 brandt Exp $ * * ATM API as defined per af-saa-0108 */ @@ -43,7 +43,7 @@ #ifdef _KERNEL #ifdef __FreeBSD__ -#include <sys/stdarg.h> +#include <machine/stdarg.h> #endif #else /* !_KERNEL */ #include <stdarg.h> @@ -84,7 +84,7 @@ va_end(ap); if (n < 0) { - d->ret = errno; + d->ret = CCGETERRNO(); return; } if ((size_t)n < d->maxsiz - d->len) { @@ -105,7 +105,7 @@ va_end(ap); if (n < 0) { - d->ret = errno; + d->ret = CCGETERRNO(); return; } if ((size_t)n >= d->maxsiz) { @@ -123,18 +123,18 @@ cc_dump_sap(struct dump *d, const struct uni_sap *sap) { static const char *const tagtab[] = { - [UNISVE_ABSENT] "absent", - [UNISVE_ANY] "any", - [UNISVE_PRESENT]"present" + [UNISVE_ABSENT] = "absent", + [UNISVE_ANY] = "any", + [UNISVE_PRESENT] = "present" }; static const char *const plantab[] = { - [UNI_ADDR_E164] "E164", - [UNI_ADDR_ATME] "ATME", + [UNI_ADDR_E164] = "E164", + [UNI_ADDR_ATME] = "ATME", }; static const char *const hlitab[] = { - [UNI_BHLI_ISO] "ISO", - [UNI_BHLI_VENDOR] "VENDOR", - [UNI_BHLI_USER] "USER" + [UNI_BHLI_ISO] = "ISO", + [UNI_BHLI_VENDOR] = "VENDOR", + [UNI_BHLI_USER] = "USER" }; u_int i; ==== //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/api/cc_user.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Begemot: libunimsg/netnatm/api/cc_user.c,v 1.2 2004/07/08 09:17:18 brandt Exp $ + * $Begemot: libunimsg/netnatm/api/cc_user.c,v 1.3 2004/07/16 18:46:55 brandt Exp $ * * ATM API as defined per af-saa-0108 * @@ -1297,6 +1297,7 @@ /* connection has disappeared. Send an ok * to the user and lock whether there is another * connection at this endpoint */ + uni_msg_destroy(msg); cc_user_ok(user, ATMRESP_NONE, NULL, 0); set_state(user, USER_IN_WAITING); @@ -1359,6 +1360,7 @@ /* connection has disappeared. Send an error * to the user and lock whether there is another * connection at this endpoint */ + uni_msg_destroy(msg); cc_user_err(user, ATMERR_PREVIOUSLY_ABORTED); set_state(user, USER_IN_WAITING); @@ -1370,15 +1372,14 @@ LIST_FOREACH(newep, &user->cc->user_list, node_link) if (strcmp(acc->newep, newep->name) == 0) break; + uni_msg_destroy(msg); if (newep == NULL) { - uni_msg_destroy(msg); cc_user_err(user, ATMERR_BAD_ENDPOINT); return; } if (newep->state != USER_NULL || newep->accepted != NULL) { - uni_msg_destroy(msg); cc_user_err(user, ATMERR_BAD_STATE); return; } ==== //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/msg/uni_ie.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * * Author: Hartmut Brandt <harti@freebsd.org> * - * $Begemot: libunimsg/netnatm/msg/uni_ie.c,v 1.14 2004/07/08 08:22:06 brandt Exp $ + * $Begemot: libunimsg/netnatm/msg/uni_ie.c,v 1.15 2004/08/05 07:10:59 brandt Exp $ * * Private definitions for the IE code file. * @@ -792,11 +792,11 @@ }; static const char *errtab[] = { - [UNI_IERR_UNK] "unk", /* unknown IE */ - [UNI_IERR_LEN] "len", /* length error */ - [UNI_IERR_BAD] "bad", /* content error */ - [UNI_IERR_ACC] "acc", /* access element discarded */ - [UNI_IERR_MIS] "mis", /* missing IE */ + [UNI_IERR_UNK] = "unk", /* unknown IE */ + [UNI_IERR_LEN] = "len", /* length error */ + [UNI_IERR_BAD] = "bad", /* content error */ + [UNI_IERR_ACC] = "acc", /* access element discarded */ + [UNI_IERR_MIS] = "mis", /* missing IE */ }; u_int i; @@ -844,7 +844,7 @@ enum uni_diag diag; } itu_causes[128] = { -#define D(NAME,VAL,DIAG,STD,STR) [UNI_CAUSE_##NAME] { STR, UNI_DIAG_##DIAG }, +#define D(NAME,VAL,DIAG,STD,STR) [UNI_CAUSE_##NAME] = { STR, UNI_DIAG_##DIAG }, #define N(NAME,VAL,DIAG,STD,STR) UNI_DECLARE_CAUSE_VALUES @@ -855,7 +855,7 @@ }, net_causes[128] = { #define D(NAME,VAL,DIAG,STD,STR) -#define N(NAME,VAL,DIAG,STD,STR) [UNI_CAUSE_##NAME] { STR, UNI_DIAG_##DIAG }, +#define N(NAME,VAL,DIAG,STD,STR) [UNI_CAUSE_##NAME] = { STR, UNI_DIAG_##DIAG }, UNI_DECLARE_CAUSE_VALUES ==== //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/msg/unistruct.h#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: libunimsg/netnatm/msg/unistruct.h,v 1.6 2004/07/08 08:22:08 brandt Exp $ + * $Begemot: libunimsg/netnatm/msg/unistruct.h,v 1.7 2004/07/16 18:42:22 brandt Exp $ * * This file defines all structures that are used by * API users. @@ -206,10 +206,11 @@ UNI_ADDR_SCREEN_NET = 0x3, }; +/* don't use bitfields to get a defined structure layout */ struct uni_addr { - enum uni_addr_type type; - enum uni_addr_plan plan; - u_int len; + uint8_t type; + uint8_t plan; + uint8_t len; u_char addr[UNI_ADDR_MAXLEN]; }; struct uni_subaddr { ==== //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_call.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * * Author: Hartmut Brandt <harti@freebsd.org> * - * $Begemot: libunimsg/netnatm/sig/sig_call.c,v 1.64 2004/07/08 08:22:19 brandt Exp $ + * $Begemot: libunimsg/netnatm/sig/sig_call.c,v 1.65 2004/08/05 07:11:00 brandt Exp $ * * Call instance handling * @@ -51,7 +51,7 @@ static void respond_drop_party_ack(struct call *, struct uni_ie_epref *, u_int); -#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] "SIG"#NAME, +#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] = "SIG"#NAME, static const char *const call_sigs[] = { DEF_CALL_SIGS }; @@ -65,27 +65,27 @@ TIMER_FUNC_CALL(t322, t322_func) const struct callstates callstates[] = { - [CALLST_NULL] { "NU0", UNI_CALLSTATE_U0 }, - [CALLST_U1] { "U1", UNI_CALLSTATE_U1 }, - [CALLST_U3] { "U3", UNI_CALLSTATE_U3 }, - [CALLST_U4] { "U4", UNI_CALLSTATE_U4 }, - [CALLST_U6] { "U6", UNI_CALLSTATE_U6 }, - [CALLST_U7] { "U7", UNI_CALLSTATE_U7 }, - [CALLST_U8] { "U8", UNI_CALLSTATE_U8 }, - [CALLST_U9] { "U9", UNI_CALLSTATE_U9 }, - [CALLST_U10] { "U10", UNI_CALLSTATE_U10 }, - [CALLST_U11] { "U11", UNI_CALLSTATE_U11 }, - [CALLST_U12] { "U12", UNI_CALLSTATE_U12 }, - [CALLST_N1] { "N1", UNI_CALLSTATE_N1 }, - [CALLST_N3] { "N3", UNI_CALLSTATE_N3 }, - [CALLST_N4] { "N4", UNI_CALLSTATE_N4 }, - [CALLST_N6] { "N6", UNI_CALLSTATE_N6 }, - [CALLST_N7] { "N7", UNI_CALLSTATE_N7 }, - [CALLST_N8] { "N8", UNI_CALLSTATE_N8 }, - [CALLST_N9] { "N9", UNI_CALLSTATE_N9 }, - [CALLST_N10] { "N10", UNI_CALLSTATE_N10 }, - [CALLST_N11] { "N11", UNI_CALLSTATE_N11 }, - [CALLST_N12] { "N12", UNI_CALLSTATE_N12 }, + [CALLST_NULL] = { "NU0", UNI_CALLSTATE_U0 }, + [CALLST_U1] = { "U1", UNI_CALLSTATE_U1 }, + [CALLST_U3] = { "U3", UNI_CALLSTATE_U3 }, + [CALLST_U4] = { "U4", UNI_CALLSTATE_U4 }, + [CALLST_U6] = { "U6", UNI_CALLSTATE_U6 }, + [CALLST_U7] = { "U7", UNI_CALLSTATE_U7 }, + [CALLST_U8] = { "U8", UNI_CALLSTATE_U8 }, + [CALLST_U9] = { "U9", UNI_CALLSTATE_U9 }, + [CALLST_U10] = { "U10", UNI_CALLSTATE_U10 }, + [CALLST_U11] = { "U11", UNI_CALLSTATE_U11 }, + [CALLST_U12] = { "U12", UNI_CALLSTATE_U12 }, + [CALLST_N1] = { "N1", UNI_CALLSTATE_N1 }, + [CALLST_N3] = { "N3", UNI_CALLSTATE_N3 }, + [CALLST_N4] = { "N4", UNI_CALLSTATE_N4 }, + [CALLST_N6] = { "N6", UNI_CALLSTATE_N6 }, + [CALLST_N7] = { "N7", UNI_CALLSTATE_N7 }, + [CALLST_N8] = { "N8", UNI_CALLSTATE_N8 }, + [CALLST_N9] = { "N9", UNI_CALLSTATE_N9 }, + [CALLST_N10] = { "N10", UNI_CALLSTATE_N10 }, + [CALLST_N11] = { "N11", UNI_CALLSTATE_N11 }, + [CALLST_N12] = { "N12", UNI_CALLSTATE_N12 }, }; static void unx_send_add_party_rej(struct call *c, struct uni_all *u); ==== //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_coord.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * * Author: Hartmut Brandt <harti@freebsd.org> * - * $Begemot: libunimsg/netnatm/sig/sig_coord.c,v 1.11 2004/07/08 08:22:20 brandt Exp $ + * $Begemot: libunimsg/netnatm/sig/sig_coord.c,v 1.12 2004/08/05 07:11:01 brandt Exp $ * * Coordinator */ @@ -40,7 +40,7 @@ #include <netnatm/sig/unipriv.h> #include <netnatm/sig/unimkmsg.h> -#define STR(S) [S] #S +#define STR(S) [S] = #S static const char *const cunames[] = { STR(CU_STAT0), STR(CU_STAT1), @@ -48,7 +48,7 @@ STR(CU_STAT3), }; -#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] "SIG"#NAME, +#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] = "SIG"#NAME, static const char *const coord_sigs[] = { DEF_COORD_SIGS }; ==== //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_party.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * * Author: Hartmut Brandt <harti@freebsd.org> * - * $Begemot: libunimsg/netnatm/sig/sig_party.c,v 1.17 2004/07/08 08:22:21 brandt Exp $ + * $Begemot: libunimsg/netnatm/sig/sig_party.c,v 1.18 2004/08/05 07:11:01 brandt Exp $ * * Party instance handling */ @@ -44,7 +44,7 @@ static void drop_partyE(struct party *p); static int epstate_compat(struct party *, enum uni_epstate); -#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] "SIG"#NAME, +#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] = "SIG"#NAME, static const char *const party_sigs[] = { DEF_PARTY_SIGS }; ==== //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_print.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ * Author: Hartmut Brandt <harti@freebsd.org> * Kendy Kutzner <kutzner@fokus.fraunhofer.de> * - * $Begemot: libunimsg/netnatm/sig/sig_print.c,v 1.5 2004/07/08 08:22:22 brandt Exp $ + * $Begemot: libunimsg/netnatm/sig/sig_print.c,v 1.6 2004/08/05 07:11:02 brandt Exp $ */ #include <sys/types.h> @@ -56,7 +56,7 @@ uni_strerr(u_int err) { static const char *const errstr[] = { -#define DEF(NAME, VAL, STR) [UNIAPI_##NAME] STR, +#define DEF(NAME, VAL, STR) [UNIAPI_##NAME] = STR, UNIAPI_DEF_ERRORS(DEF) #undef DEF }; @@ -69,7 +69,7 @@ return (errstr[err]); } -#define D(M) [M] #M +#define D(M) [M] = #M static const char *const msgs[] = { D(UNIAPI_ERROR), D(UNIAPI_CALL_CREATED), ==== //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_reset.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: libunimsg/netnatm/sig/sig_reset.c,v 1.10 2004/07/08 08:22:22 brandt Exp $ + * $Begemot: libunimsg/netnatm/sig/sig_reset.c,v 1.11 2004/08/05 07:11:03 brandt Exp $ * * Reset-start and reset-respond */ @@ -60,13 +60,13 @@ static int restart_forward(struct uni *, const struct uni_all *); -#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] "SIG"#NAME, +#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] = "SIG"#NAME, static const char *const start_sigs[] = { DEF_START_SIGS }; #undef DEF_PRIV_SIG -#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] "SIG"#NAME, +#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] = "SIG"#NAME, static const char *const respond_sigs[] = { DEF_RESPOND_SIGS }; ==== //depot/projects/netperf_socket/sys/contrib/ngatm/netnatm/sig/sig_uni.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * * Author: Hartmut Brandt <harti@freebsd.org> * - * $Begemot: libunimsg/netnatm/sig/sig_uni.c,v 1.10 2004/07/08 08:22:23 brandt Exp $ + * $Begemot: libunimsg/netnatm/sig/sig_uni.c,v 1.11 2004/08/05 07:11:03 brandt Exp $ * * Instance handling */ @@ -45,7 +45,7 @@ UNICORE #endif -#define STR(S) [S] #S +#define STR(S) [S] = #S static const char *custat_names[] = { STR(CU_STAT0), STR(CU_STAT1), ==== //depot/projects/netperf_socket/sys/dev/acpica/acpi_pci_link.c#8 (text+ko) ==== @@ -24,11 +24,8 @@ * SUCH DAMAGE. */ -/* XXX Uncomment this if you have new PCI IRQ problems starting 2004/8/5. */ -/* #define ACPI_OLD_PCI_LINK 1 */ - #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.18 2004/08/06 04:50:56 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.21 2004/08/12 02:06:19 njl Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -39,43 +36,27 @@ #include <dev/acpica/acpivar.h> #include <dev/acpica/acpi_pcibvar.h> +#include <dev/pci/pcivar.h> +#include "pcib_if.h" + /* Hooks for the ACPI CA debugging infrastructure. */ #define _COMPONENT ACPI_BUS ACPI_MODULE_NAME("PCI_LINK") -#define MAX_POSSIBLE_INTERRUPTS 16 -#define MAX_ISA_INTERRUPTS 16 -#define MAX_ACPI_INTERRUPTS 255 - -struct acpi_pci_link_entry { - TAILQ_ENTRY(acpi_pci_link_entry) links; - ACPI_HANDLE handle; - UINT8 current_irq; - UINT8 initial_irq; - ACPI_RESOURCE possible_resources; - UINT8 number_of_interrupts; - UINT8 interrupts[MAX_POSSIBLE_INTERRUPTS]; - UINT8 sorted_irq[MAX_POSSIBLE_INTERRUPTS]; - int references; - int priority; -}; - TAILQ_HEAD(acpi_pci_link_entries, acpi_pci_link_entry); static struct acpi_pci_link_entries acpi_pci_link_entries; -struct acpi_prt_entry { - TAILQ_ENTRY(acpi_prt_entry) links; - device_t pcidev; - int busno; - ACPI_PCI_ROUTING_TABLE prt; - struct acpi_pci_link_entry *pci_link; -}; - TAILQ_HEAD(acpi_prt_entries, acpi_prt_entry); static struct acpi_prt_entries acpi_prt_entries; static int irq_penalty[MAX_ACPI_INTERRUPTS]; +static int acpi_pci_link_is_valid_irq(struct acpi_pci_link_entry *link, + UINT8 irq); +static void acpi_pci_link_update_irq_penalty(device_t dev, int busno); +static void acpi_pci_link_set_bootdisabled_priority(void); +static void acpi_pci_link_fixup_bootdisabled_link(void); + /* * PCI link object management */ @@ -137,27 +118,31 @@ UINT8 i; ACPI_RESOURCE_IRQ *Irq; ACPI_RESOURCE_EXT_IRQ *ExtIrq; + struct acpi_pci_link_entry *link; if (entry == NULL || entry->pci_link == NULL) return; + link = entry->pci_link; - printf("%s irq %3d: ", acpi_name(entry->pci_link->handle), - entry->pci_link->current_irq); + printf("%s irq%c%2d: ", acpi_name(link->handle), + (link->flags & ACPI_LINK_ROUTED) ? '*' : ' ', link->current_irq); printf("["); - for (i = 0; i < entry->pci_link->number_of_interrupts; i++) - printf("%3d", entry->pci_link->interrupts[i]); - printf("] "); + if (link->number_of_interrupts) + printf("%2d", link->interrupts[0]); + for (i = 1; i < link->number_of_interrupts; i++) + printf("%3d", link->interrupts[i]); + printf("] %2d+ ", link->initial_irq); - switch (entry->pci_link->possible_resources.Id) { + switch (link->possible_resources.Id) { case ACPI_RSTYPE_IRQ: - Irq = &entry->pci_link->possible_resources.Data.Irq; + Irq = &link->possible_resources.Data.Irq; acpi_pci_link_dump_polarity(Irq->ActiveHighLow); acpi_pci_link_dump_trigger(Irq->EdgeLevel); acpi_pci_link_dump_sharemode(Irq->SharedExclusive); break; case ACPI_RSTYPE_EXT_IRQ: - ExtIrq = &entry->pci_link->possible_resources.Data.ExtendedIrq; + ExtIrq = &link->possible_resources.Data.ExtendedIrq; acpi_pci_link_dump_polarity(ExtIrq->ActiveHighLow); acpi_pci_link_dump_trigger(ExtIrq->EdgeLevel); acpi_pci_link_dump_sharemode(ExtIrq->SharedExclusive); @@ -370,17 +355,33 @@ buf.Length = ACPI_ALLOCATE_BUFFER; bzero(link, sizeof(struct acpi_pci_link_entry)); - link->handle = handle; + /* + * Get the IRQ configured at boot-time. If successful, set this + * as the initial IRQ. + */ error = acpi_pci_link_get_current_irq(link, &link->current_irq); - if (ACPI_FAILURE(error)) { + if (ACPI_SUCCESS(error)) { + link->initial_irq = link->current_irq; + } else { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "couldn't get current IRQ from interrupt link %s - %s\n", acpi_name(handle), AcpiFormatException(error))); + link->initial_irq = 0; } - link->initial_irq = link->current_irq; + /* + * Try to disable this link. If successful, set the current IRQ to + * zero and flags to indicate this link is not routed. If we can't + * run _DIS (i.e., the method doesn't exist), assume the initial + * IRQ was routed by the BIOS. + */ + if (ACPI_SUCCESS(AcpiEvaluateObject(handle, "_DIS", NULL, NULL))) { + link->current_irq = 0; + link->flags = ACPI_LINK_NONE; + } else + link->flags = ACPI_LINK_ROUTED; error = AcpiGetPossibleResources(handle, &buf); if (ACPI_FAILURE(error)) { @@ -396,6 +397,7 @@ goto out; } + /* XXX This only handles one resource, ignoring SourceIndex. */ resources = (ACPI_RESOURCE *) buf.Pointer; bcopy(resources, &link->possible_resources, sizeof(link->possible_resources)); @@ -417,6 +419,19 @@ goto out; } + /* + * If the initial IRQ is invalid (not in _PRS), set it to 0 and + * mark this link as not routed. We won't use it as the preferred + * interrupt later when we route. + */ + if (!acpi_pci_link_is_valid_irq(link, link->initial_irq) && + link->initial_irq != 0) { + printf("ACPI link %s has invalid initial irq %d, ignoring\n", + acpi_name(handle), link->initial_irq); + link->initial_irq = 0; + link->flags = ACPI_LINK_NONE; + } + link->references++; TAILQ_INSERT_TAIL(&acpi_pci_link_entries, link, links); @@ -442,73 +457,75 @@ ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - if (prt == NULL || prt->Source == NULL || prt->Source[0] == '\0') { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "couldn't handle this routing table - hardwired\n")); + if (prt == NULL) { + device_printf(pcidev, "NULL PRT entry\n"); return_ACPI_STATUS (AE_BAD_PARAMETER); } - error = AcpiGetHandle(acpi_get_handle(pcidev), prt->Source, &handle); - if (ACPI_FAILURE(error)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "couldn't get handle - %s\n", - AcpiFormatException(error))); - return_ACPI_STATUS (error); - } - - error = acpi_pci_link_get_object_status(handle, &sta); - if (ACPI_FAILURE(error)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "couldn't get object status %s - %s\n", - acpi_name(handle), AcpiFormatException(error))); - return_ACPI_STATUS (error); - } - - /* - * PCI link status (_STA) is unreliable. Many systems return - * erroneous values so we ignore it. - */ - if ((sta & (ACPI_STA_PRESENT | ACPI_STA_FUNCTIONAL)) == 0) { -#ifndef ACPI_OLD_PCI_LINK - device_printf(pcidev, "acpi PRT ignoring status for %s\n", - acpi_name(handle)); -#else - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "interrupt link is not functional - %s\n", - acpi_name(handle))); - return_ACPI_STATUS (AE_ERROR); -#endif /* !ACPI_OLD_PCI_LINK */ - } - + /* Bail out if attempting to add a duplicate PRT entry. */ TAILQ_FOREACH(entry, &acpi_prt_entries, links) { if (entry->busno == busno && entry->prt.Address == prt->Address && entry->prt.Pin == prt->Pin) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "interrupt link entry already exists - %s\n", - acpi_name(handle))); + "PRT entry already exists\n")); return_ACPI_STATUS (AE_ALREADY_EXISTS); } } + /* Allocate and initialize our new PRT entry. */ entry = AcpiOsAllocate(sizeof(struct acpi_prt_entry)); if (entry == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "couldn't allocate memory - %s\n", acpi_name(handle))); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "can't allocate memory\n")); return_ACPI_STATUS (AE_NO_MEMORY); } bzero(entry, sizeof(struct acpi_prt_entry)); + /* + * If the source link is NULL, then this IRQ is hardwired so skip + * initializing the link but still add it to the list. + */ + if (prt->Source[0] != '\0') { + /* Get a handle for the link source. */ + error = AcpiGetHandle(acpi_get_handle(pcidev), prt->Source, + &handle); + if (ACPI_FAILURE(error)) { + device_printf(pcidev, "get handle for %s - %s\n", + prt->Source, AcpiFormatException(error)); + goto out; + } + + error = acpi_pci_link_get_object_status(handle, &sta); + if (ACPI_FAILURE(error)) { + device_printf(pcidev, "can't get status for %s - %s\n", + acpi_name(handle), AcpiFormatException(error)); + goto out; + } + + /* Probe/initialize the link. */ + error = acpi_pci_link_add_link(handle, entry); + if (ACPI_FAILURE(error)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "couldn't add _PRT entry to link %s - %s\n", + acpi_name(handle), AcpiFormatException(error))); + goto out; + } + } + entry->pcidev = pcidev; entry->busno = busno; bcopy(prt, &entry->prt, sizeof(entry->prt)); - error = acpi_pci_link_add_link(handle, entry); - if (ACPI_FAILURE(error)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "couldn't add _PRT entry to link %s - %s\n", - acpi_name(handle), AcpiFormatException(error))); - goto out; - } + /* + * Make sure the Source value is null-terminated. It is really a + * variable-length string (with a fixed size in the struct) so when + * we copy the entire struct, we truncate the string. Instead of + * trying to make a variable-sized PRT object to handle the string, + * we store its handle in prt_source. Callers should use that to + * look up the link object. + */ + entry->prt.Source[sizeof(prt->Source) - 1] = '\0'; + entry->prt_source = handle; TAILQ_INSERT_TAIL(&acpi_prt_entries, entry, links); error = AE_OK; @@ -520,6 +537,12 @@ return_ACPI_STATUS (error); } +/* + * Look up the given interrupt in the list of possible settings for + * this link. We don't special-case the initial link setting. Some + * systems return current settings that are outside the list of valid + * settings so only allow choices explicitly specified in _PRS. + */ static int acpi_pci_link_is_valid_irq(struct acpi_pci_link_entry *link, UINT8 irq) { >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408120343.i7C3hiPk002518>