PERFORCE change 122405 for review

Roman Divacky rdivacky at FreeBSD.org
Wed Jun 27 14:24:35 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=122405

Change 122405 by rdivacky at rdivacky_witten on 2007/06/27 14:24:01

	IFC

Affected files ...

.. //depot/projects/soc2007/rdivacky/linux_at/sys/boot/forth/loader.conf#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/conf/NOTES#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/conf/files#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/conf/options#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/acpica/acpi.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/acpica/acpiio.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/acpica/acpivar.h#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-all.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-chipset.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-disk.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-pci.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-usb.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ath/if_ath.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/isp/isp.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/isp/isp_pci.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/iwi/if_iwi.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/rp/rp.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/sym/sym_hipd.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ehci_pci.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/if_aue.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/if_cdce.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/if_cue.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/if_kue.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/if_rum.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/if_ural.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ohci_pci.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ubsa.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ubser.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ucom.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ucycom.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/udbp.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ufm.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ufoma.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/uftdi.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/uhci_pci.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/uhid.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/uhub.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/uipaq.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ukbd.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ulpt.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/umass.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/umodem.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ums.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/urio.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/usb_port.h#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/usb_quirks.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/usb_quirks.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/usbdevs#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/uscanner.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/uvisor.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/tmpfs/tmpfs.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/tmpfs/tmpfs_fifoops.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/tmpfs/tmpfs_subr.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/tmpfs/tmpfs_uma.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/tmpfs/tmpfs_uma.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/tmpfs/tmpfs_vfsops.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/tmpfs/tmpfs_vnops.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/umapfs/umap.h#2 delete
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/umapfs/umap_subr.c#2 delete
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/umapfs/umap_vfsops.c#2 delete
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/umapfs/umap_vnops.c#3 delete
.. //depot/projects/soc2007/rdivacky/linux_at/sys/i386/acpica/acpi_machdep.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/Make.tags.inc#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/Makefile#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/kern_malloc.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/kern_rwlock.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/kern_timeout.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/modules/acpi/acpi_video/Makefile#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/modules/i2c/controllers/alpm/Makefile#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/modules/i2c/controllers/viapm/Makefile#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/modules/umapfs/Makefile#2 delete
.. //depot/projects/soc2007/rdivacky/linux_at/sys/net/bridgestp.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/net/if_gre.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/net80211/ieee80211_freebsd.h#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netatm/atm_cm.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netatm/ipatm/ipatm_event.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netatm/spans/spans_proto.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netatm/uni/sscf_uni_lower.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netatm/uni/uniarp.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netatm/uni/uniarp_timer.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netatm/uni/unisig_decode.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netatm/uni/unisig_proto.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netgraph/ng_parse.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netinet/sctp_indata.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netinet/sctp_indata.h#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netinet/sctp_input.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netinet/sctp_uio.h#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netinet/sctputil.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/powerpc/powerpc/busdma_machdep.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/security/audit/audit_syscalls.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/security/mac/mac_audit.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/security/mac/mac_framework.h#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/security/mac/mac_policy.h#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/security/mac_stub/mac_stub.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/security/mac_test/mac_test.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/sys/_rwlock.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/sys/rwlock.h#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/ufs/ffs/ffs_softdep.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/ufs/ufs/ufs_inode.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/swap_pager.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/vm_pageout.c#5 integrate

Differences ...

==== //depot/projects/soc2007/rdivacky/linux_at/sys/boot/forth/loader.conf#2 (text+ko) ====

@@ -6,7 +6,7 @@
 #
 # All arguments must be in double quotes.
 #
-# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.120 2007/04/09 22:09:09 pjd Exp $
+# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.121 2007/06/25 05:06:55 rafan Exp $
 
 ##############################################################
 ###  Basic configuration options  ############################
@@ -135,7 +135,6 @@
 portalfs_load="NO"		# Portal filesystem
 procfs_load="NO"		# Process filesystem
 reiserfs_load="NO"		# ReiserFS
-#umapfs_load="NO"		# User-id map filesystem
 unionfs_load="NO"		# Union filesystem
 xfs_load="NO"   		# XFS
 zfs_load="NO"   		# ZFS

==== //depot/projects/soc2007/rdivacky/linux_at/sys/conf/NOTES#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1434 2007/06/16 04:57:03 alc Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1437 2007/06/27 02:34:22 rafan Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -938,10 +938,12 @@
 # currently be demand-loaded.)  Some people still prefer to statically
 # compile other filesystems as well.
 #
-# NB: The NULL, PORTAL, UMAP and UNION filesystems are known to be
-# buggy, and WILL panic your system if you attempt to do anything with
-# them.  They are included here as an incentive for some enterprising
-# soul to sit down and fix them.
+# NB: The PORTAL filesystem is known to be buggy, and WILL panic your
+# system if you attempt to do anything with it.  It is included here
+# as an incentive for some enterprising soul to sit down and fix it.
+# The UNION filesystem was known to be buggy in the past.  It is now
+# being actively maintained, although there are still some issues being
+# resolved.
 #
 
 # One of these is mandatory:
@@ -964,8 +966,6 @@
 options 	PSEUDOFS_TRACE		#Debugging support for PSEUDOFS
 options 	SMBFS			#SMB/CIFS filesystem
 options 	UDF			#Universal Disk Format
-# Broken (seriously (functionally) broken):
-#options 	UMAPFS			#UID map filesystem
 options 	UNIONFS			#Union filesystem
 # The xFS_ROOT options REQUIRE the associated ``options xFS''
 options 	NFS_ROOT		#NFS usable as root device

==== //depot/projects/soc2007/rdivacky/linux_at/sys/conf/files#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1222 2007/06/16 04:57:04 alc Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1223 2007/06/25 05:06:55 rafan Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -1199,9 +1199,6 @@
 fs/udf/udf_iconv.c		optional udf_iconv
 fs/udf/udf_vfsops.c		optional udf
 fs/udf/udf_vnops.c		optional udf
-fs/umapfs/umap_subr.c		optional umapfs
-fs/umapfs/umap_vfsops.c		optional umapfs
-fs/umapfs/umap_vnops.c		optional umapfs
 fs/unionfs/union_subr.c		optional unionfs
 fs/unionfs/union_vfsops.c	optional unionfs
 fs/unionfs/union_vnops.c	optional unionfs

==== //depot/projects/soc2007/rdivacky/linux_at/sys/conf/options#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.596 2007/06/16 04:57:04 alc Exp $
+# $FreeBSD: src/sys/conf/options,v 1.597 2007/06/25 05:06:55 rafan Exp $
 #
 #        On the handling of kernel options
 #
@@ -198,7 +198,6 @@
 SMBFS		opt_dontuse.h
 TMPFS		opt_dontuse.h
 UDF		opt_dontuse.h
-UMAPFS		opt_dontuse.h
 UNIONFS		opt_dontuse.h
 
 # Pseudofs debugging

==== //depot/projects/soc2007/rdivacky/linux_at/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#4 (text+ko) ====

@@ -766,7 +766,7 @@
 		vn_lock(*vpp, flags, curthread);
 	}
 	ZFS_EXIT(zfsvfs);
-	return (0);
+	return (err);
 }
 
 static int

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/acpica/acpi.c#4 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.239 2007/06/15 18:02:33 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.240 2007/06/21 22:50:37 njl Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -136,6 +136,7 @@
 static ACPI_STATUS acpi_probe_child(ACPI_HANDLE handle, UINT32 level,
 		    void *context, void **status);
 static BOOLEAN	acpi_MatchHid(ACPI_HANDLE h, const char *hid);
+static ACPI_STATUS acpi_EnterSleepState(struct acpi_softc *sc, int state);
 static void	acpi_shutdown_final(void *arg, int howto);
 static void	acpi_enable_fixed_events(struct acpi_softc *sc);
 static int	acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate);
@@ -410,6 +411,7 @@
 
     sc = device_get_softc(dev);
     sc->acpi_dev = dev;
+    callout_init(&sc->susp_force_to, TRUE);
 
     error = ENXIO;
 
@@ -592,7 +594,7 @@
 
     /* Pick the first valid sleep state for the sleep button default. */
     sc->acpi_sleep_button_sx = ACPI_S_STATES_MAX + 1;
-    for (state = ACPI_STATE_S1; state < ACPI_STATE_S5; state++)
+    for (state = ACPI_STATE_S1; state <= ACPI_STATE_S4; state++)
 	if (ACPI_SUCCESS(AcpiGetSleepTypeData(state, &TypeA, &TypeB))) {
 	    sc->acpi_sleep_button_sx = state;
 	    break;
@@ -2118,7 +2120,151 @@
     return (acpi_SetInteger(ACPI_ROOT_OBJECT, "_PIC", model));
 }
 
+/*
+ * DEPRECATED.  This interface has serious deficiencies and will be
+ * removed.
+ *
+ * Immediately enter the sleep state.  In the old model, acpiconf(8) ran
+ * rc.suspend and rc.resume so we don't have to notify devd(8) to do this.
+ */
+ACPI_STATUS
+acpi_SetSleepState(struct acpi_softc *sc, int state)
+{
+    static int once;
+
+    if (!once) {
+	printf(
+"warning: acpi_SetSleepState() deprecated, need to update your software\n");
+	once = 1;
+    }
+    return (acpi_EnterSleepState(sc, state));
+}
+
 static void
+acpi_sleep_force(void *arg)
+{
+    struct acpi_softc *sc;
+
+    printf("acpi: suspend request timed out, forcing sleep now\n");
+    sc = arg;
+    if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate)))
+	printf("acpi: force sleep state S%d failed\n", sc->acpi_next_sstate);
+}
+
+/*
+ * Request that the system enter the given suspend state.  All /dev/apm
+ * devices and devd(8) will be notified.  Userland then has a chance to
+ * save state and acknowledge the request.  The system sleeps once all
+ * acks are in.
+ */
+int
+acpi_ReqSleepState(struct acpi_softc *sc, int state)
+{
+    struct apm_clone_data *clone;
+
+    if (state < ACPI_STATE_S1 || state > ACPI_STATE_S5)
+	return (EINVAL);
+
+    /* S5 (soft-off) should be entered directly with no waiting. */
+    if (state == ACPI_STATE_S5) {
+	if (ACPI_SUCCESS(acpi_EnterSleepState(sc, state)))
+	    return (0);
+	else
+	    return (ENXIO);
+    }
+
+    /* If a suspend request is already in progress, just return. */
+    ACPI_LOCK(acpi);
+    if (sc->acpi_next_sstate != 0) {
+    	ACPI_UNLOCK(acpi);
+	return (0);
+    }
+
+    /* Record the pending state and notify all apm devices. */
+    sc->acpi_next_sstate = state;
+    STAILQ_FOREACH(clone, &sc->apm_cdevs, entries) {
+	clone->notify_status = APM_EV_NONE;
+	if ((clone->flags & ACPI_EVF_DEVD) == 0) {
+	    selwakeuppri(&clone->sel_read, PZERO);
+	    KNOTE_UNLOCKED(&clone->sel_read.si_note, 0);
+	}
+    }
+
+    /* Now notify devd(8) also. */
+    acpi_UserNotify("Suspend", ACPI_ROOT_OBJECT, state);
+
+    /*
+     * Set a timeout to fire if userland doesn't ack the suspend request
+     * in time.  This way we still eventually go to sleep if we were
+     * overheating or running low on battery, even if userland is hung.
+     * We cancel this timeout once all userland acks are in or the
+     * suspend request is aborted.
+     */
+    callout_reset(&sc->susp_force_to, 10 * hz, acpi_sleep_force, sc);
+    ACPI_UNLOCK(acpi);
+    return (0);
+}
+
+/*
+ * Acknowledge (or reject) a pending sleep state.  The caller has
+ * prepared for suspend and is now ready for it to proceed.  If the
+ * error argument is non-zero, it indicates suspend should be cancelled
+ * and gives an errno value describing why.  Once all votes are in,
+ * we suspend the system.
+ */
+int
+acpi_AckSleepState(struct apm_clone_data *clone, int error)
+{
+    struct acpi_softc *sc;
+    int ret, sleeping;
+
+    /* If no pending sleep state, return an error. */
+    ACPI_LOCK(acpi);
+    sc = clone->acpi_sc;
+    if (sc->acpi_next_sstate == 0) {
+    	ACPI_UNLOCK(acpi);
+	return (ENXIO);
+    }
+
+    /* Caller wants to abort suspend process. */
+    if (error) {
+	sc->acpi_next_sstate = 0;
+	callout_stop(&sc->susp_force_to);
+	printf("acpi: listener on %s cancelled the pending suspend\n",
+	    devtoname(clone->cdev));
+    	ACPI_UNLOCK(acpi);
+	return (0);
+    }
+
+    /*
+     * Mark this device as acking the suspend request.  Then, walk through
+     * all devices, seeing if they agree yet.  We only count devices that
+     * are writable since read-only devices couldn't ack the request.
+     */
+    clone->notify_status = APM_EV_ACKED;
+    sleeping = TRUE;
+    STAILQ_FOREACH(clone, &sc->apm_cdevs, entries) {
+	if ((clone->flags & ACPI_EVF_WRITE) != 0 &&
+	    clone->notify_status != APM_EV_ACKED) {
+	    sleeping = FALSE;
+	    break;
+	}
+    }
+
+    /* If all devices have voted "yes", we will suspend now. */
+    if (sleeping)
+	callout_stop(&sc->susp_force_to);
+    ACPI_UNLOCK(acpi);
+    ret = 0;
+    if (sleeping) {
+	if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate)))
+		ret = ENODEV;
+    }
+
+    return (ret);
+}
+
+static void
 acpi_sleep_enable(void *arg)
 {
 
@@ -2134,12 +2280,12 @@
 };
 
 /*
- * Set the system sleep state
+ * Enter the desired system sleep state.
  *
  * Currently we support S1-S5 but S4 is only S4BIOS
  */
-ACPI_STATUS
-acpi_SetSleepState(struct acpi_softc *sc, int state)
+static ACPI_STATUS
+acpi_EnterSleepState(struct acpi_softc *sc, int state)
 {
     ACPI_STATUS	status;
     UINT8	TypeA;
@@ -2148,14 +2294,13 @@
 
     ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state);
 
+    /* Re-entry once we're suspending is not allowed. */
     status = AE_OK;
     ACPI_LOCK(acpi);
     if (sc->acpi_sleep_disabled) {
-	if (sc->acpi_sstate != ACPI_STATE_S0)
-	    status = AE_ERROR;
 	ACPI_UNLOCK(acpi);
 	printf("acpi: suspend request ignored (not ready yet)\n");
-	return (status);
+	return (AE_ERROR);
     }
     sc->acpi_sleep_disabled = 1;
     ACPI_UNLOCK(acpi);
@@ -2251,6 +2396,7 @@
      * Back out state according to how far along we got in the suspend
      * process.  This handles both the error and success cases.
      */
+    sc->acpi_next_sstate = 0;
     if (slp_state >= ACPI_SS_GPE_SET) {
 	acpi_wake_prep_walk(state);
 	sc->acpi_sstate = ACPI_STATE_S0;
@@ -2264,7 +2410,10 @@
 
     /* Allow another sleep request after a while. */
     if (state != ACPI_STATE_S5)
-	timeout(acpi_sleep_enable, (caddr_t)sc, hz * ACPI_MINIMUM_AWAKETIME);
+	timeout(acpi_sleep_enable, sc, hz * ACPI_MINIMUM_AWAKETIME);
+
+    /* Run /etc/rc.resume after we are back. */
+    acpi_UserNotify("Resume", ACPI_ROOT_OBJECT, state);
 
     mtx_unlock(&Giant);
     return_ACPI_STATUS (status);
@@ -2574,11 +2723,15 @@
 static void
 acpi_system_eventhandler_sleep(void *arg, int state)
 {
+    int ret;
 
     ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state);
 
-    if (state >= ACPI_STATE_S0 && state <= ACPI_S_STATES_MAX)
-	acpi_SetSleepState((struct acpi_softc *)arg, state);
+    /* Request that the system prepare to enter the given suspend state. */
+    ret = acpi_ReqSleepState((struct acpi_softc *)arg, state);
+    if (ret != 0)
+	printf("acpi: request to enter state S%d failed (err %d)\n",
+	    state, ret);
 
     return_VOID;
 }
@@ -2840,7 +2993,20 @@
 
     /* Core system ioctls. */
     switch (cmd) {
-    case ACPIIO_SETSLPSTATE:
+    case ACPIIO_REQSLPSTATE:
+	state = *(int *)addr;
+	if (state != ACPI_STATE_S5)
+	    error = acpi_ReqSleepState(sc, state);
+	else {
+	    printf("power off via acpi ioctl not supported\n");
+	    error = ENXIO;
+	}
+	break;
+    case ACPIIO_ACKSLPSTATE:
+	error = *(int *)addr;
+	error = acpi_AckSleepState(sc->acpi_clone, error);
+	break;
+    case ACPIIO_SETSLPSTATE:	/* DEPRECATED */
 	error = EINVAL;
 	state = *(int *)addr;
 	if (state >= ACPI_STATE_S0 && state <= ACPI_S_STATES_MAX)
@@ -3171,7 +3337,8 @@
 			goto out;
 		}
 
-		acpi_SetSleepState(sc, acpi_state);
+		if (ACPI_FAILURE(acpi_EnterSleepState(sc, acpi_state)))
+			error = ENXIO;
 		break;
 	default:
 		error = EINVAL;

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/acpica/acpiio.h#2 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/acpica/acpiio.h,v 1.16 2005/10/23 00:16:41 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpiio.h,v 1.17 2007/06/21 22:50:37 njl Exp $
  */
 
 #ifndef _ACPIIO_H_
@@ -33,7 +33,13 @@
 /*
  * Core ACPI subsystem ioctls
  */
-#define ACPIIO_SETSLPSTATE	_IOW('P', 3, int)
+#define ACPIIO_SETSLPSTATE	_IOW('P', 3, int) /* DEPRECATED */
+
+/* Request S1-5 sleep state. User is notified and then sleep proceeds. */
+#define ACPIIO_REQSLPSTATE	_IOW('P', 4, int)
+
+/* Allow suspend to continue (0) or abort it (errno). */
+#define ACPIIO_ACKSLPSTATE	_IOW('P', 5, int)
 
 struct acpi_battinfo {
     int	 cap;				/* percent */

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/acpica/acpivar.h#4 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.106 2007/06/15 18:02:34 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.107 2007/06/21 22:50:37 njl Exp $
  */
 
 #ifndef _ACPIVAR_H_
@@ -39,12 +39,14 @@
 #include <sys/ktr.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
+#include <sys/selinfo.h>
 #include <sys/sx.h>
 #include <sys/sysctl.h>
 
 #include <machine/bus.h>
 #include <machine/resource.h>
 
+struct apm_clone_data;
 struct acpi_softc {
     device_t		acpi_dev;
     struct cdev		*acpi_dev_t;
@@ -76,6 +78,11 @@
     bus_dmamap_t	acpi_wakemap;
     vm_offset_t		acpi_wakeaddr;
     vm_paddr_t		acpi_wakephys;
+
+    int			acpi_next_sstate;	/* Next suspend Sx state. */
+    struct apm_clone_data *acpi_clone;		/* Pseudo-dev for devd(8). */
+    STAILQ_HEAD(,apm_clone_data) apm_cdevs;	/* All apm/apmctl/acpi cdevs. */
+    struct callout	susp_force_to;		/* Force suspend if no acks. */
 };
 
 struct acpi_device {
@@ -89,6 +96,22 @@
     struct resource_list	ad_rl;
 };
 
+/* Track device (/dev/{apm,apmctl} and /dev/acpi) notification status. */
+struct apm_clone_data {
+    STAILQ_ENTRY(apm_clone_data) entries;
+    struct cdev 	*cdev;
+    int			flags;
+#define	ACPI_EVF_NONE	0	/* /dev/apm semantics */
+#define	ACPI_EVF_DEVD	1	/* /dev/acpi is handled via devd(8) */
+#define	ACPI_EVF_WRITE	2	/* Device instance is opened writable. */
+    int			notify_status;
+#define	APM_EV_NONE	0	/* Device not yet aware of pending sleep. */
+#define	APM_EV_NOTIFIED	1	/* Device saw next sleep state. */
+#define	APM_EV_ACKED	2	/* Device agreed sleep can occur. */
+    struct acpi_softc	*acpi_sc;
+    struct selinfo	sel_read;
+};
+
 #define ACPI_PRW_MAX_POWERRES	8
 
 struct acpi_prw_data {
@@ -304,6 +327,8 @@
 		    ACPI_RESOURCE *res);
 ACPI_STATUS	acpi_OverrideInterruptLevel(UINT32 InterruptNumber);
 ACPI_STATUS	acpi_SetIntrModel(int model);
+int		acpi_ReqSleepState(struct acpi_softc *sc, int state);
+int		acpi_AckSleepState(struct apm_clone_data *clone, int error);
 ACPI_STATUS	acpi_SetSleepState(struct acpi_softc *sc, int state);
 int		acpi_wake_init(device_t dev, int type);
 int		acpi_wake_set_enable(device_t dev, int enable);

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-all.h#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.123 2007/04/08 19:18:51 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.124 2007/06/26 22:13:43 remko Exp $
  */
 
 /* ATA register defines */
@@ -294,6 +294,7 @@
 #define ATA_DEV(device)                 ((device == ATA_MASTER) ? 0 : 1)
 #define ATA_CFA_MAGIC1                  0x844A
 #define ATA_CFA_MAGIC2                  0x848A
+#define ATA_CFA_MAGIC3                  0x8400
 #define ATAPI_MAGIC_LSB                 0x14
 #define ATAPI_MAGIC_MSB                 0xeb
 #define ATAPI_P_READ                    (ATA_S_DRQ | ATA_I_IN)

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-chipset.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.197 2007/06/13 17:44:49 bms Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.198 2007/06/25 08:21:21 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -2890,6 +2890,10 @@
      { ATA_NFORCE_MCP55,    0, AMDNVIDIA, NVIDIA,  ATA_UDMA6, "nForce MCP55" },
      { ATA_NFORCE_MCP55_S1, 0, 0,         NV4|NVQ, ATA_SA300, "nForce MCP55" },
      { ATA_NFORCE_MCP55_S2, 0, 0,         NV4|NVQ, ATA_SA300, "nForce MCP55" },
+     { ATA_NFORCE_MCP61,    0, AMDNVIDIA, NVIDIA,  ATA_UDMA6, "nForce MCP61" },
+     { ATA_NFORCE_MCP61_S1, 0, 0,         NV4|NVQ, ATA_SA300, "nForce MCP61" },
+     { ATA_NFORCE_MCP61_S2, 0, 0,         NV4|NVQ, ATA_SA300, "nForce MCP61" },
+     { ATA_NFORCE_MCP61_S3, 0, 0,         NV4|NVQ, ATA_SA300, "nForce MCP61" },
      { 0, 0, 0, 0, 0, 0}} ;
     char buffer[64] ;
 

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-disk.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.203 2007/05/06 01:20:06 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.204 2007/06/26 22:13:43 remko Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -80,7 +80,8 @@
 
     if (!(atadev->param.config & ATA_PROTO_ATAPI) ||
 	(atadev->param.config == ATA_CFA_MAGIC1) ||
-	(atadev->param.config == ATA_CFA_MAGIC2))
+	(atadev->param.config == ATA_CFA_MAGIC2) ||
+	(atadev->param.config == ATA_CFA_MAGIC3))
 	return 0;
     else
 	return ENXIO;

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-pci.h#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.76 2007/03/09 22:23:39 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.77 2007/06/25 08:21:21 sos Exp $
  */
 
 /* structure holding chipset config info */
@@ -222,6 +222,10 @@
 #define ATA_NFORCE_MCP55        0x036e10de
 #define ATA_NFORCE_MCP55_S1     0x037e10de
 #define ATA_NFORCE_MCP55_S2     0x037f10de
+#define ATA_NFORCE_MCP61        0x03ec10de
+#define ATA_NFORCE_MCP61_S1     0x03e710de
+#define ATA_NFORCE_MCP61_S2     0x03f610de
+#define ATA_NFORCE_MCP61_S3     0x03f710de
 
 #define ATA_PROMISE_ID          0x105a
 #define ATA_PDC20246            0x4d33105a

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ata/ata-usb.c#2 (text) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-usb.c,v 1.6 2007/02/21 19:07:18 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-usb.c,v 1.7 2007/06/23 21:52:05 imp Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -45,6 +45,7 @@
 #include <machine/resource.h>
 #include <machine/bus.h>
 #include <sys/rman.h>
+#include <dev/usb/usb_port.h>
 #include <dev/usb/usb.h>
 #include <dev/usb/usbdi.h>
 #include <dev/usb/usbdi_util.h>

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/ath/if_ath.c#4 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.171 2007/06/11 03:36:49 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.172 2007/06/24 01:57:20 sam Exp $");
 
 /*
  * Driver for the Atheros Wireless LAN controller.
@@ -4798,8 +4798,10 @@
 		bf->bf_node = NULL;
 		if (ni != NULL) {
 			/*
-			 * Reclaim node reference.
+			 * Do any callback and reclaim the node reference.
 			 */
+			if (bf->bf_m->m_flags & M_TXCB)
+				ieee80211_process_callback(ni, bf->bf_m, -1);
 			ieee80211_free_node(ni);
 		}
 		m_freem(bf->bf_m);

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/isp/isp.c#3 (text+ko) ====

@@ -46,7 +46,7 @@
 #endif
 #ifdef	__FreeBSD__
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.146 2007/05/05 20:17:22 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.147 2007/06/24 01:41:16 mjacob Exp $");
 #include <dev/isp/isp_freebsd.h>
 #endif
 #ifdef	__OpenBSD__
@@ -812,7 +812,7 @@
 				}
 				cp = isp->isp_rquest;
 				for (i = 0; i < nw; i++) {
-					cp[i] = ptr[wi++];
+					ISP_IOXPUT_32(isp,  ptr[wi++], &cp[i]);
 					wl--;
 				}
 				MEMORYBARRIER(isp, SYNC_REQUEST,
@@ -875,7 +875,7 @@
 				}
 				cp = isp->isp_rquest;
 				for (i = 0; i < nw; i++) {
-					cp[i] = ptr[wi++];
+					ISP_IOXPUT_16(isp,  ptr[wi++], &cp[i]);
 					wl--;
 				}
 				MEMORYBARRIER(isp, SYNC_REQUEST,

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/isp/isp_pci.c#4 (text+ko) ====

@@ -28,7 +28,7 @@
  * FreeBSD Version.
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.145 2007/06/11 17:56:17 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.148 2007/06/26 23:08:57 mjacob Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2847,10 +2847,22 @@
 		    (ispextreq_t *)qep);
 		break;
 	case RQSTYPE_T2RQS:
-		isp_put_request_t2(isp, (ispreqt2_t *) rq, (ispreqt2_t *) qep);
+		if (FCPARAM(isp)->isp_2klogin) {
+			isp_put_request_t2e(isp,
+			    (ispreqt2e_t *) rq, (ispreqt2e_t *) qep);
+		} else {
+			isp_put_request_t2(isp,
+			    (ispreqt2_t *) rq, (ispreqt2_t *) qep);
+		}
 		break;
+	case RQSTYPE_T3RQS:
+		if (FCPARAM(isp)->isp_2klogin) {
+			isp_put_request_t3e(isp,
+			    (ispreqt3e_t *) rq, (ispreqt3e_t *) qep);
+			break;
+		}
+		/* FALLTHROUGH */
 	case RQSTYPE_A64:
-	case RQSTYPE_T3RQS:
 		isp_put_request_t3(isp, (ispreqt3_t *) rq, (ispreqt3_t *) qep);
 		break;
 	case RQSTYPE_T7RQS:

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/iwi/if_iwi.c#3 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.54 2007/06/11 10:56:06 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.55 2007/06/25 20:56:33 thompsa Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -2630,6 +2630,7 @@
 			return error;
 	}
 
+	memset(&rs, 0, sizeof rs);
 	rs.mode = IWI_MODE_11G;
 	rs.type = IWI_RATESET_TYPE_SUPPORTED;
 	rs.nrates = ic->ic_sup_rates[IEEE80211_MODE_11G].rs_nrates;
@@ -2640,6 +2641,7 @@
 	if (error != 0)
 		return error;
 
+	memset(&rs, 0, sizeof rs);
 	rs.mode = IWI_MODE_11A;
 	rs.type = IWI_RATESET_TYPE_SUPPORTED;
 	rs.nrates = ic->ic_sup_rates[IEEE80211_MODE_11A].rs_nrates;
@@ -2866,7 +2868,7 @@
 	struct iwi_associate *assoc = &sc->assoc;
 	struct iwi_rateset rs;
 	uint16_t capinfo;
-	int error;
+	int error, mode;
 
 	IWI_LOCK_ASSERT(sc);
 
@@ -2877,12 +2879,22 @@
 
 	IWI_STATE_BEGIN(sc, IWI_FW_ASSOCIATING);
 	error = 0;
+	mode = 0;
+
+	if (IEEE80211_IS_CHAN_A(ic->ic_curchan))
+		mode = IWI_MODE_11A;
+	else if (IEEE80211_IS_CHAN_G(ic->ic_curchan))
+		mode = IWI_MODE_11G;
+	if (IEEE80211_IS_CHAN_B(ic->ic_curchan))
+		mode = IWI_MODE_11B;
+
 	if (IEEE80211_IS_CHAN_2GHZ(ic->ic_curchan)) {
 		memset(&config, 0, sizeof config);
 		config.bluetooth_coexistence = sc->bluetooth;
 		config.antenna = sc->antenna;
 		config.multicast_enabled = 1;
-		config.use_protection = 1;
+		if (mode == IWI_MODE_11G)
+			config.use_protection = 1;
 		config.answer_pbreq =
 		    (ic->ic_opmode == IEEE80211_M_IBSS) ? 1 : 0;
 		config.disable_unicast_decryption = 1;
@@ -2905,13 +2917,8 @@
 		goto done;
 
 	/* the rate set has already been "negotiated" */
-	if (IEEE80211_IS_CHAN_A(ic->ic_curchan))
-		rs.mode = IWI_MODE_11A;
-	else if (IEEE80211_IS_CHAN_G(ic->ic_curchan))
-		rs.mode = IWI_MODE_11G;
-	if (IEEE80211_IS_CHAN_B(ic->ic_curchan))
-		rs.mode = IWI_MODE_11B;
-
+	memset(&rs, 0, sizeof rs);
+	rs.mode = mode;
 	rs.type = IWI_RATESET_TYPE_NEGOTIATED;
 	rs.nrates = ni->ni_rates.rs_nrates;
 	if (rs.nrates > IWI_RATESET_SIZE) {
@@ -2946,13 +2953,7 @@
 	if (error != 0)
 		goto done;
 
-	if (IEEE80211_IS_CHAN_A(ic->ic_curchan))
-		assoc->mode = IWI_MODE_11A;
-	else if (IEEE80211_IS_CHAN_G(ic->ic_curchan))
-		assoc->mode = IWI_MODE_11G;
-	else if (IEEE80211_IS_CHAN_B(ic->ic_curchan))
-		assoc->mode = IWI_MODE_11B;
-	
+	assoc->mode = mode;
 	assoc->chan = ic->ic_curchan->ic_ieee;
 	/*
 	 * NB: do not arrange for shared key auth w/o privacy

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/rp/rp.c#2 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/rp/rp.c,v 1.72 2006/11/20 12:59:27 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/rp/rp.c,v 1.73 2007/06/26 13:50:48 remko Exp $");
 
 /* 
  * rp.c - for RocketPort FreeBSD
@@ -573,6 +573,7 @@
 
 static	void	rpbreak(struct tty *, int);
 static	void	rpclose(struct tty *tp);
+static	void	rphardclose(struct tty *tp);
 static	int	rpmodem(struct tty *, int, int);
 static	int	rpparam(struct tty *, struct termios *);
 static	void	rpstart(struct tty *);
@@ -697,7 +698,7 @@
 			if((tp->t_state & TS_CARR_ON)) {
 				(void)ttyld_modem(tp, 0);
 				if(ttyld_modem(tp, 0) == 0) {
-					rpclose(tp);
+					rphardclose(tp);
 				}
 			}
 		}
@@ -935,6 +936,16 @@
 rpclose(struct tty *tp)
 {
 	struct	rp_port	*rp;
+
+	rp = tp->t_sc;
+	rphardclose(tp);
+	device_unbusy(rp->rp_ctlp->dev);
+}
+
+static void
+rphardclose(struct tty *tp)
+{
+	struct	rp_port	*rp;
 	CHANNEL_t	*cp;
 
 	rp = tp->t_sc;
@@ -958,7 +969,6 @@
 	tp->t_actout = FALSE;
 	wakeup(&tp->t_actout);
 	wakeup(TSA_CARR_ON(tp));
-	device_unbusy(rp->rp_ctlp->dev);
 }
 
 static void

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/sym/sym_hipd.c#4 (text+ko) ====

@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/sym/sym_hipd.c,v 1.65 2007/06/17 05:55:52 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/sym/sym_hipd.c,v 1.66 2007/06/23 00:02:19 mjacob Exp $");
 
 #define SYM_DRIVER_NAME	"sym-1.6.5-20000902"
 
@@ -202,7 +202,7 @@
 }
 
 #define sym_que_entry(ptr, type, member) \
-	((type *)((char *)(ptr)-(unsigned int)(&((type *)0)->member)))
+	((type *)((char *)(ptr)-(size_t)(&((type *)0)->member)))
 
 
 #define sym_insque(new, pos)		__sym_que_add(new, pos, (pos)->flink)

==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ehci_pci.c#3 (text+ko) ====

@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.26 2007/06/20 05:10:52 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.27 2007/06/21 14:42:33 imp Exp $");
 
 /*
  * USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller.
@@ -153,11 +153,11 @@
 #define DPRINTF(x)
 #endif
 
-static int ehci_pci_attach(device_t self);
-static int ehci_pci_detach(device_t self);
-static int ehci_pci_shutdown(device_t self);
-static int ehci_pci_suspend(device_t self);
-static int ehci_pci_resume(device_t self);
+static device_attach_t ehci_pci_attach;
+static device_detach_t ehci_pci_detach;
+static device_shutdown_t ehci_pci_shutdown;
+static device_suspend_t ehci_pci_suspend;
+static device_resume_t ehci_pci_resume;
 static void ehci_pci_givecontroller(device_t self);
 static void ehci_pci_takecontroller(device_t self);

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list