## Automatically generated incremental diff
## From:   linux-2.4.26-pre6
## To:     linux-2.4.26-rc1
## Robot:  $Id: make-incremental-diff,v 1.12 2004/01/06 07:19:36 hpa Exp $

diff -urN linux-2.4.26-pre6/Documentation/Configure.help linux-2.4.26-rc1/Documentation/Configure.help
--- linux-2.4.26-pre6/Documentation/Configure.help	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/Documentation/Configure.help	2004-03-27 20:23:23.000000000 -0800
@@ -10829,6 +10829,14 @@
   whenever you want). If you want to compile it as a module, say M
   here and read <file:Documentation/modules.txt>.
 
+Network delay simualtor  
+CONFIG_NET_SCH_DELAY
+  Say Y if you want to delay packets by a fixed amount of
+  time. This is often useful to simulate network delay when
+  testing applications or protocols.
+  
+  This code is also available as a module called sch_delay.o
+
 Ingress Qdisc
 CONFIG_NET_SCH_INGRESS
   If you say Y here, you will be able to police incoming bandwidth
diff -urN linux-2.4.26-pre6/Makefile linux-2.4.26-rc1/Makefile
--- linux-2.4.26-pre6/Makefile	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/Makefile	2004-03-27 20:23:23.000000000 -0800
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 26
-EXTRAVERSION = -pre6
+EXTRAVERSION = -rc1
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.26-pre6/arch/i386/kernel/acpi.c linux-2.4.26-rc1/arch/i386/kernel/acpi.c
--- linux-2.4.26-pre6/arch/i386/kernel/acpi.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/arch/i386/kernel/acpi.c	2004-03-27 20:23:23.000000000 -0800
@@ -220,7 +220,7 @@
  * Parse Interrupt Source Override for the ACPI SCI
  */
 static void
-acpi_parse_sci_int_src_ovr(u8 bus_irq, u16 polarity, u16 trigger, u32 global_irq)
+acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
 {
 	if (trigger == 0)	/* compatible SCI trigger is level */
 		trigger = 3;
@@ -235,13 +235,18 @@
 	if (acpi_sci_flags.polarity)
 		polarity = acpi_sci_flags.polarity;
 
-	mp_override_legacy_irq(bus_irq, polarity, trigger, global_irq);
+	/*
+ 	 * mp_config_acpi_legacy_irqs() already setup IRQs < 16
+	 * If GSI is < 16, this will update its flags,
+	 * else it will create a new mp_irqs[] entry.
+	 */
+	mp_override_legacy_irq(gsi, polarity, trigger, gsi);
 
 	/*
 	 * stash over-ride to indicate we've been here
 	 * and for later update of acpi_fadt
 	 */
-	acpi_sci_override_gsi = global_irq;
+	acpi_sci_override_gsi = gsi;
 	return;
 }
 
@@ -278,9 +283,8 @@
 	acpi_table_print_madt_entry(header);
 
 	if (intsrc->bus_irq == acpi_fadt.sci_int) {
-		acpi_parse_sci_int_src_ovr(intsrc->bus_irq,
-			intsrc->flags.polarity, intsrc->flags.trigger,
-			intsrc->global_irq);
+		acpi_sci_ioapic_setup(intsrc->global_irq,
+			intsrc->flags.polarity, intsrc->flags.trigger);
 		return 0;
 	}
 
@@ -516,7 +520,7 @@
 	 * pretend we got one so we can set the SCI flags.
 	 */
 	if (!acpi_sci_override_gsi)
-		acpi_parse_sci_int_src_ovr(acpi_fadt.sci_int, 0, 0, acpi_fadt.sci_int);
+		acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0);
 
 	result = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src);
 	if (result < 0) {
diff -urN linux-2.4.26-pre6/arch/sparc64/defconfig linux-2.4.26-rc1/arch/sparc64/defconfig
--- linux-2.4.26-pre6/arch/sparc64/defconfig	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/arch/sparc64/defconfig	2004-03-27 20:23:24.000000000 -0800
@@ -314,7 +314,6 @@
 #
 #    SCTP Configuration (EXPERIMENTAL)
 #
-CONFIG_IPV6_SCTP__=m
 CONFIG_IP_SCTP=m
 # CONFIG_SCTP_DBG_MSG is not set
 # CONFIG_SCTP_DBG_OBJCNT is not set
@@ -757,7 +756,7 @@
 # CONFIG_JFFS_FS is not set
 # CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
-# CONFIG_TMPFS is not set
+CONFIG_TMPFS=y
 CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=m
 CONFIG_JOLIET=y
diff -urN linux-2.4.26-pre6/arch/x86_64/kernel/acpi.c linux-2.4.26-rc1/arch/x86_64/kernel/acpi.c
--- linux-2.4.26-pre6/arch/x86_64/kernel/acpi.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/arch/x86_64/kernel/acpi.c	2004-03-27 20:23:24.000000000 -0800
@@ -233,7 +233,7 @@
  * Parse Interrupt Source Override for the ACPI SCI
  */
 static void
-acpi_parse_sci_int_src_ovr(u8 bus_irq, u16 polarity, u16 trigger, u32 global_irq)
+acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
 {
 	if (trigger == 0)	/* compatible SCI trigger is level */
 		trigger = 3;
@@ -248,13 +248,18 @@
 	if (acpi_sci_flags.polarity)
 		polarity = acpi_sci_flags.polarity;
 
-	mp_override_legacy_irq(bus_irq, polarity, trigger, global_irq);
+	/*
+ 	 * mp_config_acpi_legacy_irqs() already setup IRQs < 16
+	 * If GSI is < 16, this will update its flags,
+	 * else it will create a new mp_irqs[] entry.
+	 */
+	mp_override_legacy_irq(gsi, polarity, trigger, gsi);
 
 	/*
 	 * stash over-ride to indicate we've been here
 	 * and for later update of acpi_fadt
 	 */
-	acpi_sci_override_gsi = global_irq;
+	acpi_sci_override_gsi = gsi;
 	return;
 }
 
@@ -291,9 +296,8 @@
 	acpi_table_print_madt_entry(header);
 
 	if (intsrc->bus_irq == acpi_fadt.sci_int) {
-		acpi_parse_sci_int_src_ovr(intsrc->bus_irq,
-			intsrc->flags.polarity, intsrc->flags.trigger,
-			intsrc->global_irq);
+		acpi_sci_ioapic_setup(intsrc->global_irq,
+			intsrc->flags.polarity, intsrc->flags.trigger);
 		return 0;
 	}
 
@@ -587,7 +591,7 @@
 	 * pretend we got one so we can set the SCI flags.
 	 */
 	if (!acpi_sci_override_gsi)
-		acpi_parse_sci_int_src_ovr(acpi_fadt.sci_int, 0, 0, acpi_fadt.sci_int);
+		acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0);
 
 	result = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src);
 	if (result < 0) {
diff -urN linux-2.4.26-pre6/crypto/arc4.c linux-2.4.26-rc1/crypto/arc4.c
--- linux-2.4.26-pre6/crypto/arc4.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/crypto/arc4.c	2004-03-27 20:23:24.000000000 -0800
@@ -45,10 +45,6 @@
 			k = 0;
 	}
 
-	/* TODO: dump the first 768 bytes generated as recommended
-	   by Ilya Mironov (http://eprint.iacr.org/2002/067/) to 
-	   increase the statistical strength of the state table */
-
 	return 0;
 }
 
diff -urN linux-2.4.26-pre6/drivers/acpi/ec.c linux-2.4.26-rc1/drivers/acpi/ec.c
--- linux-2.4.26-pre6/drivers/acpi/ec.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/ec.c	2004-03-27 20:23:24.000000000 -0800
@@ -715,7 +715,7 @@
 	 * Install GPE handler
 	 */
 	status = acpi_install_gpe_handler(NULL, ec->gpe_bit,
-		ACPI_EVENT_EDGE_TRIGGERED, &acpi_ec_gpe_handler, ec);
+		ACPI_GPE_EDGE_TRIGGERED, &acpi_ec_gpe_handler, ec);
 	if (ACPI_FAILURE(status)) {
 		return_VALUE(-ENODEV);
 	}
@@ -799,7 +799,7 @@
 	 * Install GPE handler
 	 */
 	status = acpi_install_gpe_handler(NULL, ec_ecdt->gpe_bit,
-		ACPI_EVENT_EDGE_TRIGGERED, &acpi_ec_gpe_handler,
+		ACPI_GPE_EDGE_TRIGGERED, &acpi_ec_gpe_handler,
 		ec_ecdt);
 	if (ACPI_FAILURE(status)) {
 		goto error;
diff -urN linux-2.4.26-pre6/drivers/acpi/events/evgpe.c linux-2.4.26-rc1/drivers/acpi/events/evgpe.c
--- linux-2.4.26-pre6/drivers/acpi/events/evgpe.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/events/evgpe.c	2004-03-27 20:23:24.000000000 -0800
@@ -99,9 +99,8 @@
 		return (NULL);
 	}
 
-	/*
-	 * A Non-null gpe_device means this is a GPE Block Device.
-	 */
+	/* A Non-NULL gpe_device means this is a GPE Block Device */
+
 	obj_desc = acpi_ns_get_attached_object ((struct acpi_namespace_node *) gpe_device);
 	if (!obj_desc ||
 		!obj_desc->device.gpe_block) {
@@ -297,7 +296,7 @@
 		}
 	}
 
-	if (local_gpe_event_info.flags & ACPI_EVENT_LEVEL_TRIGGERED) {
+	if ((local_gpe_event_info.flags & ACPI_GPE_XRUPT_TYPE_MASK) == ACPI_GPE_LEVEL_TRIGGERED) {
 		/*
 		 * GPE is level-triggered, we clear the GPE status bit after handling
 		 * the event.
@@ -346,7 +345,7 @@
 	 * If edge-triggered, clear the GPE status bit now.  Note that
 	 * level-triggered events are cleared after the GPE is serviced.
 	 */
-	if (gpe_event_info->flags & ACPI_EVENT_EDGE_TRIGGERED) {
+	if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) == ACPI_GPE_EDGE_TRIGGERED) {
 		status = acpi_hw_clear_gpe (gpe_event_info);
 		if (ACPI_FAILURE (status)) {
 			ACPI_REPORT_ERROR (("acpi_ev_gpe_dispatch: Unable to clear GPE[%2X]\n",
@@ -369,7 +368,7 @@
 
 		/* It is now safe to clear level-triggered events. */
 
-		if (gpe_event_info->flags & ACPI_EVENT_LEVEL_TRIGGERED) {
+		if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) == ACPI_GPE_LEVEL_TRIGGERED) {
 			status = acpi_hw_clear_gpe (gpe_event_info);
 			if (ACPI_FAILURE (status)) {
 				ACPI_REPORT_ERROR ((
diff -urN linux-2.4.26-pre6/drivers/acpi/events/evgpeblk.c linux-2.4.26-rc1/drivers/acpi/events/evgpeblk.c
--- linux-2.4.26-pre6/drivers/acpi/events/evgpeblk.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/events/evgpeblk.c	2004-03-27 20:23:24.000000000 -0800
@@ -168,11 +168,11 @@
  *              information for quick lookup during GPE dispatch
  *
  *              The name of each GPE control method is of the form:
- *                  "_Lnn" or "_Enn"
- *                  Where:
- *                      L      - means that the GPE is level triggered
- *                      E      - means that the GPE is edge triggered
- *                      nn     - is the GPE number [in HEX]
+ *              "_Lxx" or "_Exx"
+ *              Where:
+ *                  L      - means that the GPE is level triggered
+ *                  E      - means that the GPE is edge triggered
+ *                  xx     - is the GPE number [in HEX]
  *
  ******************************************************************************/
 
@@ -188,36 +188,41 @@
 	u32                             gpe_number;
 	char                            name[ACPI_NAME_SIZE + 1];
 	u8                              type;
-	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_save_method_info");
 
 
-	/* Extract the name from the object and convert to a string */
-
+	/*
+	 * _Lxx and _Exx GPE method support
+	 *
+	 * 1) Extract the name from the object and convert to a string
+	 */
 	ACPI_MOVE_32_TO_32 (name,
 			   &((struct acpi_namespace_node *) obj_handle)->name.integer);
 	name[ACPI_NAME_SIZE] = 0;
 
 	/*
-	 * Edge/Level determination is based on the 2nd character
-	 * of the method name
+	 * 2) Edge/Level determination is based on the 2nd character
+	 *    of the method name
+	 *
+	 * NOTE: Default GPE type is RUNTIME.  May be changed later to WAKE if a
+	 * _PRW object is found that points to this GPE.
 	 */
 	switch (name[1]) {
 	case 'L':
-		type = ACPI_EVENT_LEVEL_TRIGGERED;
+		type = ACPI_GPE_LEVEL_TRIGGERED | ACPI_GPE_TYPE_RUNTIME;
 		break;
 
 	case 'E':
-		type = ACPI_EVENT_EDGE_TRIGGERED;
+		type = ACPI_GPE_EDGE_TRIGGERED | ACPI_GPE_TYPE_RUNTIME;
 		break;
 
 	default:
 		/* Unknown method type, just ignore it! */
 
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
-			"Unknown GPE method type: %s (name not of form _Lnn or _Enn)\n",
+			"Unknown GPE method type: %s (name not of form _Lxx or _Exx)\n",
 			name));
 		return_ACPI_STATUS (AE_OK);
 	}
@@ -229,7 +234,7 @@
 		/* Conversion failed; invalid method, just ignore it */
 
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
-			"Could not extract GPE number from name: %s (name is not of form _Lnn or _Enn)\n",
+			"Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)\n",
 			name));
 		return_ACPI_STATUS (AE_OK);
 	}
@@ -255,13 +260,6 @@
 	gpe_event_info->flags    = type;
 	gpe_event_info->method_node = (struct acpi_namespace_node *) obj_handle;
 
-	/* Enable the GPE (SCIs should be disabled at this point) */
-
-	status = acpi_hw_enable_gpe (gpe_event_info);
-	if (ACPI_FAILURE (status)) {
-		return_ACPI_STATUS (status);
-	}
-
 	ACPI_DEBUG_PRINT ((ACPI_DB_LOAD,
 		"Registered GPE method %s as GPE number 0x%.2X\n",
 		name, gpe_number));
@@ -271,6 +269,122 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    acpi_ev_get_gpe_type
+ *
+ * PARAMETERS:  Callback from walk_namespace
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Called from acpi_walk_namespace. Expects each object to be a
+ *              Device.  Run the _PRW method.  If present, extract the GPE
+ *              number and mark the GPE as a WAKE GPE.
+ *
+ ******************************************************************************/
+
+static acpi_status
+acpi_ev_get_gpe_type (
+	acpi_handle                     obj_handle,
+	u32                             level,
+	void                            *info,
+	void                            **return_value)
+{
+	struct acpi_gpe_walk_info       *gpe_info = (void *) info;
+	struct acpi_namespace_node      *gpe_device;
+	struct acpi_gpe_block_info      *gpe_block;
+	struct acpi_namespace_node      *target_gpe_device;
+	struct acpi_gpe_event_info      *gpe_event_info;
+	union acpi_operand_object       *pkg_desc;
+	union acpi_operand_object       *obj_desc;
+	u32                             gpe_number;
+	acpi_status                     status;
+
+
+	ACPI_FUNCTION_TRACE ("ev_get_gpe_type");
+
+
+	/* Check for a _PRW method under this device */
+
+	status = acpi_ut_evaluate_object (obj_handle, METHOD_NAME__PRW,
+			 ACPI_BTYPE_PACKAGE, &pkg_desc);
+	if (status == AE_NOT_FOUND) {
+		return_ACPI_STATUS (AE_OK);
+	}
+	else if (ACPI_FAILURE (status)) {
+		return_ACPI_STATUS (status);
+	}
+
+	/* The returned _PRW package must have at least two elements */
+
+	if (pkg_desc->package.count < 2) {
+		goto cleanup;
+	}
+
+	/* Extract pointers from the input context */
+
+	gpe_device = gpe_info->gpe_device;
+	gpe_block = gpe_info->gpe_block;
+
+	/*
+	 * The _PRW object must return a package, we are only interested
+	 * in the first element
+	 */
+	obj_desc = pkg_desc->package.elements[0];
+
+	if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
+		/* Use FADT-defined GPE device (from definition of _PRW) */
+
+		target_gpe_device = acpi_gbl_fadt_gpe_device;
+
+		/* Integer is the GPE number in the FADT described GPE blocks */
+
+		gpe_number = (u32) obj_desc->integer.value;
+	}
+	else if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_PACKAGE) {
+		/* Package contains a GPE reference and GPE number within a GPE block */
+
+		if ((obj_desc->package.count < 2) ||
+			(ACPI_GET_OBJECT_TYPE (obj_desc->package.elements[0]) != ACPI_TYPE_LOCAL_REFERENCE) ||
+			(ACPI_GET_OBJECT_TYPE (obj_desc->package.elements[1]) != ACPI_TYPE_INTEGER)) {
+			goto cleanup;
+		}
+
+		/* Get GPE block reference and decode */
+
+		target_gpe_device = obj_desc->package.elements[0]->reference.node;
+		gpe_number = (u32) obj_desc->package.elements[1]->integer.value;
+	}
+	else {
+		/* Unknown type, just ignore it */
+
+		goto cleanup;
+	}
+
+	/*
+	 * Is this GPE within this block?
+	 *
+	 * TRUE iff these conditions are true:
+	 *     1) The GPE devices match.
+	 *     2) The GPE index(number) is within the range of the Gpe Block
+	 *          associated with the GPE device.
+	 */
+	if ((gpe_device == target_gpe_device) &&
+		(gpe_number >= gpe_block->block_base_number) &&
+		(gpe_number < gpe_block->block_base_number + (gpe_block->register_count * 8))) {
+		/* Mark GPE for WAKE but DISABLED (even for wake) */
+
+		gpe_event_info = &gpe_block->event_info[gpe_number - gpe_block->block_base_number];
+		gpe_event_info->flags |= ACPI_GPE_TYPE_WAKE;
+	}
+
+cleanup:
+	acpi_ut_remove_reference (pkg_desc);
+
+	return_ACPI_STATUS (status);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    acpi_ev_get_gpe_xrupt_block
  *
  * PARAMETERS:  interrupt_level     - Interrupt for a GPE block
@@ -695,8 +809,13 @@
 	struct acpi_gpe_block_info      **return_gpe_block)
 {
 	struct acpi_gpe_block_info      *gpe_block;
+	struct acpi_gpe_event_info      *gpe_event_info;
+	acpi_native_uint                i;
+	acpi_native_uint                j;
+	u32                             wake_gpe_count;
+	u32                             gpe_enabled_count;
 	acpi_status                     status;
-
+	struct acpi_gpe_walk_info       gpe_info;
 
 	ACPI_FUNCTION_TRACE ("ev_create_gpe_block");
 
@@ -737,7 +856,8 @@
 
 	/* Dump info about this GPE block */
 
-	ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "GPE %02d to %02d [%4.4s] %d regs at %8.8X%8.8X on int %d\n",
+	ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
+		"GPE %02d to %02d [%4.4s] %d regs at %8.8X%8.8X on int %d\n",
 		gpe_block->block_base_number,
 		(u32) (gpe_block->block_base_number +
 				((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)),
@@ -752,6 +872,58 @@
 			  ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK, acpi_ev_save_method_info,
 			  gpe_block, NULL);
 
+	/*
+	 * Runtime option: Should Wake GPEs be enabled at runtime?  The default is
+	 * No,they should only be enabled just as the machine goes to sleep.
+	 */
+	if (acpi_gbl_leave_wake_gpes_disabled) {
+		/*
+		 * Differentiate RUNTIME vs WAKE GPEs, via the _PRW control methods. (Each
+		 * GPE that has one or more _PRWs that reference it is by definition a
+		 * WAKE GPE and will not be enabled while the machine is running.)
+		 */
+		gpe_info.gpe_block = gpe_block;
+		gpe_info.gpe_device = gpe_device;
+
+		status = acpi_ns_walk_namespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+				  ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK, acpi_ev_get_gpe_type,
+				  &gpe_info, NULL);
+	}
+
+	/*
+	 * Enable all GPEs in this block that are 1) "runtime" GPEs, and 2) have
+	 * a corresponding _Lxx or _Exx method.  All other GPEs must be enabled via
+	 * the acpi_enable_gpe() external interface.
+	 */
+	wake_gpe_count = 0;
+	gpe_enabled_count = 0;
+
+	for (i = 0; i < gpe_block->register_count; i++) {
+		for (j = 0; j < 8; j++) {
+			/* Get the info block for this particular GPE */
+
+			gpe_event_info = &gpe_block->event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j];
+			if ((gpe_event_info->method_node) &&
+			   ((gpe_event_info->flags & ACPI_GPE_TYPE_MASK) == ACPI_GPE_TYPE_RUNTIME)) {
+				/* Enable this GPE, it is 1) RUNTIME and 2) has an _Lxx or _Exx method */
+
+				status = acpi_hw_enable_gpe (gpe_event_info);
+				if (ACPI_FAILURE (status)) {
+					return_ACPI_STATUS (status);
+				}
+				gpe_enabled_count++;
+			}
+
+			if ((gpe_event_info->flags & ACPI_GPE_TYPE_MASK) == ACPI_GPE_TYPE_WAKE) {
+				wake_gpe_count++;
+			}
+		}
+	}
+
+	ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
+			"Found %u Wake, Enabled %u Runtime GPEs in this block\n",
+			wake_gpe_count, gpe_enabled_count));
+
 	/* Return the new block */
 
 	if (return_gpe_block) {
@@ -775,27 +947,25 @@
  ******************************************************************************/
 
 acpi_status
-acpi_ev_gpe_initialize (void)
+acpi_ev_gpe_initialize (
+	void)
 {
 	u32                             register_count0 = 0;
 	u32                             register_count1 = 0;
 	u32                             gpe_number_max = 0;
-	acpi_handle                     gpe_device;
 	acpi_status                     status;
 
 
 	ACPI_FUNCTION_TRACE ("ev_gpe_initialize");
 
 
-	/* Get a handle to the predefined _GPE object */
-
-	status = acpi_get_handle (NULL, "\\_GPE", &gpe_device);
+	status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE);
 	if (ACPI_FAILURE (status)) {
 		return_ACPI_STATUS (status);
 	}
 
 	/*
-	 * Initialize the GPE Blocks defined in the FADT
+	 * Initialize the GPE Block(s) defined in the FADT
 	 *
 	 * Why the GPE register block lengths are divided by 2:  From the ACPI Spec,
 	 * section "General-Purpose Event Registers", we have:
@@ -829,8 +999,9 @@
 
 		/* Install GPE Block 0 */
 
-		status = acpi_ev_create_gpe_block (gpe_device, &acpi_gbl_FADT->xgpe0_blk,
+		status = acpi_ev_create_gpe_block (acpi_gbl_fadt_gpe_device, &acpi_gbl_FADT->xgpe0_blk,
 				 register_count0, 0, acpi_gbl_FADT->sci_int, &acpi_gbl_gpe_fadt_blocks[0]);
+
 		if (ACPI_FAILURE (status)) {
 			ACPI_REPORT_ERROR ((
 				"Could not create GPE Block 0, %s\n",
@@ -861,9 +1032,10 @@
 		else {
 			/* Install GPE Block 1 */
 
-			status = acpi_ev_create_gpe_block (gpe_device, &acpi_gbl_FADT->xgpe1_blk,
+			status = acpi_ev_create_gpe_block (acpi_gbl_fadt_gpe_device, &acpi_gbl_FADT->xgpe1_blk,
 					 register_count1, acpi_gbl_FADT->gpe1_base,
 					 acpi_gbl_FADT->sci_int, &acpi_gbl_gpe_fadt_blocks[1]);
+
 			if (ACPI_FAILURE (status)) {
 				ACPI_REPORT_ERROR ((
 					"Could not create GPE Block 1, %s\n",
@@ -885,7 +1057,8 @@
 		/* GPEs are not required by ACPI, this is OK */
 
 		ACPI_REPORT_INFO (("There are no GPE blocks defined in the FADT\n"));
-		return_ACPI_STATUS (AE_OK);
+		status = AE_OK;
+		goto cleanup;
 	}
 
 	/* Check for Max GPE number out-of-range */
@@ -893,9 +1066,12 @@
 	if (gpe_number_max > ACPI_GPE_MAX) {
 		ACPI_REPORT_ERROR (("Maximum GPE number from FADT is too large: 0x%X\n",
 			gpe_number_max));
-		return_ACPI_STATUS (AE_BAD_VALUE);
+		status = AE_BAD_VALUE;
+		goto cleanup;
 	}
 
+cleanup:
+	(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
 	return_ACPI_STATUS (AE_OK);
 }
 
diff -urN linux-2.4.26-pre6/drivers/acpi/events/evmisc.c linux-2.4.26-rc1/drivers/acpi/events/evmisc.c
--- linux-2.4.26-pre6/drivers/acpi/events/evmisc.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/events/evmisc.c	2004-03-27 20:23:24.000000000 -0800
@@ -97,6 +97,20 @@
  *
  ******************************************************************************/
 
+#ifdef ACPI_DEBUG_OUTPUT
+static const char                *acpi_notify_value_names[] =
+{
+	"Bus Check",
+	"Device Check",
+	"Device Wake",
+	"Eject request",
+	"Device Check Light",
+	"Frequency Mismatch",
+	"Bus Mode Mismatch",
+	"Power Fault"
+};
+#endif
+
 acpi_status
 acpi_ev_queue_notify_request (
 	struct acpi_namespace_node      *node,
@@ -112,7 +126,7 @@
 
 
 	/*
-	 * For value 1 (Ejection Request), some device method may need to be run.
+	 * For value 3 (Ejection Request), some device method may need to be run.
 	 * For value 2 (Device Wake) if _PRW exists, the _PS0 method may need to be run.
 	 * For value 0x80 (Status Change) on the power button or sleep button,
 	 * initiate soft-off or sleep operation?
@@ -120,26 +134,13 @@
 	ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
 		"Dispatching Notify(%X) on node %p\n", notify_value, node));
 
-	switch (notify_value) {
-	case 0:
-		ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Re-enumerate Devices\n"));
-		break;
-
-	case 1:
-		ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Ejection Request\n"));
-		break;
-
-	case 2:
-		ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Device Wake\n"));
-		break;
-
-	case 0x80:
-		ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Status Change\n"));
-		break;
-
-	default:
-		ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Unknown Notify Value: %X \n", notify_value));
-		break;
+	if (notify_value <= 7) {
+		ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: %s\n",
+				acpi_notify_value_names[notify_value]));
+	}
+	else {
+		ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "notify value: 0x2.2_x **Device Specific**\n",
+				notify_value));
 	}
 
 	/*
diff -urN linux-2.4.26-pre6/drivers/acpi/events/evxfevnt.c linux-2.4.26-rc1/drivers/acpi/events/evxfevnt.c
--- linux-2.4.26-pre6/drivers/acpi/events/evxfevnt.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/events/evxfevnt.c	2004-03-27 20:23:24.000000000 -0800
@@ -247,16 +247,29 @@
 		goto unlock_and_exit;
 	}
 
-	/* Enable the requested GPE number */
-
-	status = acpi_hw_enable_gpe (gpe_event_info);
-	if (ACPI_FAILURE (status)) {
-		goto unlock_and_exit;
-	}
+	/* Check for Wake vs Runtime GPE */
 
 	if (flags & ACPI_EVENT_WAKE_ENABLE) {
+		/* Ensure the requested wake GPE is disabled */
+
+		status = acpi_hw_disable_gpe (gpe_event_info);
+		if (ACPI_FAILURE (status)) {
+			goto unlock_and_exit;
+		}
+
+		/* Defer Enable of Wake GPE until sleep time */
+
 		acpi_hw_enable_gpe_for_wakeup (gpe_event_info);
 	}
+	else {
+		/* Enable the requested runtime GPE  */
+
+		status = acpi_hw_enable_gpe (gpe_event_info);
+		if (ACPI_FAILURE (status)) {
+			goto unlock_and_exit;
+		}
+	}
+
 
 unlock_and_exit:
 	if (flags & ACPI_NOT_ISR) {
diff -urN linux-2.4.26-pre6/drivers/acpi/executer/excreate.c linux-2.4.26-rc1/drivers/acpi/executer/excreate.c
--- linux-2.4.26-pre6/drivers/acpi/executer/excreate.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/executer/excreate.c	2004-03-27 20:23:24.000000000 -0800
@@ -84,14 +84,15 @@
 	alias_node = (struct acpi_namespace_node *) walk_state->operands[0];
 	target_node = (struct acpi_namespace_node *) walk_state->operands[1];
 
-	if (target_node->type == ACPI_TYPE_LOCAL_ALIAS) {
+	if ((target_node->type == ACPI_TYPE_LOCAL_ALIAS) ||
+		(target_node->type == ACPI_TYPE_LOCAL_METHOD_ALIAS)) {
 		/*
 		 * Dereference an existing alias so that we don't create a chain
 		 * of aliases.  With this code, we guarantee that an alias is
 		 * always exactly one level of indirection away from the
 		 * actual aliased name.
 		 */
-		target_node = (struct acpi_namespace_node *) target_node->object;
+		target_node = ACPI_CAST_PTR (struct acpi_namespace_node, target_node->object);
 	}
 
 	/*
@@ -117,6 +118,17 @@
 		alias_node->object = ACPI_CAST_PTR (union acpi_operand_object, target_node);
 		break;
 
+	case ACPI_TYPE_METHOD:
+
+		/*
+		 * The new alias has the type ALIAS and points to the original
+		 * NS node, not the object itself.  This is because for these
+		 * types, the object can change dynamically via a Store.
+		 */
+		alias_node->type = ACPI_TYPE_LOCAL_METHOD_ALIAS;
+		alias_node->object = ACPI_CAST_PTR (union acpi_operand_object, target_node);
+		break;
+
 	default:
 
 		/* Attach the original source object to the new Alias Node */
diff -urN linux-2.4.26-pre6/drivers/acpi/executer/exdump.c linux-2.4.26-rc1/drivers/acpi/executer/exdump.c
--- linux-2.4.26-pre6/drivers/acpi/executer/exdump.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/executer/exdump.c	2004-03-27 20:23:24.000000000 -0800
@@ -774,6 +774,7 @@
 
 
 	case ACPI_TYPE_LOCAL_ALIAS:
+	case ACPI_TYPE_LOCAL_METHOD_ALIAS:
 	case ACPI_TYPE_LOCAL_EXTRA:
 	case ACPI_TYPE_LOCAL_DATA:
 	default:
diff -urN linux-2.4.26-pre6/drivers/acpi/executer/exresnte.c linux-2.4.26-rc1/drivers/acpi/executer/exresnte.c
--- linux-2.4.26-pre6/drivers/acpi/executer/exresnte.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/executer/exresnte.c	2004-03-27 20:23:24.000000000 -0800
@@ -108,10 +108,11 @@
 	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Entry=%p source_desc=%p [%s]\n",
 		 node, source_desc, acpi_ut_get_type_name (entry_type)));
 
-	if (entry_type == ACPI_TYPE_LOCAL_ALIAS) {
+	if ((entry_type == ACPI_TYPE_LOCAL_ALIAS) ||
+		(entry_type == ACPI_TYPE_LOCAL_METHOD_ALIAS)) {
 		/* There is always exactly one level of indirection */
 
-		node       = (struct acpi_namespace_node *) node->object;
+		node       = ACPI_CAST_PTR (struct acpi_namespace_node, node->object);
 		source_desc = acpi_ns_get_attached_object (node);
 		entry_type = acpi_ns_get_type ((acpi_handle) node);
 		*object_ptr = node;
diff -urN linux-2.4.26-pre6/drivers/acpi/executer/exstoren.c linux-2.4.26-rc1/drivers/acpi/executer/exstoren.c
--- linux-2.4.26-pre6/drivers/acpi/executer/exstoren.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/executer/exstoren.c	2004-03-27 20:23:24.000000000 -0800
@@ -138,6 +138,7 @@
 
 
 	case ACPI_TYPE_LOCAL_ALIAS:
+	case ACPI_TYPE_LOCAL_METHOD_ALIAS:
 
 		/*
 		 * Aliases are resolved by acpi_ex_prep_operands
diff -urN linux-2.4.26-pre6/drivers/acpi/hardware/hwgpe.c linux-2.4.26-rc1/drivers/acpi/hardware/hwgpe.c
--- linux-2.4.26-pre6/drivers/acpi/hardware/hwgpe.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/hardware/hwgpe.c	2004-03-27 20:23:24.000000000 -0800
@@ -53,9 +53,9 @@
  *
  * FUNCTION:    acpi_hw_enable_gpe
  *
- * PARAMETERS:  gpe_number      - The GPE
+ * PARAMETERS:  gpe_event_info      - Info block for the GPE to be enabled
  *
- * RETURN:      None
+ * RETURN:      Status
  *
  * DESCRIPTION: Enable a single GPE.
  *
@@ -95,7 +95,7 @@
  *
  * FUNCTION:    acpi_hw_enable_gpe_for_wakeup
  *
- * PARAMETERS:  gpe_number      - The GPE
+ * PARAMETERS:  gpe_event_info      - Info block for the GPE to be enabled
  *
  * RETURN:      None
  *
@@ -122,9 +122,11 @@
 	}
 
 	/*
-	 * Set the bit so we will not disable this when sleeping
+	 * Set the bit so we will not enable this GPE when sleeping (and disable
+	 * it upon wake)
 	 */
 	gpe_register_info->wake_enable |= gpe_event_info->bit_mask;
+	gpe_event_info->flags |= (ACPI_GPE_TYPE_WAKE | ACPI_GPE_ENABLED);
 }
 
 
@@ -132,9 +134,9 @@
  *
  * FUNCTION:    acpi_hw_disable_gpe
  *
- * PARAMETERS:  gpe_number      - The GPE
+ * PARAMETERS:  gpe_event_info      - Info block for the GPE to be disabled
  *
- * RETURN:      None
+ * RETURN:      Status
  *
  * DESCRIPTION: Disable a single GPE.
  *
@@ -177,6 +179,8 @@
 		return (status);
 	}
 
+	/* Make sure this GPE is disabled for wake, also */
+
 	acpi_hw_disable_gpe_for_wakeup (gpe_event_info);
 	return (AE_OK);
 }
@@ -186,7 +190,7 @@
  *
  * FUNCTION:    acpi_hw_disable_gpe_for_wakeup
  *
- * PARAMETERS:  gpe_number      - The GPE
+ * PARAMETERS:  gpe_event_info      - Info block for the GPE to be disabled
  *
  * RETURN:      None
  *
@@ -212,9 +216,8 @@
 		return;
 	}
 
-	/*
-	 * Clear the bit so we will disable this when sleeping
-	 */
+	/* Clear the bit so we will disable this when sleeping */
+
 	gpe_register_info->wake_enable &= ~(gpe_event_info->bit_mask);
 }
 
@@ -223,11 +226,11 @@
  *
  * FUNCTION:    acpi_hw_clear_gpe
  *
- * PARAMETERS:  gpe_number      - The GPE
+ * PARAMETERS:  gpe_event_info      - Info block for the GPE to be cleared
  *
- * RETURN:      None
+ * RETURN:      status_status
  *
- * DESCRIPTION: Clear a single GPE.
+ * DESCRIPTION: Clear the status bit for a single GPE.
  *
  ******************************************************************************/
 
@@ -256,9 +259,10 @@
  *
  * FUNCTION:    acpi_hw_get_gpe_status
  *
- * PARAMETERS:  gpe_number      - The GPE
+ * PARAMETERS:  gpe_event_info      - Info block for the GPE to queried
+ *              event_status        - Where the GPE status is returned
  *
- * RETURN:      None
+ * RETURN:      Status
  *
  * DESCRIPTION: Return the status of a single GPE.
  *
@@ -376,7 +380,7 @@
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Clear all GPEs within a GPE block
+ * DESCRIPTION: Clear status bits for all GPEs within a GPE block
  *
  ******************************************************************************/
 
@@ -392,7 +396,7 @@
 	/* Examine each GPE Register within the block */
 
 	for (i = 0; i < gpe_block->register_count; i++) {
-		/* Clear all GPEs in this register */
+		/* Clear status on all GPEs in this register */
 
 		status = acpi_hw_low_level_write (8, 0xFF,
 				 &gpe_block->register_info[i].status_address);
@@ -407,19 +411,20 @@
 
 /******************************************************************************
  *
- * FUNCTION:    acpi_hw_disable_non_wakeup_gpe_block
+ * FUNCTION:    acpi_hw_prepare_gpe_block_for_sleep
  *
  * PARAMETERS:  gpe_xrupt_info      - GPE Interrupt info
  *              gpe_block           - Gpe Block info
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Disable all GPEs except wakeup GPEs in a GPE block
+ * DESCRIPTION: Disable all runtime GPEs and enable all wakeup GPEs -- within
+ *              a single GPE block
  *
  ******************************************************************************/
 
 static acpi_status
-acpi_hw_disable_non_wakeup_gpe_block (
+acpi_hw_prepare_gpe_block_for_sleep (
 	struct acpi_gpe_xrupt_info      *gpe_xrupt_info,
 	struct acpi_gpe_block_info      *gpe_block)
 {
@@ -437,8 +442,11 @@
 
 	for (i = 0; i < gpe_block->register_count; i++) {
 		/*
-		 * Read the enabled status of all GPEs. We
+		 * Read the enabled/disabled status of all GPEs. We
 		 * will be using it to restore all the GPEs later.
+		 *
+		 * NOTE:  Wake GPEs are are ALL disabled at this time, so when we wake
+		 * and restore this register, they will be automatically disabled.
 		 */
 		status = acpi_hw_low_level_read (8, &in_value,
 				 &gpe_register_info->enable_address);
@@ -449,7 +457,8 @@
 		gpe_register_info->enable = (u8) in_value;
 
 		/*
-		 * Disable all GPEs except wakeup GPEs.
+		 * 1) Disable all runtime GPEs
+		 * 2) Enable all wakeup GPEs
 		 */
 		status = acpi_hw_low_level_write (8, gpe_register_info->wake_enable,
 				&gpe_register_info->enable_address);
@@ -457,6 +466,8 @@
 			return (status);
 		}
 
+		/* Point to next GPE register */
+
 		gpe_register_info++;
 	}
 
@@ -466,22 +477,22 @@
 
 /******************************************************************************
  *
- * FUNCTION:    acpi_hw_disable_non_wakeup_gpes
+ * FUNCTION:    acpi_hw_prepare_gpes_for_sleep
  *
  * PARAMETERS:  None
  *
- * RETURN:      None
+ * RETURN:      Status
  *
- * DESCRIPTION: Disable all non-wakeup GPEs
+ * DESCRIPTION: Disable all runtime GPEs, enable all wake GPEs.
  *              Called with interrupts disabled. The interrupt handler also
  *              modifies gpe_register_info->Enable, so it should not be
- *              given the chance to run until after non-wake GPEs are
+ *              given the chance to run until after the runtime GPEs are
  *              re-enabled.
  *
  ******************************************************************************/
 
 acpi_status
-acpi_hw_disable_non_wakeup_gpes (
+acpi_hw_prepare_gpes_for_sleep (
 	void)
 {
 	acpi_status                     status;
@@ -490,27 +501,27 @@
 	ACPI_FUNCTION_ENTRY ();
 
 
-	status = acpi_ev_walk_gpe_list (acpi_hw_disable_non_wakeup_gpe_block);
-
+	status = acpi_ev_walk_gpe_list (acpi_hw_prepare_gpe_block_for_sleep);
 	return (status);
 }
 
 
 /******************************************************************************
  *
- * FUNCTION:    acpi_hw_enable_non_wakeup_gpe_block
+ * FUNCTION:    acpi_hw_restore_gpe_block_on_wake
  *
  * PARAMETERS:  gpe_xrupt_info      - GPE Interrupt info
  *              gpe_block           - Gpe Block info
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Enable a single GPE.
+ * DESCRIPTION: Enable all runtime GPEs and disable all wake GPEs -- in one
+ *              GPE block
  *
  ******************************************************************************/
 
 static acpi_status
-acpi_hw_enable_non_wakeup_gpe_block (
+acpi_hw_restore_gpe_block_on_wake (
 	struct acpi_gpe_xrupt_info      *gpe_xrupt_info,
 	struct acpi_gpe_block_info      *gpe_block)
 {
@@ -537,8 +548,12 @@
 		}
 
 		/*
-		 * We previously stored the enabled status of all GPEs.
-		 * Blast them back in.
+		 * Restore the GPE Enable register, which will do the following:
+		 *
+		 * 1) Disable all wakeup GPEs
+		 * 2) Enable all runtime GPEs
+		 *
+		 *  (On sleep, we saved the enabled status of all GPEs)
 		 */
 		status = acpi_hw_low_level_write (8, gpe_register_info->enable,
 				 &gpe_register_info->enable_address);
@@ -546,28 +561,30 @@
 			return (status);
 		}
 
+		/* Point to next GPE register */
+
 		gpe_register_info++;
 	}
 
-
 	return (AE_OK);
 }
 
 
 /******************************************************************************
  *
- * FUNCTION:    acpi_hw_enable_non_wakeup_gpes
+ * FUNCTION:    acpi_hw_restore_gpes_on_wake
  *
  * PARAMETERS:  None
  *
- * RETURN:      None
+ * RETURN:      Status
  *
- * DESCRIPTION: Enable all non-wakeup GPEs we previously enabled.
+ * DESCRIPTION: Enable all runtime GPEs and disable all wake GPEs -- in all
+ *              GPE blocks
  *
  ******************************************************************************/
 
 acpi_status
-acpi_hw_enable_non_wakeup_gpes (
+acpi_hw_restore_gpes_on_wake (
 	void)
 {
 	acpi_status                     status;
@@ -576,7 +593,6 @@
 	ACPI_FUNCTION_ENTRY ();
 
 
-	status = acpi_ev_walk_gpe_list (acpi_hw_enable_non_wakeup_gpe_block);
-
+	status = acpi_ev_walk_gpe_list (acpi_hw_restore_gpe_block_on_wake);
 	return (status);
 }
diff -urN linux-2.4.26-pre6/drivers/acpi/hardware/hwsleep.c linux-2.4.26-rc1/drivers/acpi/hardware/hwsleep.c
--- linux-2.4.26-pre6/drivers/acpi/hardware/hwsleep.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/hardware/hwsleep.c	2004-03-27 20:23:24.000000000 -0800
@@ -286,7 +286,11 @@
 		}
 	}
 
-	status = acpi_hw_disable_non_wakeup_gpes ();
+	/*
+	 * 1) Disable all runtime GPEs
+	 * 2) Enable all wakeup GPEs
+	 */
+	status = acpi_hw_prepare_gpes_for_sleep ();
 	if (ACPI_FAILURE (status)) {
 		return_ACPI_STATUS (status);
 	}
@@ -415,7 +419,11 @@
 		return_ACPI_STATUS (status);
 	}
 
-	status = acpi_hw_disable_non_wakeup_gpes ();
+	/*
+	 * 1) Disable all runtime GPEs
+	 * 2) Enable all wakeup GPEs
+	 */
+	status = acpi_hw_prepare_gpes_for_sleep ();
 	if (ACPI_FAILURE (status)) {
 		return_ACPI_STATUS (status);
 	}
@@ -528,10 +536,14 @@
 	if (ACPI_FAILURE (status) && status != AE_NOT_FOUND) {
 		ACPI_REPORT_ERROR (("Method _WAK failed, %s\n", acpi_format_exception (status)));
 	}
+	/* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
 
-	/* _WAK returns stuff - do we want to look at it? */
-
-	status = acpi_hw_enable_non_wakeup_gpes ();
+	/*
+	 * Restore the GPEs:
+	 * 1) Disable all wakeup GPEs
+	 * 2) Enable all runtime GPEs
+	 */
+	status = acpi_hw_restore_gpes_on_wake ();
 	if (ACPI_FAILURE (status)) {
 		return_ACPI_STATUS (status);
 	}
diff -urN linux-2.4.26-pre6/drivers/acpi/namespace/nsaccess.c linux-2.4.26-rc1/drivers/acpi/namespace/nsaccess.c
--- linux-2.4.26-pre6/drivers/acpi/namespace/nsaccess.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/namespace/nsaccess.c	2004-03-27 20:23:24.000000000 -0800
@@ -247,6 +247,14 @@
 
 unlock_and_exit:
 	(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
+
+	/* Save a handle to "_GPE", it is always present */
+
+	if (ACPI_SUCCESS (status)) {
+		status = acpi_ns_get_node_by_path ("\\_GPE", NULL, ACPI_NS_NO_UPSEARCH,
+				  &acpi_gbl_fadt_gpe_device);
+	}
+
 	return_ACPI_STATUS (status);
 }
 
@@ -577,6 +585,7 @@
 		if ((num_segments       == 0)                               &&
 			(type_to_check_for  != ACPI_TYPE_ANY)                   &&
 			(type_to_check_for  != ACPI_TYPE_LOCAL_ALIAS)           &&
+			(type_to_check_for  != ACPI_TYPE_LOCAL_METHOD_ALIAS)    &&
 			(type_to_check_for  != ACPI_TYPE_LOCAL_SCOPE)           &&
 			(this_node->type    != ACPI_TYPE_ANY)                   &&
 			(this_node->type    != type_to_check_for)) {
diff -urN linux-2.4.26-pre6/drivers/acpi/namespace/nsdump.c linux-2.4.26-rc1/drivers/acpi/namespace/nsdump.c
--- linux-2.4.26-pre6/drivers/acpi/namespace/nsdump.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/namespace/nsdump.c	2004-03-27 20:23:24.000000000 -0800
@@ -351,6 +351,7 @@
 
 
 		case ACPI_TYPE_LOCAL_ALIAS:
+		case ACPI_TYPE_LOCAL_METHOD_ALIAS:
 
 			acpi_os_printf ("Target %4.4s (%p)\n", acpi_ut_get_node_name (obj_desc), obj_desc);
 			break;
diff -urN linux-2.4.26-pre6/drivers/acpi/namespace/nseval.c linux-2.4.26-rc1/drivers/acpi/namespace/nseval.c
--- linux-2.4.26-pre6/drivers/acpi/namespace/nseval.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/namespace/nseval.c	2004-03-27 20:23:24.000000000 -0800
@@ -311,6 +311,15 @@
 	}
 
 	/*
+	 * For a method alias, we must grab the actual method node
+	 * so that proper scoping context will be established
+	 * before execution.
+	 */
+	if (acpi_ns_get_type (node) == ACPI_TYPE_LOCAL_METHOD_ALIAS) {
+		node = ACPI_CAST_PTR (struct acpi_namespace_node, node->object);
+	}
+
+	/*
 	 * Two major cases here:
 	 * 1) The object is an actual control method -- execute it.
 	 * 2) The object is not a method -- just return it's current
diff -urN linux-2.4.26-pre6/drivers/acpi/namespace/nssearch.c linux-2.4.26-rc1/drivers/acpi/namespace/nssearch.c
--- linux-2.4.26-pre6/drivers/acpi/namespace/nssearch.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/namespace/nssearch.c	2004-03-27 20:23:24.000000000 -0800
@@ -113,6 +113,12 @@
 		/* Check for match against the name */
 
 		if (next_node->name.integer == target_name) {
+			/* Resolve a control method alias if any */
+
+			if (acpi_ns_get_type (next_node) == ACPI_TYPE_LOCAL_METHOD_ALIAS) {
+				next_node = ACPI_CAST_PTR (struct acpi_namespace_node, next_node->object);
+			}
+
 			/*
 			 * Found matching entry.
 			 */
diff -urN linux-2.4.26-pre6/drivers/acpi/namespace/nsutils.c linux-2.4.26-rc1/drivers/acpi/namespace/nsutils.c
--- linux-2.4.26-pre6/drivers/acpi/namespace/nsutils.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/namespace/nsutils.c	2004-03-27 20:23:24.000000000 -0800
@@ -256,7 +256,7 @@
 
 
 	if (!node) {
-		ACPI_REPORT_WARNING (("ns_get_type: Null Node ptr"));
+		ACPI_REPORT_WARNING (("ns_get_type: Null Node input pointer\n"));
 		return_VALUE (ACPI_TYPE_ANY);
 	}
 
diff -urN linux-2.4.26-pre6/drivers/acpi/namespace/nsxfeval.c linux-2.4.26-rc1/drivers/acpi/namespace/nsxfeval.c
--- linux-2.4.26-pre6/drivers/acpi/namespace/nsxfeval.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/namespace/nsxfeval.c	2004-03-27 20:23:24.000000000 -0800
@@ -45,6 +45,7 @@
 
 #include <acpi/acpi.h>
 #include <acpi/acnamesp.h>
+#include <acpi/acinterp.h>
 
 
 #define _COMPONENT          ACPI_NAMESPACE
@@ -149,11 +150,11 @@
  * FUNCTION:    acpi_evaluate_object
  *
  * PARAMETERS:  Handle              - Object handle (optional)
- *              *Pathname           - Object pathname (optional)
- *              **external_params   - List of parameters to pass to method,
+ *              Pathname            - Object pathname (optional)
+ *              external_params     - List of parameters to pass to method,
  *                                    terminated by NULL.  May be NULL
  *                                    if no parameters are being passed.
- *              *return_buffer      - Where to put method's return value (if
+ *              return_buffer       - Where to put method's return value (if
  *                                    any).  If NULL, no value is returned.
  *
  * RETURN:      Status
@@ -172,6 +173,7 @@
 	struct acpi_buffer              *return_buffer)
 {
 	acpi_status                     status;
+	acpi_status                     status2;
 	union acpi_operand_object       **internal_params = NULL;
 	union acpi_operand_object       *internal_return_obj = NULL;
 	acpi_size                       buffer_space_needed;
@@ -203,7 +205,7 @@
 		 */
 		for (i = 0; i < external_params->count; i++) {
 			status = acpi_ut_copy_eobject_to_iobject (&external_params->pointer[i],
-					 &internal_params[i]);
+					  &internal_params[i]);
 			if (ACPI_FAILURE (status)) {
 				acpi_ut_delete_internal_object_list (internal_params);
 				return_ACPI_STATUS (status);
@@ -321,14 +323,20 @@
 		}
 	}
 
-	/* Delete the return and parameter objects */
-
 	if (internal_return_obj) {
 		/*
-		 * Delete the internal return object. (Or at least
-		 * decrement the reference count by one)
+		 * Delete the internal return object.  NOTE: Interpreter
+		 * must be locked to avoid race condition.
 		 */
-		acpi_ut_remove_reference (internal_return_obj);
+		status2 = acpi_ex_enter_interpreter ();
+		if (ACPI_SUCCESS (status2)) {
+			/*
+			 * Delete the internal return object. (Or at least
+			 * decrement the reference count by one)
+			 */
+			acpi_ut_remove_reference (internal_return_obj);
+			acpi_ex_exit_interpreter ();
+		}
 	}
 
 	/*
diff -urN linux-2.4.26-pre6/drivers/acpi/osl.c linux-2.4.26-rc1/drivers/acpi/osl.c
--- linux-2.4.26-pre6/drivers/acpi/osl.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/osl.c	2004-03-27 20:23:24.000000000 -0800
@@ -1057,3 +1057,24 @@
 
 __setup("acpi_serialize", acpi_serialize_setup);
 
+/*
+ * Wake and Run-Time GPES are expected to be separate.
+ * We disable wake-GPEs at run-time to prevent spurious
+ * interrupts.
+ *
+ * However, if a system exists that shares Wake and
+ * Run-time events on the same GPE this flag is available
+ * to tell Linux to keep the wake-time GPEs enabled at run-time.
+ */
+int __init
+acpi_wake_gpes_always_on_setup(char *str)
+{
+	printk(KERN_INFO PREFIX "wake GPEs not disabled\n");
+
+	acpi_gbl_leave_wake_gpes_disabled = FALSE;
+
+	return 1;
+}
+
+__setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
+
diff -urN linux-2.4.26-pre6/drivers/acpi/pci_link.c linux-2.4.26-rc1/drivers/acpi/pci_link.c
--- linux-2.4.26-pre6/drivers/acpi/pci_link.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/pci_link.c	2004-03-27 20:23:24.000000000 -0800
@@ -68,6 +68,7 @@
 	u8			edge_level;		/* All IRQs */
 	u8			active_high_low;	/* All IRQs */
 	u8			setonboot;
+	u8			resource_type;
 	u8			possible_count;
 	u8			possible[ACPI_PCI_LINK_MAX_POSSIBLE];
 };
@@ -119,6 +120,7 @@
 		}
 		link->irq.edge_level = p->edge_level;
 		link->irq.active_high_low = p->active_high_low;
+		link->irq.resource_type = ACPI_RSTYPE_IRQ;
 		break;
 	}
 	case ACPI_RSTYPE_EXT_IRQ:
@@ -139,6 +141,7 @@
 		}
 		link->irq.edge_level = p->edge_level;
 		link->irq.active_high_low = p->active_high_low;
+		link->irq.resource_type = ACPI_RSTYPE_EXT_IRQ;
 		break;
 	}
 	default:
@@ -338,13 +341,18 @@
 		}
 	}
 
+	resource_type = link->irq.resource_type;
+
+	if (resource_type != ACPI_RSTYPE_IRQ &&
+			resource_type != ACPI_RSTYPE_EXT_IRQ){
 	/* If IRQ<=15, first try with a "normal" IRQ descriptor. If that fails, try with
 	 * an extended one */
-	if (irq <= 15) {
-		resource_type = ACPI_RSTYPE_IRQ;
-	} else {
-		resource_type = ACPI_RSTYPE_EXT_IRQ;
-	}
+		if (irq <= 15) {
+			resource_type = ACPI_RSTYPE_IRQ;
+		} else {
+			resource_type = ACPI_RSTYPE_EXT_IRQ;
+		}
+	} 
 
 retry_programming:
    
diff -urN linux-2.4.26-pre6/drivers/acpi/resources/rsaddr.c linux-2.4.26-rc1/drivers/acpi/resources/rsaddr.c
--- linux-2.4.26-pre6/drivers/acpi/resources/rsaddr.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/resources/rsaddr.c	2004-03-27 20:23:24.000000000 -0800
@@ -88,6 +88,7 @@
 
 	ACPI_FUNCTION_TRACE ("rs_address16_resource");
 
+
 	/*
 	 * Point past the Descriptor to get the number of bytes consumed
 	 */
@@ -149,7 +150,7 @@
 		output_struct->data.address16.attribute.memory.read_write_attribute =
 				(u16) (temp8 & 0x01);
 		output_struct->data.address16.attribute.memory.cache_attribute =
-				(u16) ((temp8 >> 1) & 0x0F);
+				(u16) ((temp8 >> 1) & 0x03);
 	}
 	else {
 		if (ACPI_IO_RANGE == output_struct->data.address16.resource_type) {
@@ -347,7 +348,7 @@
 
 		temp8 |=
 			(linked_list->data.address16.attribute.memory.cache_attribute &
-			 0x0F) << 1;
+			 0x03) << 1;
 	}
 	else if (ACPI_IO_RANGE == linked_list->data.address16.resource_type) {
 		temp8 = (u8)
@@ -539,7 +540,7 @@
 				(u16) (temp8 & 0x01);
 
 		output_struct->data.address32.attribute.memory.cache_attribute =
-				(u16) ((temp8 >> 1) & 0x0F);
+				(u16) ((temp8 >> 1) & 0x03);
 	}
 	else {
 		if (ACPI_IO_RANGE == output_struct->data.address32.resource_type) {
@@ -735,7 +736,7 @@
 
 		temp8 |=
 			(linked_list->data.address32.attribute.memory.cache_attribute &
-			 0x0F) << 1;
+			 0x03) << 1;
 	}
 	else if (ACPI_IO_RANGE == linked_list->data.address32.resource_type) {
 		temp8 = (u8)
@@ -926,7 +927,7 @@
 				(u16) (temp8 & 0x01);
 
 		output_struct->data.address64.attribute.memory.cache_attribute =
-				(u16) ((temp8 >> 1) & 0x0F);
+				(u16) ((temp8 >> 1) & 0x03);
 	}
 	else {
 		if (ACPI_IO_RANGE == output_struct->data.address64.resource_type) {
@@ -1124,7 +1125,7 @@
 
 		temp8 |=
 			(linked_list->data.address64.attribute.memory.cache_attribute &
-			 0x0F) << 1;
+			 0x03) << 1;
 	}
 	else if (ACPI_IO_RANGE == linked_list->data.address64.resource_type) {
 		temp8 = (u8)
diff -urN linux-2.4.26-pre6/drivers/acpi/utilities/utglobal.c linux-2.4.26-rc1/drivers/acpi/utilities/utglobal.c
--- linux-2.4.26-pre6/drivers/acpi/utilities/utglobal.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/utilities/utglobal.c	2004-03-27 20:23:24.000000000 -0800
@@ -253,14 +253,15 @@
 	ACPI_NS_NORMAL,                     /* 19 index_field      */
 	ACPI_NS_NORMAL,                     /* 20 Reference        */
 	ACPI_NS_NORMAL,                     /* 21 Alias            */
-	ACPI_NS_NORMAL,                     /* 22 Notify           */
-	ACPI_NS_NORMAL,                     /* 23 Address Handler  */
-	ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL,   /* 24 Resource Desc    */
-	ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL,   /* 25 Resource Field   */
-	ACPI_NS_NEWSCOPE,                   /* 26 Scope            */
-	ACPI_NS_NORMAL,                     /* 27 Extra            */
-	ACPI_NS_NORMAL,                     /* 28 Data             */
-	ACPI_NS_NORMAL                      /* 29 Invalid          */
+	ACPI_NS_NORMAL,                     /* 22 method_alias     */
+	ACPI_NS_NORMAL,                     /* 23 Notify           */
+	ACPI_NS_NORMAL,                     /* 24 Address Handler  */
+	ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL,   /* 25 Resource Desc    */
+	ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL,   /* 26 Resource Field   */
+	ACPI_NS_NEWSCOPE,                   /* 27 Scope            */
+	ACPI_NS_NORMAL,                     /* 28 Extra            */
+	ACPI_NS_NORMAL,                     /* 29 Data             */
+	ACPI_NS_NORMAL                      /* 30 Invalid          */
 };
 
 
@@ -501,14 +502,15 @@
 	/* 19 */ "index_field",
 	/* 20 */ "Reference",
 	/* 21 */ "Alias",
-	/* 22 */ "Notify",
-	/* 23 */ "addr_handler",
-	/* 24 */ "resource_desc",
-	/* 25 */ "resource_fld",
-	/* 26 */ "Scope",
-	/* 27 */ "Extra",
-	/* 28 */ "Data",
-	/* 39 */ "Invalid"
+	/* 22 */ "method_alias",
+	/* 23 */ "Notify",
+	/* 24 */ "addr_handler",
+	/* 25 */ "resource_desc",
+	/* 26 */ "resource_fld",
+	/* 27 */ "Scope",
+	/* 28 */ "Extra",
+	/* 29 */ "Data",
+	/* 30 */ "Invalid"
 };
 
 
@@ -556,7 +558,7 @@
 acpi_ut_get_node_name (
 	void                            *object)
 {
-	struct acpi_namespace_node      *node;
+	struct acpi_namespace_node      *node = (struct acpi_namespace_node *) object;
 
 
 	if (!object)
@@ -564,7 +566,10 @@
 		return ("NULL NODE");
 	}
 
-	node = (struct acpi_namespace_node *) object;
+	if (object == ACPI_ROOT_OBJECT)
+	{
+		node = acpi_gbl_root_node;
+	}
 
 	if (node->descriptor != ACPI_DESC_TYPE_NAMED)
 	{
@@ -782,6 +787,7 @@
 
 	acpi_gbl_create_osi_method = TRUE;
 	acpi_gbl_all_methods_serialized = FALSE;
+	acpi_gbl_leave_wake_gpes_disabled = TRUE;
 
 	/* Memory allocation and cache lists */
 
diff -urN linux-2.4.26-pre6/drivers/acpi/utilities/utmisc.c linux-2.4.26-rc1/drivers/acpi/utilities/utmisc.c
--- linux-2.4.26-pre6/drivers/acpi/utilities/utmisc.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/acpi/utilities/utmisc.c	2004-03-27 20:23:24.000000000 -0800
@@ -529,6 +529,7 @@
 	return (src_string);
 }
 
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ut_mutex_initialize
@@ -562,10 +563,8 @@
 		}
 	}
 
-
 	status = acpi_os_create_lock (&acpi_gbl_gpe_lock);
-
-	return_ACPI_STATUS (AE_OK);
+	return_ACPI_STATUS (status);
 }
 
 
diff -urN linux-2.4.26-pre6/drivers/atm/nicstar.c linux-2.4.26-rc1/drivers/atm/nicstar.c
--- linux-2.4.26-pre6/drivers/atm/nicstar.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/drivers/atm/nicstar.c	2004-03-27 20:23:24.000000000 -0800
@@ -112,9 +112,6 @@
 
 /* Macros *********************************************************************/
 
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-
 #define CMD_BUSY(card) (readl((card)->membase + STAT) & NS_STAT_CMDBZ)
 
 #define NS_DELAY mdelay(1)
@@ -2472,7 +2469,7 @@
             for (j = 1; j < NS_SKB(iovb)->iovcnt; j++)
             {
                lb = (struct sk_buff *) iov->iov_base;
-               tocopy = MIN(remaining, iov->iov_len);
+               tocopy = min_t(int, remaining, iov->iov_len);
                memcpy(hb->tail, lb->data, tocopy);
                skb_put(hb, tocopy);
                iov++;
diff -urN linux-2.4.26-pre6/drivers/bluetooth/hci_usb.c linux-2.4.26-rc1/drivers/bluetooth/hci_usb.c
--- linux-2.4.26-pre6/drivers/bluetooth/hci_usb.c	2004-03-27 20:23:21.000000000 -0800
+++ linux-2.4.26-rc1/drivers/bluetooth/hci_usb.c	2004-03-27 20:23:24.000000000 -0800
@@ -73,6 +73,9 @@
 	/* Generic Bluetooth USB device */
 	{ USB_DEVICE_INFO(HCI_DEV_CLASS, HCI_DEV_SUBCLASS, HCI_DEV_PROTOCOL) },
 
+	/* AVM BlueFRITZ! USB v2.0 */
+	{ USB_DEVICE(0x057c, 0x3800) },
+
 	/* Ericsson with non-standard id */
 	{ USB_DEVICE(0x0bdb, 0x1002) },
 
diff -urN linux-2.4.26-pre6/fs/inode.c linux-2.4.26-rc1/fs/inode.c
--- linux-2.4.26-pre6/fs/inode.c	2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.26-rc1/fs/inode.c	2004-03-27 20:23:25.000000000 -0800
@@ -319,7 +319,8 @@
 	if (!inode)
 		return;
 	spin_lock(&inode_lock);
-	__refile_inode(inode);
+	if (!(inode->i_state & I_LOCK))
+		__refile_inode(inode);
 	spin_unlock(&inode_lock);
 }
 
diff -urN linux-2.4.26-pre6/include/acpi/acconfig.h linux-2.4.26-rc1/include/acpi/acconfig.h
--- linux-2.4.26-pre6/include/acpi/acconfig.h	2004-03-27 20:23:22.000000000 -0800
+++ linux-2.4.26-rc1/include/acpi/acconfig.h	2004-03-27 20:23:25.000000000 -0800
@@ -64,7 +64,7 @@
 
 /* Version string */
 
-#define ACPI_CA_VERSION                 0x20040311
+#define ACPI_CA_VERSION                 0x20040326
 
 /* Maximum objects in the various object caches */
 
diff -urN linux-2.4.26-pre6/include/acpi/acglobal.h linux-2.4.26-rc1/include/acpi/acglobal.h
--- linux-2.4.26-pre6/include/acpi/acglobal.h	2004-03-27 20:23:22.000000000 -0800
+++ linux-2.4.26-rc1/include/acpi/acglobal.h	2004-03-27 20:23:25.000000000 -0800
@@ -87,6 +87,7 @@
 
 ACPI_EXTERN u8                                  acpi_gbl_create_osi_method;
 ACPI_EXTERN u8                                  acpi_gbl_all_methods_serialized;
+ACPI_EXTERN u8                                  acpi_gbl_leave_wake_gpes_disabled;
 
 /*****************************************************************************
  *
@@ -196,6 +197,7 @@
 
 ACPI_EXTERN struct acpi_namespace_node          acpi_gbl_root_node_struct;
 ACPI_EXTERN struct acpi_namespace_node         *acpi_gbl_root_node;
+ACPI_EXTERN struct acpi_namespace_node         *acpi_gbl_fadt_gpe_device;
 
 extern const u8                                 acpi_gbl_ns_properties[NUM_NS_TYPES];
 extern const struct acpi_predefined_names       acpi_gbl_pre_defined_names [NUM_PREDEFINED_NAMES];
diff -urN linux-2.4.26-pre6/include/acpi/achware.h linux-2.4.26-rc1/include/acpi/achware.h
--- linux-2.4.26-pre6/include/acpi/achware.h	2004-02-18 05:36:32.000000000 -0800
+++ linux-2.4.26-rc1/include/acpi/achware.h	2004-03-27 20:23:25.000000000 -0800
@@ -149,11 +149,11 @@
 	acpi_event_status               *event_status);
 
 acpi_status
-acpi_hw_disable_non_wakeup_gpes (
+acpi_hw_prepare_gpes_for_sleep (
 	void);
 
 acpi_status
-acpi_hw_enable_non_wakeup_gpes (
+acpi_hw_restore_gpes_on_wake (
 	void);
 
 
diff -urN linux-2.4.26-pre6/include/acpi/aclocal.h linux-2.4.26-rc1/include/acpi/aclocal.h
--- linux-2.4.26-pre6/include/acpi/aclocal.h	2004-02-18 05:36:32.000000000 -0800
+++ linux-2.4.26-rc1/include/acpi/aclocal.h	2004-03-27 20:23:25.000000000 -0800
@@ -360,6 +360,13 @@
 };
 
 
+struct acpi_gpe_walk_info
+{
+	struct acpi_namespace_node              *gpe_device;
+	struct acpi_gpe_block_info              *gpe_block;
+};
+
+
 typedef acpi_status (*ACPI_GPE_CALLBACK) (
 	struct acpi_gpe_xrupt_info      *gpe_xrupt_info,
 	struct acpi_gpe_block_info      *gpe_block);
diff -urN linux-2.4.26-pre6/include/acpi/actypes.h linux-2.4.26-rc1/include/acpi/actypes.h
--- linux-2.4.26-pre6/include/acpi/actypes.h	2004-03-27 20:23:22.000000000 -0800
+++ linux-2.4.26-rc1/include/acpi/actypes.h	2004-03-27 20:23:25.000000000 -0800
@@ -413,7 +413,7 @@
  * of the ACPI object_type() operator (See the ACPI Spec). Therefore,
  * only add to the first group if the spec changes.
  *
- * Types must be kept in sync with the global acpi_ns_properties
+ * NOTE: Types must be kept in sync with the global acpi_ns_properties
  * and acpi_ns_type_names arrays.
  */
 typedef u32                                     acpi_object_type;
@@ -450,26 +450,27 @@
 #define ACPI_TYPE_LOCAL_INDEX_FIELD     0x13
 #define ACPI_TYPE_LOCAL_REFERENCE       0x14  /* Arg#, Local#, Name, Debug, ref_of, Index */
 #define ACPI_TYPE_LOCAL_ALIAS           0x15
-#define ACPI_TYPE_LOCAL_NOTIFY          0x16
-#define ACPI_TYPE_LOCAL_ADDRESS_HANDLER 0x17
-#define ACPI_TYPE_LOCAL_RESOURCE        0x18
-#define ACPI_TYPE_LOCAL_RESOURCE_FIELD  0x19
-#define ACPI_TYPE_LOCAL_SCOPE           0x1A  /* 1 Name, multiple object_list Nodes */
+#define ACPI_TYPE_LOCAL_METHOD_ALIAS    0x16
+#define ACPI_TYPE_LOCAL_NOTIFY          0x17
+#define ACPI_TYPE_LOCAL_ADDRESS_HANDLER 0x18
+#define ACPI_TYPE_LOCAL_RESOURCE        0x19
+#define ACPI_TYPE_LOCAL_RESOURCE_FIELD  0x1A
+#define ACPI_TYPE_LOCAL_SCOPE           0x1B  /* 1 Name, multiple object_list Nodes */
 
-#define ACPI_TYPE_NS_NODE_MAX           0x1A  /* Last typecode used within a NS Node */
+#define ACPI_TYPE_NS_NODE_MAX           0x1B  /* Last typecode used within a NS Node */
 
 /*
  * These are special object types that never appear in
  * a Namespace node, only in an union acpi_operand_object
  */
-#define ACPI_TYPE_LOCAL_EXTRA           0x1B
-#define ACPI_TYPE_LOCAL_DATA            0x1C
+#define ACPI_TYPE_LOCAL_EXTRA           0x1C
+#define ACPI_TYPE_LOCAL_DATA            0x1D
 
-#define ACPI_TYPE_LOCAL_MAX             0x1C
+#define ACPI_TYPE_LOCAL_MAX             0x1D
 
 /* All types above here are invalid */
 
-#define ACPI_TYPE_INVALID               0x1D
+#define ACPI_TYPE_INVALID               0x1E
 #define ACPI_TYPE_NOT_FOUND             0xFF
 
 
@@ -511,9 +512,8 @@
 #define ACPI_WRITE                      1
 #define ACPI_IO_MASK                    1
 
-
 /*
- * Acpi Event Types: Fixed & General Purpose
+ * Event Types: Fixed & General Purpose
  */
 typedef u32                                     acpi_event_type;
 
@@ -528,25 +528,8 @@
 #define ACPI_EVENT_MAX                  4
 #define ACPI_NUM_FIXED_EVENTS           ACPI_EVENT_MAX + 1
 
-#define ACPI_GPE_INVALID                0xFF
-#define ACPI_GPE_MAX                    0xFF
-#define ACPI_NUM_GPE                    256
-
-#define ACPI_EVENT_LEVEL_TRIGGERED      1
-#define ACPI_EVENT_EDGE_TRIGGERED       2
-
 /*
- * Flags for GPE and Lock interfaces
- */
-#define ACPI_EVENT_WAKE_ENABLE          0x2
-#define ACPI_EVENT_WAKE_DISABLE         0x2
-
-#define ACPI_NOT_ISR                    0x1
-#define ACPI_ISR                        0x0
-
-
-/*
- * acpi_event Status:
+ * Event Status - Per event
  * -------------
  * The encoding of acpi_event_status is illustrated below.
  * Note that a set bit (1) indicates the property is TRUE
@@ -567,6 +550,45 @@
 #define ACPI_EVENT_FLAG_WAKE_ENABLED    (acpi_event_status) 0x02
 #define ACPI_EVENT_FLAG_SET             (acpi_event_status) 0x04
 
+/*
+ * General Purpose Events (GPE)
+ */
+#define ACPI_GPE_INVALID                0xFF
+#define ACPI_GPE_MAX                    0xFF
+#define ACPI_NUM_GPE                    256
+
+/*
+ * GPE info flags - Per GPE
+ * +---------+-+-+-+
+ * |Bits 8:3 |2|1|0|
+ * +---------+-+-+-+
+ *          | | | |
+ *          | | | +- Edge or Level Triggered
+ *          | | +--- Type: Wake or Runtime
+ *          | +----- Enabled for wake?
+ *          +--------<Reserved>
+ */
+#define ACPI_GPE_XRUPT_TYPE_MASK        (u8) 1
+#define ACPI_GPE_LEVEL_TRIGGERED        (u8) 1
+#define ACPI_GPE_EDGE_TRIGGERED         (u8) 0
+
+#define ACPI_GPE_TYPE_MASK              (u8) 2
+#define ACPI_GPE_TYPE_WAKE              (u8) 2
+#define ACPI_GPE_TYPE_RUNTIME           (u8) 0       /* Default */
+
+#define ACPI_GPE_ENABLE_MASK            (u8) 4
+#define ACPI_GPE_ENABLED                (u8) 4
+#define ACPI_GPE_DISABLED               (u8) 0       /* Default */
+
+/*
+ * Flags for GPE and Lock interfaces
+ */
+#define ACPI_EVENT_WAKE_ENABLE          0x2
+#define ACPI_EVENT_WAKE_DISABLE         0x2
+
+#define ACPI_NOT_ISR                    0x1
+#define ACPI_ISR                        0x0
+
 
 /* Notify types */
 
diff -urN linux-2.4.26-pre6/include/acpi/acutils.h linux-2.4.26-rc1/include/acpi/acutils.h
--- linux-2.4.26-pre6/include/acpi/acutils.h	2004-03-27 20:23:22.000000000 -0800
+++ linux-2.4.26-rc1/include/acpi/acutils.h	2004-03-27 20:23:25.000000000 -0800
@@ -471,6 +471,7 @@
 #define METHOD_NAME__PRT        "_PRT"
 #define METHOD_NAME__CRS        "_CRS"
 #define METHOD_NAME__PRS        "_PRS"
+#define METHOD_NAME__PRW        "_PRW"
 
 
 acpi_status
diff -urN linux-2.4.26-pre6/include/linux/inetdevice.h linux-2.4.26-rc1/include/linux/inetdevice.h
--- linux-2.4.26-pre6/include/linux/inetdevice.h	2004-03-27 20:23:22.000000000 -0800
+++ linux-2.4.26-rc1/include/linux/inetdevice.h	2004-03-27 20:23:25.000000000 -0800
@@ -34,6 +34,8 @@
 	rwlock_t		lock;
 	int			dead;
 	struct in_ifaddr	*ifa_list;	/* IP ifaddr chain		*/
+	int			mc_initted;
+
 	struct ip_mc_list	*mc_list;	/* IP multicast filter chain    */
 	rwlock_t		mc_lock;	/* for mc_tomb */
 	struct ip_mc_list	*mc_tomb;
diff -urN linux-2.4.26-pre6/include/linux/pkt_sched.h linux-2.4.26-rc1/include/linux/pkt_sched.h
--- linux-2.4.26-pre6/include/linux/pkt_sched.h	2004-02-18 05:36:32.000000000 -0800
+++ linux-2.4.26-rc1/include/linux/pkt_sched.h	2004-03-27 20:23:25.000000000 -0800
@@ -432,4 +432,11 @@
 
 #define TCA_ATM_MAX	TCA_ATM_STATE
 
+/* Delay section */
+struct tc_dly_qopt
+{
+	__u32	latency;
+	__u32   limit;
+};	
+
 #endif
diff -urN linux-2.4.26-pre6/net/atm/lec.c linux-2.4.26-rc1/net/atm/lec.c
--- linux-2.4.26-pre6/net/atm/lec.c	2004-03-27 20:23:22.000000000 -0800
+++ linux-2.4.26-rc1/net/atm/lec.c	2004-03-27 20:23:25.000000000 -0800
@@ -746,8 +746,8 @@
                 return -EINVAL;
         lec_vcc_added(dev_lec[ioc_data.dev_num]->priv, 
                       &ioc_data, vcc, vcc->push);
-        vcc->push = lec_push;
         vcc->proto_data = dev_lec[ioc_data.dev_num];
+        vcc->push = lec_push;
         return 0;
 }
 
diff -urN linux-2.4.26-pre6/net/bluetooth/af_bluetooth.c linux-2.4.26-rc1/net/bluetooth/af_bluetooth.c
--- linux-2.4.26-pre6/net/bluetooth/af_bluetooth.c	2004-03-27 20:23:22.000000000 -0800
+++ linux-2.4.26-rc1/net/bluetooth/af_bluetooth.c	2004-03-27 20:23:25.000000000 -0800
@@ -218,20 +218,6 @@
 	return err ? : copied;
 }
 
-static inline unsigned int bluez_accept_poll(struct sock *parent)
-{
-	struct list_head *p, *n;
-	struct sock *sk;
-
-	list_for_each_safe(p, n, &bluez_pi(parent)->accept_q) {
-		sk = (struct sock *) list_entry(p, struct bluez_pinfo, accept_q);
-		if (sk->state == BT_CONNECTED)
-			return POLLIN | POLLRDNORM;
-	}
-
-	return 0;
-}
-
 unsigned int bluez_sock_poll(struct file * file, struct socket *sock, poll_table *wait)
 {
 	struct sock *sk = sock->sk;
@@ -241,9 +227,6 @@
 
 	poll_wait(file, sk->sleep, wait);
 
-	if (sk->state == BT_LISTEN)
-		return bluez_accept_poll(sk);
-
 	if (sk->err || !skb_queue_empty(&sk->error_queue))
 		mask |= POLLERR;
 
@@ -251,6 +234,7 @@
 		mask |= POLLHUP;
 
 	if (!skb_queue_empty(&sk->receive_queue) || 
+			!list_empty(&bluez_pi(sk)->accept_q) ||
 			(sk->shutdown & RCV_SHUTDOWN))
 		mask |= POLLIN | POLLRDNORM;
 
diff -urN linux-2.4.26-pre6/net/ipv4/igmp.c linux-2.4.26-rc1/net/ipv4/igmp.c
--- linux-2.4.26-pre6/net/ipv4/igmp.c	2004-03-27 20:23:22.000000000 -0800
+++ linux-2.4.26-rc1/net/ipv4/igmp.c	2004-03-27 20:23:25.000000000 -0800
@@ -1205,6 +1205,9 @@
 
 	ASSERT_RTNL();
 
+	if (!in_dev->mc_initted)
+		return;
+
 #ifdef CONFIG_IP_MULTICAST
 	in_dev->mr_ifc_count = 0;
 	if (del_timer(&in_dev->mr_ifc_timer))
@@ -1250,6 +1253,8 @@
 
 	for (i=in_dev->mc_list; i; i=i->next)
 		igmp_group_added(i);
+
+	in_dev->mc_initted = 1;
 }
 
 /*
diff -urN linux-2.4.26-pre6/net/ipv4/ipvs/ip_vs_conn.c linux-2.4.26-rc1/net/ipv4/ipvs/ip_vs_conn.c
--- linux-2.4.26-pre6/net/ipv4/ipvs/ip_vs_conn.c	2004-03-27 20:23:22.000000000 -0800
+++ linux-2.4.26-rc1/net/ipv4/ipvs/ip_vs_conn.c	2004-03-27 20:23:25.000000000 -0800
@@ -137,25 +137,27 @@
 static int ip_vs_conn_hash(struct ip_vs_conn *cp)
 {
 	unsigned hash;
-
-	if (cp->flags & IP_VS_CONN_F_HASHED) {
-		IP_VS_ERR("ip_vs_conn_hash(): request for already hashed, "
-			  "called from %p\n", __builtin_return_address(0));
-		return 0;
-	}
+	int ret;
 
 	/* Hash by protocol, client address and port */
 	hash = ip_vs_conn_hashkey(cp->protocol, cp->caddr, cp->cport);
 
 	ct_write_lock(hash);
 
-	list_add(&cp->c_list, &ip_vs_conn_tab[hash]);
-	cp->flags |= IP_VS_CONN_F_HASHED;
-	atomic_inc(&cp->refcnt);
+	if (!(cp->flags & IP_VS_CONN_F_HASHED)) {
+		list_add(&cp->c_list, &ip_vs_conn_tab[hash]);
+		cp->flags |= IP_VS_CONN_F_HASHED;
+		atomic_inc(&cp->refcnt);
+		ret = 1;
+	} else {
+		IP_VS_ERR("ip_vs_conn_hash(): request for already hashed, "
+			  "called from %p\n", __builtin_return_address(0));
+		ret = 0;
+	}
 
 	ct_write_unlock(hash);
 
-	return 1;
+	return ret;
 }
 
 
@@ -166,24 +168,23 @@
 static int ip_vs_conn_unhash(struct ip_vs_conn *cp)
 {
 	unsigned hash;
-
-	if (!(cp->flags & IP_VS_CONN_F_HASHED)) {
-		IP_VS_ERR("ip_vs_conn_unhash(): request for unhash flagged, "
-			  "called from %p\n", __builtin_return_address(0));
-		return 0;
-	}
+	int ret;
 
 	/* unhash it and decrease its reference counter */
 	hash = ip_vs_conn_hashkey(cp->protocol, cp->caddr, cp->cport);
 	ct_write_lock(hash);
 
-	list_del(&cp->c_list);
-	cp->flags &= ~IP_VS_CONN_F_HASHED;
-	atomic_dec(&cp->refcnt);
+	if (cp->flags & IP_VS_CONN_F_HASHED) {
+		list_del(&cp->c_list);
+		cp->flags &= ~IP_VS_CONN_F_HASHED;
+		atomic_dec(&cp->refcnt);
+		ret = 1;
+	} else
+		ret = 0;
 
 	ct_write_unlock(hash);
 
-	return 1;
+	return ret;
 }
 
 
@@ -721,15 +722,20 @@
 	/*
 	 *  Check if it is no_cport connection ...
 	 */
-	if (cp->flags & IP_VS_CONN_F_NO_CPORT) {
-		atomic_dec(&ip_vs_conn_no_cport_cnt);
-		ip_vs_conn_unhash(cp);
-		cp->flags &= ~IP_VS_CONN_F_NO_CPORT;
-		cp->cport = h.portp[0];
-		/* hash on new dport */
-		ip_vs_conn_hash(cp);
+	if (unlikely(cp->flags & IP_VS_CONN_F_NO_CPORT)) {
+		if (ip_vs_conn_unhash(cp)) {
+			spin_lock(&cp->lock);
+			if (cp->flags & IP_VS_CONN_F_NO_CPORT) {
+				atomic_dec(&ip_vs_conn_no_cport_cnt);
+				cp->flags &= ~IP_VS_CONN_F_NO_CPORT;
+				cp->cport = h.portp[0];
+				IP_VS_DBG(10, "filled cport=%d\n", ntohs(cp->dport));
+			}
+			spin_unlock(&cp->lock);
 
-		IP_VS_DBG(10, "filled cport=%d\n", ntohs(cp->dport));
+			/* hash on new dport */
+			ip_vs_conn_hash(cp);
+		}
 	}
 
 	if (!(rt = __ip_vs_get_out_rt(cp, RT_TOS(iph->tos))))
@@ -886,8 +892,6 @@
 	/* update checksum because skb might be defragmented */
 	ip_send_check(old_iph);
 
-	skb->h.raw = skb->nh.raw;
-
 	/*
 	 * Okay, now see if we can stuff it in the buffer as-is.
 	 */
@@ -907,6 +911,7 @@
 		old_iph = skb->nh.iph;
 	}
 
+	skb->h.raw = skb->nh.raw;
 	skb->nh.raw = skb_push(skb, sizeof(struct iphdr));
 	memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
 
@@ -1138,11 +1143,14 @@
 		/*
 		 * Invalidate the connection template
 		 */
-		ip_vs_conn_unhash(ct);
-		ct->dport = 65535;
-		ct->vport = 65535;
-		ct->cport = 0;
-		ip_vs_conn_hash(ct);
+		if (ct->cport) {
+			if (ip_vs_conn_unhash(ct)) {
+				ct->dport = 65535;
+				ct->vport = 65535;
+				ct->cport = 0;
+				ip_vs_conn_hash(ct);
+			}
+		}
 
 		/*
 		 * Simply decrease the refcnt of the template,
@@ -1196,7 +1204,8 @@
 	/*
 	 *	unhash it if it is hashed in the conn table
 	 */
-	ip_vs_conn_unhash(cp);
+	if (!ip_vs_conn_unhash(cp))
+		goto expire_later;
 
 	/*
 	 *	refcnt==1 implies I'm the only one referrer
diff -urN linux-2.4.26-pre6/net/ipv4/ipvs/ip_vs_ctl.c linux-2.4.26-rc1/net/ipv4/ipvs/ip_vs_ctl.c
--- linux-2.4.26-pre6/net/ipv4/ipvs/ip_vs_ctl.c	2004-03-27 20:23:22.000000000 -0800
+++ linux-2.4.26-rc1/net/ipv4/ipvs/ip_vs_ctl.c	2004-03-27 20:23:25.000000000 -0800
@@ -889,9 +889,16 @@
 
 	__ip_vs_update_dest(svc, dest, ur);
 
+	write_lock_bh(&__ip_vs_svc_lock);
+
+	/* Wait until all other svc users go away */
+	while (atomic_read(&svc->usecnt) > 1) {};
+
 	/* call the update_service, because server weight may be changed */
 	svc->scheduler->update_service(svc);
 
+	write_unlock_bh(&__ip_vs_svc_lock);
+
 	LeaveFunction(2);
 
 	return 0;
diff -urN linux-2.4.26-pre6/net/sched/Config.in linux-2.4.26-rc1/net/sched/Config.in
--- linux-2.4.26-pre6/net/sched/Config.in	2004-02-18 05:36:32.000000000 -0800
+++ linux-2.4.26-rc1/net/sched/Config.in	2004-03-27 20:23:26.000000000 -0800
@@ -15,6 +15,7 @@
 tristate '  TEQL queue' CONFIG_NET_SCH_TEQL
 tristate '  TBF queue' CONFIG_NET_SCH_TBF
 tristate '  GRED queue' CONFIG_NET_SCH_GRED
+tristate '  Network delay simulator' CONFIG_NET_SCH_DELAY
 tristate '  Diffserv field marker' CONFIG_NET_SCH_DSMARK
 if [ "$CONFIG_NETFILTER" = "y" ]; then
    tristate '  Ingress Qdisc' CONFIG_NET_SCH_INGRESS
diff -urN linux-2.4.26-pre6/net/sched/Makefile linux-2.4.26-rc1/net/sched/Makefile
--- linux-2.4.26-pre6/net/sched/Makefile	2002-11-28 15:53:16.000000000 -0800
+++ linux-2.4.26-rc1/net/sched/Makefile	2004-03-27 20:23:26.000000000 -0800
@@ -14,6 +14,7 @@
 obj-$(CONFIG_NET_SCH_INGRESS)	+= sch_ingress.o 
 obj-$(CONFIG_NET_SCH_CBQ)	+= sch_cbq.o
 obj-$(CONFIG_NET_SCH_CSZ)	+= sch_csz.o
+obj-$(CONFIG_NET_SCH_DELAY)	+= sch_delay.o
 obj-$(CONFIG_NET_SCH_HPFQ)	+= sch_hpfq.o
 obj-$(CONFIG_NET_SCH_HFSC)	+= sch_hfsc.o
 obj-$(CONFIG_NET_SCH_HTB)	+= sch_htb.o
diff -urN linux-2.4.26-pre6/net/sched/sch_delay.c linux-2.4.26-rc1/net/sched/sch_delay.c
--- linux-2.4.26-pre6/net/sched/sch_delay.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.26-rc1/net/sched/sch_delay.c	2004-03-27 20:23:26.000000000 -0800
@@ -0,0 +1,277 @@
+/*
+ * net/sched/sch_delay.c	Simple constant delay
+ *
+ * 		This program is free software; you can redistribute it and/or
+ * 		modify it under the terms of the GNU General Public License
+ * 		as published by the Free Software Foundation; either version
+ * 		2 of the License, or (at your option) any later version.
+ *
+ * Authors:	Stephen Hemminger <shemminger@osdl.org>
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/socket.h>
+#include <linux/sockios.h>
+#include <linux/in.h>
+#include <linux/errno.h>
+#include <linux/interrupt.h>
+#include <linux/if_ether.h>
+#include <linux/inet.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/notifier.h>
+#include <net/ip.h>
+#include <net/route.h>
+#include <linux/skbuff.h>
+#include <net/sock.h>
+#include <net/pkt_sched.h>
+
+/*	Network delay simulator
+	This scheduler adds a fixed delay to all packets.
+	Similar to NISTnet and BSD Dummynet.
+
+	It uses byte fifo underneath similar to TBF */
+struct dly_sched_data {
+	u32	latency;
+	u32	limit;
+	struct timer_list timer;
+	struct Qdisc *qdisc;
+};
+
+/* Time stamp put into socket buffer control block */
+struct dly_skb_cb {
+	psched_time_t	queuetime;
+};
+
+/* Enqueue packets with underlying discipline (fifo)
+ * but mark them with current time first.
+ */
+static int dly_enqueue(struct sk_buff *skb, struct Qdisc *sch)
+{
+	struct dly_sched_data *q = (struct dly_sched_data *)sch->data;
+	struct dly_skb_cb *cb = (struct dly_skb_cb *)skb->cb;
+	int ret;
+
+	PSCHED_GET_TIME(cb->queuetime);
+
+	/* Queue to underlying scheduler */
+	ret = q->qdisc->enqueue(skb, q->qdisc);
+	if (ret)
+		sch->stats.drops++;
+	else {
+		sch->q.qlen++;
+		sch->stats.bytes += skb->len;
+		sch->stats.packets++;
+	}
+	return 0;
+}
+
+/* Requeue packets but don't change time stamp */
+static int dly_requeue(struct sk_buff *skb, struct Qdisc *sch)
+{
+	struct dly_sched_data *q = (struct dly_sched_data *)sch->data;
+	int ret;
+
+	ret = q->qdisc->ops->requeue(skb, q->qdisc);
+	if (ret == 0)
+		sch->q.qlen++;
+	return ret;
+}
+
+static unsigned int dly_drop(struct Qdisc *sch)
+{
+	struct dly_sched_data *q = (struct dly_sched_data *)sch->data;
+	unsigned int len;
+
+	len = q->qdisc->ops->drop(q->qdisc);
+	if (len) {
+		sch->q.qlen--;
+		sch->stats.drops++;
+	}
+	return len;
+}
+
+/* Dequeue packet.
+ * If packet needs to be held up, then stop the
+ * queue and set timer to wakeup later.
+ */
+static struct sk_buff *dly_dequeue(struct Qdisc *sch)
+{
+	struct dly_sched_data *q = (struct dly_sched_data *)sch->data;
+	struct sk_buff *skb = q->qdisc->dequeue(q->qdisc);
+
+	if (skb) {
+		struct dly_skb_cb *cb = (struct dly_skb_cb *)skb->cb;
+		psched_time_t now;
+		long diff;
+
+		PSCHED_GET_TIME(now);
+		diff = q->latency - PSCHED_TDIFF(now, cb->queuetime);
+
+		if (diff <= 0) {
+			sch->q.qlen--;
+			sch->flags &= ~TCQ_F_THROTTLED;
+			return skb;
+		}
+
+		if (!netif_queue_stopped(sch->dev)) {
+			long delay = PSCHED_US2JIFFIE(diff);
+			if (delay <= 0)
+				delay = 1;
+			mod_timer(&q->timer, jiffies+delay);
+		}
+
+		if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) {
+			sch->q.qlen--;
+			sch->stats.drops++;
+		}
+		sch->flags |= TCQ_F_THROTTLED;
+	}
+	return NULL;
+}
+
+static void dly_reset(struct Qdisc *sch)
+{
+	struct dly_sched_data *q = (struct dly_sched_data *)sch->data;
+
+	qdisc_reset(q->qdisc);
+	sch->q.qlen = 0;
+	sch->flags &= ~TCQ_F_THROTTLED;
+	del_timer(&q->timer);
+}
+
+static void dly_timer(unsigned long arg)
+{
+	struct Qdisc *sch = (struct Qdisc *)arg;
+
+	sch->flags &= ~TCQ_F_THROTTLED;
+	netif_schedule(sch->dev);
+}
+
+/* Tell Fifo the new limit. */
+static int change_limit(struct Qdisc *q, u32 limit)
+{
+	struct rtattr *rta;
+	int ret;
+
+	rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL);
+	if (!rta)
+		return -ENOMEM;
+
+	rta->rta_type = RTM_NEWQDISC;
+	((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit;
+	ret = q->ops->change(q, rta);
+	kfree(rta);
+
+	return ret;
+}
+
+/* Setup underlying FIFO discipline */
+static int dly_change(struct Qdisc *sch, struct rtattr *opt)
+{
+	struct dly_sched_data *q = (struct dly_sched_data *)sch->data;
+	struct tc_dly_qopt *qopt = RTA_DATA(opt);
+	int err;
+
+	if (q->qdisc == &noop_qdisc) {
+		struct Qdisc *child
+			= qdisc_create_dflt(sch->dev, &bfifo_qdisc_ops);
+		if (!child)
+			return -EINVAL;
+		q->qdisc = child;
+	}
+
+	err = change_limit(q->qdisc, qopt->limit);
+	if (err) {
+		qdisc_destroy(q->qdisc);
+		q->qdisc = &noop_qdisc;
+	} else {
+		q->latency = qopt->latency;
+		q->limit = qopt->limit;
+	}
+	return err;
+}
+
+static int dly_init(struct Qdisc *sch, struct rtattr *opt)
+{
+	struct dly_sched_data *q = (struct dly_sched_data *)sch->data;
+	int err;
+
+	if (!opt)
+		return -EINVAL;
+
+	MOD_INC_USE_COUNT;
+
+	init_timer(&q->timer);
+	q->timer.function = dly_timer;
+	q->timer.data = (unsigned long) sch;
+	q->qdisc = &noop_qdisc;
+
+	err = dly_change(sch, opt);
+	if (err)
+		MOD_DEC_USE_COUNT;
+
+	return err;
+}
+
+static void dly_destroy(struct Qdisc *sch)
+{
+	struct dly_sched_data *q = (struct dly_sched_data *)sch->data;
+
+	del_timer(&q->timer);
+	qdisc_destroy(q->qdisc);
+	q->qdisc = &noop_qdisc;
+
+	MOD_DEC_USE_COUNT;
+}
+
+static int dly_dump(struct Qdisc *sch, struct sk_buff *skb)
+{
+	struct dly_sched_data *q = (struct dly_sched_data *)sch->data;
+	unsigned char	 *b = skb->tail;
+	struct tc_dly_qopt qopt;
+
+	qopt.latency = q->latency;
+	qopt.limit = q->limit;
+
+	RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt);
+
+	return skb->len;
+
+rtattr_failure:
+	skb_trim(skb, b - skb->data);
+	return -1;
+}
+
+struct Qdisc_ops dly_qdisc_ops = {
+	.id		=	"delay",
+	.priv_size	=	sizeof(struct dly_sched_data),
+	.enqueue	=	dly_enqueue,
+	.dequeue	=	dly_dequeue,
+	.requeue	=	dly_requeue,
+	.drop		=	dly_drop,
+	.init		=	dly_init,
+	.reset		=	dly_reset,
+	.destroy	=	dly_destroy,
+	.change		=	dly_change,
+	.dump		=	dly_dump,
+};
+
+#ifdef MODULE
+int init_module(void)
+{
+	return register_qdisc(&dly_qdisc_ops);
+}
+
+void cleanup_module(void)
+{
+	unregister_qdisc(&dly_qdisc_ops);
+}
+#endif
+MODULE_LICENSE("GPL");
diff -urN linux-2.4.26-pre6/net/sched/sch_fifo.c linux-2.4.26-rc1/net/sched/sch_fifo.c
--- linux-2.4.26-pre6/net/sched/sch_fifo.c	2004-02-18 05:36:32.000000000 -0800
+++ linux-2.4.26-rc1/net/sched/sch_fifo.c	2004-03-27 20:23:26.000000000 -0800
@@ -140,10 +140,12 @@
 	struct fifo_sched_data *q = (void*)sch->data;
 
 	if (opt == NULL) {
+		unsigned int limit = sch->dev->tx_queue_len ? : 1;
+
 		if (sch->ops == &bfifo_qdisc_ops)
-			q->limit = sch->dev->tx_queue_len*sch->dev->mtu;
+			q->limit = limit*sch->dev->mtu;
 		else	
-			q->limit = sch->dev->tx_queue_len;
+			q->limit = limit;
 	} else {
 		struct tc_fifo_qopt *ctl = RTA_DATA(opt);
 		if (opt->rta_len < RTA_LENGTH(sizeof(*ctl)))
diff -urN linux-2.4.26-pre6/net/sched/sch_gred.c linux-2.4.26-rc1/net/sched/sch_gred.c
--- linux-2.4.26-pre6/net/sched/sch_gred.c	2004-02-18 05:36:32.000000000 -0800
+++ linux-2.4.26-rc1/net/sched/sch_gred.c	2004-03-27 20:23:26.000000000 -0800
@@ -110,7 +110,7 @@
 	unsigned long	qave=0;	
 	int i=0;
 
-	if (!t->initd && skb_queue_len(&sch->q) < sch->dev->tx_queue_len) {
+	if (!t->initd && skb_queue_len(&sch->q) < (sch->dev->tx_queue_len ? : 1)) {
 		D2PRINTK("NO GRED Queues setup yet! Enqueued anyway\n");
 		goto do_enqueue;
 	}
diff -urN linux-2.4.26-pre6/net/sched/sch_hfsc.c linux-2.4.26-rc1/net/sched/sch_hfsc.c
--- linux-2.4.26-pre6/net/sched/sch_hfsc.c	2004-02-18 05:36:32.000000000 -0800
+++ linux-2.4.26-rc1/net/sched/sch_hfsc.c	2004-03-27 20:23:26.000000000 -0800
@@ -117,7 +117,7 @@
 
 struct hfsc_class
 {
-	u32	classid;	/* class id */
+	u32		classid;	/* class id */
 	unsigned int	refcnt;		/* usage count */
 
 	struct tc_stats	stats;		/* generic statistics */
@@ -137,28 +137,28 @@
 	struct list_head hlist;		/* hash list member */
 	struct list_head dlist;		/* drop list member */
 
-	u64	cl_total;	/* total work in bytes */
-	u64	cl_cumul;	/* cumulative work in bytes done by
+	u64	cl_total;		/* total work in bytes */
+	u64	cl_cumul;		/* cumulative work in bytes done by
 					   real-time criteria */
 
-	u64 	cl_d;		/* deadline*/
-	u64 	cl_e;		/* eligible time */
-	u64	cl_vt;		/* virtual time */
-	u64	cl_f;		/* time when this class will fit for
+	u64 	cl_d;			/* deadline*/
+	u64 	cl_e;			/* eligible time */
+	u64	cl_vt;			/* virtual time */
+	u64	cl_f;			/* time when this class will fit for
 					   link-sharing, max(myf, cfmin) */
-	u64	cl_myf;		/* my fit-time (calculated from this
+	u64	cl_myf;			/* my fit-time (calculated from this
 					   class's own upperlimit curve) */
-	u64	cl_myfadj;	/* my fit-time adjustment (to cancel
+	u64	cl_myfadj;		/* my fit-time adjustment (to cancel
 					   history dependence) */
-	u64	cl_cfmin;	/* earliest children's fit-time (used
+	u64	cl_cfmin;		/* earliest children's fit-time (used
 					   with cl_myf to obtain cl_f) */
-	u64	cl_cvtmin;	/* minimal virtual time among the
+	u64	cl_cvtmin;		/* minimal virtual time among the
 					   children fit for link-sharing
 					   (monotonic within a period) */
-	u64	cl_vtadj;	/* intra-period cumulative vt
+	u64	cl_vtadj;		/* intra-period cumulative vt
 					   adjustment */
-	u64	cl_vtoff;	/* inter-period cumulative vt offset */
-	u64	cl_cvtmax;	/* max child's vt in the last period */
+	u64	cl_vtoff;		/* inter-period cumulative vt offset */
+	u64	cl_cvtmax;		/* max child's vt in the last period */
 
 	struct internal_sc cl_rsc;	/* internal real-time service curve */
 	struct internal_sc cl_fsc;	/* internal fair service curve */
@@ -178,15 +178,13 @@
 
 struct hfsc_sched
 {
-	u16	defcls;			/* default class id */
-
+	u16	defcls;				/* default class id */
 	struct hfsc_class root;			/* root class */
-	struct hfsc_class *last_xmit;		/* class that transmitted last
-						   packet (for requeueing) */
 	struct list_head clhash[HFSC_HSIZE];	/* class hash */
 	struct list_head eligible;		/* eligible list */
 	struct list_head droplist;		/* active leaf class list (for
 						   dropping) */
+	struct sk_buff_head requeue;		/* requeued packet */
 	struct timer_list wd_timer;		/* watchdog timer */
 };
 
@@ -565,8 +563,7 @@
  * service curve starting at (x, y).
  */
 static void
-rtsc_init(struct runtime_sc *rtsc, struct internal_sc *isc, u64 x,
-                                                            u64 y)
+rtsc_init(struct runtime_sc *rtsc, struct internal_sc *isc, u64 x, u64 y)
 {
 	rtsc->x	   = x;
 	rtsc->y    = y;
@@ -625,8 +622,7 @@
  * runtime service curve and the service curve starting at (x, y).
  */
 static void
-rtsc_min(struct runtime_sc *rtsc, struct internal_sc *isc, u64 x,
-                                                           u64 y)
+rtsc_min(struct runtime_sc *rtsc, struct internal_sc *isc, u64 x, u64 y)
 {
 	u64 y1, y2, dx, dy;
 	u32 dsm;
@@ -1230,9 +1226,6 @@
 	list_del(&cl->siblings);
 	hfsc_adjust_levels(cl->cl_parent);
 	hfsc_purge_queue(sch, cl);
-	if (q->last_xmit == cl)
-		q->last_xmit = NULL;
-
 	if (--cl->refcnt == 0)
 		hfsc_destroy_class(sch, cl);
 
@@ -1540,6 +1533,7 @@
 		INIT_LIST_HEAD(&q->clhash[i]);
 	INIT_LIST_HEAD(&q->eligible);
 	INIT_LIST_HEAD(&q->droplist);
+	skb_queue_head_init(&q->requeue);
 
 	q->root.refcnt  = 1;
 	q->root.classid = sch->handle;
@@ -1619,10 +1613,9 @@
 		list_for_each_entry(cl, &q->clhash[i], hlist)
 			hfsc_reset_class(cl);
 	}
-
+	__skb_queue_purge(&q->requeue);
 	INIT_LIST_HEAD(&q->eligible);
 	INIT_LIST_HEAD(&q->droplist);
-	q->last_xmit = NULL;
 	del_timer(&q->wd_timer);
 	sch->flags &= ~TCQ_F_THROTTLED;
 	sch->q.qlen = 0;
@@ -1639,7 +1632,7 @@
 		list_for_each_entry_safe(cl, next, &q->clhash[i], hlist)
 			hfsc_destroy_class(sch, cl);
 	}
-
+	__skb_queue_purge(&q->requeue);
 	del_timer(&q->wd_timer);
 	MOD_DEC_USE_COUNT;
 }
@@ -1709,6 +1702,8 @@
 
 	if (sch->q.qlen == 0)
 		return NULL;
+	if ((skb = __skb_dequeue(&q->requeue)))
+		goto out;
 
 	PSCHED_GET_TIME(cur_time);
 
@@ -1758,7 +1753,7 @@
 		set_passive(cl);
 	}
 
-	q->last_xmit = cl;
+ out:
 	sch->flags &= ~TCQ_F_THROTTLED;
 	sch->q.qlen--;
 
@@ -1769,28 +1764,10 @@
 hfsc_requeue(struct sk_buff *skb, struct Qdisc *sch)
 {
 	struct hfsc_sched *q = (struct hfsc_sched *)sch->data;
-	struct hfsc_class *cl = q->last_xmit;
-	unsigned int len = skb->len;
-	int ret;
-
-	if (cl == NULL) {
-		kfree_skb(skb);
-		sch->stats.drops++;
-		return NET_XMIT_DROP;
-	}
 
-	ret = cl->qdisc->ops->requeue(skb, cl->qdisc);
-	if (ret == NET_XMIT_SUCCESS) {
-		if (cl->qdisc->q.qlen == 1)
-			set_active(cl, len);
-		sch->q.qlen++;
-	} else {
-		cl->stats.drops++;
-		sch->stats.drops++;
-	}
-	q->last_xmit = NULL;
-
-	return ret;
+	__skb_queue_head(&q->requeue, skb);
+	sch->q.qlen++;
+	return NET_XMIT_SUCCESS;
 }
 
 static unsigned int
diff -urN linux-2.4.26-pre6/net/sched/sch_htb.c linux-2.4.26-rc1/net/sched/sch_htb.c
--- linux-2.4.26-pre6/net/sched/sch_htb.c	2004-03-27 20:23:23.000000000 -0800
+++ linux-2.4.26-rc1/net/sched/sch_htb.c	2004-03-27 20:23:26.000000000 -0800
@@ -21,9 +21,11 @@
  *			created test case so that I was able to fix nasty bug
  *		Wilfried Weissmann
  *			spotted bug in dequeue code and helped with fix
+ *		Jiri Fojtasek
+ *			fixed requeue routine
  *		and many others. thanks.
  *
- * $Id: sch_htb.c,v 1.24 2003/07/28 15:25:23 devik Exp devik $
+ * $Id: sch_htb.c,v 1.25 2003/12/07 11:08:25 devik Exp devik $
  */
 #include <linux/config.h>
 #include <linux/module.h>
@@ -75,7 +77,7 @@
 #define HTB_HYSTERESIS 1/* whether to use mode hysteresis for speedup */
 #define HTB_QLOCK(S) spin_lock_bh(&(S)->dev->queue_lock)
 #define HTB_QUNLOCK(S) spin_unlock_bh(&(S)->dev->queue_lock)
-#define HTB_VER 0x3000d	/* major must be matched with number suplied by TC as version */
+#define HTB_VER 0x30010	/* major must be matched with number suplied by TC as version */
 
 #if HTB_VER >> 16 != TC_HTB_PROTOVER
 #error "Mismatched sch_htb.c and pkt_sch.h"
@@ -304,7 +306,7 @@
 	   rules in it */
 	if (skb->priority == sch->handle)
 		return HTB_DIRECT;  /* X:0 (direct flow) selected */
-	if ((cl = htb_find(skb->priority,sch)) != NULL) 
+	if ((cl = htb_find(skb->priority,sch)) != NULL && cl->level == 0) 
 		return cl;
 
 	tcf = q->filter_list;
@@ -717,7 +719,7 @@
 
     sch->q.qlen++;
     sch->stats.packets++; sch->stats.bytes += skb->len;
-    HTB_DBG(1,1,"htb_enq_ok cl=%X skb=%p\n",cl?cl->classid:0,skb);
+    HTB_DBG(1,1,"htb_enq_ok cl=%X skb=%p\n",(cl && cl != HTB_DIRECT)?cl->classid:0,skb);
     return NET_XMIT_SUCCESS;
 }
 
@@ -726,16 +728,18 @@
 {
     struct htb_sched *q = (struct htb_sched *)sch->data;
     struct htb_class *cl = htb_classify(skb,sch);
+    struct sk_buff *tskb;
 
     if (cl == HTB_DIRECT || !cl) {
 	/* enqueue to helper queue */
 	if (q->direct_queue.qlen < q->direct_qlen && cl) {
-	    __skb_queue_tail(&q->direct_queue, skb);
-	    q->direct_pkts++;
+	    __skb_queue_head(&q->direct_queue, skb);
 	} else {
-	    kfree_skb (skb);
-	    sch->stats.drops++;
-	    return NET_XMIT_DROP;
+            __skb_queue_head(&q->direct_queue, skb);
+            tskb = __skb_dequeue_tail(&q->direct_queue);
+            kfree_skb (tskb);
+            sch->stats.drops++;
+            return NET_XMIT_CN;	
 	}
     } else if (cl->un.leaf.q->ops->requeue(skb, cl->un.leaf.q) != NET_XMIT_SUCCESS) {
 	sch->stats.drops++;
@@ -745,7 +749,7 @@
 	    htb_activate (q,cl);
 
     sch->q.qlen++;
-    HTB_DBG(1,1,"htb_req_ok cl=%X skb=%p\n",cl?cl->classid:0,skb);
+    HTB_DBG(1,1,"htb_req_ok cl=%X skb=%p\n",(cl && cl != HTB_DIRECT)?cl->classid:0,skb);
     return NET_XMIT_SUCCESS;
 }
 
@@ -1396,11 +1400,16 @@
 #ifdef HTB_RATECM
 	del_timer_sync (&q->rttim);
 #endif
+	/* This line used to be after htb_destroy_class call below
+	   and surprisingly it worked in 2.4. But it must precede it 
+	   because filter need its target class alive to be able to call
+	   unbind_filter on it (without Oops). */
+	htb_destroy_filters(&q->filter_list);
+	
 	while (!list_empty(&q->root)) 
 		htb_destroy_class (sch,list_entry(q->root.next,
 					struct htb_class,sibling));
 
-	htb_destroy_filters(&q->filter_list);
 	__skb_queue_purge(&q->direct_queue);
 	MOD_DEC_USE_COUNT;
 }
@@ -1493,7 +1502,7 @@
 		cl->magic = HTB_CMAGIC;
 #endif
 
-		/* create leaf qdisc early because it uses kmalloc(GPF_KERNEL)
+		/* create leaf qdisc early because it uses kmalloc(GFP_KERNEL)
 		   so that can't be used inside of sch_tree_lock
 		   -- thanks to Karlis Peisenieks */
 		new_q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops);
diff -urN linux-2.4.26-pre6/net/sched/sch_tbf.c linux-2.4.26-rc1/net/sched/sch_tbf.c
--- linux-2.4.26-pre6/net/sched/sch_tbf.c	2004-02-18 05:36:32.000000000 -0800
+++ linux-2.4.26-rc1/net/sched/sch_tbf.c	2004-03-27 20:23:26.000000000 -0800
@@ -62,7 +62,7 @@
 
 	Algorithm.
 	----------
-	
+
 	Let N(t_i) be B/R initially and N(t) grow continuously with time as:
 
 	N(t+delta) = min{B/R, N(t) + delta}
@@ -146,15 +146,15 @@
 		if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch))
 #endif
 			kfree_skb(skb);
-	
+
 		return NET_XMIT_DROP;
 	}
-	
+
 	if ((ret = q->qdisc->enqueue(skb, q->qdisc)) != 0) {
 		sch->stats.drops++;
 		return ret;
-	}	
-	
+	}
+
 	sch->q.qlen++;
 	sch->stats.bytes += skb->len;
 	sch->stats.packets++;
@@ -165,10 +165,10 @@
 {
 	struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data;
 	int ret;
-	
+
 	if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0)
-		sch->q.qlen++; 
-	
+		sch->q.qlen++;
+
 	return ret;
 }
 
@@ -176,7 +176,7 @@
 {
 	struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data;
 	unsigned int len;
-	
+
 	if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) {
 		sch->q.qlen--;
 		sch->stats.drops++;
@@ -196,7 +196,7 @@
 {
 	struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data;
 	struct sk_buff *skb;
-	
+
 	skb = q->qdisc->dequeue(q->qdisc);
 
 	if (skb) {
@@ -204,7 +204,7 @@
 		long toks;
 		long ptoks = 0;
 		unsigned int len = skb->len;
-		
+
 		PSCHED_GET_TIME(now);
 
 		toks = PSCHED_TDIFF_SAFE(now, q->t_c, q->buffer, 0);
@@ -248,13 +248,13 @@
 		   This is the main idea of all FQ algorithms
 		   (cf. CSZ, HPFQ, HFSC)
 		 */
-		
+
 		if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) {
-			/* When requeue fails skb is dropped */ 
+			/* When requeue fails skb is dropped */
 			sch->q.qlen--;
 			sch->stats.drops++;
-		}	
-		
+		}
+
 		sch->flags |= TCQ_F_THROTTLED;
 		sch->stats.overlimits++;
 	}
@@ -279,24 +279,24 @@
 	struct Qdisc *q = qdisc_create_dflt(dev, &bfifo_qdisc_ops);
         struct rtattr *rta;
 	int ret;
-	
+
 	if (q) {
 		rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL);
 		if (rta) {
 			rta->rta_type = RTM_NEWQDISC;
-			rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); 
+			rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt));
 			((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit;
-			
+
 			ret = q->ops->change(q, rta);
 			kfree(rta);
-			
+
 			if (ret == 0)
 				return q;
 		}
 		qdisc_destroy(q);
 	}
 
-	return NULL;	
+	return NULL;
 }
 
 static int tbf_change(struct Qdisc* sch, struct rtattr *opt)
@@ -340,7 +340,7 @@
 	}
 	if (max_size < 0)
 		goto done;
-	
+
 	if (q->qdisc == &noop_qdisc) {
 		if ((child = tbf_create_dflt_qdisc(sch->dev, qopt->limit)) == NULL)
 			goto done;
@@ -370,19 +370,19 @@
 {
 	int err;
 	struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data;
-	
+
 	if (opt == NULL)
 		return -EINVAL;
-	
+
 	MOD_INC_USE_COUNT;
-	
+
 	PSCHED_GET_TIME(q->t_c);
 	init_timer(&q->wd_timer);
 	q->wd_timer.function = tbf_watchdog;
 	q->wd_timer.data = (unsigned long)sch;
 
 	q->qdisc = &noop_qdisc;
-	
+
 	if ((err = tbf_change(sch, opt)) != 0) {
 		MOD_DEC_USE_COUNT;
 	}
@@ -399,7 +399,7 @@
 		qdisc_put_rtab(q->P_tab);
 	if (q->R_tab)
 		qdisc_put_rtab(q->R_tab);
-	
+
 	qdisc_destroy(q->qdisc);
 	q->qdisc = &noop_qdisc;
 
@@ -412,10 +412,10 @@
 	unsigned char	 *b = skb->tail;
 	struct rtattr *rta;
 	struct tc_tbf_qopt opt;
-	
+
 	rta = (struct rtattr*)b;
 	RTA_PUT(skb, TCA_OPTIONS, 0, NULL);
-	
+
 	opt.limit = q->limit;
 	opt.rate = q->R_tab->rate;
 	if (q->P_tab)
@@ -439,11 +439,10 @@
 {
 	struct tbf_sched_data *q = (struct tbf_sched_data*)sch->data;
 
-	if (cl != 1) 	/* only one class */ 
+	if (cl != 1) 	/* only one class */
 		return -ENOENT;
-    
-	tcm->tcm_parent = TC_H_ROOT;
-	tcm->tcm_handle = 1;
+
+	tcm->tcm_handle |= TC_H_MIN(1);
 	tcm->tcm_info = q->qdisc->handle;
 
 	return 0;
@@ -457,12 +456,12 @@
 	if (new == NULL)
 		new = &noop_qdisc;
 
-	sch_tree_lock(sch);	
+	sch_tree_lock(sch);
 	*old = xchg(&q->qdisc, new);
 	qdisc_reset(*old);
 	sch->q.qlen = 0;
 	sch_tree_unlock(sch);
-	
+
 	return 0;
 }
 
@@ -481,7 +480,7 @@
 {
 }
 
-static int tbf_change_class(struct Qdisc *sch, u32 classid, u32 parentid, 
+static int tbf_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
 			struct rtattr **tca, unsigned long *arg)
 {
 	return -ENOSYS;
@@ -494,11 +493,9 @@
 
 static void tbf_walk(struct Qdisc *sch, struct qdisc_walker *walker)
 {
-	struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data;
-
 	if (!walker->stop) {
-		if (walker->count >= walker->skip) 
-			if (walker->fn(sch, (unsigned long)q, walker) < 0) { 
+		if (walker->count >= walker->skip)
+			if (walker->fn(sch, 1, walker) < 0) {
 				walker->stop = 1;
 				return;
 			}
@@ -545,7 +542,7 @@
 	return register_qdisc(&tbf_qdisc_ops);
 }
 
-void cleanup_module(void) 
+void cleanup_module(void)
 {
 	unregister_qdisc(&tbf_qdisc_ops);
 }
diff -urN linux-2.4.26-pre6/net/sctp/Config.in linux-2.4.26-rc1/net/sctp/Config.in
--- linux-2.4.26-pre6/net/sctp/Config.in	2004-03-27 20:23:23.000000000 -0800
+++ linux-2.4.26-rc1/net/sctp/Config.in	2004-03-27 20:23:26.000000000 -0800
@@ -4,39 +4,38 @@
 mainmenu_option next_comment
 comment '   SCTP Configuration (EXPERIMENTAL)'
 
-if [ "$CONFIG_IPV6" != "n" ]; then
-   define_bool CONFIG_IPV6_SCTP__ $CONFIG_IPV6
+if [ "$CONFIG_IPV6" = "n" ]; then
+  tristate '  The SCTP Protocol (EXPERIMENTAL)' CONFIG_IP_SCTP
 else
-   define_bool CONFIG_IPV6_SCTP__ y
+  dep_tristate '  The SCTP Protocol (EXPERIMENTAL)' CONFIG_IP_SCTP $CONFIG_IPV6
 fi
 
-dep_tristate '  The SCTP Protocol (EXPERIMENTAL)' CONFIG_IP_SCTP $CONFIG_IPV6_SCTP__
 if [ "$CONFIG_IP_SCTP" != "n" ]; then
-   bool '    SCTP: Debug messages' CONFIG_SCTP_DBG_MSG
-   bool '    SCTP: Debug object counts' CONFIG_SCTP_DBG_OBJCNT
-fi
-if [ "$CONFIG_CRYPTO_HMAC" = "n" ]; then
-  choice '    SCTP: Cookie HMAC Algorithm' \
-        "HMAC-NONE		CONFIG_SCTP_HMAC_NONE" HMAC-NONE
-else
-  if [ "$CONFIG_CRYPTO_MD5" = "n" -a "$CONFIG_CRYPTO_SHA1" = "n" ]; then
+  bool '    SCTP: Debug messages' CONFIG_SCTP_DBG_MSG
+  bool '    SCTP: Debug object counts' CONFIG_SCTP_DBG_OBJCNT
+  if [ "$CONFIG_CRYPTO_HMAC" = "n" ]; then
     choice '    SCTP: Cookie HMAC Algorithm' \
-        "HMAC-NONE		CONFIG_SCTP_HMAC_NONE" HMAC-NONE
+      "HMAC-NONE		CONFIG_SCTP_HMAC_NONE" HMAC-NONE
   else
-    if [ "$CONFIG_CRYPTO_MD5" != "n" -a "$CONFIG_CRYPTO_SHA1" != "n" ]; then
+    if [ "$CONFIG_CRYPTO_MD5" = "n" -a "$CONFIG_CRYPTO_SHA1" = "n" ]; then
       choice '    SCTP: Cookie HMAC Algorithm' \
-        "HMAC-NONE		CONFIG_SCTP_HMAC_NONE \
-         HMAC-SHA1              CONFIG_SCTP_HMAC_SHA1 \
-         HMAC-MD5		CONFIG_SCTP_HMAC_MD5"	HMAC-SHA1
+        "HMAC-NONE		CONFIG_SCTP_HMAC_NONE" HMAC-NONE
     else
-      if [ "$CONFIG_CRYPTO_MD5" != "n" ]; then
-        choice 'SCTP: Cookie HMAC Algorithm' \
-        "HMAC-NONE		CONFIG_SCTP_HMAC_NONE \
-         HMAC-MD5		CONFIG_SCTP_HMAC_MD5"	HMAC-MD5
+      if [ "$CONFIG_CRYPTO_MD5" != "n" -a "$CONFIG_CRYPTO_SHA1" != "n" ]; then
+        choice '    SCTP: Cookie HMAC Algorithm' \
+          "HMAC-NONE		CONFIG_SCTP_HMAC_NONE \
+           HMAC-SHA1              CONFIG_SCTP_HMAC_SHA1 \
+           HMAC-MD5		CONFIG_SCTP_HMAC_MD5"	HMAC-MD5
       else
-        choice 'SCTP: Cookie HMAC Algorithm' \
-        "HMAC-NONE		CONFIG_SCTP_HMAC_NONE \
-         HMAC-SHA1		CONFIG_SCTP_HMAC_SHA1"	HMAC-SHA1
+        if [ "$CONFIG_CRYPTO_MD5" != "n" ]; then
+          choice 'SCTP: Cookie HMAC Algorithm' \
+          "HMAC-NONE		CONFIG_SCTP_HMAC_NONE \
+           HMAC-MD5		CONFIG_SCTP_HMAC_MD5"	HMAC-MD5
+        else
+          choice 'SCTP: Cookie HMAC Algorithm' \
+          "HMAC-NONE		CONFIG_SCTP_HMAC_NONE \
+           HMAC-SHA1		CONFIG_SCTP_HMAC_SHA1"	HMAC-SHA1
+        fi
       fi
     fi
   fi
diff -urN linux-2.4.26-pre6/net/sctp/sm_make_chunk.c linux-2.4.26-rc1/net/sctp/sm_make_chunk.c
--- linux-2.4.26-pre6/net/sctp/sm_make_chunk.c	2004-03-27 20:23:23.000000000 -0800
+++ linux-2.4.26-rc1/net/sctp/sm_make_chunk.c	2004-03-27 20:23:26.000000000 -0800
@@ -516,7 +516,7 @@
 	 */
 	dp.tsn = 0;
 	dp.stream = htons(sinfo->sinfo_stream);
-	dp.ppid   = htonl(sinfo->sinfo_ppid);
+	dp.ppid   = sinfo->sinfo_ppid;
 
 	/* Set the flags for an unordered send.  */
 	if (sinfo->sinfo_flags & MSG_UNORDERED) {
diff -urN linux-2.4.26-pre6/net/sctp/ulpevent.c linux-2.4.26-rc1/net/sctp/ulpevent.c
--- linux-2.4.26-pre6/net/sctp/ulpevent.c	2004-03-27 20:23:23.000000000 -0800
+++ linux-2.4.26-rc1/net/sctp/ulpevent.c	2004-03-27 20:23:26.000000000 -0800
@@ -663,7 +663,7 @@
 	 * for and this information is passed opaquely by the SCTP stack from
 	 * one end to the other.
 	 */
-	info->sinfo_ppid = ntohl(chunk->subh.data_hdr->ppid);
+	info->sinfo_ppid = chunk->subh.data_hdr->ppid;
 
 	/* Sockets API Extensions for SCTP
 	 * Section 5.2.2 SCTP Header Information Structure (SCTP_SNDRCV)
