PERFORCE change 90811 for review
Warner Losh
imp at FreeBSD.org
Tue Jan 31 09:55:04 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=90811
Change 90811 by imp at imp_harmony on 2006/01/31 17:54:32
IFC @90807
Affected files ...
.. //depot/projects/arm/src/sys/cam/scsi/scsi_da.c#6 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_getcwd.c#4 integrate
.. //depot/projects/arm/src/sys/conf/Makefile.i386#4 integrate
.. //depot/projects/arm/src/sys/conf/Makefile.pc98#4 integrate
.. //depot/projects/arm/src/sys/conf/NOTES#13 integrate
.. //depot/projects/arm/src/sys/conf/files#14 integrate
.. //depot/projects/arm/src/sys/conf/kmod.mk#4 integrate
.. //depot/projects/arm/src/sys/conf/options#13 integrate
.. //depot/projects/arm/src/sys/dev/acpi_support/acpi_asus.c#3 integrate
.. //depot/projects/arm/src/sys/dev/acpi_support/acpi_fujitsu.c#2 integrate
.. //depot/projects/arm/src/sys/dev/bge/if_bge.c#8 integrate
.. //depot/projects/arm/src/sys/dev/ce/if_ce.c#2 integrate
.. //depot/projects/arm/src/sys/dev/em/if_em.c#12 integrate
.. //depot/projects/arm/src/sys/dev/iwi/if_iwi.c#3 integrate
.. //depot/projects/arm/src/sys/dev/iwi/if_iwireg.h#3 integrate
.. //depot/projects/arm/src/sys/dev/le/am7990.c#1 branch
.. //depot/projects/arm/src/sys/dev/le/am79900.c#1 branch
.. //depot/projects/arm/src/sys/dev/le/am79900reg.h#1 branch
.. //depot/projects/arm/src/sys/dev/le/am79900var.h#1 branch
.. //depot/projects/arm/src/sys/dev/le/am7990reg.h#1 branch
.. //depot/projects/arm/src/sys/dev/le/am7990var.h#1 branch
.. //depot/projects/arm/src/sys/dev/le/if_le_ledma.c#1 branch
.. //depot/projects/arm/src/sys/dev/le/if_le_pci.c#1 branch
.. //depot/projects/arm/src/sys/dev/le/lance.c#1 branch
.. //depot/projects/arm/src/sys/dev/le/lancereg.h#1 branch
.. //depot/projects/arm/src/sys/dev/le/lancevar.h#1 branch
.. //depot/projects/arm/src/sys/dev/md/md.c#5 integrate
.. //depot/projects/arm/src/sys/dev/ral/if_ral.c#4 integrate
.. //depot/projects/arm/src/sys/dev/ral/if_ralreg.h#3 integrate
.. //depot/projects/arm/src/sys/dev/ral/if_ralvar.h#2 integrate
.. //depot/projects/arm/src/sys/dev/sound/pcm/dsp.c#6 integrate
.. //depot/projects/arm/src/sys/dev/sound/pcm/feeder.c#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/umass.c#7 integrate
.. //depot/projects/arm/src/sys/dev/usb/usbdevs#9 integrate
.. //depot/projects/arm/src/sys/fs/devfs/devfs_vnops.c#5 integrate
.. //depot/projects/arm/src/sys/geom/concat/g_concat.c#4 integrate
.. //depot/projects/arm/src/sys/geom/raid3/g_raid3.c#6 integrate
.. //depot/projects/arm/src/sys/i386/include/cserial.h#2 integrate
.. //depot/projects/arm/src/sys/ia64/include/elf.h#3 integrate
.. //depot/projects/arm/src/sys/kern/kern_ktrace.c#4 integrate
.. //depot/projects/arm/src/sys/kern/kern_malloc.c#5 integrate
.. //depot/projects/arm/src/sys/kern/kern_mbuf.c#5 integrate
.. //depot/projects/arm/src/sys/kern/kern_rwlock.c#1 branch
.. //depot/projects/arm/src/sys/kern/subr_firmware.c#1 branch
.. //depot/projects/arm/src/sys/kern/subr_lock.c#2 integrate
.. //depot/projects/arm/src/sys/kern/subr_sleepqueue.c#5 integrate
.. //depot/projects/arm/src/sys/kern/sys_pipe.c#4 integrate
.. //depot/projects/arm/src/sys/kern/tty_pts.c#2 integrate
.. //depot/projects/arm/src/sys/kern/tty_pty.c#6 integrate
.. //depot/projects/arm/src/sys/kern/uipc_usrreq.c#6 integrate
.. //depot/projects/arm/src/sys/kern/vfs_default.c#7 integrate
.. //depot/projects/arm/src/sys/kern/vfs_mount.c#9 integrate
.. //depot/projects/arm/src/sys/kern/vfs_subr.c#8 integrate
.. //depot/projects/arm/src/sys/modules/Makefile#9 integrate
.. //depot/projects/arm/src/sys/modules/ce/Makefile#1 branch
.. //depot/projects/arm/src/sys/modules/firmware/Makefile#1 branch
.. //depot/projects/arm/src/sys/net/if.c#6 integrate
.. //depot/projects/arm/src/sys/net/if.h#4 integrate
.. //depot/projects/arm/src/sys/net/if_ethersubr.c#9 integrate
.. //depot/projects/arm/src/sys/net/if_gif.c#4 integrate
.. //depot/projects/arm/src/sys/net/if_gif.h#4 integrate
.. //depot/projects/arm/src/sys/net/if_var.h#4 integrate
.. //depot/projects/arm/src/sys/net/if_vlan.c#5 integrate
.. //depot/projects/arm/src/sys/net/if_vlan_var.h#5 integrate
.. //depot/projects/arm/src/sys/netgraph/ng_sppp.c#3 integrate
.. //depot/projects/arm/src/sys/netinet/if_ether.c#7 integrate
.. //depot/projects/arm/src/sys/netinet/in_gif.c#4 integrate
.. //depot/projects/arm/src/sys/netinet6/in6_gif.c#4 integrate
.. //depot/projects/arm/src/sys/nfsserver/nfs.h#3 integrate
.. //depot/projects/arm/src/sys/nfsserver/nfs_serv.c#4 integrate
.. //depot/projects/arm/src/sys/nfsserver/nfs_srvsock.c#3 integrate
.. //depot/projects/arm/src/sys/nfsserver/nfs_syscalls.c#3 integrate
.. //depot/projects/arm/src/sys/sparc64/sbus/dma_sbus.c#4 integrate
.. //depot/projects/arm/src/sys/sparc64/sbus/lsi64854.c#3 integrate
.. //depot/projects/arm/src/sys/sparc64/sbus/lsi64854var.h#3 integrate
.. //depot/projects/arm/src/sys/sys/_rwlock.h#1 branch
.. //depot/projects/arm/src/sys/sys/firmware.h#1 branch
.. //depot/projects/arm/src/sys/sys/lock.h#6 integrate
.. //depot/projects/arm/src/sys/sys/mbuf.h#8 integrate
.. //depot/projects/arm/src/sys/sys/rwlock.h#1 branch
.. //depot/projects/arm/src/sys/tools/fw_stub.awk#1 branch
.. //depot/projects/arm/src/sys/vm/redzone.c#1 branch
.. //depot/projects/arm/src/sys/vm/redzone.h#1 branch
.. //depot/projects/arm/src/sys/vm/vm_contig.c#5 integrate
.. //depot/projects/arm/src/usr.sbin/config/config.h#4 integrate
.. //depot/projects/arm/src/usr.sbin/config/config.y#4 integrate
.. //depot/projects/arm/src/usr.sbin/config/main.c#4 integrate
.. //depot/projects/arm/src/usr.sbin/config/mkmakefile.c#3 integrate
.. //depot/projects/arm/src/usr.sbin/config/mkoptions.c#2 integrate
Differences ...
==== //depot/projects/arm/src/sys/cam/scsi/scsi_da.c#6 (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/arm/src/sys/compat/linux/linux_getcwd.c#4 (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/arm/src/sys/conf/Makefile.i386#4 (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/arm/src/sys/conf/Makefile.pc98#4 (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/arm/src/sys/conf/NOTES#13 (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.1348 2006/01/31 11:09:21 pjd Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -327,6 +327,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 +1193,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
==== //depot/projects/arm/src/sys/conf/files#14 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1086 2006/01/26 01:30:33 cognet Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1089 2006/01/31 11:09:21 pjd Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -1268,6 +1268,7 @@
kern/kern_proc.c standard
kern/kern_prot.c standard
kern/kern_resource.c standard
+kern/kern_rwlock.c standard
kern/kern_sema.c standard
kern/kern_shutdown.c standard
kern/kern_sig.c standard
@@ -1297,6 +1298,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
@@ -1865,6 +1867,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/arm/src/sys/conf/kmod.mk#4 (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/arm/src/sys/conf/options#13 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.524 2006/01/10 09:19:08 phk Exp $
+# $FreeBSD: src/sys/conf/options,v 1.527 2006/01/31 11:09:21 pjd Exp $
#
# On the handling of kernel options
#
@@ -387,6 +387,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.
@@ -515,6 +517,7 @@
MSIZE opt_global.h
REGRESSION opt_global.h
RESTARTABLE_PANICS opt_global.h
+RWLOCK_NOINLINE opt_global.h
VFS_BIO_DEBUG opt_global.h
# These are VM related options
@@ -529,6 +532,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/arm/src/sys/dev/acpi_support/acpi_asus.c#3 (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/arm/src/sys/dev/acpi_support/acpi_fujitsu.c#2 (text+ko) ====
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002 Sean Bullington <seanATstalker.org>
- * 2003-2005 Anish Mistry <amistry at am-productions.biz>
+ * 2003-2006 Anish Mistry <amistry at am-productions.biz>
* 2004 Mark Santcroos <marks at 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",
- (sc->bIntPtrEnabled) ? "enabled" : "disabled");
+ ACPI_SERIAL_ASSERT(fujitsu);
+ if(sc->gsif.exists)
+ changed = sc->gsif.value & acpi_fujitsu_method_get(sc,METHOD_GHKS);
+ else
+ changed = 0;
- sc->lastValChanged = MOUSE_CHANGED;
+ /* System Volume Level */
+ if(sc->gvol.exists) {
+ 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);
+ }
+
+ if (changed & VOLUME_CHANGED) {
+ sc->bIsMuted =
+ (uint8_t)((sc->gvol.value & VOLUME_MUTE_BIT) != 0);
+
+ /* Clear the modification bit */
+ sc->gvol.value &= VOLUME_SETTING_BITS;
+
+ 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);
+
+ acpi_UserNotify("FUJITSU", sc->handle, FN_VOLUME);
+ }
}
- /* Screen Brightness Level */
- if (ACPI_FAILURE(acpi_GetInteger(sc->handle,
- sc->gbll.name, &(sc->gbll.value)))) {
- device_printf(sc->dev, "Couldn't query brightness level\n");
- return (FALSE);
+ /* Internal mouse pointer (eraserhead) */
+ if(sc->gmou.exists) {
+ 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);
+ }
+
+ if (changed & MOUSE_CHANGED) {
+ sc->bIntPtrEnabled = (uint8_t)(sc->gmou.value & 0x1);
+
+ /* Clear the modification bit */
+ sc->gmou.value &= MOUSE_SETTING_BITS;
+
+ acpi_UserNotify("FUJITSU", sc->handle, FN_POINTER_ENABLE);
+
+ ACPI_VPRINT(sc->dev, acpi_sc, "Internal pointer is now %s\n",
+ (sc->bIntPtrEnabled) ? "enabled" : "disabled");
+ }
}
- if (sc->gbll.value & BRIGHTNESS_CHANGE_BIT) {
- /* No state to record here. */
-
- /* Clear the modification bit */
- sc->gbll.value &= BRIGHTNESS_SETTING_BITS;
-
- acpi_UserNotify("FUJITSU", sc->handle, FN_LCD_BRIGHTNESS);
-
- ACPI_VPRINT(sc->dev, acpi_sc, "Brightness level is now %d\n",
- sc->gbll.value);
-
- sc->lastValChanged = BRIGHT_CHANGED;
+ /* Screen Brightness Level */
+ if(sc->gbll.exists) {
+ if (ACPI_FAILURE(acpi_GetInteger(sc->handle,
+ sc->gbll.name, &(sc->gbll.value)))) {
+ device_printf(sc->dev, "Couldn't query brightness level\n");
+ return (FALSE);
+ }
+
+ if (changed & BRIGHT_CHANGED) {
+ /* No state to record here. */
+
+ /* Clear the modification bit */
+ sc->gbll.value &= BRIGHTNESS_SETTING_BITS;
+
+ acpi_UserNotify("FUJITSU", sc->handle, FN_LCD_BRIGHTNESS);
+
+ ACPI_VPRINT(sc->dev, acpi_sc, "Brightness level is now %d\n",
+ sc->gbll.value);
+ }
}
+ sc->lastValChanged = changed;
return (TRUE);
}
==== //depot/projects/arm/src/sys/dev/bge/if_bge.c#8 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.117 2006/01/23 15:57:02 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.118 2006/01/30 13:45:55 glebius Exp $");
/*
* Broadcom BCM570x family gigabit ethernet driver for FreeBSD.
@@ -2194,7 +2194,7 @@
IFQ_SET_READY(&ifp->if_snd);
ifp->if_hwassist = BGE_CSUM_FEATURES;
ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWTAGGING |
- IFCAP_VLAN_MTU;
+ IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM;
ifp->if_capenable = ifp->if_capabilities;
#ifdef DEVICE_POLLING
ifp->if_capabilities |= IFCAP_POLLING;
@@ -3519,6 +3519,7 @@
ifp->if_hwassist = BGE_CSUM_FEATURES;
else
ifp->if_hwassist = 0;
+ VLAN_CAPABILITIES(ifp);
}
break;
default:
==== //depot/projects/arm/src/sys/dev/ce/if_ce.c#2 (text+ko) ====
@@ -16,7 +16,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ce/if_ce.c,v 1.1 2006/01/27 09:02:09 rik Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ce/if_ce.c,v 1.2 2006/01/30 21:12:49 rik Exp $");
#include <sys/param.h>
@@ -256,6 +256,74 @@
static int ce_destroy = 0;
+#if __FreeBSD_version < 500000
+static int ce_open (dev_t dev, int oflags, int devtype, struct proc *p);
+static int ce_close (dev_t dev, int fflag, int devtype, struct proc *p);
+static int ce_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p);
+#else
+static int ce_open (struct cdev *dev, int oflags, int devtype, struct thread *td);
+static int ce_close (struct cdev *dev, int fflag, int devtype, struct thread *td);
+static int ce_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td);
+#endif
+#if __FreeBSD_version < 500000
+static struct cdevsw ce_cdevsw = {
+ ce_open, ce_close, noread, nowrite,
+ ce_ioctl, nopoll, nommap, nostrategy,
+ "ce", CDEV_MAJOR, nodump, nopsize,
+ D_NAGGED, -1
+ };
+#elif __FreeBSD_version == 500000
+static struct cdevsw ce_cdevsw = {
+ ce_open, ce_close, noread, nowrite,
+ ce_ioctl, nopoll, nommap, nostrategy,
+ "ce", CDEV_MAJOR, nodump, nopsize,
+ D_NAGGED,
+ };
+#elif __FreeBSD_version <= 501000
+static struct cdevsw ce_cdevsw = {
+ .d_open = ce_open,
+ .d_close = ce_close,
+ .d_read = noread,
+ .d_write = nowrite,
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list