From owner-p4-projects@FreeBSD.ORG Tue Dec 30 09:34:31 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 81DAE16A4D1; Tue, 30 Dec 2003 09:34:31 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5934F16A4CF for ; Tue, 30 Dec 2003 09:34:31 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E3AE43D54 for ; Tue, 30 Dec 2003 09:34:25 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id hBUHYP0B001794 for ; Tue, 30 Dec 2003 09:34:25 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id hBUHYOHv001791 for perforce@freebsd.org; Tue, 30 Dec 2003 09:34:24 -0800 (PST) (envelope-from sam@freebsd.org) Date: Tue, 30 Dec 2003 09:34:24 -0800 (PST) Message-Id: <200312301734.hBUHYOHv001791@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 44558 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2003 17:34:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=44558 Change 44558 by sam@sam_ebb on 2003/12/30 09:34:02 IFC Affected files ... .. //depot/projects/netperf+sockets/sys/alpha/alpha/vm_machdep.c#4 integrate .. //depot/projects/netperf+sockets/sys/amd64/amd64/vm_machdep.c#4 integrate .. //depot/projects/netperf+sockets/sys/compat/ndis/kern_ndis.c#6 integrate .. //depot/projects/netperf+sockets/sys/compat/ndis/subr_ndis.c#6 integrate .. //depot/projects/netperf+sockets/sys/conf/Makefile.alpha#2 integrate .. //depot/projects/netperf+sockets/sys/conf/files#5 integrate .. //depot/projects/netperf+sockets/sys/conf/kern.post.mk#3 integrate .. //depot/projects/netperf+sockets/sys/conf/kern.pre.mk#4 integrate .. //depot/projects/netperf+sockets/sys/conf/options.i386#4 integrate .. //depot/projects/netperf+sockets/sys/conf/options.pc98#3 integrate .. //depot/projects/netperf+sockets/sys/dev/acpica/acpi_cpu.c#6 integrate .. //depot/projects/netperf+sockets/sys/dev/an/if_aironet_ieee.h#2 integrate .. //depot/projects/netperf+sockets/sys/dev/an/if_an.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/an/if_an_isa.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/an/if_an_pccard.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/an/if_an_pci.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/an/if_anreg.h#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ath/if_ath.c#5 integrate .. //depot/projects/netperf+sockets/sys/dev/ath/if_athioctl.h#4 integrate .. //depot/projects/netperf+sockets/sys/dev/if_ndis/if_ndis.c#6 integrate .. //depot/projects/netperf+sockets/sys/dev/iicbus/if_ic.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ppbus/if_plip.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/wi/if_wi.c#4 integrate .. //depot/projects/netperf+sockets/sys/dev/wi/if_wireg.h#3 integrate .. //depot/projects/netperf+sockets/sys/fs/msdosfs/msdosfs_fat.c#3 integrate .. //depot/projects/netperf+sockets/sys/fs/msdosfs/msdosfs_vfsops.c#4 integrate .. //depot/projects/netperf+sockets/sys/fs/msdosfs/msdosfs_vnops.c#3 integrate .. //depot/projects/netperf+sockets/sys/fs/nullfs/null_vnops.c#2 integrate .. //depot/projects/netperf+sockets/sys/i386/conf/NOTES#4 integrate .. //depot/projects/netperf+sockets/sys/i386/i386/pmap.c#6 integrate .. //depot/projects/netperf+sockets/sys/i386/i386/vm_machdep.c#4 integrate .. //depot/projects/netperf+sockets/sys/i386/linux/linux_sysvec.c#3 integrate .. //depot/projects/netperf+sockets/sys/ia64/ia64/vm_machdep.c#4 integrate .. //depot/projects/netperf+sockets/sys/kern/kern_descrip.c#3 integrate .. //depot/projects/netperf+sockets/sys/kern/kern_exec.c#4 integrate .. //depot/projects/netperf+sockets/sys/kern/sys_pipe.c#3 integrate .. //depot/projects/netperf+sockets/sys/kern/uipc_syscalls.c#6 integrate .. //depot/projects/netperf+sockets/sys/kern/vfs_subr.c#4 integrate .. //depot/projects/netperf+sockets/sys/kern/vfs_vnops.c#2 integrate .. //depot/projects/netperf+sockets/sys/modules/acpi/acpi/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/cam/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/raidframe/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/sio/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/ukbd/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/net/bpf.c#4 integrate .. //depot/projects/netperf+sockets/sys/net/bpf.h#3 integrate .. //depot/projects/netperf+sockets/sys/net/if_disc.c#3 integrate .. //depot/projects/netperf+sockets/sys/net/if_ef.c#3 integrate .. //depot/projects/netperf+sockets/sys/net/if_faith.c#3 integrate .. //depot/projects/netperf+sockets/sys/net/if_gif.c#3 integrate .. //depot/projects/netperf+sockets/sys/net/if_gre.c#4 integrate .. //depot/projects/netperf+sockets/sys/net/if_gre.h#2 integrate .. //depot/projects/netperf+sockets/sys/net/if_loop.c#4 integrate .. //depot/projects/netperf+sockets/sys/net/if_stf.c#3 integrate .. //depot/projects/netperf+sockets/sys/net/if_tun.c#3 integrate .. //depot/projects/netperf+sockets/sys/net80211/ieee80211_radiotap.h#3 integrate .. //depot/projects/netperf+sockets/sys/netgraph/ng_iface.c#3 integrate .. //depot/projects/netperf+sockets/sys/netinet/in.c#3 integrate .. //depot/projects/netperf+sockets/sys/netinet/ip_gre.c#3 integrate .. //depot/projects/netperf+sockets/sys/pc98/conf/NOTES#3 integrate .. //depot/projects/netperf+sockets/sys/pc98/pc98/sio_cbus.c#2 integrate .. //depot/projects/netperf+sockets/sys/powerpc/powerpc/vm_machdep.c#4 integrate .. //depot/projects/netperf+sockets/sys/sparc64/sparc64/vm_machdep.c#4 integrate .. //depot/projects/netperf+sockets/sys/sys/mbuf.h#4 integrate .. //depot/projects/netperf+sockets/sys/sys/sf_buf.h#2 integrate .. //depot/projects/netperf+sockets/sys/sys/vnode.h#3 integrate .. //depot/projects/netperf+sockets/sys/vm/swap_pager.c#4 integrate Differences ... ==== //depot/projects/netperf+sockets/sys/alpha/alpha/vm_machdep.c#4 (text+ko) ==== @@ -67,7 +67,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.97 2003/12/27 07:52:46 silby Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.99 2003/12/28 08:57:08 silby Exp $"); #include "opt_kstack_pages.h" @@ -116,7 +116,6 @@ } sf_freelist; static u_int sf_buf_alloc_want; -extern int nsfbufspeak, nsfbufsused; /* * Finish a fork operation, with process p2 nearly set up. @@ -416,6 +415,7 @@ mtx_lock(&sf_freelist.sf_lock); while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) { sf_buf_alloc_want++; + mbstat.sf_allocwait++; error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH, "sfbufa", 0); sf_buf_alloc_want--; @@ -430,7 +430,7 @@ SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); sf->m = m; nsfbufsused++; - nsfbufspeak = max(nsfbufspeak, nsfbufsused); + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); } mtx_unlock(&sf_freelist.sf_lock); return (sf); ==== //depot/projects/netperf+sockets/sys/amd64/amd64/vm_machdep.c#4 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.225 2003/12/27 07:52:46 silby Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.227 2003/12/28 08:57:08 silby Exp $"); #include "opt_isa.h" #include "opt_kstack_pages.h" @@ -99,7 +99,6 @@ } sf_freelist; static u_int sf_buf_alloc_want; -extern int nsfbufspeak, nsfbufsused; /* * Finish a fork operation, with process p2 nearly set up. @@ -461,6 +460,7 @@ mtx_lock(&sf_freelist.sf_lock); while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) { sf_buf_alloc_want++; + mbstat.sf_allocwait++; error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH, "sfbufa", 0); sf_buf_alloc_want--; @@ -475,7 +475,7 @@ SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); sf->m = m; nsfbufsused++; - nsfbufspeak = max(nsfbufspeak, nsfbufsused); + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); } mtx_unlock(&sf_freelist.sf_lock); return (sf); ==== //depot/projects/netperf+sockets/sys/compat/ndis/kern_ndis.c#6 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.15 2003/12/26 07:01:05 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.16 2003/12/29 23:51:58 wpaul Exp $"); #include #include @@ -397,9 +397,13 @@ ndis_resource_list *rl = NULL; cm_partial_resource_desc *prd = NULL; ndis_miniport_block *block; + device_t dev; + struct resource_list *brl; + struct resource_list_entry *brle; sc = arg; block = &sc->ndis_block; + dev = sc->ndis_dev; rl = malloc(sizeof(ndis_resource_list) + (sizeof(cm_partial_resource_desc) * (sc->ndis_rescnt - 1)), @@ -411,33 +415,35 @@ rl->cprl_version = 5; rl->cprl_version = 1; rl->cprl_count = sc->ndis_rescnt; - prd = rl->cprl_partial_descs; - if (sc->ndis_res_io) { - prd->cprd_type = CmResourceTypePort; - prd->u.cprd_port.cprd_start.np_quad = - rman_get_start(sc->ndis_res_io); - prd->u.cprd_port.cprd_len = - rman_get_size(sc->ndis_res_io); - prd++; - } - if (sc->ndis_res_mem) { - prd->cprd_type = CmResourceTypeMemory; - prd->u.cprd_mem.cprd_start.np_quad = - rman_get_start(sc->ndis_res_mem); - prd->u.cprd_mem.cprd_len = - rman_get_size(sc->ndis_res_mem); - prd++; - } - - if (sc->ndis_irq) { - prd->cprd_type = CmResourceTypeInterrupt; - prd->u.cprd_intr.cprd_level = - rman_get_start(sc->ndis_irq); - prd->u.cprd_intr.cprd_vector = - rman_get_start(sc->ndis_irq); - prd->u.cprd_intr.cprd_affinity = 0; + brl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev); + if (brl != NULL) { + SLIST_FOREACH(brle, brl, link) { + switch (brle->type) { + case SYS_RES_IOPORT: + prd->cprd_type = CmResourceTypePort; + prd->u.cprd_port.cprd_start.np_quad = + brle->start; + prd->u.cprd_port.cprd_len = brle->count; + break; + case SYS_RES_MEMORY: + prd->cprd_type = CmResourceTypeMemory; + prd->u.cprd_port.cprd_start.np_quad = + brle->start; + prd->u.cprd_port.cprd_len = brle->count; + break; + case SYS_RES_IRQ: + prd->cprd_type = CmResourceTypeInterrupt; + prd->u.cprd_intr.cprd_level = brle->start; + prd->u.cprd_intr.cprd_vector = brle->start; + prd->u.cprd_intr.cprd_affinity = 0; + break; + default: + break; + } + prd++; + } } block->nmb_rlist = rl; ==== //depot/projects/netperf+sockets/sys/compat/ndis/subr_ndis.c#6 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.16 2003/12/26 03:31:34 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.18 2003/12/28 21:36:03 wpaul Exp $"); /* * This file implements a translation layer between the BSD networking @@ -230,6 +230,8 @@ __stdcall static void ndis_uptime(uint32_t *); __stdcall static void ndis_init_string(ndis_unicode_string **, char *); __stdcall static void ndis_init_ansi_string(ndis_ansi_string *, char *); +__stdcall static void ndis_init_unicode_string(ndis_unicode_string *, + uint16_t *); __stdcall static void ndis_free_string(ndis_unicode_string *); __stdcall static ndis_status ndis_remove_miniport(ndis_handle *); __stdcall static void ndis_termwrap(ndis_handle, void *); @@ -1707,8 +1709,6 @@ ndis_buffer *buf; int len; { - if (len > buf->nb_size) - return; buf->nb_bytecount = len; return; @@ -2168,6 +2168,31 @@ return; } +__stdcall static void +ndis_init_unicode_string(dst, src) + ndis_unicode_string *dst; + uint16_t *src; +{ + ndis_unicode_string *u; + int i; + + u = dst; + if (u == NULL) + return; + if (src == NULL) { + u->nus_len = u->nus_maxlen = 0; + u->nus_buf = NULL; + } else { + i = 0; + while(src[i] != 0) + i++; + u->nus_buf = src; + u->nus_len = u->nus_maxlen = i * 2; + } + + return; +} + __stdcall static void ndis_get_devprop(adapter, phydevobj, funcdevobj, nextdevobj, resources, transresources) ndis_handle adapter; @@ -2286,6 +2311,7 @@ { "NdisGetBufferPhysicalArraySize", (FUNC)ndis_buf_physpages }, { "NdisMGetDeviceProperty", (FUNC)ndis_get_devprop }, { "NdisInitAnsiString", (FUNC)ndis_init_ansi_string }, + { "NdisInitUnicodeString", (FUNC)ndis_init_unicode_string }, { "NdisWriteConfiguration", (FUNC)ndis_write_cfg }, { "NdisAnsiStringToUnicodeString", (FUNC)ndis_ansi2unicode }, { "NdisTerminateWrapper", (FUNC)ndis_termwrap }, ==== //depot/projects/netperf+sockets/sys/conf/Makefile.alpha#2 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.alpha -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.alpha 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.127 2003/04/15 21:29:11 phk Exp $ +# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.128 2003/12/29 11:34:33 bde Exp $ # # Makefile for FreeBSD # @@ -28,7 +28,7 @@ .endif .include "$S/conf/kern.pre.mk" -SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \ +SYSTEM_LD= @${LD} -Bdynamic -T $S/conf/ldscript.$M \ -e locorestart \ -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o ==== //depot/projects/netperf+sockets/sys/conf/files#5 (text+ko) ==== @@ -485,7 +485,6 @@ dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa dev/joy/joy_pccard.c optional joy pccard -dev/kttcp/kttcp.c optional kttcp dev/led/led.c optional cpu_soekris dev/lge/if_lge.c optional lge dev/lnc/if_lnc.c optional lnc ==== //depot/projects/netperf+sockets/sys/conf/kern.post.mk#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.post.mk,v 1.53 2003/11/25 04:12:43 imp Exp $ +# $FreeBSD: src/sys/conf/kern.post.mk,v 1.57 2003/12/30 07:54:39 bde Exp $ # Part of a unified Makefile for building kernels. This part includes all # the definitions that need to be after all the % directives except %RULES @@ -54,13 +54,14 @@ install.debug reinstall.debug: gdbinit cd ${.CURDIR}; ${MAKE} -DINSTALL_DEBUG ${.TARGET:R} +# Install gdbinit files for kernel debugging. gdbinit: - sed < ${S}/../tools/debugscripts/dot.gdbinit > .gdbinit \ - "s:MODPATH:${.OBJDIR}/modules:" + grep -v '# XXX' ${S}/../tools/debugscripts/dot.gdbinit | \ + sed "s:MODPATH:${.OBJDIR}/modules:" > .gdbinit cp ${S}/../tools/debugscripts/gdbinit.kernel \ - ${S}/../tools/debugscripts/gdbinit.vinum ${.CURDIR} + ${S}/../tools/debugscripts/gdbinit.vinum ${.CURDIR} cp ${S}/../tools/debugscripts/gdbinit.${MACHINE_ARCH} \ - ${.CURDIR}/gdbinit.machine + ${.CURDIR}/gdbinit.machine .endif ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @@ -87,14 +88,14 @@ kernel-clean: rm -f *.o *.so *.So *.ko *.s eddep errs \ - ${FULLKERNEL} ${KERNEL_KO} linterrs makelinks tags \ - vers.c vnode_if.c vnode_if.h majors.c \ - ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ - ${CLEAN} + ${FULLKERNEL} ${KERNEL_KO} linterrs makelinks tags \ + vers.c vnode_if.c vnode_if.h majors.c \ + ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ + ${CLEAN} lint: ${LNFILES} - ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} \ - 2>&1 | tee -a linterrs + ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 | \ + tee -a linterrs # This is a hack. BFD "optimizes" away dynamic mode if there are no # dynamic references. We could probably do a '-Bforcedynamic' mode like @@ -102,19 +103,17 @@ HACK_EXTRA_FLAGS?= -shared hack.So: Makefile touch hack.c - ${CC} ${FMT} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.So + ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.So rm -f hack.c -# this rule stops ./assym.s in .depend from causing problems +# This rule stops ./assym.s in .depend from causing problems. ./assym.s: assym.s assym.s: $S/kern/genassym.sh genassym.o NM=${NM} sh $S/kern/genassym.sh genassym.o > ${.TARGET} -# XXX used to force -elf after CFLAGS to work around breakage of cc -aout -# (genassym.sh makes some assumptions and cc stopped satisfying them). genassym.o: $S/$M/$M/genassym.c - ${CC} -c ${CFLAGS:N-fno-common} -Wno-inline $S/$M/$M/genassym.c + ${CC} -c ${CFLAGS:N-fno-common} $S/$M/$M/genassym.c ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h @@ -148,10 +147,10 @@ links: egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ - sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink + sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink ${MAKE} -V CFILES | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ - sort -u | comm -23 - dontlink | \ - sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks + sort -u | comm -23 - dontlink | \ + sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks sh makelinks; rm -f dontlink kernel-tags: ==== //depot/projects/netperf+sockets/sys/conf/kern.pre.mk#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.37 2003/11/05 12:20:16 bde Exp $ +# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.39 2003/12/30 09:01:29 bde Exp $ # Part of a unified Makefile for building kernels. This part contains all # of the definitions that need to be before %BEFORE_DEPEND. @@ -47,8 +47,7 @@ CFLAGS+= -DGPROF -falign-functions=16 .if ${PROFLEVEL} >= 2 CFLAGS+= -DGPROF4 -DGUPROF -# XXX -Wno-inline is to break some warnings. -PROF= -finstrument-functions -Wno-inline +PROF= -finstrument-functions .else PROF= -pg .endif @@ -78,11 +77,11 @@ SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} SYSTEM_OBJS+= hack.So -SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \ +SYSTEM_LD= @${LD} -Bdynamic -T $S/conf/ldscript.$M \ -warn-common -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \ - ${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET} + ${SIZE} ${.TARGET} ; chmod 755 ${.TARGET} SYSTEM_DEP+= $S/conf/ldscript.$M # MKMODULESENV is set here so that port makefiles can augment ==== //depot/projects/netperf+sockets/sys/conf/options.i386#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.i386,v 1.205 2003/12/10 19:30:42 jhb Exp $ +# $FreeBSD: src/sys/conf/options.i386,v 1.206 2003/12/30 07:28:53 bde Exp $ # Options specific to the i386 platform kernels AUTO_EOI_1 opt_auto_eoi.h @@ -36,7 +36,6 @@ CLK_CALIBRATION_LOOP opt_clock.h CLK_USE_I8254_CALIBRATION opt_clock.h -CLK_USE_TSC_CALIBRATION opt_clock.h TIMER_FREQ opt_clock.h CPU_ATHLON_SSE_HACK opt_cpu.h ==== //depot/projects/netperf+sockets/sys/conf/options.pc98#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.pc98,v 1.171 2003/11/15 12:31:02 nyan Exp $ +# $FreeBSD: src/sys/conf/options.pc98,v 1.172 2003/12/30 07:28:54 bde Exp $ # Options specific to the pc98 platform kernels AUTO_EOI_1 opt_auto_eoi.h @@ -33,7 +33,6 @@ CLK_CALIBRATION_LOOP opt_clock.h CLK_USE_I8254_CALIBRATION opt_clock.h -CLK_USE_TSC_CALIBRATION opt_clock.h TIMER_FREQ opt_clock.h CPU_BLUELIGHTNING_3X opt_cpu.h ==== //depot/projects/netperf+sockets/sys/dev/acpica/acpi_cpu.c#6 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.28 2003/12/23 18:26:53 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.29 2003/12/28 22:15:24 njl Exp $"); #include "opt_acpi.h" #include @@ -395,7 +395,7 @@ /* If _PTC not present or other failure, try the P_BLK. */ if (sc->cpu_p_cnt == NULL) { /* The spec says P_BLK must be at least 6 bytes long. */ - if (sc->cpu_p_blk_len != 6) + if (sc->cpu_p_blk == 0 || sc->cpu_p_blk_len != 6) return (ENXIO); gas.Address = sc->cpu_p_blk; gas.AddressSpaceId = ACPI_ADR_SPACE_SYSTEM_IO; ==== //depot/projects/netperf+sockets/sys/dev/an/if_aironet_ieee.h#2 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/an/if_aironet_ieee.h,v 1.13 2003/08/24 17:48:04 obrien Exp $ + * $FreeBSD: src/sys/dev/an/if_aironet_ieee.h,v 1.14 2003/12/30 01:07:12 ambrisko Exp $ */ #ifndef _IF_AIRONET_IEEE_H @@ -337,7 +337,7 @@ u_int8_t an_magic_packet_action; /* 0x98 */ u_int8_t an_magic_packet_ctl; /* 0x99 */ u_int16_t an_rsvd9; - u_int16_t an_spare[13]; + u_int16_t an_spare[19]; }; #define AN_OPMODE_IBSS_ADHOC 0x0000 @@ -593,7 +593,7 @@ u_int8_t an_avg_noise_prev_min_db; /* 0x7D */ u_int8_t an_max_noise_prev_min_pc; /* 0x7E */ u_int8_t an_max_noise_prev_min_db; /* 0x7F */ - u_int16_t an_spare[8]; + u_int16_t an_spare[18]; }; #define AN_STATUS_OPMODE_CONFIGURED 0x0001 ==== //depot/projects/netperf+sockets/sys/dev/an/if_an.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.56 2003/11/14 19:00:29 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.57 2003/12/30 01:07:12 ambrisko Exp $"); /* * The Aironet 4500/4800 series cards come in PCMCIA, ISA and PCI form. @@ -503,6 +503,7 @@ { bus_dmamap_unload(sc->an_dtag, dma->an_dma_map); bus_dmamem_free(sc->an_dtag, dma->an_dma_vaddr, dma->an_dma_map); + dma->an_dma_vaddr = 0; bus_dmamap_destroy(sc->an_dtag, dma->an_dma_map); } @@ -816,6 +817,29 @@ return(error); } +int +an_detach(device_t dev) +{ + struct an_softc *sc = device_get_softc(dev); + struct ifnet *ifp = &sc->arpcom.ac_if; + + if (sc->an_gone) { + device_printf(dev,"already unloaded\n"); + return(0); + } + AN_LOCK(sc); + an_stop(sc); + ifmedia_removeall(&sc->an_ifmedia); + ifp->if_flags &= ~IFF_RUNNING; + ether_ifdetach(ifp); + sc->an_gone = 1; + AN_UNLOCK(sc); + bus_teardown_intr(dev, sc->irq_res, sc->irq_handle); + an_release_resources(dev); + mtx_destroy(&sc->an_mtx); + return (0); +} + static void an_rxeof(sc) struct an_softc *sc; @@ -1417,6 +1441,8 @@ *ptr2 = CSR_READ_1(sc, AN_DATA1); } } else { /* MPI-350 */ + if (!sc->an_rid_buffer.an_dma_vaddr) + return(EIO); an_rid_desc.an_valid = 1; an_rid_desc.an_len = AN_RID_BUFFER_SIZE; an_rid_desc.an_rid = 0; @@ -1449,11 +1475,18 @@ an_rid_desc.an_len = an_ltv->an_len; } - if (an_rid_desc.an_len > 2) - bcopy(&an_ltv->an_type, - <v->an_val, - an_rid_desc.an_len - 2); - ltv->an_len = an_rid_desc.an_len + 2; + len = an_rid_desc.an_len; + if (len > (ltv->an_len - 2)) { + printf("an%d: record length mismatch -- expected %d, " + "got %d for Rid %x\n", sc->an_unit, + ltv->an_len - 2, len, ltv->an_type); + len = ltv->an_len - 2; + } else { + ltv->an_len = len + 2; + } + bcopy(&an_ltv->an_type, + <v->an_val, + len); } if (an_dump) @@ -3376,9 +3409,8 @@ * Linux driver */ -#define FLASH_DELAY(_sc, x) AN_UNLOCK(_sc) ; \ - tsleep(ifp, PZERO, "flash", ((x) / hz) + 1); \ - AN_LOCK(_sc) ; +#define FLASH_DELAY(_sc, x) msleep(ifp, &(_sc)->an_mtx, PZERO, \ + "flash", ((x) / hz) + 1); #define FLASH_COMMAND 0x7e7e #define FLASH_SIZE 32 * 1024 ==== //depot/projects/netperf+sockets/sys/dev/an/if_an_isa.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/an/if_an_isa.c,v 1.13 2003/08/24 17:48:04 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an_isa.c,v 1.14 2003/12/30 01:07:12 ambrisko Exp $"); #include "opt_inet.h" @@ -79,7 +79,6 @@ static int an_probe_isa (device_t); static int an_attach_isa (device_t); -static int an_detach_isa (device_t); static int an_probe_isa(dev) @@ -133,26 +132,11 @@ return (0); } -static int -an_detach_isa(device_t dev) -{ - struct an_softc *sc = device_get_softc(dev); - struct ifnet *ifp = &sc->arpcom.ac_if; - - an_stop(sc); - ifmedia_removeall(&sc->an_ifmedia); - ether_ifdetach(ifp); - bus_teardown_intr(dev, sc->irq_res, sc->irq_handle); - an_release_resources(dev); - - return (0); -} - static device_method_t an_isa_methods[] = { /* Device interface */ DEVMETHOD(device_probe, an_probe_isa), DEVMETHOD(device_attach, an_attach_isa), - DEVMETHOD(device_detach, an_detach_isa), + DEVMETHOD(device_detach, an_detach), DEVMETHOD(device_shutdown, an_shutdown), { 0, 0 } }; ==== //depot/projects/netperf+sockets/sys/dev/an/if_an_pccard.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pccard.c,v 1.22 2003/10/08 01:20:00 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pccard.c,v 1.23 2003/12/30 01:07:12 ambrisko Exp $"); #include "opt_inet.h" @@ -79,13 +79,12 @@ static int an_pccard_match(device_t); static int an_pccard_probe(device_t); static int an_pccard_attach(device_t); -static int an_pccard_detach(device_t); static device_method_t an_pccard_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pccard_compat_probe), DEVMETHOD(device_attach, pccard_compat_attach), - DEVMETHOD(device_detach, an_pccard_detach), + DEVMETHOD(device_detach, an_detach), DEVMETHOD(device_shutdown, an_shutdown), /* Card interface */ @@ -131,27 +130,6 @@ } static int -an_pccard_detach(device_t dev) -{ - struct an_softc *sc = device_get_softc(dev); - struct ifnet *ifp = &sc->arpcom.ac_if; - - if (sc->an_gone) { - device_printf(dev,"already unloaded\n"); - return(0); - } - an_stop(sc); - ifmedia_removeall(&sc->an_ifmedia); - ifp->if_flags &= ~IFF_RUNNING; - ether_ifdetach(ifp); - sc->an_gone = 1; - bus_teardown_intr(dev, sc->irq_res, sc->irq_handle); - an_release_resources(dev); - mtx_destroy(&sc->an_mtx); - return (0); -} - -static int an_pccard_probe(device_t dev) { int error; ==== //depot/projects/netperf+sockets/sys/dev/an/if_an_pci.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pci.c,v 1.25 2003/09/02 17:30:34 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pci.c,v 1.26 2003/12/30 01:07:12 ambrisko Exp $"); /* * This is a PCI shim for the Aironet PC4500/4800 wireless network @@ -111,7 +111,6 @@ static int an_probe_pci (device_t); static int an_attach_pci (device_t); -static int an_detach_pci (device_t); static int an_suspend_pci (device_t); static int an_resume_pci (device_t); @@ -250,21 +249,6 @@ } static int -an_detach_pci(device_t dev) -{ - struct an_softc *sc = device_get_softc(dev); - struct ifnet *ifp = &sc->arpcom.ac_if; - - an_stop(sc); - ifmedia_removeall(&sc->an_ifmedia); - ether_ifdetach(ifp); - bus_teardown_intr(dev, sc->irq_res, sc->irq_handle); - an_release_resources(dev); - - return (0); -} - -static int an_suspend_pci(device_t dev) { an_shutdown(dev); @@ -284,7 +268,7 @@ /* Device interface */ DEVMETHOD(device_probe, an_probe_pci), DEVMETHOD(device_attach, an_attach_pci), - DEVMETHOD(device_detach, an_detach_pci), + DEVMETHOD(device_detach, an_detach), DEVMETHOD(device_shutdown, an_shutdown), DEVMETHOD(device_suspend, an_suspend_pci), DEVMETHOD(device_resume, an_resume_pci), ==== //depot/projects/netperf+sockets/sys/dev/an/if_anreg.h#3 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/an/if_anreg.h,v 1.20 2003/11/14 19:00:30 sam Exp $ + * $FreeBSD: src/sys/dev/an/if_anreg.h,v 1.21 2003/12/30 01:07:12 ambrisko Exp $ */ #define AN_TIMEOUT 65536 @@ -513,6 +513,7 @@ void an_shutdown (device_t); void an_resume (device_t); int an_attach (struct an_softc *, int, int); +int an_detach (device_t); void an_stop (struct an_softc *); driver_intr_t an_intr; ==== //depot/projects/netperf+sockets/sys/dev/ath/if_ath.c#5 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.36 2003/11/29 01:23:59 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.38 2003/12/28 07:00:32 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -799,6 +799,7 @@ } sc->sc_stats.ast_tx_mgmt++; } + if (ath_tx_start(sc, ni, bf, m)) { bad: ATH_TXBUF_LOCK(sc); ==== //depot/projects/netperf+sockets/sys/dev/ath/if_athioctl.h#4 (text+ko) ==== @@ -33,7 +33,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGES. * - * $FreeBSD: src/sys/dev/ath/if_athioctl.h,v 1.4 2003/11/29 01:23:59 sam Exp $ + * $FreeBSD: src/sys/dev/ath/if_athioctl.h,v 1.5 2003/12/28 07:00:32 sam Exp $ */ /* @@ -70,7 +70,6 @@ u_int32_t ast_tx_rts; /* tx frames with rts enabled */ u_int32_t ast_tx_cts; /* tx frames with cts enabled */ u_int32_t ast_tx_shortpre;/* tx frames with short preamble */ - u_int32_t ast_tx_altrate; /* tx frames with alternate rate */ u_int32_t ast_rx_nombuf; /* rx setup failed 'cuz no mbuf */ u_int32_t ast_rx_busdma; /* rx setup failed for dma resrcs */ u_int32_t ast_rx_orn; /* rx failed 'cuz of desc overrun */ @@ -108,8 +107,8 @@ (1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_CHANNEL) | \ + (1 << IEEE80211_RADIOTAP_ANTENNA) | \ (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL) | \ - (1 << IEEE80211_RADIOTAP_ANTENNA) | \ 0) struct ath_rx_radiotap_header { @@ -118,14 +117,15 @@ u_int8_t wr_rate; u_int16_t wr_chan_freq; u_int16_t wr_chan_flags; + u_int8_t wr_antenna; u_int8_t wr_antsignal; - u_int8_t wr_antenna; }; #define ATH_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_CHANNEL) | \ + (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \ (1 << IEEE80211_RADIOTAP_ANTENNA) | \ 0) ==== //depot/projects/netperf+sockets/sys/dev/if_ndis/if_ndis.c#6 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.15 2003/12/26 07:01:05 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.16 2003/12/29 23:51:59 wpaul Exp $"); #include "opt_bdg.h" @@ -215,10 +215,13 @@ void *img; struct ndis_type *t; int i, devidx = 0, defidx = 0; + struct resource_list *rl; + struct resource_list_entry *rle; sc = device_get_softc(dev); unit = device_get_unit(dev); + sc->ndis_dev = dev; mtx_init(&sc->ndis_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE); @@ -228,67 +231,76 @@ */ pci_enable_busmaster(dev); - /* Try to map iospace */ - - sc->ndis_io_rid = NDIS_PCI_LOIO; - sc->ndis_res_io = bus_alloc_resource(dev, SYS_RES_IOPORT, - &sc->ndis_io_rid, 0, ~0, 1, RF_ACTIVE); - - /* - * Sometimes the iospace and memspace BARs are swapped. - * Make one more try to map I/O space using a different - * RID. - */ - if (sc->ndis_res_io == NULL) { - sc->ndis_io_rid = NDIS_PCI_LOMEM; - sc->ndis_res_io = bus_alloc_resource(dev, SYS_RES_IOPORT, - &sc->ndis_io_rid, 0, ~0, 1, RF_ACTIVE); - } - - if (sc->ndis_res_io != NULL) - sc->ndis_rescnt++; - - /* Now try to mem memory space */ - sc->ndis_mem_rid = NDIS_PCI_LOMEM; - sc->ndis_res_mem = bus_alloc_resource(dev, SYS_RES_MEMORY, - &sc->ndis_mem_rid, 0, ~0, 1, RF_ACTIVE); - - /* - * If the first attempt fails, try again with another - * BAR. - */ - if (sc->ndis_res_mem == NULL) { - sc->ndis_mem_rid = NDIS_PCI_LOIO; - sc->ndis_res_mem = bus_alloc_resource(dev, SYS_RES_MEMORY, - &sc->ndis_mem_rid, 0, ~0, 1, RF_ACTIVE); - } - - if (sc->ndis_res_mem != NULL) - sc->ndis_rescnt++; - - if (!sc->ndis_rescnt) { - printf("ndis%d: couldn't map ports/memory\n", unit); - error = ENXIO; - goto fail; - } -#ifdef notdef - sc->ndis_btag = rman_get_bustag(sc->ndis_res); - sc->ndis_bhandle = rman_get_bushandle(sc->ndis_res); -#endif - - /* Allocate interrupt */ - rid = 0; - sc->ndis_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, - RF_SHAREABLE | RF_ACTIVE); - - if (sc->ndis_irq == NULL) { - printf("ndis%d: couldn't map interrupt\n", unit); - error = ENXIO; - goto fail; + rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev); + if (rl != NULL) { + SLIST_FOREACH(rle, rl, link) { + switch (rle->type) { + case SYS_RES_IOPORT: + sc->ndis_io_rid = rle->rid; + sc->ndis_res_io = bus_alloc_resource(dev, + SYS_RES_IOPORT, &sc->ndis_io_rid, + 0, ~0, 1, RF_ACTIVE); + if (sc->ndis_res_io == NULL) { + printf("ndis%d: couldn't map " + "iospace\n", unit); + error = ENXIO; + goto fail; + } + break; + case SYS_RES_MEMORY: + if (sc->ndis_res_altmem != NULL) { + printf ("ndis%d: too many memory " + "resources", sc->ndis_unit); + error = ENXIO; + goto fail; + } + if (sc->ndis_res_mem == NULL) { + sc->ndis_mem_rid = rle->rid; + sc->ndis_res_mem = + bus_alloc_resource(dev, + SYS_RES_MEMORY, + &sc->ndis_mem_rid, + 0, ~0, 1, RF_ACTIVE); + if (sc->ndis_res_mem == NULL) { + printf("ndis%d: couldn't map " + "memory\n", unit); + error = ENXIO; + goto fail; >>> TRUNCATED FOR MAIL (1000 lines) <<<