Date: Wed, 1 Feb 2006 17:15:02 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 90890 for review Message-ID: <200602011715.k11HF2SI082844@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=90890 Change 90890 by jhb@jhb_slimer on 2006/02/01 17:14:07 IFC @90881. Affected files ... .. //depot/projects/smpng/sys/cam/scsi/scsi_da.c#64 integrate .. //depot/projects/smpng/sys/coda/coda_vnops.c#26 integrate .. //depot/projects/smpng/sys/compat/linux/linux_getcwd.c#20 integrate .. //depot/projects/smpng/sys/conf/Makefile.i386#26 integrate .. //depot/projects/smpng/sys/conf/Makefile.pc98#25 integrate .. //depot/projects/smpng/sys/conf/NOTES#113 integrate .. //depot/projects/smpng/sys/conf/files#166 integrate .. //depot/projects/smpng/sys/conf/files.i386#92 integrate .. //depot/projects/smpng/sys/conf/files.sparc64#54 integrate .. //depot/projects/smpng/sys/conf/kmod.mk#54 integrate .. //depot/projects/smpng/sys/conf/options#114 integrate .. //depot/projects/smpng/sys/dev/acpi_support/acpi_asus.c#7 integrate .. //depot/projects/smpng/sys/dev/acpi_support/acpi_fujitsu.c#4 integrate .. //depot/projects/smpng/sys/dev/bge/if_bge.c#70 integrate .. //depot/projects/smpng/sys/dev/bge/if_bgereg.h#39 integrate .. //depot/projects/smpng/sys/dev/ce/if_ce.c#2 integrate .. //depot/projects/smpng/sys/dev/em/if_em.c#65 integrate .. //depot/projects/smpng/sys/dev/iwi/if_iwi.c#13 integrate .. //depot/projects/smpng/sys/dev/iwi/if_iwireg.h#6 integrate .. //depot/projects/smpng/sys/dev/le/am7990.c#1 branch .. //depot/projects/smpng/sys/dev/le/am79900.c#1 branch .. //depot/projects/smpng/sys/dev/le/am79900reg.h#1 branch .. //depot/projects/smpng/sys/dev/le/am79900var.h#1 branch .. //depot/projects/smpng/sys/dev/le/am7990reg.h#1 branch .. //depot/projects/smpng/sys/dev/le/am7990var.h#1 branch .. //depot/projects/smpng/sys/dev/le/if_le_ledma.c#1 branch .. //depot/projects/smpng/sys/dev/le/if_le_pci.c#1 branch .. //depot/projects/smpng/sys/dev/le/lance.c#1 branch .. //depot/projects/smpng/sys/dev/le/lancereg.h#1 branch .. //depot/projects/smpng/sys/dev/le/lancevar.h#1 branch .. //depot/projects/smpng/sys/dev/md/md.c#73 integrate .. //depot/projects/smpng/sys/dev/pci/vga_pci.c#3 integrate .. //depot/projects/smpng/sys/dev/ral/if_ral.c#13 integrate .. //depot/projects/smpng/sys/dev/ral/if_ralreg.h#3 integrate .. //depot/projects/smpng/sys/dev/ral/if_ralvar.h#3 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/dsp.c#35 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/feeder.c#14 integrate .. //depot/projects/smpng/sys/dev/usb/umass.c#53 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#85 integrate .. //depot/projects/smpng/sys/fs/devfs/devfs_vnops.c#54 integrate .. //depot/projects/smpng/sys/fs/msdosfs/msdosfs_vnops.c#34 integrate .. //depot/projects/smpng/sys/geom/concat/g_concat.c#15 integrate .. //depot/projects/smpng/sys/geom/concat/g_concat.h#9 integrate .. //depot/projects/smpng/sys/geom/eli/g_eli.c#7 integrate .. //depot/projects/smpng/sys/geom/eli/g_eli.h#4 integrate .. //depot/projects/smpng/sys/geom/eli/g_eli_crypto.c#2 integrate .. //depot/projects/smpng/sys/geom/eli/g_eli_ctl.c#4 integrate .. //depot/projects/smpng/sys/geom/eli/g_eli_key.c#2 integrate .. //depot/projects/smpng/sys/geom/eli/pkcs5v2.c#2 integrate .. //depot/projects/smpng/sys/geom/eli/pkcs5v2.h#2 integrate .. //depot/projects/smpng/sys/geom/gate/g_gate.c#14 integrate .. //depot/projects/smpng/sys/geom/gate/g_gate.h#5 integrate .. //depot/projects/smpng/sys/geom/label/g_label.c#11 integrate .. //depot/projects/smpng/sys/geom/label/g_label.h#7 integrate .. //depot/projects/smpng/sys/geom/label/g_label_iso9660.c#4 integrate .. //depot/projects/smpng/sys/geom/label/g_label_msdosfs.c#3 integrate .. //depot/projects/smpng/sys/geom/label/g_label_ufs.c#5 integrate .. //depot/projects/smpng/sys/geom/mirror/g_mirror.c#24 integrate .. //depot/projects/smpng/sys/geom/mirror/g_mirror.h#9 integrate .. //depot/projects/smpng/sys/geom/mirror/g_mirror_ctl.c#8 integrate .. //depot/projects/smpng/sys/geom/nop/g_nop.c#9 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#21 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.h#9 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3_ctl.c#9 integrate .. //depot/projects/smpng/sys/geom/shsec/g_shsec.c#4 integrate .. //depot/projects/smpng/sys/geom/shsec/g_shsec.h#3 integrate .. //depot/projects/smpng/sys/geom/stripe/g_stripe.c#15 integrate .. //depot/projects/smpng/sys/geom/stripe/g_stripe.h#7 integrate .. //depot/projects/smpng/sys/geom/zero/g_zero.c#4 integrate .. //depot/projects/smpng/sys/i386/conf/NOTES#114 integrate .. //depot/projects/smpng/sys/i386/include/cserial.h#3 integrate .. //depot/projects/smpng/sys/ia64/include/elf.h#11 integrate .. //depot/projects/smpng/sys/kern/kern_ktrace.c#49 integrate .. //depot/projects/smpng/sys/kern/kern_malloc.c#43 integrate .. //depot/projects/smpng/sys/kern/kern_mbuf.c#14 integrate .. //depot/projects/smpng/sys/kern/kern_rwlock.c#2 integrate .. //depot/projects/smpng/sys/kern/subr_firmware.c#1 branch .. //depot/projects/smpng/sys/kern/sys_pipe.c#54 integrate .. //depot/projects/smpng/sys/kern/tty_pts.c#2 integrate .. //depot/projects/smpng/sys/kern/tty_pty.c#45 integrate .. //depot/projects/smpng/sys/kern/uipc_usrreq.c#54 integrate .. //depot/projects/smpng/sys/kern/vfs_default.c#45 integrate .. //depot/projects/smpng/sys/kern/vfs_lookup.c#33 integrate .. //depot/projects/smpng/sys/kern/vfs_mount.c#57 integrate .. //depot/projects/smpng/sys/kern/vfs_subr.c#120 integrate .. //depot/projects/smpng/sys/kern/vfs_syscalls.c#97 integrate .. //depot/projects/smpng/sys/modules/Makefile#115 integrate .. //depot/projects/smpng/sys/modules/ce/Makefile#1 branch .. //depot/projects/smpng/sys/modules/firmware/Makefile#1 branch .. //depot/projects/smpng/sys/modules/le/Makefile#1 branch .. //depot/projects/smpng/sys/net/if.c#78 integrate .. //depot/projects/smpng/sys/net/if.h#28 integrate .. //depot/projects/smpng/sys/net/if_bridge.c#23 integrate .. //depot/projects/smpng/sys/net/if_ethersubr.c#70 integrate .. //depot/projects/smpng/sys/net/if_gif.c#32 integrate .. //depot/projects/smpng/sys/net/if_gif.h#13 integrate .. //depot/projects/smpng/sys/net/if_var.h#43 integrate .. //depot/projects/smpng/sys/net/if_vlan.c#44 integrate .. //depot/projects/smpng/sys/net/if_vlan_var.h#16 integrate .. //depot/projects/smpng/sys/netgraph/ng_sppp.c#10 integrate .. //depot/projects/smpng/sys/netinet/if_ether.c#46 integrate .. //depot/projects/smpng/sys/netinet/in_gif.c#18 integrate .. //depot/projects/smpng/sys/netinet/ip_input.c#75 integrate .. //depot/projects/smpng/sys/netinet/ip_ipsec.c#1 branch .. //depot/projects/smpng/sys/netinet/ip_ipsec.h#1 branch .. //depot/projects/smpng/sys/netinet/ip_mroute.h#9 integrate .. //depot/projects/smpng/sys/netinet/ip_output.c#82 integrate .. //depot/projects/smpng/sys/netinet6/in6_gif.c#12 integrate .. //depot/projects/smpng/sys/nfsserver/nfs.h#17 integrate .. //depot/projects/smpng/sys/nfsserver/nfs_serv.c#44 integrate .. //depot/projects/smpng/sys/nfsserver/nfs_srvsock.c#24 integrate .. //depot/projects/smpng/sys/nfsserver/nfs_srvsubs.c#28 integrate .. //depot/projects/smpng/sys/nfsserver/nfs_syscalls.c#27 integrate .. //depot/projects/smpng/sys/pci/agp_i810.c#21 integrate .. //depot/projects/smpng/sys/sparc64/conf/GENERIC#64 integrate .. //depot/projects/smpng/sys/sparc64/sbus/dma_sbus.c#4 integrate .. //depot/projects/smpng/sys/sparc64/sbus/lsi64854.c#4 integrate .. //depot/projects/smpng/sys/sparc64/sbus/lsi64854var.h#3 integrate .. //depot/projects/smpng/sys/sys/_rwlock.h#2 integrate .. //depot/projects/smpng/sys/sys/firmware.h#1 branch .. //depot/projects/smpng/sys/sys/mbuf.h#59 integrate .. //depot/projects/smpng/sys/sys/rwlock.h#2 integrate .. //depot/projects/smpng/sys/sys/vnode.h#70 integrate .. //depot/projects/smpng/sys/tools/fw_stub.awk#1 branch .. //depot/projects/smpng/sys/ufs/ufs/ufs_extattr.c#38 integrate .. //depot/projects/smpng/sys/vm/redzone.c#1 branch .. //depot/projects/smpng/sys/vm/redzone.h#1 branch .. //depot/projects/smpng/sys/vm/vm_contig.c#35 integrate .. //depot/projects/smpng/sys/vm/vm_object.c#76 integrate .. //depot/projects/smpng/sys/vm/vm_page.c#71 integrate .. //depot/projects/smpng/sys/vm/vnode_pager.c#56 integrate Differences ... ==== //depot/projects/smpng/sys/cam/scsi/scsi_da.c#64 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.185 2006/01/26 00:35:53 flz Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.186 2006/01/30 20:27:44 flz Exp $"); #include <sys/param.h> @@ -427,6 +427,14 @@ {T_DIRECT, SIP_MEDIA_REMOVABLE, "*" , "USB DISK*", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, + { + /* + * Genesys 6-in-1 Card Reader + * No PR, reported by anders + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "Generic*", "STORAGE DEVICE*", + "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE + }, }; static disk_strategy_t dastrategy; ==== //depot/projects/smpng/sys/coda/coda_vnops.c#26 (text+ko) ==== @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/coda/coda_vnops.c,v 1.67 2006/01/21 19:51:47 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/coda/coda_vnops.c,v 1.68 2006/02/01 00:25:24 jeff Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1289,21 +1289,18 @@ /* XXX - do we need to call cache pureg on the moved vnode? */ cache_purge(ap->a_fvp); - /* It seems to be incumbent on us to drop locks on all four vnodes */ - /* From-vnodes are not locked, only ref'd. To-vnodes are locked. */ - - vrele(ap->a_fvp); + /* Release parents first, then children. */ vrele(odvp); - if (ap->a_tvp) { - if (ap->a_tvp == ndvp) { - vrele(ap->a_tvp); - } else { - vput(ap->a_tvp); - } - } + if (ap->a_tvp == ndvp) + vrele(ndvp); + else + vput(ndvp); + vput(ap->a_tvp); + } else + vput(ndvp); + vrele(ap->a_fvp); - vput(ndvp); return(error); } ==== //depot/projects/smpng/sys/compat/linux/linux_getcwd.c#20 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_getcwd.c,v 1.20 2005/12/04 02:12:39 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_getcwd.c,v 1.21 2006/01/30 08:22:56 jeff Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -327,11 +327,8 @@ */ error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, td); - if (error) { - vrele(lvp); - lvp = NULL; - goto out; - } + if (error != 0) + panic("vn_lock LK_RETRY returned error %d", error); if (bufp) bp = *bpp; /* @@ -383,11 +380,8 @@ } VREF(lvp); error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, td); - if (error != 0) { - vrele(lvp); - lvp = NULL; - goto out; - } + if (error != 0) + panic("vn_lock LK_RETRY returned %d", error); } error = linux_getcwd_scandir(&lvp, &uvp, &bp, bufp, td); if (error) ==== //depot/projects/smpng/sys/conf/Makefile.i386#26 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.i386,v 1.270 2005/11/28 17:51:30 imp Exp $ +# $FreeBSD: src/sys/conf/Makefile.i386,v 1.271 2006/01/29 03:32:19 nyan Exp $ # # Makefile for FreeBSD # @@ -30,7 +30,9 @@ .endif .include "$S/conf/kern.pre.mk" -MKMODULESENV+= MACHINE=i386 +MACHINE=i386 + +MKMODULESENV+= MACHINE=${MACHINE} %BEFORE_DEPEND ==== //depot/projects/smpng/sys/conf/Makefile.pc98#25 (text+ko) ==== @@ -3,7 +3,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.172 2005/11/28 17:51:31 imp Exp $ +# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.173 2006/01/29 03:32:19 nyan Exp $ # # Makefile for FreeBSD # @@ -30,7 +30,9 @@ .endif .include "$S/conf/kern.pre.mk" -MKMODULESENV+= MACHINE=pc98 +MACHINE=pc98 + +MKMODULESENV+= MACHINE=${MACHINE} %BEFORE_DEPEND ==== //depot/projects/smpng/sys/conf/NOTES#113 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1346 2006/01/14 15:35:20 bz Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1350 2006/01/31 22:56:44 jhb Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -191,7 +191,7 @@ # MUTEX_NOINLINE forces mutex operations to call functions to perform each # operation rather than inlining the simple cases. This can be used to # shrink the size of the kernel text segment. Note that this behavior is -# already implied by the INVARIANT_SUPPORT, INVARIANTS, MUTEX_PROFILING, +# already implied by the INVARIANT_SUPPORT, INVARIANTS, KTR, MUTEX_PROFILING, # and WITNESS options. options MUTEX_NOINLINE @@ -200,6 +200,13 @@ # priority waiter. options MUTEX_WAKE_ALL +# RWLOCK_NOINLINE forces rwlock operations to call functions to perform each +# operation rather than inlining the simple cases. This can be used to +# shrink the size of the kernel text segment. Note that this behavior is +# already implied by the INVARIANT_SUPPORT, INVARIANTS, KTR, MUTEX_PROFILING, +# and WITNESS options. +options RWLOCK_NOINLINE + # SMP Debugging Options: # # PREEMPTION allows the threads that are in the kernel to be preempted @@ -327,6 +334,12 @@ options DEBUG_MEMGUARD # +# DEBUG_REDZONE enables buffer underflows and buffer overflows detection for +# malloc(9). +# +options DEBUG_REDZONE + +# # KTRACE enables the system-call tracing facility ktrace(2). To be more # SMP-friendly, KTRACE uses a worker thread to process most trace events # asynchronously to the thread generating the event. This requires a @@ -1187,6 +1200,7 @@ device md #Memory/malloc disk device snp #Snoop device - to look at pty/vty/etc.. device ccd #Concatenated disk driver +device firmware #firmware(9) support # Kernel side iconv library options LIBICONV @@ -1724,6 +1738,7 @@ # fxp: Intel EtherExpress Pro/100B # (hint of prefer_iomap can be done to prefer I/O instead of Mem mapping) # hme: Sun HME (Happy Meal Ethernet) +# le: AMD Am7900 LANCE and Am79C9xx PCnet # lge: Support for PCI gigabit ethernet adapters based on the Level 1 # LXT1001 NetCellerator chipset. This includes the D-Link DGE-500SX, # SMC TigerCard 1000 (SMC9462SX), and some Addtron cards. @@ -1839,6 +1854,7 @@ # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') +device le # AMD Am7900 LANCE and Am79C9xx PCnet device txp # 3Com 3cR990 (``Typhoon'') device vx # 3Com 3c590, 3c595 (``Vortex'') ==== //depot/projects/smpng/sys/conf/files#166 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1087 2006/01/27 23:13:24 jhb Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1091 2006/02/01 13:55:02 andre Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -679,6 +679,10 @@ dev/joy/joy_isa.c optional joy isa dev/joy/joy_pccard.c optional joy pccard dev/kbdmux/kbdmux.c optional kbdmux +dev/le/am7990.c optional le +dev/le/am79900.c optional le +dev/le/if_le_pci.c optional le pci +dev/le/lance.c optional le dev/led/led.c standard dev/lge/if_lge.c optional lge dev/lmc/if_lmc.c optional lmc @@ -1298,6 +1302,7 @@ kern/subr_devstat.c standard kern/subr_disk.c standard kern/subr_eventhandler.c standard +kern/subr_firmware.c optional firmware kern/subr_hints.c standard kern/subr_kdb.c standard kern/subr_kobj.c standard @@ -1649,6 +1654,8 @@ netinet/ip_fw_pfil.c optional ipfirewall netinet/ip_icmp.c optional inet netinet/ip_input.c optional inet +netinet/ip_ipsec.c optional ipsec +netinet/ip_ipsec.c optional fast_ipsec netinet/ip_mroute.c optional mrouting netinet/ip_options.c optional inet netinet/ip_output.c optional inet @@ -1866,6 +1873,7 @@ vm/default_pager.c standard vm/device_pager.c standard vm/phys_pager.c standard +vm/redzone.c optional DEBUG_REDZONE vm/swap_pager.c standard vm/uma_core.c standard vm/uma_dbg.c standard ==== //depot/projects/smpng/sys/conf/files.i386#92 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.550 2005/12/07 21:30:46 jkim Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.551 2006/01/31 23:11:34 rik Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -142,6 +142,9 @@ dev/atkbdc/atkbdc_isa.c optional atkbdc isa dev/atkbdc/atkbdc_subr.c optional atkbdc dev/atkbdc/psm.c optional psm atkbdc +dev/ce/ceddk.c optional ce +dev/ce/if_ce.c optional ce +dev/ce/tau32-ddk.c optional ce dev/cm/if_cm_isa.c optional cm isa dev/cp/cpddk.c optional cp dev/cp/if_cp.c optional cp ==== //depot/projects/smpng/sys/conf/files.sparc64#54 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.sparc64,v 1.77 2005/11/27 21:41:58 ru Exp $ +# $FreeBSD: src/sys/conf/files.sparc64,v 1.78 2006/01/31 22:34:12 marius Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -36,6 +36,7 @@ dev/fb/splash.c optional splash dev/hwpmc/hwpmc_sparc64.c optional hwpmc dev/kbd/kbd.c optional atkbd | sc | ukbd +dev/le/if_le_ledma.c optional le sbus dev/ofw/ofw_bus_if.m standard dev/ofw/ofw_bus_subr.c standard dev/ofw/ofw_console.c optional ofw_console ==== //depot/projects/smpng/sys/conf/kmod.mk#54 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $FreeBSD: src/sys/conf/kmod.mk,v 1.200 2005/11/29 09:37:42 ru Exp $ +# $FreeBSD: src/sys/conf/kmod.mk,v 1.201 2006/01/29 02:52:41 mlaier Exp $ # # The include file <bsd.kmod.mk> handles building and installing loadable # kernel modules. @@ -36,6 +36,8 @@ # # SRCS List of source files. # +# FIRMWS List of firmware images in format filename:shortname:version +# # DESTDIR The tree where the module gets installed. [not set] # # +++ targets +++ @@ -119,6 +121,32 @@ CFLAGS+= -mlongcall -fno-omit-frame-pointer .endif +.if defined(FIRMWS) +.if !exists(@) +${KMOD:S/$/.c/}: @ +.else +${KMOD:S/$/.c/}: @/tools/fw_stub.awk +.endif + ${AWK} -f @/tools/fw_stub.awk ${FIRMWS} -m${KMOD} -c${KMOD:S/$/.c/g} + +SRCS+= ${KMOD:S/$/.c/} +CLEANFILES+= ${KMOD:S/$/.c/} + +.for _firmw in ${FIRMWS} +${_firmw:C/\:.*$/.fwo/}: ${_firmw:C/\:.*$//} + @${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}} +.if !exists(${.CURDIR}/${_firmw:C/\:.*$//}) + ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//} + ${LD} -b binary ${LDFLAGS} -r -d -o ${.TARGET} ${_firmw:C/\:.*$//} + rm -f ${_firmw:C/\:.*$//} +.else + ${LD} -b binary ${LDFLAGS} -r -d -o ${.TARGET} ${_firmw:C/\:.*$//} +.endif + +OBJS+= ${_firmw:C/\:.*$/.fwo/} +.endfor +.endif + OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .if !defined(PROG) ==== //depot/projects/smpng/sys/conf/options#114 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.525 2006/01/27 23:13:25 jhb Exp $ +# $FreeBSD: src/sys/conf/options,v 1.527 2006/01/31 11:09:21 pjd Exp $ # # On the handling of kernel options # @@ -385,6 +385,8 @@ TCP_SIGNATURE opt_inet.h TCP_SACK_DEBUG opt_tcp_sack.h TCP_DROP_SYNFIN opt_tcp_input.h +DEV_VLAN opt_vlan.h +VLAN_ARRAY opt_vlan.h XBONEHACK # Netgraph(4). Use option NETGRAPH to enable the base netgraph code. @@ -528,6 +530,9 @@ # The MemGuard replacement allocator used for tamper-after-free detection DEBUG_MEMGUARD opt_vm.h +# The RedZone malloc(9) protection +DEBUG_REDZONE opt_vm.h + # Standard SMP options SMP opt_global.h ==== //depot/projects/smpng/sys/dev/acpi_support/acpi_asus.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpi_support/acpi_asus.c,v 1.25 2005/09/11 18:39:00 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpi_support/acpi_asus.c,v 1.27 2006/01/29 23:59:43 philip Exp $"); /* * Driver for extra ACPI-controlled gadgets (hotkeys, leds, etc) found on @@ -146,6 +146,30 @@ .disp_set = "SDSP" }, { + .name = "A4D", + .mled_set = "MLED", + .brn_up = "\\_SB_.PCI0.SBRG.EC0._Q0E", + .brn_dn = "\\_SB_.PCI0.SBRG.EC0._Q0F", + .brn_get = "GPLV", + .brn_set = "SPLV", +#ifdef notyet + .disp_get = "\\_SB_.PCI0.SBRG.EC0._Q10", + .disp_set = "\\_SB_.PCI0.SBRG.EC0._Q11" +#endif + }, + { + .name = "A6V", + .bled_set = "BLED", + .mled_set = "MLED", + .wled_set = "WLED", + .lcd_get = NULL, + .lcd_set = "\\_SB.PCI0.SBRG.EC0._Q10", + .brn_get = "GPLV", + .brn_set = "SPLV", + .disp_get = "\\_SB.PCI0.P0P3.VGA.GETD", + .disp_set = "SDSP" + }, + { .name = "D1x", .mled_set = "MLED", .lcd_get = "\\GP11", ==== //depot/projects/smpng/sys/dev/acpi_support/acpi_fujitsu.c#4 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 2002 Sean Bullington <seanATstalker.org> - * 2003-2005 Anish Mistry <amistry@am-productions.biz> + * 2003-2006 Anish Mistry <amistry@am-productions.biz> * 2004 Mark Santcroos <marks@ripe.net> * All Rights Reserved. * @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpi_support/acpi_fujitsu.c,v 1.3 2005/09/11 18:39:00 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpi_support/acpi_fujitsu.c,v 1.4 2006/01/29 23:52:02 philip Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -44,11 +44,8 @@ #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("Fujitsu") -/* Change and update bits for the buttons */ -#define MOUSE_UPDATED_BIT 0x80000000 +/* Change and update bits for the hotkeys */ #define VOLUME_MUTE_BIT 0x40000000 -#define VOLUME_CHANGE_BIT 0x80000000 -#define BRIGHTNESS_CHANGE_BIT 0x80000000 /* Values of settings */ #define GENERAL_SETTING_BITS 0x0fffffff @@ -57,9 +54,20 @@ #define BRIGHTNESS_SETTING_BITS GENERAL_SETTING_BITS /* Possible state changes */ -#define VOLUME_CHANGED 1 -#define BRIGHT_CHANGED 2 -#define MOUSE_CHANGED 3 +/* + * These are NOT arbitrary values. They are the + * GHKS return value from the device that says which + * hotkey is active. They should match up with a bit + * from the GSIF bitmask. + */ +#define BRIGHT_CHANGED 0x01 +#define VOLUME_CHANGED 0x04 +#define MOUSE_CHANGED 0x08 +/* + * It is unknown which hotkey this bit is supposed to indicate, but + * according to values from GSIF this is a valid flag. + */ +#define UNKNOWN_CHANGED 0x10 /* sysctl values */ #define FN_MUTE 0 @@ -72,6 +80,10 @@ #define METHOD_GMOU 2 #define METHOD_GVOL 3 #define METHOD_MUTE 4 +#define METHOD_RBLL 5 +#define METHOD_RVOL 6 +#define METHOD_GSIF 7 +#define METHOD_GHKS 8 /* Notify event */ #define ACPI_NOTIFY_STATUS_CHANGED 0x80 @@ -83,6 +95,7 @@ struct int_nameval { char *name; int value; + int exists; }; /* @@ -95,12 +108,13 @@ /* Control methods */ struct int_nameval _sta, /* unused */ gbll, /* brightness */ - ghks, /* unused */ + ghks, /* hotkey selector */ + gbuf, /* unused (buffer?) */ gmou, /* mouse */ - gsif, /* unused */ + gsif, /* function key bitmask */ gvol, /* volume */ - rbll, /* unused */ - rvol; /* unused */ + rbll, /* number of brightness levels (radix) */ + rvol; /* number of volume levels (radix) */ /* State variables */ uint8_t bIsMuted; /* Is volume muted */ @@ -126,6 +140,7 @@ /* Utility function declarations */ static uint8_t acpi_fujitsu_update(struct acpi_fujitsu_softc *sc); static uint8_t acpi_fujitsu_init(struct acpi_fujitsu_softc *sc); +static uint8_t acpi_fujitsu_check_hardware(struct acpi_fujitsu_softc *sc); /* Driver/Module specific structure definitions. */ static device_method_t acpi_fujitsu_methods[] = { @@ -144,13 +159,13 @@ sizeof(struct acpi_fujitsu_softc), }; -/* Prototype for function buttons for getting/setting a value. */ +/* Prototype for function hotkeys for getting/setting a value. */ static int acpi_fujitsu_method_get(struct acpi_fujitsu_softc *sc, int method); static int acpi_fujitsu_method_set(struct acpi_fujitsu_softc *sc, int method, int value); static char *fujitsu_ids[] = { "FUJ02B1", NULL }; -ACPI_SERIAL_DECL(fujitsu, "Fujitsu Function Buttons"); +ACPI_SERIAL_DECL(fujitsu, "Fujitsu Function Hotkeys"); /* sysctl names and function calls */ static struct { @@ -178,6 +193,16 @@ .method = METHOD_GVOL, .description = "Speakers/headphones volume level" }, + { + .name = "volume_radix", + .method = METHOD_RVOL, + .description = "Number of volume level steps" + }, + { + .name = "lcd_brightness_radix", + .method = METHOD_RBLL, + .description = "Number of brightness level steps" + }, { NULL, 0, NULL } }; @@ -191,13 +216,16 @@ static int acpi_fujitsu_probe(device_t dev) { + char *name; + char buffer[64]; - if (acpi_disabled("fujitsu") || - ACPI_ID_PROBE(device_get_parent(dev), dev, fujitsu_ids) == NULL || - device_get_unit(dev) != 0) + name = ACPI_ID_PROBE(device_get_parent(dev), dev, fujitsu_ids); + if (acpi_disabled("fujitsu") || name == NULL || + device_get_unit(dev) > 1) return (ENXIO); - device_set_desc(dev, "Fujitsu Function Buttons"); + sprintf(buffer, "Fujitsu Function Hotkeys %s", name); + device_set_desc_copy(dev, buffer); return (0); } @@ -217,10 +245,10 @@ AcpiInstallNotifyHandler(sc->handle, ACPI_DEVICE_NOTIFY, acpi_fujitsu_notify_handler, sc); - /* Snag our default values for the buttons / button states. */ + /* Snag our default values for the hotkys / hotkey states. */ ACPI_SERIAL_BEGIN(fujitsu); if (!acpi_fujitsu_init(sc)) - device_printf(dev, "Couldn't initialize button states!\n"); + device_printf(dev, "Couldn't initialize hotkey states!\n"); ACPI_SERIAL_END(fujitsu); return (0); @@ -251,10 +279,11 @@ */ ACPI_SERIAL_BEGIN(fujitsu); - status = acpi_SetInteger(sc->handle, "SMOU", 1); - if (ACPI_FAILURE(status)) - device_printf(sc->dev, "Couldn't enable pointer\n"); - + if(sc->gmou.exists) { + status = acpi_SetInteger(sc->handle, "SMOU", 1); + if (ACPI_FAILURE(status)) + device_printf(sc->dev, "Couldn't enable pointer\n"); + } ACPI_SERIAL_END(fujitsu); return (0); @@ -316,13 +345,13 @@ /* * Initializes the names of the ACPI control methods and grabs - * the current state of all of the ACPI buttons into the softc. + * the current state of all of the ACPI hotkeys into the softc. */ static uint8_t acpi_fujitsu_init(struct acpi_fujitsu_softc *sc) { struct acpi_softc *acpi_sc; - int i; + int i, exists; ACPI_SERIAL_ASSERT(fujitsu); @@ -333,9 +362,14 @@ sc->gmou.name = "GMOU"; sc->gsif.name = "GSIF"; sc->gvol.name = "GVOL"; + sc->ghks.name = "GHKS"; + sc->gsif.name = "GSIF"; sc->rbll.name = "RBLL"; sc->rvol.name = "RVOL"; + /* Determine what hardware functionality is available */ + acpi_fujitsu_check_hardware(sc); + /* Build the sysctl tree */ acpi_sc = acpi_device_get_parent_softc(sc->dev); sysctl_ctx_init(&sc->sysctl_ctx); @@ -344,6 +378,31 @@ OID_AUTO, "fujitsu", CTLFLAG_RD, 0, ""); for (i = 0; sysctl_table[i].name != NULL; i++) { + exists = 0; + switch(sysctl_table[i].method) { + case METHOD_GMOU: + exists = sc->gmou.exists; + break; + case METHOD_GBLL: + exists = sc->gbll.exists; + break; + case METHOD_GVOL: + case METHOD_MUTE: + exists = sc->gvol.exists; + break; + case METHOD_RVOL: + exists = sc->rvol.exists; + break; + case METHOD_RBLL: + exists = sc->rbll.exists; + break; + default: + /* Allow by default */ + exists = 1; + break; + } + if(!exists) + continue; SYSCTL_ADD_PROC(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, sysctl_table[i].name, @@ -352,9 +411,10 @@ sysctl_table[i].description); } - /* Set the buttons to their initial states */ + + /* Set the hotkeys to their initial states */ if (!acpi_fujitsu_update(sc)) { - device_printf(sc->dev, "Couldn't init button states\n"); + device_printf(sc->dev, "Couldn't init hotkey states\n"); return (FALSE); } @@ -409,13 +469,28 @@ case METHOD_MUTE: nv = sc->gvol; break; + case METHOD_GHKS: + nv = sc->ghks; + break; + case METHOD_GSIF: + nv = sc->gsif; + break; + case METHOD_RBLL: + nv = sc->rbll; + break; + case METHOD_RVOL: + nv = sc->rvol; + break; default: return (FALSE); } + if(!nv.exists) + return (EINVAL); + status = acpi_GetInteger(sc->handle, nv.name, &nv.value); if (ACPI_FAILURE(status)) { - device_printf(sc->dev, "Couldn't query method\n"); + device_printf(sc->dev, "Couldn't query method (%s)\n", nv.name); return (FALSE); } @@ -459,6 +534,9 @@ return (EINVAL); } + if(!nv.exists) + return (EINVAL); + if (method == METHOD_MUTE) { if (value == 1) value = nv.value | VOLUME_MUTE_BIT; @@ -471,7 +549,7 @@ status = acpi_SetInteger(sc->handle, control, value); if (ACPI_FAILURE(status)) { device_printf(sc->dev, "Couldn't update %s\n", control); - return (EINVAL); + return (FALSE); } sc->lastValChanged = changed; @@ -479,86 +557,160 @@ } /* - * Query each of the ACPI control methods that contain information we're - * interested in. We check the return values from the control methods and - * adjust any state variables if they should be adjusted. + * Query the get methods to determine what functionality is available + * from the hardware function hotkeys. */ static uint8_t -acpi_fujitsu_update(struct acpi_fujitsu_softc *sc) +acpi_fujitsu_check_hardware(struct acpi_fujitsu_softc *sc) { + int val; struct acpi_softc *acpi_sc; acpi_sc = acpi_device_get_parent_softc(sc->dev); ACPI_SERIAL_ASSERT(fujitsu); + /* save the hotkey bitmask */ + if (ACPI_FAILURE(acpi_GetInteger(sc->handle, + sc->gsif.name, &(sc->gsif.value)))) { + sc->gsif.exists = 0; + device_printf(sc->dev, "Couldn't query bitmask value\n"); + } else { + sc->gsif.exists = 1; + } /* System Volume Level */ if (ACPI_FAILURE(acpi_GetInteger(sc->handle, - sc->gvol.name, &(sc->gvol.value)))) { - device_printf(sc->dev, "Couldn't query volume level\n"); - return (FALSE); + sc->gvol.name, &val))) { + sc->gvol.exists = 0; + } else { + sc->gvol.exists = 1; } - if (sc->gvol.value & VOLUME_CHANGE_BIT) { - sc->bIsMuted = - (uint8_t)((sc->gvol.value & VOLUME_MUTE_BIT) != 0); + if (ACPI_FAILURE(acpi_GetInteger(sc->handle, + sc->gbll.name, &val))) { + sc->gbll.exists = 0; + } else { + sc->gbll.exists = 1; + } - /* Clear the modification bit */ - sc->gvol.value &= VOLUME_SETTING_BITS; + if (ACPI_FAILURE(acpi_GetInteger(sc->handle, + sc->ghks.name, &val))) { + sc->ghks.exists = 0; + } else { + sc->ghks.exists = 1; + } - if (sc->bIsMuted) { - acpi_UserNotify("FUJITSU", sc->handle, FN_MUTE); - ACPI_VPRINT(sc->dev, acpi_sc, "Volume is now mute\n"); - } else - ACPI_VPRINT(sc->dev, acpi_sc, "Volume is now %d\n", - sc->gvol.value); + if (ACPI_FAILURE(acpi_GetInteger(sc->handle, + sc->gmou.name, &val))) { + sc->gmou.exists = 0; + } else { + sc->gmou.exists = 1; + } - acpi_UserNotify("FUJITSU", sc->handle, FN_VOLUME); - - sc->lastValChanged = VOLUME_CHANGED; + if (ACPI_FAILURE(acpi_GetInteger(sc->handle, + sc->rbll.name, &val))) { + sc->rbll.exists = 0; + } else { + sc->rbll.exists = 1; } - /* Internal mouse pointer (eraserhead) */ if (ACPI_FAILURE(acpi_GetInteger(sc->handle, - sc->gmou.name, &(sc->gmou.value)))) { - device_printf(sc->dev, "Couldn't query pointer state\n"); - return (FALSE); + sc->rvol.name, &val))) { + sc->rvol.exists = 0; + } else { + sc->rvol.exists = 1; } - if (sc->gmou.value & MOUSE_UPDATED_BIT) { - sc->bIntPtrEnabled = (uint8_t)(sc->gmou.value & 0x1); + return (TRUE); +} + +/* + * Query each of the ACPI control methods that contain information we're + * interested in. We check the return values from the control methods and + * adjust any state variables if they should be adjusted. + */ +static uint8_t +acpi_fujitsu_update(struct acpi_fujitsu_softc *sc) +{ + int changed; + struct acpi_softc *acpi_sc; - /* Clear the modification bit */ - sc->gmou.value &= MOUSE_SETTING_BITS; - - acpi_UserNotify("FUJITSU", sc->handle, FN_POINTER_ENABLE); + acpi_sc = acpi_device_get_parent_softc(sc->dev); - ACPI_VPRINT(sc->dev, acpi_sc, "Internal pointer is now %s\n", >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602011715.k11HF2SI082844>