## Automatically generated incremental diff
## From:   linux-2.5.69-bk9
## To:     linux-2.5.69-bk10
## Robot:  $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $

diff -urN linux-2.5.69-bk9/Makefile linux-2.5.69-bk10/Makefile
--- linux-2.5.69-bk9/Makefile	2003-05-15 04:44:26.000000000 -0700
+++ linux-2.5.69-bk10/Makefile	2003-05-15 04:44:35.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 5
 SUBLEVEL = 69
-EXTRAVERSION = -bk9
+EXTRAVERSION = -bk10
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
diff -urN linux-2.5.69-bk9/arch/arm/kernel/asm-offsets.c linux-2.5.69-bk10/arch/arm/kernel/asm-offsets.c
--- linux-2.5.69-bk9/arch/arm/kernel/asm-offsets.c	2003-05-04 16:53:02.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/kernel/asm-offsets.c	2003-05-15 04:44:35.000000000 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2001 Russell King
+ * Copyright (C) 1995-2003 Russell King
  *               2001-2002 Keith Owens
  *     
  * Generate definitions needed by assembly language modules.
@@ -24,12 +24,21 @@
 #if defined(__APCS_26__)
 #error Sorry, your compiler targets APCS-26 but this kernel requires APCS-32
 #endif
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 95)
-#error Sorry, your compiler is known to miscompile kernels.  Only use gcc 2.95.3 and later.
-#endif
-#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
-/* shame we can't detect the .1 or .2 releases */
-#warning GCC 2.95.2 and earlier miscompiles kernels.
+/*
+ * GCC 2.95.1, 2.95.2: ignores register clobber list in asm().
+ * GCC 3.0, 3.1: general bad code generation.
+ * GCC 3.2.0: incorrect function argument offset calculation.
+ * GCC 3.2.x: miscompiles NEW_AUX_ENT in fs/binfmt_elf.c
+ *            (http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=8896)
+ */
+#if __GNUC__ < 2 || \
+   (__GNUC__ == 2 && __GNUC_MINOR__ < 95) || \
+   (__GNUC__ == 2 && __GNUC_MINOR__ == 95 && __GNUC_PATCHLEVEL__ != 0 && \
+					     __GNUC_PATCHLEVEL__ < 3) || \
+   (__GNUC__ == 3 && __GNUC_MINOR__ < 2) || \
+   (__GNUC__ == 3 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ < 1)
+#error Your compiler is too buggy; it is known to miscompile kernels.
+#error    Known good compilers: 2.95.3, 2.95.4, 2.96, 3.2.2+PR8896
 #endif
 
 /* Use marker if you need to separate the values later */
@@ -62,7 +71,6 @@
   DEFINE(LPTE_EXEC,		L_PTE_EXEC);
   DEFINE(LPTE_DIRTY,		L_PTE_DIRTY);
   BLANK();
-  BLANK();
   DEFINE(PAGE_SZ,	       	PAGE_SIZE);
   BLANK();
   DEFINE(SYS_ERROR0,		0x9f0000);
diff -urN linux-2.5.69-bk9/arch/arm/kernel/calls.S linux-2.5.69-bk10/arch/arm/kernel/calls.S
--- linux-2.5.69-bk9/arch/arm/kernel/calls.S	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/kernel/calls.S	2003-05-15 04:44:35.000000000 -0700
@@ -1,7 +1,7 @@
 /*
- *  linux/arch/arm/lib/calls.h
+ *  linux/arch/arm/kernel/calls.S
  *
- *  Copyright (C) 1995-1998 Russell King
+ *  Copyright (C) 1995-2003 Russell King
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
diff -urN linux-2.5.69-bk9/arch/arm/kernel/entry-armv.S linux-2.5.69-bk10/arch/arm/kernel/entry-armv.S
--- linux-2.5.69-bk9/arch/arm/kernel/entry-armv.S	2003-05-04 16:53:09.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/kernel/entry-armv.S	2003-05-15 04:44:35.000000000 -0700
@@ -621,7 +621,7 @@
 		rsb	\irqstat, \irqnr, #0
 		and	\irqstat, \irqstat, \irqnr
 		clz	\irqnr, \irqstat
-		rsb	\irqnr, \irqnr, #23
+		rsb	\irqnr, \irqnr, #(31 - PXA_IRQ_SKIP)
 1001:
 		.endm
 
diff -urN linux-2.5.69-bk9/arch/arm/kernel/irq.c linux-2.5.69-bk10/arch/arm/kernel/irq.c
--- linux-2.5.69-bk9/arch/arm/kernel/irq.c	2003-05-04 16:52:48.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/kernel/irq.c	2003-05-15 04:44:35.000000000 -0700
@@ -58,6 +58,11 @@
 {
 }
 
+irqreturn_t no_action(int irq, void *dev_id, struct pt_regs *regs)
+{
+	return IRQ_NONE;
+}
+
 void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
 {
 	irq_err_count += 1;
@@ -222,6 +227,7 @@
 __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs)
 {
 	unsigned int status;
+	int retval = 0;
 
 	spin_unlock(&irq_controller_lock);
 
@@ -231,7 +237,7 @@
 	status = 0;
 	do {
 		status |= action->flags;
-		action->handler(irq, action->dev_id, regs);
+		retval |= action->handler(irq, action->dev_id, regs);
 		action = action->next;
 	} while (action);
 
@@ -239,6 +245,19 @@
 		add_interrupt_randomness(irq);
 
 	spin_lock_irq(&irq_controller_lock);
+
+	if (retval != 1) {
+		static int count = 100;
+		if (count) {
+			count--;
+			if (retval) {
+				printk("irq event %d: bogus retval mask %x\n",
+					irq, retval);
+			} else {
+				printk("irq %d: nobody cared\n", irq);
+			}
+		}
+	}
 }
 
 /*
@@ -606,7 +625,7 @@
  *	SA_SAMPLE_RANDOM	The interrupt can be used for entropy
  *
  */
-int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
+int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *),
 		 unsigned long irq_flags, const char * devname, void *dev_id)
 {
 	unsigned long retval;
diff -urN linux-2.5.69-bk9/arch/arm/kernel/pm.c linux-2.5.69-bk10/arch/arm/kernel/pm.c
--- linux-2.5.69-bk9/arch/arm/kernel/pm.c	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/kernel/pm.c	2003-05-15 04:44:35.000000000 -0700
@@ -16,10 +16,18 @@
 #include <asm/leds.h>
 #include <asm/system.h>
 
+/*
+ * Tell the linker that pm_do_suspend may not be present.
+ */
+extern int pm_do_suspend(void) __attribute__((weak));
+
 int suspend(void)
 {
 	int ret;
 
+	if (!pm_do_suspend)
+		return -ENOSYS;
+
 	/*
 	 * Suspend "legacy" devices.
 	 */
@@ -82,9 +90,26 @@
 }
 
 #ifdef CONFIG_SYSCTL
+/*
+ * We really want this to die.  It's a disgusting hack using unallocated
+ * sysctl numbers.  We should be using a real interface.
+ */
+
 #include <linux/init.h>
 #include <linux/sysctl.h>
 
+static int
+pm_sysctl_proc_handler(ctl_table *ctl, int write, struct file *filp,
+		       void *buffer, size_t *lenp)
+{
+	int ret = -EIO;
+	printk("PM: task %s (pid %d) uses deprecated sysctl PM interface\n",
+		current->comm, current->pid);
+	if (write)
+		ret = suspend();
+	return ret;
+}
+
 /*
  * This came from arch/arm/mach-sa1100/pm.c:
  * Copyright (c) 2001 Cliff Brake <cbrake@accelent.com>
@@ -102,13 +127,23 @@
 
 static struct ctl_table pm_table[] =
 {
-	{ACPI_S1_SLP_TYP, "suspend", NULL, 0, 0600, NULL, (proc_handler *)&suspend},
+	{
+		.ctl_name	= ACPI_S1_SLP_TYP,
+		.procname	= "suspend",
+		.mode		= 0200,
+		.proc_handler	= pm_sysctl_proc_handler,
+	},
 	{0}
 };
 
 static struct ctl_table pm_dir_table[] =
 {
-	{CTL_ACPI, "pm", NULL, 0, 0555, pm_table},
+	{
+		.ctl_name	= CTL_ACPI,
+		.procname	= "pm",
+		.mode		= 0555,
+		.child		= pm_table,
+	},
 	{0}
 };
 
diff -urN linux-2.5.69-bk9/arch/arm/kernel/ptrace.c linux-2.5.69-bk10/arch/arm/kernel/ptrace.c
--- linux-2.5.69-bk9/arch/arm/kernel/ptrace.c	2003-05-04 16:53:02.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/kernel/ptrace.c	2003-05-15 04:44:35.000000000 -0700
@@ -18,10 +18,12 @@
 #include <linux/ptrace.h>
 #include <linux/user.h>
 #include <linux/security.h>
+#include <linux/init.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
+#include <asm/traps.h>
 
 #include "ptrace.h"
 
@@ -32,7 +34,7 @@
  * in exit.c or in signal.c.
  */
 
-#if 1
+#if 0
 /*
  * Breakpoint SWI instruction: SWI &9F0001
  */
@@ -479,25 +481,47 @@
 {
 	siginfo_t info;
 
-	/*
-	 * The PC is always left pointing at the next instruction.  Fix this.
-	 */
-	regs->ARM_pc -= 4;
-
-	if (tsk->thread.debug.nsaved == 0)
-		printk(KERN_ERR "ptrace: bogus breakpoint trap\n");
-
 	ptrace_cancel_bpt(tsk);
 
 	info.si_signo = SIGTRAP;
 	info.si_errno = 0;
 	info.si_code  = TRAP_BRKPT;
-	info.si_addr  = (void *)instruction_pointer(regs) -
-			 (thumb_mode(regs) ? 2 : 4);
+	info.si_addr  = (void *)instruction_pointer(regs);
 
 	force_sig_info(SIGTRAP, &info, tsk);
 }
 
+static int break_trap(struct pt_regs *regs, unsigned int instr)
+{
+	ptrace_break(current, regs);
+	return 0;
+}
+
+static struct undef_hook arm_break_hook = {
+	.instr_mask	= 0x0fffffff,
+	.instr_val	= 0x07f001f0,
+	.cpsr_mask	= PSR_T_BIT,
+	.cpsr_val	= 0,
+	.fn		= break_trap,
+};
+
+static struct undef_hook thumb_break_hook = {
+	.instr_mask	= 0xffff,
+	.instr_val	= 0xde01,
+	.cpsr_mask	= PSR_T_BIT,
+	.cpsr_val	= PSR_T_BIT,
+	.fn		= break_trap,
+};
+
+static int __init ptrace_break_init(void)
+{
+	register_undef_hook(&arm_break_hook);
+	register_undef_hook(&thumb_break_hook);
+	return 0;
+}
+
+core_initcall(ptrace_break_init);
+
 /*
  * Read the word at offset "off" into the "struct user".  We
  * actually access the pt_regs stored on the kernel stack.
diff -urN linux-2.5.69-bk9/arch/arm/kernel/traps.c linux-2.5.69-bk10/arch/arm/kernel/traps.c
--- linux-2.5.69-bk9/arch/arm/kernel/traps.c	2003-05-04 16:53:13.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/kernel/traps.c	2003-05-15 04:44:35.000000000 -0700
@@ -34,7 +34,7 @@
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
-#include <asm/semaphore.h>
+#include <asm/traps.h>
 
 #include "ptrace.h"
 
@@ -240,17 +240,56 @@
     	die(str, regs, err);
 }
 
+static LIST_HEAD(undef_hook);
+static spinlock_t undef_lock = SPIN_LOCK_UNLOCKED;
+
+void register_undef_hook(struct undef_hook *hook)
+{
+	spin_lock_irq(&undef_lock);
+	list_add(&hook->node, &undef_hook);
+	spin_unlock_irq(&undef_lock);
+}
+
+void unregister_undef_hook(struct undef_hook *hook)
+{
+	spin_lock_irq(&undef_lock);
+	list_del(&hook->node);
+	spin_unlock_irq(&undef_lock);
+}
+
 asmlinkage void do_undefinstr(struct pt_regs *regs)
 {
-	unsigned long *pc;
+	unsigned int correction = thumb_mode(regs) ? 2 : 4;
+	unsigned int instr;
+	struct undef_hook *hook;
 	siginfo_t info;
+	void *pc;
 
 	/*
-	 * According to the ARM ARM, PC is 2 or 4 bytes ahead, depending
-	 * whether we're in Thumb mode or not.
+	 * According to the ARM ARM, PC is 2 or 4 bytes ahead,
+	 * depending whether we're in Thumb mode or not.
+	 * Correct this offset.
 	 */
-	regs->ARM_pc -= thumb_mode(regs) ? 2 : 4;
-	pc = (unsigned long *)instruction_pointer(regs);
+	regs->ARM_pc -= correction;
+
+	pc = (void *)instruction_pointer(regs);
+	if (thumb_mode(regs)) {
+		get_user(instr, (u16 *)pc);
+	} else {
+		get_user(instr, (u32 *)pc);
+	}
+
+	spin_lock_irq(&undef_lock);
+	list_for_each_entry(hook, &undef_hook, node) {
+		if ((instr & hook->instr_mask) == hook->instr_val &&
+		    (regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) {
+			if (hook->fn(regs, instr) == 0) {
+				spin_unlock_irq(&undef_lock);
+				return;
+			}
+		}
+	}
+	spin_unlock_irq(&undef_lock);
 
 #ifdef CONFIG_DEBUG_USER
 	printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n",
@@ -377,6 +416,7 @@
 		return 0;
 
 	case NR(breakpoint): /* SWI BREAK_POINT */
+		regs->ARM_pc -= thumb_mode(regs) ? 2 : 4;
 		ptrace_break(current, regs);
 		return regs->ARM_r0;
 
diff -urN linux-2.5.69-bk9/arch/arm/lib/copy_page.S linux-2.5.69-bk10/arch/arm/lib/copy_page.S
--- linux-2.5.69-bk9/arch/arm/lib/copy_page.S	2003-05-04 16:53:31.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/lib/copy_page.S	2003-05-15 04:44:35.000000000 -0700
@@ -13,11 +13,7 @@
 #include <asm/assembler.h>
 #include <asm/constants.h>
 
-#ifndef PLD
-#define COPY_COUNT PAGE_SZ/64
-#else
-#define COPY_COUNT PAGE_SZ/64-1
-#endif
+#define COPY_COUNT (PAGE_SZ/64 PLD( -1 ))
 
 		.text
 		.align	5
diff -urN linux-2.5.69-bk9/arch/arm/mach-footbridge/dc21285.c linux-2.5.69-bk10/arch/arm/mach-footbridge/dc21285.c
--- linux-2.5.69-bk9/arch/arm/mach-footbridge/dc21285.c	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/mach-footbridge/dc21285.c	2003-05-15 04:44:35.000000000 -0700
@@ -65,7 +65,7 @@
 		    int size, u32 *value)
 {
 	unsigned long addr = dc21285_base_address(bus, devfn);
-	u32 v;
+	u32 v = 0xffffffff;
 
 	if (addr)
 		switch (size) {
@@ -82,8 +82,6 @@
 				: "=r" (v) : "r" (addr), "r" (where));
 			break;
 		}
-	else
-		v = 0xffffffff;
 
 	*value = v;
 
@@ -154,7 +152,7 @@
 /*
  * Warn on PCI errors.
  */
-static void dc21285_abort_irq(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t dc21285_abort_irq(int irq, void *dev_id, struct pt_regs *regs)
 {
 	unsigned int cmd;
 	unsigned int status;
@@ -180,9 +178,11 @@
 	}
 
 	*CSR_PCICMD = cmd;
+
+	return IRQ_HANDLED;
 }
 
-static void dc21285_serr_irq(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t dc21285_serr_irq(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct timer_list *timer = dev_id;
 	unsigned int cntl;
@@ -200,15 +200,19 @@
 	disable_irq(irq);
 	timer->expires = jiffies + HZ;
 	add_timer(timer);
+
+	return IRQ_HANDLED;
 }
 
-static void dc21285_discard_irq(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t dc21285_discard_irq(int irq, void *dev_id, struct pt_regs *regs)
 {
 	printk(KERN_DEBUG "PCI: discard timer expired\n");
 	*CSR_SA110_CNTL &= 0xffffde07;
+
+	return IRQ_HANDLED;
 }
 
-static void dc21285_dparity_irq(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t dc21285_dparity_irq(int irq, void *dev_id, struct pt_regs *regs)
 {
 	unsigned int cmd;
 
@@ -218,9 +222,11 @@
 
 	cmd = *CSR_PCICMD & 0xffff;
 	*CSR_PCICMD = cmd | 1 << 24;
+
+	return IRQ_HANDLED;
 }
 
-static void dc21285_parity_irq(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t dc21285_parity_irq(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct timer_list *timer = dev_id;
 	unsigned int cmd;
@@ -238,6 +244,8 @@
 	disable_irq(irq);
 	timer->expires = jiffies + HZ;
 	add_timer(timer);
+
+	return IRQ_HANDLED;
 }
 
 int __init dc21285_setup(int nr, struct pci_sys_data *sys)
diff -urN linux-2.5.69-bk9/arch/arm/mach-integrator/mm.c linux-2.5.69-bk10/arch/arm/mach-integrator/mm.c
--- linux-2.5.69-bk9/arch/arm/mach-integrator/mm.c	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/mach-integrator/mm.c	2003-05-15 04:44:35.000000000 -0700
@@ -43,8 +43,6 @@
  * f1500000	15000000	RTC
  * f1600000	16000000	UART 0
  * f1700000	17000000	UART 1
- * f1800000	18000000	Keyboard
- * f1900000	19000000	Mouse
  * f1a00000	1a000000	Debug LEDs
  * f1b00000	1b000000	GPIO
  */
@@ -58,8 +56,6 @@
  { IO_ADDRESS(INTEGRATOR_RTC_BASE),   INTEGRATOR_RTC_BASE,   SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_UART0_BASE), INTEGRATOR_UART0_BASE, SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K,  MT_DEVICE },
- { IO_ADDRESS(INTEGRATOR_KBD_BASE),   INTEGRATOR_KBD_BASE,   SZ_4K,  MT_DEVICE },
- { IO_ADDRESS(INTEGRATOR_MOUSE_BASE), INTEGRATOR_MOUSE_BASE, SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_DBG_BASE),   INTEGRATOR_DBG_BASE,   SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_GPIO_BASE),  INTEGRATOR_GPIO_BASE,  SZ_4K,  MT_DEVICE },
  { PCI_MEMORY_VADDR,                  PHYS_PCI_MEM_BASE,     SZ_16M, MT_DEVICE },
diff -urN linux-2.5.69-bk9/arch/arm/mach-pxa/irq.c linux-2.5.69-bk10/arch/arm/mach-pxa/irq.c
--- linux-2.5.69-bk9/arch/arm/mach-pxa/irq.c	2003-05-04 16:53:41.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/mach-pxa/irq.c	2003-05-15 04:44:35.000000000 -0700
@@ -50,9 +50,9 @@
  * Use this instead of directly setting GRER/GFER.
  */
 
-static int GPIO_IRQ_rising_edge[3];
-static int GPIO_IRQ_falling_edge[3];
-static int GPIO_IRQ_mask[3];
+static long GPIO_IRQ_rising_edge[3];
+static long GPIO_IRQ_falling_edge[3];
+static long GPIO_IRQ_mask[3];
 
 static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
 {
@@ -189,7 +189,6 @@
 	.ack		= pxa_ack_muxed_gpio,
 	.mask		= pxa_mask_muxed_gpio,
 	.unmask		= pxa_unmask_muxed_gpio,
-	.rerun		= pxa_manual_rerun,
 	.type		= pxa_gpio_irq_type,
 };
 
@@ -217,21 +216,18 @@
 	/* GPIO 0 and 1 must have their mask bit always set */
 	GPIO_IRQ_mask[0] = 3;
 
+	for (irq = PXA_IRQ(PXA_IRQ_SKIP); irq <= PXA_IRQ(31); irq++) {
+		set_irq_chip(irq, &pxa_internal_chip);
+		set_irq_handler(irq, do_level_IRQ);
+		set_irq_flags(irq, IRQF_VALID);
+	}
+
 	for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
 		set_irq_chip(irq, &pxa_low_gpio_chip);
 		set_irq_handler(irq, do_edge_IRQ);
 		set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
 	}
 
-	for (irq = PXA_IRQ(11); irq <= PXA_IRQ(31); irq++) {
-		set_irq_chip(irq, &pxa_internal_chip);
-		set_irq_handler(irq, do_level_IRQ);
-		set_irq_flags(irq, IRQF_VALID);
-	}
-	/* Those are reserved */
-	set_irq_flags(PXA_IRQ(15), 0);
-	set_irq_flags(PXA_IRQ(16), 0);
-
 	for (irq = IRQ_GPIO(2); irq <= IRQ_GPIO(80); irq++) {
 		set_irq_chip(irq, &pxa_muxed_gpio_chip);
 		set_irq_handler(irq, do_edge_IRQ);
diff -urN linux-2.5.69-bk9/arch/arm/mach-pxa/lubbock.c linux-2.5.69-bk10/arch/arm/mach-pxa/lubbock.c
--- linux-2.5.69-bk9/arch/arm/mach-pxa/lubbock.c	2003-05-04 16:53:12.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/mach-pxa/lubbock.c	2003-05-15 04:44:35.000000000 -0700
@@ -33,57 +33,41 @@
 
 #include "generic.h"
 
-static void lubbock_ack_irq(unsigned int irq)
-{
-	int lubbock_irq = (irq - LUBBOCK_IRQ(0));
-	LUB_IRQ_SET_CLR &= ~(1 << lubbock_irq);
-}
+
+static unsigned long lubbock_irq_enabled;
 
 static void lubbock_mask_irq(unsigned int irq)
 {
 	int lubbock_irq = (irq - LUBBOCK_IRQ(0));
-	LUB_IRQ_MASK_EN &= ~(1 << lubbock_irq);
+	LUB_IRQ_MASK_EN = (lubbock_irq_enabled &= ~(1 << lubbock_irq));
 }
 
 static void lubbock_unmask_irq(unsigned int irq)
 {
 	int lubbock_irq = (irq - LUBBOCK_IRQ(0));
-	LUB_IRQ_MASK_EN |= (1 << lubbock_irq);
+	/* the irq can be acknowledged only if deasserted, so it's done here */
+	LUB_IRQ_SET_CLR &= ~(1 << lubbock_irq);
+	LUB_IRQ_MASK_EN = (lubbock_irq_enabled |= (1 << lubbock_irq));
 }
 
 static struct irqchip lubbock_irq_chip = {
-	.ack		= lubbock_ack_irq,
+	.ack		= lubbock_mask_irq,
 	.mask		= lubbock_mask_irq,
 	.unmask		= lubbock_unmask_irq,
 };
 
-void lubbock_irq_handler(unsigned int irq, struct irqdesc *desc,
-			 struct pt_regs *regs)
+static void lubbock_irq_handler(unsigned int irq, struct irqdesc *desc,
+				struct pt_regs *regs)
 {
-	unsigned int enabled, pending;
-
-	/* get active pending irq mask */
-	enabled = LUB_IRQ_MASK_EN & 0x003f;
-	pending = LUB_IRQ_SET_CLR & enabled;
-
+	unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled;
 	do {
-//printk("%s a: set_clr %#x, mask_en %#x LR/DR %d/%d\n", __FUNCTION__, LUB_IRQ_SET_CLR, LUB_IRQ_MASK_EN, GPLR(0)&1, GEDR(0)&1 );
-		/* clear our parent irq */
-		GEDR(0) = GPIO_bit(0);
-
-		/* process them */
-		irq = LUBBOCK_IRQ(0);
-		desc = irq_desc + irq;
-		do {
-			if (pending & 1)
-				desc->handle(irq, desc, regs);
-			irq++;
-			desc++;
-			pending >>= 1;
-		} while (pending);
-//printk("%s b: set_clr %#x, mask_en %#x LR/DR %d/%d\n", __FUNCTION__, LUB_IRQ_SET_CLR, LUB_IRQ_MASK_EN, GPLR(0)&1, GEDR(0)&1 );
-		enabled = LUB_IRQ_MASK_EN & 0x003f;
-		pending = LUB_IRQ_SET_CLR & enabled;
+		GEDR(0) = GPIO_bit(0);	/* clear our parent irq */
+		if (likely(pending)) {
+			irq = LUBBOCK_IRQ(0) + __ffs(pending);
+			desc = irq_desc + irq;
+			desc->handle(irq, desc, regs);
+		}
+		pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled;
 	} while (pending);
 }
 
diff -urN linux-2.5.69-bk9/arch/arm/mach-rpc/dma.c linux-2.5.69-bk10/arch/arm/mach-rpc/dma.c
--- linux-2.5.69-bk9/arch/arm/mach-rpc/dma.c	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/mach-rpc/dma.c	2003-05-15 04:44:35.000000000 -0700
@@ -83,7 +83,7 @@
 	sg->length |= flags;
 }
 
-static void iomd_dma_handle(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t iomd_dma_handle(int irq, void *dev_id, struct pt_regs *regs)
 {
 	dma_t *dma = (dma_t *)dev_id;
 	unsigned long base = dma->dma_base;
@@ -93,7 +93,7 @@
 
 		status = iomd_readb(base + ST);
 		if (!(status & DMA_ST_INT))
-			return;
+			return IRQ_HANDLED;
 
 		if (status & DMA_ST_OFL && !dma->sg)
 			break;
@@ -117,6 +117,8 @@
 
 	iomd_writeb(0, dma->dma_base + CR);
 	disable_irq(irq);
+
+	return IRQ_HANDLED;
 }
 
 static int iomd_request_dma(dmach_t channel, dma_t *dma)
diff -urN linux-2.5.69-bk9/arch/arm/mm/consistent.c linux-2.5.69-bk10/arch/arm/mm/consistent.c
--- linux-2.5.69-bk9/arch/arm/mm/consistent.c	2003-05-04 16:53:37.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/mm/consistent.c	2003-05-15 04:44:35.000000000 -0700
@@ -330,7 +330,7 @@
 core_initcall(consistent_init);
 
 /*
- * make an area consistent for devices.
+ * Make an area consistent for devices.
  */
 void consistent_sync(void *vaddr, size_t size, int direction)
 {
diff -urN linux-2.5.69-bk9/arch/arm/tools/mach-types linux-2.5.69-bk10/arch/arm/tools/mach-types
--- linux-2.5.69-bk9/arch/arm/tools/mach-types	2003-05-04 16:53:14.000000000 -0700
+++ linux-2.5.69-bk10/arch/arm/tools/mach-types	2003-05-15 04:44:35.000000000 -0700
@@ -6,7 +6,7 @@
 # To add an entry into this database, please see Documentation/arm/README,
 # or contact rmk@arm.linux.org.uk
 #
-# Last update: Sat Apr 26 11:41:41 2003
+# Last update: Wed May 7 23:43:08 2003
 #
 # machine_is_xxx	CONFIG_xxxx		MACH_TYPE_xxx		number
 #
@@ -328,3 +328,14 @@
 nipc2			ARCH_NIPC2		NIPC2			317
 fu7202			ARCH_FU7202		FU7202			318
 adsagx			ARCH_ADSAGX		ADSAGX			319
+pxa_pooh		ARCH_PXA_POOH		PXA_POOH		320
+bandon			ARCH_BANDON		BANDON			321
+pcm7210			ARCH_PCM7210		PCM7210			322
+nms9200			ARCH_NMS9200		NMS9200			323
+gealog			ARCH_GEALOG		GEALOG			324
+m7140			SA1100_M7140		M7140			325
+korebot			ARCH_KOREBOT		KOREBOT			326
+iq31244			ARCH_IQ31244		IQ31244			327
+koan393			SA1100_KOAN393		KOAN393			328
+inhandftip3		ARCH_INHANDFTIP3	INHANDFTIP3		329
+gonzo			ARCH_GONZO		GONZO			330
diff -urN linux-2.5.69-bk9/arch/i386/kernel/apm.c linux-2.5.69-bk10/arch/i386/kernel/apm.c
--- linux-2.5.69-bk9/arch/i386/kernel/apm.c	2003-05-15 04:44:26.000000000 -0700
+++ linux-2.5.69-bk10/arch/i386/kernel/apm.c	2003-05-15 04:44:35.000000000 -0700
@@ -1166,9 +1166,13 @@
 #endif
 }
 
-static inline void reinit_timer(void)
+static void reinit_timer(void)
 {
 #ifdef INIT_TIMER_AFTER_SUSPEND
+	unsigned long	flags;
+	extern spinlock_t i8253_lock;
+
+	spin_lock_irqsave(&i8253_lock, flags);
 	/* set the clock to 100 Hz */
 	outb_p(0x34, PIT_MODE);		/* binary, mode 2, LSB/MSB, ch 0 */
 	udelay(10);
@@ -1176,6 +1180,7 @@
 	udelay(10);
 	outb(LATCH >> 8, PIT_CH0);	/* MSB */
 	udelay(10);
+	spin_unlock_irqrestore(&i8253_lock, flags);
 #endif
 }
 
diff -urN linux-2.5.69-bk9/arch/i386/kernel/i8259.c linux-2.5.69-bk10/arch/i386/kernel/i8259.c
--- linux-2.5.69-bk9/arch/i386/kernel/i8259.c	2003-05-04 16:53:41.000000000 -0700
+++ linux-2.5.69-bk10/arch/i386/kernel/i8259.c	2003-05-15 04:44:35.000000000 -0700
@@ -373,11 +373,16 @@
 
 static void setup_timer(void)
 {
+	extern spinlock_t i8253_lock;
+	unsigned long flags;
+
+	spin_lock_irqsave(&i8253_lock, flags);
 	outb_p(0x34,PIT_MODE);		/* binary, mode 2, LSB/MSB, ch 0 */
 	udelay(10);
 	outb_p(LATCH & 0xff , PIT_CH0);	/* LSB */
 	udelay(10);
 	outb(LATCH >> 8 , PIT_CH0);	/* MSB */
+	spin_unlock_irqrestore(&i8253_lock, flags);
 }
 
 static int timer_resume(struct device *dev, u32 level)
diff -urN linux-2.5.69-bk9/arch/i386/kernel/msr.c linux-2.5.69-bk10/arch/i386/kernel/msr.c
--- linux-2.5.69-bk9/arch/i386/kernel/msr.c	2003-05-04 16:53:13.000000000 -0700
+++ linux-2.5.69-bk10/arch/i386/kernel/msr.c	2003-05-15 04:44:35.000000000 -0700
@@ -120,8 +120,6 @@
   preempt_disable();
   if ( cpu == smp_processor_id() ) {
     ret = wrmsr_eio(reg, eax, edx);
-    preempt_enable();
-    return ret;
   } else {
     cmd.cpu = cpu;
     cmd.reg = reg;
@@ -129,17 +127,20 @@
     cmd.data[1] = edx;
     
     smp_call_function(msr_smp_wrmsr, &cmd, 1, 1);
-    preempt_enable();
-    return cmd.err;
+    ret = cmd.err;
   }
+  preempt_enable();
+  return ret;
 }
 
 static inline int do_rdmsr(int cpu, u32 reg, u32 *eax, u32 *edx)
 {
   struct msr_command cmd;
+  int ret;
 
+  preempt_disable();
   if ( cpu == smp_processor_id() ) {
-    return rdmsr_eio(reg, eax, edx);
+    ret = rdmsr_eio(reg, eax, edx);
   } else {
     cmd.cpu = cpu;
     cmd.reg = reg;
@@ -149,8 +150,10 @@
     *eax = cmd.data[0];
     *edx = cmd.data[1];
 
-    return cmd.err;
+    ret = cmd.err;
   }
+  preempt_enable();
+  return ret;
 }
 
 #else /* ! CONFIG_SMP */
diff -urN linux-2.5.69-bk9/drivers/acorn/net/ether1.c linux-2.5.69-bk10/drivers/acorn/net/ether1.c
--- linux-2.5.69-bk9/drivers/acorn/net/ether1.c	2003-05-04 16:53:32.000000000 -0700
+++ linux-2.5.69-bk10/drivers/acorn/net/ether1.c	2003-05-15 04:44:35.000000000 -0700
@@ -68,7 +68,7 @@
 
 static int ether1_open(struct net_device *dev);
 static int ether1_sendpacket(struct sk_buff *skb, struct net_device *dev);
-static void ether1_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+static irqreturn_t ether1_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 static int ether1_close(struct net_device *dev);
 static struct net_device_stats *ether1_getstats(struct net_device *dev);
 static void ether1_setmulticastlist(struct net_device *dev);
@@ -908,7 +908,7 @@
 	} while (1);
 }
 
-static void
+static irqreturn_t
 ether1_interrupt (int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct net_device *dev = (struct net_device *)dev_id;
@@ -953,7 +953,9 @@
 						NORMALIRQS));
 		}
 	} else
-	        outb (CTRL_ACK, REG_CONTROL);
+		outb (CTRL_ACK, REG_CONTROL);
+
+	return IRQ_HANDLED;
 }
 
 static int
diff -urN linux-2.5.69-bk9/drivers/acorn/net/ether3.c linux-2.5.69-bk10/drivers/acorn/net/ether3.c
--- linux-2.5.69-bk9/drivers/acorn/net/ether3.c	2003-05-04 16:53:55.000000000 -0700
+++ linux-2.5.69-bk10/drivers/acorn/net/ether3.c	2003-05-15 04:44:35.000000000 -0700
@@ -82,7 +82,7 @@
 static void	ether3_tx(struct net_device *dev, struct dev_priv *priv);
 static int	ether3_open (struct net_device *dev);
 static int	ether3_sendpacket (struct sk_buff *skb, struct net_device *dev);
-static void	ether3_interrupt (int irq, void *dev_id, struct pt_regs *regs);
+static irqreturn_t ether3_interrupt (int irq, void *dev_id, struct pt_regs *regs);
 static int	ether3_close (struct net_device *dev);
 static struct net_device_stats *ether3_getstats (struct net_device *dev);
 static void	ether3_setmulticastlist (struct net_device *dev);
@@ -576,12 +576,12 @@
 	return 0;
 }
 
-static void
+static irqreturn_t
 ether3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct net_device *dev = (struct net_device *)dev_id;
 	struct dev_priv *priv;
-	unsigned int status;
+	unsigned int status, handled = IRQ_NONE;
 
 #if NET_DEBUG > 1
 	if(net_debug & DEBUG_INT)
@@ -595,17 +595,20 @@
 	if (status & STAT_INTRX) {
 		ether3_outw(CMD_ACKINTRX | priv->regs.command, REG_COMMAND);
 		ether3_rx(dev, priv, 12);
+		handled = IRQ_HANDLED;
 	}
 
 	if (status & STAT_INTTX) {
 		ether3_outw(CMD_ACKINTTX | priv->regs.command, REG_COMMAND);
 		ether3_tx(dev, priv);
+		handled = IRQ_HANDLED;
 	}
 
 #if NET_DEBUG > 1
 	if(net_debug & DEBUG_INT)
 		printk("done\n");
 #endif
+	return handled;
 }
 
 /*
diff -urN linux-2.5.69-bk9/drivers/acorn/scsi/acornscsi.c linux-2.5.69-bk10/drivers/acorn/scsi/acornscsi.c
--- linux-2.5.69-bk9/drivers/acorn/scsi/acornscsi.c	2003-05-15 04:44:26.000000000 -0700
+++ linux-2.5.69-bk10/drivers/acorn/scsi/acornscsi.c	2003-05-15 04:44:35.000000000 -0700
@@ -2466,18 +2466,14 @@
  *	      dev_id - device specific data (AS_Host structure)
  *	      regs   - processor registers when interrupt occurred
  */
-static
-void acornscsi_intr(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+acornscsi_intr(int irq, void *dev_id, struct pt_regs *regs)
 {
     AS_Host *host = (AS_Host *)dev_id;
     intr_ret_t ret;
     int iostatus;
     int in_irq = 0;
 
-    if (host->scsi.interrupt)
-	printk("scsi%d: interrupt re-entered\n", host->host->host_no);
-    host->scsi.interrupt = 1;
-
     do {
 	ret = INTR_IDLE;
 
@@ -2505,7 +2501,7 @@
 	in_irq = 1;
     } while (ret != INTR_IDLE);
 
-    host->scsi.interrupt = 0;
+    return IRQ_HANDLED;
 }
 
 /*=============================================================================================
diff -urN linux-2.5.69-bk9/drivers/acorn/scsi/cumana_2.c linux-2.5.69-bk10/drivers/acorn/scsi/cumana_2.c
--- linux-2.5.69-bk9/drivers/acorn/scsi/cumana_2.c	2003-05-15 04:44:26.000000000 -0700
+++ linux-2.5.69-bk10/drivers/acorn/scsi/cumana_2.c	2003-05-15 04:44:35.000000000 -0700
@@ -141,12 +141,12 @@
  *	      dev_id - user-defined (Scsi_Host structure)
  *	      regs   - processor registers at interrupt
  */
-static void
+static irqreturn_t
 cumanascsi_2_intr(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct cumanascsi2_info *info = dev_id;
 
-	fas216_intr(&info->info);
+	return fas216_intr(&info->info);
 }
 
 /* Prototype: fasdmatype_t cumanascsi_2_dma_setup(host, SCpnt, direction, min_type)
diff -urN linux-2.5.69-bk9/drivers/acorn/scsi/eesox.c linux-2.5.69-bk10/drivers/acorn/scsi/eesox.c
--- linux-2.5.69-bk9/drivers/acorn/scsi/eesox.c	2003-05-15 04:44:26.000000000 -0700
+++ linux-2.5.69-bk10/drivers/acorn/scsi/eesox.c	2003-05-15 04:44:35.000000000 -0700
@@ -141,12 +141,12 @@
  *	      dev_id - user-defined (Scsi_Host structure)
  *	      regs   - processor registers at interrupt
  */
-static void
+static irqreturn_t
 eesoxscsi_intr(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct eesoxscsi_info *info = dev_id;
 
-	fas216_intr(&info->info);
+	return fas216_intr(&info->info);
 }
 
 /* Prototype: fasdmatype_t eesoxscsi_dma_setup(host, SCpnt, direction, min_type)
diff -urN linux-2.5.69-bk9/drivers/acorn/scsi/fas216.c linux-2.5.69-bk10/drivers/acorn/scsi/fas216.c
--- linux-2.5.69-bk9/drivers/acorn/scsi/fas216.c	2003-05-04 16:53:13.000000000 -0700
+++ linux-2.5.69-bk10/drivers/acorn/scsi/fas216.c	2003-05-15 04:44:35.000000000 -0700
@@ -1824,9 +1824,10 @@
  *
  * Handle interrupts from the interface to progress a command
  */
-void fas216_intr(FAS216_Info *info)
+irqreturn_t fas216_intr(FAS216_Info *info)
 {
 	unsigned char isr, ssr, stat;
+	int handled = IRQ_NONE;
 
 	fas216_checkmagic(info);
 
@@ -1857,7 +1858,9 @@
 		    	fas216_log(info, 0, "unknown interrupt received:"
 				" phase %s isr %02X ssr %02X stat %02X",
 				fas216_drv_phase(info), isr, ssr, stat);
+		handled = IRQ_HANDLED;
 	}
+	return handled;
 }
 
 static void __fas216_start_command(FAS216_Info *info, Scsi_Cmnd *SCpnt)
diff -urN linux-2.5.69-bk9/drivers/acorn/scsi/fas216.h linux-2.5.69-bk10/drivers/acorn/scsi/fas216.h
--- linux-2.5.69-bk9/drivers/acorn/scsi/fas216.h	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/drivers/acorn/scsi/fas216.h	2003-05-15 04:44:35.000000000 -0700
@@ -351,11 +351,11 @@
  */
 extern int fas216_command (Scsi_Cmnd *);
 
-/* Function: void fas216_intr (FAS216_Info *info)
+/* Function: irqreturn_t fas216_intr (FAS216_Info *info)
  * Purpose : handle interrupts from the interface to progress a command
  * Params  : info - interface to service
  */
-extern void fas216_intr (FAS216_Info *info);
+extern irqreturn_t fas216_intr (FAS216_Info *info);
 
 extern void fas216_remove (struct Scsi_Host *instance);
 
diff -urN linux-2.5.69-bk9/drivers/acorn/scsi/powertec.c linux-2.5.69-bk10/drivers/acorn/scsi/powertec.c
--- linux-2.5.69-bk9/drivers/acorn/scsi/powertec.c	2003-05-15 04:44:26.000000000 -0700
+++ linux-2.5.69-bk10/drivers/acorn/scsi/powertec.c	2003-05-15 04:44:35.000000000 -0700
@@ -113,12 +113,12 @@
  *	      dev_id - user-defined (Scsi_Host structure)
  *	      regs   - processor registers at interrupt
  */
-static void
+static irqreturn_t
 powertecscsi_intr(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct powertec_info *info = dev_id;
 
-	fas216_intr(&info->info);
+	return fas216_intr(&info->info);
 }
 
 /* Prototype: fasdmatype_t powertecscsi_dma_setup(host, SCpnt, direction, min_type)
diff -urN linux-2.5.69-bk9/drivers/block/ll_rw_blk.c linux-2.5.69-bk10/drivers/block/ll_rw_blk.c
--- linux-2.5.69-bk9/drivers/block/ll_rw_blk.c	2003-05-15 04:44:26.000000000 -0700
+++ linux-2.5.69-bk10/drivers/block/ll_rw_blk.c	2003-05-15 04:44:36.000000000 -0700
@@ -1616,7 +1616,8 @@
 
 	sector = bio->bi_sector;
 	nr_sectors = bio_sectors(bio);
-	cur_nr_sectors = bio_iovec(bio)->bv_len >> 9;
+	cur_nr_sectors = bio_cur_sectors(bio);
+
 	rw = bio_data_dir(bio);
 
 	/*
@@ -1672,7 +1673,10 @@
 			}
 
 			bio->bi_next = req->bio;
-			req->bio = bio;
+			req->cbio = req->bio = bio;
+			req->nr_cbio_segments = bio_segments(bio);
+			req->nr_cbio_sectors = bio_sectors(bio);
+
 			/*
 			 * may not be valid. if the low level driver said
 			 * it didn't need a bounce buffer then it better
@@ -1740,9 +1744,11 @@
 	req->current_nr_sectors = req->hard_cur_sectors = cur_nr_sectors;
 	req->nr_phys_segments = bio_phys_segments(q, bio);
 	req->nr_hw_segments = bio_hw_segments(q, bio);
+	req->nr_cbio_segments = bio_segments(bio);
+	req->nr_cbio_sectors = bio_sectors(bio);
 	req->buffer = bio_data(bio);	/* see ->buffer comment above */
 	req->waiting = NULL;
-	req->bio = req->biotail = bio;
+	req->cbio = req->bio = req->biotail = bio;
 	req->rq_disk = bio->bi_bdev->bd_disk;
 	req->start_time = jiffies;
 
@@ -1914,6 +1920,81 @@
 	return 1;
 }
 
+/**
+ * blk_rq_next_segment
+ * @rq:		the request being processed
+ *
+ * Description:
+ *	Points to the next segment in the request if the current segment
+ *	is complete. Leaves things unchanged if this segment is not over
+ *	or if no more segments are left in this request.
+ *
+ *	Meant to be used for bio traversal during I/O submission
+ *	Does not affect any I/O completions or update completion state
+ *	in the request, and does not modify any bio fields.
+ *
+ *	Decrementing rq->nr_sectors, rq->current_nr_sectors and
+ *	rq->nr_cbio_sectors as data is transferred is the caller's
+ *	responsibility and should be done before calling this routine.
+ **/
+void blk_rq_next_segment(struct request *rq)
+{
+	if (rq->current_nr_sectors > 0)
+		return;
+
+	if (rq->nr_cbio_sectors > 0) {
+		--rq->nr_cbio_segments;
+		rq->current_nr_sectors = blk_rq_vec(rq)->bv_len >> 9;
+	} else {
+		if ((rq->cbio = rq->cbio->bi_next)) {
+			rq->nr_cbio_segments = bio_segments(rq->cbio);
+			rq->nr_cbio_sectors = bio_sectors(rq->cbio);
+ 			rq->current_nr_sectors = bio_cur_sectors(rq->cbio);
+		}
+ 	}
+
+	/* remember the size of this segment before we start I/O */
+	rq->hard_cur_sectors = rq->current_nr_sectors;
+}
+
+/**
+ * process_that_request_first	-	process partial request submission
+ * @req:	the request being processed
+ * @nr_sectors:	number of sectors I/O has been submitted on
+ *
+ * Description:
+ *	May be used for processing bio's while submitting I/O without
+ *	signalling completion. Fails if more data is requested than is
+ *	available in the request in which case it doesn't advance any
+ *	pointers.
+ *
+ *	Assumes a request is correctly set up. No sanity checks.
+ *
+ * Return:
+ *	0 - no more data left to submit (not processed)
+ *	1 - data available to submit for this request (processed)
+ **/
+int process_that_request_first(struct request *req, unsigned int nr_sectors)
+{
+	unsigned int nsect;
+
+	if (req->nr_sectors < nr_sectors)
+		return 0;
+
+	req->nr_sectors -= nr_sectors;
+	req->sector += nr_sectors;
+	while (nr_sectors) {
+		nsect = min_t(unsigned, req->current_nr_sectors, nr_sectors);
+		req->current_nr_sectors -= nsect;
+		nr_sectors -= nsect;
+		if (req->cbio) {
+			req->nr_cbio_sectors -= nsect;
+			blk_rq_next_segment(req);
+		}
+	}
+	return 1;
+}
+
 void blk_recalc_rq_segments(struct request *rq)
 {
 	struct bio *bio;
@@ -1922,8 +2003,6 @@
 	if (!rq->bio)
 		return;
 
-	rq->buffer = bio_data(rq->bio);
-
 	nr_phys_segs = nr_hw_segs = 0;
 	rq_for_each_bio(bio, rq) {
 		/* Force bio hw/phys segs to be recalculated. */
@@ -1941,11 +2020,24 @@
 {
 	if (blk_fs_request(rq)) {
 		rq->hard_sector += nsect;
-		rq->nr_sectors = rq->hard_nr_sectors -= nsect;
-		rq->sector = rq->hard_sector;
+		rq->hard_nr_sectors -= nsect;
 
-		rq->current_nr_sectors = bio_iovec(rq->bio)->bv_len >> 9;
-		rq->hard_cur_sectors = rq->current_nr_sectors;
+		/*
+		 * Move the I/O submission pointers ahead if required,
+		 * i.e. for drivers not aware of rq->cbio.
+		 */
+		if ((rq->nr_sectors >= rq->hard_nr_sectors) &&
+		    (rq->sector <= rq->hard_sector)) {
+			rq->sector = rq->hard_sector;
+			rq->nr_sectors = rq->hard_nr_sectors;
+			rq->hard_cur_sectors = bio_cur_sectors(rq->bio);
+			rq->current_nr_sectors = rq->hard_cur_sectors;
+			rq->nr_cbio_segments = bio_segments(rq->bio);
+			rq->nr_cbio_sectors = bio_sectors(rq->bio);
+			rq->buffer = bio_data(rq->bio);
+
+			rq->cbio = rq->bio;
+		}
 
 		/*
 		 * if total number of sectors is less than the first segment
@@ -2139,9 +2231,27 @@
 	rq->current_nr_sectors = bio_cur_sectors(bio);
 	rq->hard_cur_sectors = rq->current_nr_sectors;
 	rq->hard_nr_sectors = rq->nr_sectors = bio_sectors(bio);
+	rq->nr_cbio_segments = bio_segments(bio);
+	rq->nr_cbio_sectors = bio_sectors(bio);
 	rq->buffer = bio_data(bio);
 
-	rq->bio = rq->biotail = bio;
+	rq->cbio = rq->bio = rq->biotail = bio;
+}
+
+void blk_rq_prep_restart(struct request *rq)
+{
+	struct bio *bio;
+
+	bio = rq->cbio = rq->bio;
+	if (bio) {
+		rq->nr_cbio_segments = bio_segments(bio);
+		rq->nr_cbio_sectors = bio_sectors(bio);
+		rq->hard_cur_sectors = bio_cur_sectors(bio);
+		rq->buffer = bio_data(bio);
+	}
+	rq->sector = rq->hard_sector;
+	rq->nr_sectors = rq->hard_nr_sectors;
+	rq->current_nr_sectors = rq->hard_cur_sectors;
 }
 
 int __init blk_dev_init(void)
@@ -2169,6 +2279,7 @@
 	return 0;
 };
 
+EXPORT_SYMBOL(process_that_request_first);
 EXPORT_SYMBOL(end_that_request_first);
 EXPORT_SYMBOL(end_that_request_chunk);
 EXPORT_SYMBOL(end_that_request_last);
diff -urN linux-2.5.69-bk9/drivers/block/scsi_ioctl.c linux-2.5.69-bk10/drivers/block/scsi_ioctl.c
--- linux-2.5.69-bk9/drivers/block/scsi_ioctl.c	2003-05-15 04:44:26.000000000 -0700
+++ linux-2.5.69-bk10/drivers/block/scsi_ioctl.c	2003-05-15 04:44:36.000000000 -0700
@@ -212,7 +212,7 @@
 		}
 	}
 
-	rq = blk_get_request(q, WRITE, __GFP_WAIT);
+	rq = blk_get_request(q, writing ? WRITE : READ, __GFP_WAIT);
 
 	/*
 	 * fill in request structure
@@ -227,8 +227,6 @@
 	rq->sense_len = 0;
 
 	rq->flags |= REQ_BLOCK_PC;
-	if (writing)
-		rq->flags |= REQ_RW;
 
 	rq->hard_nr_sectors = rq->nr_sectors = nr_sectors;
 	rq->hard_cur_sectors = rq->current_nr_sectors = nr_sectors;
@@ -329,7 +327,7 @@
 		memset(buffer, 0, bytes);
 	}
 
-	rq = blk_get_request(q, WRITE, __GFP_WAIT);
+	rq = blk_get_request(q, in_len ? WRITE : READ, __GFP_WAIT);
 
 	cmdlen = COMMAND_SIZE(opcode);
 
@@ -373,8 +371,6 @@
 	rq->data = buffer;
 	rq->data_len = bytes;
 	rq->flags |= REQ_BLOCK_PC;
-	if (in_len)
-		rq->flags |= REQ_RW;
 
 	blk_do_rq(q, bdev, rq);
 	err = rq->errors & 0xff;	/* only 8 bit SCSI status */
diff -urN linux-2.5.69-bk9/drivers/char/nwbutton.c linux-2.5.69-bk10/drivers/char/nwbutton.c
--- linux-2.5.69-bk9/drivers/char/nwbutton.c	2003-05-04 16:53:42.000000000 -0700
+++ linux-2.5.69-bk10/drivers/char/nwbutton.c	2003-05-15 04:44:38.000000000 -0700
@@ -146,7 +146,7 @@
  *  increments the counter.
  */ 
 
-static void button_handler (int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t button_handler (int irq, void *dev_id, struct pt_regs *regs)
 {
 	if (button_press_count) {
 		del_timer (&button_timer);
@@ -156,6 +156,8 @@
 	button_timer.function = button_sequence_finished;
 	button_timer.expires = (jiffies + bdelay);
 	add_timer (&button_timer);
+
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/drivers/char/sx.c linux-2.5.69-bk10/drivers/char/sx.c
--- linux-2.5.69-bk9/drivers/char/sx.c	2003-05-04 16:53:13.000000000 -0700
+++ linux-2.5.69-bk10/drivers/char/sx.c	2003-05-15 04:44:38.000000000 -0700
@@ -1739,8 +1739,10 @@
 				if (copy_from_user(tmp, (char *)data + i, 
 						   (i + SX_CHUNK_SIZE >
 						    nbytes) ? nbytes - i :
-						   	      SX_CHUNK_SIZE))
+						   	      SX_CHUNK_SIZE)) {
+					kfree (tmp);
 					return -EFAULT;
+				}
 				memcpy_toio    ((char *) (board->base2 + offset + i), tmp, 
 				                (i+SX_CHUNK_SIZE>nbytes)?nbytes-i:SX_CHUNK_SIZE);
 			}
diff -urN linux-2.5.69-bk9/drivers/char/tty_ioctl.c linux-2.5.69-bk10/drivers/char/tty_ioctl.c
--- linux-2.5.69-bk9/drivers/char/tty_ioctl.c	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/drivers/char/tty_ioctl.c	2003-05-15 04:44:38.000000000 -0700
@@ -394,7 +394,7 @@
 				return -EFAULT;
 			return 0;
 		case TCSETSF:
-			return set_termios(real_tty, arg,  TERMIOS_FLUSH);
+			return set_termios(real_tty, arg,  TERMIOS_FLUSH | TERMIOS_WAIT);
 		case TCSETSW:
 			return set_termios(real_tty, arg, TERMIOS_WAIT);
 		case TCSETS:
@@ -402,7 +402,7 @@
 		case TCGETA:
 			return get_termio(real_tty,(struct termio *) arg);
 		case TCSETAF:
-			return set_termios(real_tty, arg, TERMIOS_FLUSH | TERMIOS_TERMIO);
+			return set_termios(real_tty, arg, TERMIOS_FLUSH | TERMIOS_WAIT | TERMIOS_TERMIO);
 		case TCSETAW:
 			return set_termios(real_tty, arg, TERMIOS_WAIT | TERMIOS_TERMIO);
 		case TCSETA:
diff -urN linux-2.5.69-bk9/drivers/char/watchdog/pcwd.c linux-2.5.69-bk10/drivers/char/watchdog/pcwd.c
--- linux-2.5.69-bk9/drivers/char/watchdog/pcwd.c	2003-05-04 16:53:01.000000000 -0700
+++ linux-2.5.69-bk10/drivers/char/watchdog/pcwd.c	2003-05-15 04:44:38.000000000 -0700
@@ -594,6 +594,7 @@
  
 static int __init pcwatchdog_init(void)
 {
+	char *firmware;
 	int i, found = 0;
 	pcwd_validate_timeout();
 	spin_lock_init(&io_lock);
@@ -633,10 +634,12 @@
 
 	if (revision == PCWD_REVISION_A)
 		printk(KERN_INFO "pcwd: PC Watchdog (REV.A) detected at port 0x%03x\n", current_readport);
-	else if (revision == PCWD_REVISION_C)
+	else if (revision == PCWD_REVISION_C) {
+		firmware = get_firmware();
 		printk(KERN_INFO "pcwd: PC Watchdog (REV.C) detected at port 0x%03x (Firmware version: %s)\n",
-			current_readport, get_firmware());
-	else {
+			current_readport, firmware);
+		kfree(firmware);
+	} else {
 		/* Should NEVER happen, unless get_revision() fails. */
 		printk("pcwd: Unable to get revision.\n");
 		return -1;
diff -urN linux-2.5.69-bk9/drivers/ide/ide-cd.c linux-2.5.69-bk10/drivers/ide/ide-cd.c
--- linux-2.5.69-bk9/drivers/ide/ide-cd.c	2003-05-15 04:44:27.000000000 -0700
+++ linux-2.5.69-bk10/drivers/ide/ide-cd.c	2003-05-15 04:44:39.000000000 -0700
@@ -2070,6 +2070,7 @@
 
 	req.sense = sense;
 	req.cmd[0] = GPCMD_TEST_UNIT_READY;
+	req.flags |= REQ_QUIET;
 
 #if ! STANDARD_ATAPI
         /* the Sanyo 3 CD changer uses byte 7 of TEST_UNIT_READY to 
diff -urN linux-2.5.69-bk9/drivers/ide/ide-disk.c linux-2.5.69-bk10/drivers/ide/ide-disk.c
--- linux-2.5.69-bk9/drivers/ide/ide-disk.c	2003-05-04 16:53:13.000000000 -0700
+++ linux-2.5.69-bk10/drivers/ide/ide-disk.c	2003-05-15 04:44:39.000000000 -0700
@@ -1479,7 +1479,7 @@
 
 static int set_lba_addressing (ide_drive_t *drive, int arg)
 {
-	return (probe_lba_addressing(drive, arg));
+	return probe_lba_addressing(drive, arg);
 }
 
 static void idedisk_add_settings(ide_drive_t *drive)
@@ -1566,6 +1566,18 @@
 
 	(void) probe_lba_addressing(drive, 1);
 
+	if (drive->addressing == 1) {
+		ide_hwif_t *hwif = HWIF(drive);
+		int max_s = 2048;
+
+		if (max_s > hwif->rqsize)
+			max_s = hwif->rqsize;
+
+		blk_queue_max_sectors(&drive->queue, max_s);
+	}
+
+	printk("%s: max request size: %dKiB\n", drive->name, drive->queue.max_sectors / 2);
+
 	/* Extract geometry if we did not already have one for the drive */
 	if (!drive->cyl || !drive->head || !drive->sect) {
 		drive->cyl     = drive->bios_cyl  = id->cyls;
diff -urN linux-2.5.69-bk9/drivers/ide/ide-probe.c linux-2.5.69-bk10/drivers/ide/ide-probe.c
--- linux-2.5.69-bk9/drivers/ide/ide-probe.c	2003-05-15 04:44:27.000000000 -0700
+++ linux-2.5.69-bk10/drivers/ide/ide-probe.c	2003-05-15 04:44:39.000000000 -0700
@@ -998,6 +998,7 @@
 static void ide_init_queue(ide_drive_t *drive)
 {
 	request_queue_t *q = &drive->queue;
+	ide_hwif_t *hwif = HWIF(drive);
 	int max_sectors = 256;
 
 	/*
@@ -1013,8 +1014,10 @@
 	drive->queue_setup = 1;
 	blk_queue_segment_boundary(q, 0xffff);
 
-	if (HWIF(drive)->rqsize)
-		max_sectors = HWIF(drive)->rqsize;
+	if (!hwif->rqsize)
+		hwif->rqsize = hwif->addressing ? 256 : 65536;
+	if (hwif->rqsize < max_sectors)
+		max_sectors = hwif->rqsize;
 	blk_queue_max_sectors(q, max_sectors);
 
 	/* IDE DMA can do PRD_ENTRIES number of segments. */
diff -urN linux-2.5.69-bk9/drivers/ide/ide-tcq.c linux-2.5.69-bk10/drivers/ide/ide-tcq.c
--- linux-2.5.69-bk9/drivers/ide/ide-tcq.c	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/drivers/ide/ide-tcq.c	2003-05-15 04:44:40.000000000 -0700
@@ -51,9 +51,58 @@
  */
 #undef IDE_TCQ_FIDDLE_SI
 
+/*
+ * bad drive blacklist, for drives that raport tcq capability but don't
+ * work reliably with the default config. initially from freebsd table.
+ */
+struct ide_tcq_blacklist {
+	char *model;
+	char works;
+	unsigned int max_sectors;
+};
+
+static struct ide_tcq_blacklist ide_tcq_blacklist[] = {
+	{
+		.model =	"IBM-DTTA",
+		.works =	1,
+		.max_sectors =	128,
+	},
+	{
+		.model =	"IBM-DJNA",
+		.works =	0,
+	},
+	{
+		.model =	"WDC AC",
+		.works = 	0,
+	},
+	{
+		.model =	NULL,
+	},
+};
+
 ide_startstop_t ide_dmaq_intr(ide_drive_t *drive);
 ide_startstop_t ide_service(ide_drive_t *drive);
 
+static struct ide_tcq_blacklist *ide_find_drive_blacklist(ide_drive_t *drive)
+{
+	struct ide_tcq_blacklist *itb;
+	int i = 0;
+
+	do {
+		itb = &ide_tcq_blacklist[i];
+
+		if (!itb->model)
+			break;
+
+		if (!strncmp(drive->id->model, itb->model, strlen(itb->model)))
+			return itb;
+
+		i++;
+	} while (1);
+
+	return NULL;
+}
+
 static inline void drive_ctl_nien(ide_drive_t *drive, int set)
 {
 #ifdef IDE_TCQ_NIEN
@@ -502,7 +551,7 @@
 	return 0;
 err:
 	kfree(args);
-	return 1;
+	return -EIO;
 }
 
 /*
@@ -511,6 +560,7 @@
  */
 static int ide_enable_queued(ide_drive_t *drive, int on)
 {
+	struct ide_tcq_blacklist *itb;
 	int depth = drive->using_tcq ? drive->queue_depth : 0;
 
 	/*
@@ -530,6 +580,17 @@
 	}
 
 	/*
+	 * some drives need limited transfer size in tcq
+	 */
+	itb = ide_find_drive_blacklist(drive);
+	if (itb && itb->max_sectors) {
+		if (itb->max_sectors > HWIF(drive)->rqsize)
+			itb->max_sectors = HWIF(drive)->rqsize;
+
+		blk_queue_max_sectors(&drive->queue, itb->max_sectors);
+	}
+
+	/*
 	 * enable block tagging
 	 */
 	if (!blk_queue_tagged(&drive->queue))
@@ -582,13 +643,36 @@
 	return 0;
 }
 
+static int ide_tcq_check_blacklist(ide_drive_t *drive)
+{
+	struct ide_tcq_blacklist *itb = ide_find_drive_blacklist(drive);
+
+	if (!itb)
+		return 0;
+
+	return !itb->works;
+}
+
 int __ide_dma_queued_on(ide_drive_t *drive)
 {
 	if (!drive->using_dma)
 		return 1;
+	if (HWIF(drive)->chipset == ide_pdc4030)
+		return 1;
+	if (ide_tcq_check_blacklist(drive)) {
+		printk(KERN_WARNING "%s: tcq forbidden by blacklist\n",
+					drive->name);
+		return 1;
+	}
+	if (drive->next != drive) {
+		printk(KERN_WARNING "%s: only one drive on a channel supported"
+					" for tcq\n", drive->name);
+		return 1;
+	}
 
 	if (ata_pending_commands(drive)) {
-		printk(KERN_WARNING "ide-tcq; can't toggle tcq feature on busy drive\n");
+		printk(KERN_WARNING "ide-tcq; can't toggle tcq feature on "
+					"busy drive\n");
 		return 1;
 	}
 
diff -urN linux-2.5.69-bk9/drivers/input/mouse/rpcmouse.c linux-2.5.69-bk10/drivers/input/mouse/rpcmouse.c
--- linux-2.5.69-bk9/drivers/input/mouse/rpcmouse.c	2003-05-04 16:53:14.000000000 -0700
+++ linux-2.5.69-bk10/drivers/input/mouse/rpcmouse.c	2003-05-15 04:44:40.000000000 -0700
@@ -49,7 +49,7 @@
 	},
 };
 
-static void rpcmouse_irq(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t rpcmouse_irq(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct input_dev *dev = dev_id;
 	short x, y, dx, dy, b;
@@ -74,6 +74,8 @@
 	input_report_key(dev, BTN_RIGHT,  b & 0x10);
 
 	input_sync(dev);
+
+	return IRQ_HANDLED;
 }
 
 static int __init rpcmouse_init(void)
diff -urN linux-2.5.69-bk9/drivers/input/serio/ambakmi.c linux-2.5.69-bk10/drivers/input/serio/ambakmi.c
--- linux-2.5.69-bk9/drivers/input/serio/ambakmi.c	2003-05-04 16:53:33.000000000 -0700
+++ linux-2.5.69-bk10/drivers/input/serio/ambakmi.c	2003-05-15 04:44:40.000000000 -0700
@@ -28,22 +28,27 @@
 struct amba_kmi_port {
 	struct serio		io;
 	struct amba_kmi_port	*next;
-	unsigned long		base;
+	void			*base;
 	unsigned int		irq;
 	unsigned int		divisor;
 	char			name[32];
 	char			phys[16];
+	struct resource		*res;
 };
 
-static void amba_kmi_int(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t amba_kmi_int(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct amba_kmi_port *kmi = dev_id;
-	unsigned int status = __raw_readb(KMIIR);
+	unsigned int status = readb(KMIIR);
+	int handled = IRQ_NONE;
 
 	while (status & KMIIR_RXINTR) {
-		serio_interrupt(&kmi->io, __raw_readb(KMIDATA), 0, regs);
-		status = __raw_readb(KMIIR);
+		serio_interrupt(&kmi->io, readb(KMIDATA), 0, regs);
+		status = readb(KMIIR);
+		handled = IRQ_HANDLED;
 	}
+
+	return handled;
 }
 
 static int amba_kmi_write(struct serio *io, unsigned char val)
@@ -51,11 +56,11 @@
 	struct amba_kmi_port *kmi = io->driver;
 	unsigned int timeleft = 10000; /* timeout in 100ms */
 
-	while ((__raw_readb(KMISTAT) & KMISTAT_TXEMPTY) == 0 && timeleft--)
+	while ((readb(KMISTAT) & KMISTAT_TXEMPTY) == 0 && timeleft--)
 		udelay(10);
 
 	if (timeleft)
-		__raw_writeb(val, KMIDATA);
+		writeb(val, KMIDATA);
 
 	return timeleft ? 0 : SERIO_TIMEOUT;
 }
@@ -65,17 +70,17 @@
 	struct amba_kmi_port *kmi = io->driver;
 	int ret;
 
-	__raw_writeb(kmi->divisor, KMICLKDIV);
-	__raw_writeb(KMICR_EN, KMICR);
+	writeb(kmi->divisor, KMICLKDIV);
+	writeb(KMICR_EN, KMICR);
 
 	ret = request_irq(kmi->irq, amba_kmi_int, 0, kmi->phys, kmi);
 	if (ret) {
 		printk(KERN_ERR "kmi: failed to claim IRQ%d\n", kmi->irq);
-		__raw_writeb(0, KMICR);
+		writeb(0, KMICR);
 		return ret;
 	}
 
-	__raw_writeb(KMICR_EN | KMICR_RXINTREN, KMICR);
+	writeb(KMICR_EN | KMICR_RXINTREN, KMICR);
 
 	return 0;
 }
@@ -84,9 +89,9 @@
 {
 	struct amba_kmi_port *kmi = io->driver;
 
-	free_irq(kmi->irq, kmi);
+	writeb(0, KMICR);
 
-	__raw_writeb(0, KMICR);
+	free_irq(kmi->irq, kmi);
 }
 
 static struct amba_kmi_port *list;
@@ -109,24 +114,36 @@
 	kmi->io.phys	= kmi->phys;
 	kmi->io.driver	= kmi;
 
-	kmi->base	= base;
+	snprintf(kmi->name, sizeof(kmi->name), "AMBA KMI PS/2 %s port", type);
+	snprintf(kmi->phys, sizeof(kmi->phys), "amba/serio%d", nr);
+
+	kmi->res	= request_mem_region(base, KMI_SIZE, kmi->phys);
+	if (!kmi->res) {
+		kfree(kmi);
+		return -EBUSY;
+	}
+
+	kmi->base	= ioremap(base, KMI_SIZE);
+	if (!kmi->base) {
+		release_resource(kmi->res);
+		kfree(kmi);
+		return -ENOMEM;
+	}
+
 	kmi->irq	= irq;
 	kmi->divisor	= 24 / 8 - 1;
 
 	kmi->next	= list;
 	list		= kmi;
 
-	snprintf(kmi->name, sizeof(kmi->name), "AMBA KMI PS/2 %s port", type);
-	snprintf(kmi->phys, sizeof(kmi->phys), "amba/serio%d", nr);
-
 	serio_register_port(&kmi->io);
 	return 0;
 }
 
 static int __init amba_kmi_init(void)
 {
-	amba_kmi_init_one("keyboard", IO_ADDRESS(KMI0_BASE), IRQ_KMIINT0, 0);
-	amba_kmi_init_one("mouse", IO_ADDRESS(KMI1_BASE), IRQ_KMIINT1, 1);
+	amba_kmi_init_one("keyboard", KMI0_BASE, IRQ_KMIINT0, 0);
+	amba_kmi_init_one("mouse", KMI1_BASE, IRQ_KMIINT1, 1);
 	return 0;
 }
 
@@ -139,6 +156,8 @@
 		next = kmi->next;
 
 		serio_unregister_port(&kmi->io);
+		iounmap(kmi->base);
+		release_resource(kmi->res);
 		kfree(kmi);
 
 		kmi = next;
diff -urN linux-2.5.69-bk9/drivers/input/serio/rpckbd.c linux-2.5.69-bk10/drivers/input/serio/rpckbd.c
--- linux-2.5.69-bk9/drivers/input/serio/rpckbd.c	2003-05-04 16:53:00.000000000 -0700
+++ linux-2.5.69-bk10/drivers/input/serio/rpckbd.c	2003-05-15 04:44:40.000000000 -0700
@@ -54,20 +54,24 @@
 	return 0;
 }
 
-static void rpckbd_rx(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t rpckbd_rx(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct serio *port = dev_id;
 	unsigned int byte;
+	int handled = IRQ_NONE;
 
 	while (iomd_readb(IOMD_KCTRL) & (1 << 5)) {
 		byte = iomd_readb(IOMD_KARTRX);
 
 		serio_interrupt(port, byte, 0, regs);
+		handled = IRQ_HANDLED;
 	}
+	return handled;
 }
 
-static void rpckbd_tx(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t rpckbd_tx(int irq, void *dev_id, struct pt_regs *regs)
 {
+	return IRQ_HANDLED;
 }
 
 static int rpckbd_open(struct serio *port)
diff -urN linux-2.5.69-bk9/drivers/input/serio/sa1111ps2.c linux-2.5.69-bk10/drivers/input/serio/sa1111ps2.c
--- linux-2.5.69-bk9/drivers/input/serio/sa1111ps2.c	2003-05-04 16:53:14.000000000 -0700
+++ linux-2.5.69-bk10/drivers/input/serio/sa1111ps2.c	2003-05-15 04:44:40.000000000 -0700
@@ -41,10 +41,11 @@
  * at the most one, but we loop for safety.  If there was a
  * framing error, we have to manually clear the status.
  */
-static void ps2_rxint(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t ps2_rxint(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct ps2if *ps2if = dev_id;
 	unsigned int scancode, flag, status;
+	int handled = IRQ_NONE;
 
 	status = sa1111_readl(ps2if->base + SA1111_PS2STAT);
 	while (status & PS2STAT_RXF) {
@@ -62,13 +63,17 @@
 		serio_interrupt(&ps2if->io, scancode, flag, regs);
 
                	status = sa1111_readl(ps2if->base + SA1111_PS2STAT);
+
+               	handled = IRQ_HANDLED;
         }
+
+        return handled;
 }
 
 /*
  * Completion of ps2 write
  */
-static void ps2_txint(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t ps2_txint(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct ps2if *ps2if = dev_id;
 	unsigned int status;
@@ -83,6 +88,8 @@
 		ps2if->tail = (ps2if->tail + 1) & (sizeof(ps2if->buf) - 1);
 	}
 	spin_unlock(&ps2if->lock);
+
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/drivers/isdn/i4l/isdn_net_lib.c linux-2.5.69-bk10/drivers/isdn/i4l/isdn_net_lib.c
--- linux-2.5.69-bk9/drivers/isdn/i4l/isdn_net_lib.c	2003-05-04 16:52:49.000000000 -0700
+++ linux-2.5.69-bk10/drivers/isdn/i4l/isdn_net_lib.c	2003-05-15 04:44:40.000000000 -0700
@@ -1777,6 +1777,7 @@
 
 	printk(KERN_INFO "%s: disconnected\n", idev->name);
 	fsm_change_state(fi, ST_WAIT_DHUP);
+	return 0;
 }
 
 static int
@@ -1898,7 +1899,7 @@
 static int
 isdn_net_handle_event(isdn_net_dev *idev, int pr, void *arg)
 {
-	fsm_event(&idev->fi, pr, arg);
+	return fsm_event(&idev->fi, pr, arg);
 }
 
 static int
diff -urN linux-2.5.69-bk9/drivers/net/fc/iph5526.c linux-2.5.69-bk10/drivers/net/fc/iph5526.c
--- linux-2.5.69-bk9/drivers/net/fc/iph5526.c	2003-05-04 16:53:08.000000000 -0700
+++ linux-2.5.69-bk10/drivers/net/fc/iph5526.c	2003-05-15 04:44:42.000000000 -0700
@@ -2984,8 +2984,7 @@
 	 */
 	if ((type == ETH_P_ARP) || (status == 0))
 		dev_kfree_skb(skb);
-	else
-		netif_wake_queue(dev);
+	netif_wake_queue(dev);
 	LEAVE("iph5526_send_packet");
 	return 0;
 }
diff -urN linux-2.5.69-bk9/drivers/net/hamradio/mkiss.c linux-2.5.69-bk10/drivers/net/hamradio/mkiss.c
--- linux-2.5.69-bk9/drivers/net/hamradio/mkiss.c	2003-05-04 16:53:42.000000000 -0700
+++ linux-2.5.69-bk10/drivers/net/hamradio/mkiss.c	2003-05-15 04:44:42.000000000 -0700
@@ -347,6 +347,7 @@
 	netif_rx(skb);
 	tmp_ax->dev->last_rx = jiffies;
 	tmp_ax->rx_packets++;
+	tmp_ax->rx_bytes+=count;
 }
 
 /* Encapsulate one AX.25 packet and stuff into a TTY queue. */
@@ -386,6 +387,7 @@
 		ax->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
 		actual = ax->tty->driver->write(ax->tty, 0, ax->xbuff, count);
 		ax->tx_packets++;
+		ax->tx_bytes+=actual;
 		ax->dev->trans_start = jiffies;
 		ax->xleft = count - actual;
 		ax->xhead = ax->xbuff + actual;
@@ -394,6 +396,7 @@
 		ax->mkiss->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
 		actual = ax->mkiss->tty->driver->write(ax->mkiss->tty, 0, ax->mkiss->xbuff, count);
 		ax->tx_packets++;
+		ax->tx_bytes+=actual;
 		ax->mkiss->dev->trans_start = jiffies;
 		ax->mkiss->xleft = count - actual;
 		ax->mkiss->xhead = ax->mkiss->xbuff + actual;
@@ -709,6 +712,8 @@
 
 	stats.rx_packets     = ax->rx_packets;
 	stats.tx_packets     = ax->tx_packets;
+	stats.rx_bytes	     = ax->rx_bytes;
+	stats.tx_bytes       = ax->tx_bytes;
 	stats.rx_dropped     = ax->rx_dropped;
 	stats.tx_dropped     = ax->tx_dropped;
 	stats.tx_errors      = ax->tx_errors;
@@ -936,7 +941,7 @@
 	memcpy(dev->dev_addr,  ax25_test,  AX25_ADDR_LEN);
 
 	/* New-style flags. */
-	dev->flags      = 0;
+	dev->flags      = IFF_BROADCAST | IFF_MULTICAST;
 
 	return 0;
 }
diff -urN linux-2.5.69-bk9/drivers/net/hamradio/mkiss.h linux-2.5.69-bk10/drivers/net/hamradio/mkiss.h
--- linux-2.5.69-bk9/drivers/net/hamradio/mkiss.h	2003-05-04 16:53:02.000000000 -0700
+++ linux-2.5.69-bk10/drivers/net/hamradio/mkiss.h	2003-05-15 04:44:42.000000000 -0700
@@ -31,6 +31,8 @@
 	/* SLIP interface statistics. */
 	unsigned long      rx_packets;		/* inbound frames counter	*/
 	unsigned long      tx_packets;		/* outbound frames counter      */
+	unsigned long      rx_bytes;		/* inbound bytes counter        */
+	unsigned long      tx_bytes;		/* outbound bytes counter       */
 	unsigned long      rx_errors;		/* Parity, etc. errors          */
 	unsigned long      tx_errors;		/* Planned stuff                */
 	unsigned long      rx_dropped;		/* No memory for skb            */
diff -urN linux-2.5.69-bk9/drivers/net/rclanmtl.h linux-2.5.69-bk10/drivers/net/rclanmtl.h
--- linux-2.5.69-bk9/drivers/net/rclanmtl.h	2003-05-04 16:53:14.000000000 -0700
+++ linux-2.5.69-bk10/drivers/net/rclanmtl.h	2003-05-15 04:44:42.000000000 -0700
@@ -54,10 +54,10 @@
 #include <asm/io.h>
 
 /* Debug stuff. Define for debug output */
-#define RCDEBUG
+#undef RCDEBUG
 
 #ifdef RCDEBUG
-#define dprintk(args...) printk(KERN_DEBUG "(rcpci45 driver:) " args)
+#define dprintk(args...) printk(KERN_DEBUG "rc: " args)
 #else
 #define dprintk(args...) { }
 #endif
diff -urN linux-2.5.69-bk9/drivers/net/sb1000.c linux-2.5.69-bk10/drivers/net/sb1000.c
--- linux-2.5.69-bk9/drivers/net/sb1000.c	2003-05-15 04:44:28.000000000 -0700
+++ linux-2.5.69-bk10/drivers/net/sb1000.c	2003-05-15 04:44:42.000000000 -0700
@@ -137,17 +137,6 @@
 };
 MODULE_DEVICE_TABLE(pnp, sb1000_pnp_ids);
 
-static void
-sb1000_setup(struct net_device *dev)
-{
-	dev->type		= ARPHRD_ETHER;
-	dev->mtu		= 1500;
-	dev->addr_len		= ETH_ALEN;
-
-	/* New-style flags. */
-	dev->flags		= IFF_POINTOPOINT|IFF_NOARP;
-}
-
 static int
 sb1000_probe_one(struct pnp_dev *pdev, const struct pnp_device_id *id)
 {
@@ -188,11 +177,18 @@
 			"S/N %#8.8x, IRQ %d.\n", dev->name, dev->base_addr,
 			dev->mem_start, serial_number, dev->irq);
 
-	dev = alloc_netdev(sizeof(struct sb1000_private), "cm%d", sb1000_setup);
+	dev = alloc_etherdev(sizeof(struct sb1000_private));
 	if (!dev) {
 		error = -ENOMEM;
 		goto out_release_regions;
 	}
+
+	/*
+	 * The SB1000 is an rx-only cable modem device.  The uplink is a modem
+	 * and we do not want to arp on it.
+	 */
+	dev->flags = IFF_POINTOPOINT|IFF_NOARP;
+
 	SET_MODULE_OWNER(dev);
 
 	if (sb1000_debug > 0)
diff -urN linux-2.5.69-bk9/drivers/pci/quirks.c linux-2.5.69-bk10/drivers/pci/quirks.c
--- linux-2.5.69-bk9/drivers/pci/quirks.c	2003-05-04 16:52:49.000000000 -0700
+++ linux-2.5.69-bk10/drivers/pci/quirks.c	2003-05-15 04:44:43.000000000 -0700
@@ -647,6 +647,56 @@
 }
 
 /*
+ * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
+ * is not activated. The myth is that Asus said that they do not want the
+ * users to be irritated by just another PCI Device in the Win98 device
+ * manager. (see the file prog/hotplug/README.p4b in the lm_sensors 
+ * package 2.7.0 for details)
+ *
+ * The SMBus PCI Device can be activated by setting a bit in the ICH LPC 
+ * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it 
+ * becomes necessary to do this tweak in two steps -- I've chosen the Host
+ * bridge as trigger.
+ */
+
+static int __initdata asus_hides_smbus = 0;
+
+static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
+{
+	if (likely(dev->subsystem_vendor != PCI_VENDOR_ID_ASUSTEK))
+		return;
+
+	if ((dev->device == PCI_DEVICE_ID_INTEL_82845_HB) && 
+	    (dev->subsystem_device == 0x8088)) /* P4B533 */
+		asus_hides_smbus = 1;
+	if ((dev->device == PCI_DEVICE_ID_INTEL_82845G_HB) &&
+	    (dev->subsystem_device == 0x80b2)) /* P4PE */
+		asus_hides_smbus = 1;
+	if ((dev->device == PCI_DEVICE_ID_INTEL_82850_HB) &&
+	    (dev->subsystem_device == 0x8030)) /* P4T533 */
+		asus_hides_smbus = 1;
+	return;
+}
+
+static void __init asus_hides_smbus_lpc(struct pci_dev *dev)
+{
+	u16 val;
+	
+	if (likely(!asus_hides_smbus))
+		return;
+
+	pci_read_config_word(dev, 0xF2, &val);
+	if (val & 0x8) {
+		pci_write_config_word(dev, 0xF2, val & (~0x8));
+		pci_read_config_word(dev, 0xF2, &val);
+		if(val & 0x8)
+			printk(KERN_INFO "PCI: i801 SMBus device continues to play 'hide and seek'! 0x%x\n", val);
+		else
+			printk(KERN_INFO "PCI: Enabled i801 SMBus device\n");
+	}
+}
+
+/*
  *  The main table of quirks.
  */
 
@@ -725,6 +775,15 @@
 	
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82375,	quirk_eisa_bridge },
 
+	/*
+	 * on Asus P4B boards, the i801SMBus device is disabled at startup.
+	 */
+	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82845_HB,	asus_hides_smbus_hostbridge },
+	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82845G_HB,	asus_hides_smbus_hostbridge },
+	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82850_HB,	asus_hides_smbus_hostbridge },
+	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801DB_0,	asus_hides_smbus_lpc },
+	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801BA_0,	asus_hides_smbus_lpc },
+
 	{ 0 }
 };
 
diff -urN linux-2.5.69-bk9/drivers/pcmcia/cs.c linux-2.5.69-bk10/drivers/pcmcia/cs.c
--- linux-2.5.69-bk9/drivers/pcmcia/cs.c	2003-05-04 16:53:08.000000000 -0700
+++ linux-2.5.69-bk10/drivers/pcmcia/cs.c	2003-05-15 04:44:43.000000000 -0700
@@ -302,11 +302,8 @@
     
 ======================================================================*/
 
-static int setup_socket(socket_info_t *);
-static void shutdown_socket(socket_info_t *);
-static void reset_socket(socket_info_t *);
-static void unreset_socket(socket_info_t *);
-static void parse_events(void *info, u_int events);
+static int pccardd(void *__skt);
+void pcmcia_unregister_socket(struct class_device *dev);
 
 #define to_class_data(dev) dev->class_data
 
@@ -317,7 +314,7 @@
 {
 	struct pcmcia_socket_class_data *cls_d = class_get_devdata(class_dev);
 	socket_info_t *s_info;
-	unsigned int i, j;
+	unsigned int i, j, ret;
 
 	if (!cls_d)
 		return -EINVAL;
@@ -330,6 +327,7 @@
 	memset(s_info, 0, cls_d->nsock * sizeof(socket_info_t));
 
 	cls_d->s_info = s_info;
+	ret = 0;
 
 	/* socket initialization */
 	for (i = 0; i < cls_d->nsock; i++) {
@@ -344,7 +342,7 @@
 		s->erase_busy.next = s->erase_busy.prev = &s->erase_busy;
 		INIT_LIST_HEAD(&s->cis_cache);
 		spin_lock_init(&s->lock);
-    
+
 		/* TBD: remove usage of socket_table, use class_for_each_dev instead */
 		for (j = 0; j < sockets; j++)
 			if (socket_table[j] == NULL) break;
@@ -353,6 +351,20 @@
 
 		init_socket(s);
 		s->ss_entry->inquire_socket(s->sock, &s->cap);
+
+		init_completion(&s->thread_done);
+		init_waitqueue_head(&s->thread_wait);
+		init_MUTEX(&s->skt_sem);
+		spin_lock_init(&s->thread_lock);
+		ret = kernel_thread(pccardd, s, CLONE_KERNEL);
+		if (ret < 0) {
+			pcmcia_unregister_socket(class_dev);
+			break;
+		}
+
+		wait_for_completion(&s->thread_done);
+		BUG_ON(!s->thread);
+
 #ifdef CONFIG_PROC_FS
 		if (proc_pccard) {
 			char name[3];
@@ -368,7 +380,7 @@
 		}
 #endif
 	}
-	return 0;
+	return ret;
 } /* pcmcia_register_socket */
 
 
@@ -407,8 +419,12 @@
 			remove_proc_entry(name, proc_pccard);
 		}
 #endif
-		
-		shutdown_socket(s);
+		if (s->thread) {
+			init_completion(&s->thread_done);
+			s->thread = NULL;
+			wake_up(&s->thread_wait);
+			wait_for_completion(&s->thread_done);
+		}
 		release_cis_mem(s);
 		while (s->clients) {
 			client = s->clients;
@@ -450,15 +466,6 @@
 
 static int send_event(socket_info_t *s, event_t event, int priority);
 
-/*
- * Sleep for n_cs centiseconds (1 cs = 1/100th of a second)
- */
-static void cs_sleep(unsigned int n_cs)
-{
-	current->state = TASK_INTERRUPTIBLE;
-	schedule_timeout( (n_cs * HZ + 99) / 100);
-}
-
 static void shutdown_socket(socket_info_t *s)
 {
     client_t **c;
@@ -505,132 +512,6 @@
     free_regions(&s->c_region);
 } /* shutdown_socket */
 
-/*
- * Return zero if we think the card isn't actually present
- */
-static int setup_socket(socket_info_t *s)
-{
-	int val, ret;
-	int setup_timeout = 100;
-
-	/* Wait for "not pending" */
-	for (;;) {
-		get_socket_status(s, &val);
-		if (!(val & SS_PENDING))
-			break;
-		if (--setup_timeout) {
-			cs_sleep(10);
-			continue;
-		}
-		printk(KERN_NOTICE "cs: socket %p voltage interrogation"
-			" timed out\n", s);
-		ret = 0;
-		goto out;
-	}
-
-	if (val & SS_DETECT) {
-		DEBUG(1, "cs: setup_socket(%p): applying power\n", s);
-		s->state |= SOCKET_PRESENT;
-		s->socket.flags &= SS_DEBOUNCED;
-		if (val & SS_3VCARD)
-		    s->socket.Vcc = s->socket.Vpp = 33;
-		else if (!(val & SS_XVCARD))
-		    s->socket.Vcc = s->socket.Vpp = 50;
-		else {
-		    printk(KERN_NOTICE "cs: socket %p: unsupported "
-			   "voltage key\n", s);
-		    s->socket.Vcc = 0;
-		}
-		if (val & SS_CARDBUS) {
-		    s->state |= SOCKET_CARDBUS;
-#ifndef CONFIG_CARDBUS
-		    printk(KERN_NOTICE "cs: unsupported card type detected!\n");
-#endif
-		}
-		set_socket(s, &s->socket);
-		cs_sleep(vcc_settle);
-		reset_socket(s);
-		ret = 1;
-	} else {
-		DEBUG(0, "cs: setup_socket(%p): no card!\n", s);
-		ret = 0;
-	}
-out:
-	return ret;
-} /* setup_socket */
-
-/*======================================================================
-
-    Reset_socket() and unreset_socket() handle hard resets.  Resets
-    have several causes: card insertion, a call to reset_socket, or
-    recovery from a suspend/resume cycle.  Unreset_socket() sends
-    a CS event that matches the cause of the reset.
-    
-======================================================================*/
-
-static void reset_socket(socket_info_t *s)
-{
-    DEBUG(1, "cs: resetting socket %p\n", s);
-    s->socket.flags |= SS_OUTPUT_ENA | SS_RESET;
-    set_socket(s, &s->socket);
-    udelay((long)reset_time);
-    s->socket.flags &= ~SS_RESET;
-    set_socket(s, &s->socket);
-    cs_sleep(unreset_delay);
-    unreset_socket(s);
-} /* reset_socket */
-
-#define EVENT_MASK \
-(SOCKET_SETUP_PENDING|SOCKET_SUSPEND|SOCKET_RESET_PENDING)
-
-static void unreset_socket(socket_info_t *s)
-{
-	int setup_timeout = unreset_limit;
-	int val;
-
-	/* Wait for "ready" */
-	for (;;) {
-		get_socket_status(s, &val);
-		if (val & SS_READY)
-			break;
-		DEBUG(2, "cs: socket %d not ready yet\n", s->sock);
-		if (--setup_timeout) {
-			cs_sleep(unreset_check);
-			continue;
-		}
-		printk(KERN_NOTICE "cs: socket %p timed out during"
-			" reset.  Try increasing setup_delay.\n", s);
-		s->state &= ~EVENT_MASK;
-		return;
-	}
-
-	DEBUG(1, "cs: reset done on socket %p\n", s);
-	if (s->state & SOCKET_SUSPEND) {
-	    s->state &= ~EVENT_MASK;
-	    if (verify_cis_cache(s) != 0)
-		parse_events(s, SS_DETECT);
-	    else
-		send_event(s, CS_EVENT_PM_RESUME, CS_EVENT_PRI_LOW);
-	} else if (s->state & SOCKET_SETUP_PENDING) {
-#ifdef CONFIG_CARDBUS
-	    if (s->state & SOCKET_CARDBUS) {
-		cb_alloc(s);
-		s->state |= SOCKET_CARDBUS_CONFIG;
-	    }
-#endif
-	    send_event(s, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW);
-	    s->state &= ~SOCKET_SETUP_PENDING;
-	} else {
-	    send_event(s, CS_EVENT_CARD_RESET, CS_EVENT_PRI_LOW);
-	    if (s->reset_handle) { 
-		    s->reset_handle->event_callback_args.info = NULL;
-		    EVENT(s->reset_handle, CS_EVENT_RESET_COMPLETE,
-			  CS_EVENT_PRI_LOW);
-	    }
-	    s->state &= ~EVENT_MASK;
-	}
-} /* unreset_socket */
-
 /*======================================================================
 
     The central event handler.  Send_event() sends an event to all
@@ -661,61 +542,266 @@
     return ret;
 } /* send_event */
 
-static void do_shutdown(socket_info_t *s)
+static void pcmcia_error(socket_info_t *skt, const char *fmt, ...)
 {
-    client_t *client;
-    if (s->state & SOCKET_SHUTDOWN_PENDING)
-	return;
-    s->state |= SOCKET_SHUTDOWN_PENDING;
-    send_event(s, CS_EVENT_CARD_REMOVAL, CS_EVENT_PRI_HIGH);
-    for (client = s->clients; client; client = client->next)
-	if (!(client->Attributes & INFO_MASTER_CLIENT))
-	    client->state |= CLIENT_STALE;
-    if (s->state & (SOCKET_SETUP_PENDING|SOCKET_RESET_PENDING)) {
-	DEBUG(0, "cs: flushing pending setup\n");
-	s->state &= ~EVENT_MASK;
-    }
-    cs_sleep(shutdown_delay);
-    s->state &= ~SOCKET_PRESENT;
-    shutdown_socket(s);
+	static char buf[128];
+	va_list ap;
+	int len;
+
+	va_start(ap, fmt);
+	len = vsnprintf(buf, sizeof(buf), fmt, ap);
+	va_end(ap);
+	buf[len] = '\0';
+
+	printk(KERN_ERR "PCMCIA: socket %p: %s", skt, buf);
+}
+
+#define cs_to_timeout(cs) (((cs) * HZ + 99) / 100)
+
+static void socket_remove_drivers(socket_info_t *skt)
+{
+	client_t *client;
+
+	send_event(skt, CS_EVENT_CARD_REMOVAL, CS_EVENT_PRI_HIGH);
+
+	for (client = skt->clients; client; client = client->next)
+		if (!(client->Attributes & INFO_MASTER_CLIENT))
+			client->state |= CLIENT_STALE;
+}
+
+static void socket_shutdown(socket_info_t *skt)
+{
+	socket_remove_drivers(skt);
+	set_current_state(TASK_UNINTERRUPTIBLE);
+	schedule_timeout(cs_to_timeout(shutdown_delay));
+	skt->state &= ~SOCKET_PRESENT;
+	shutdown_socket(skt);
+}
+
+static int socket_reset(socket_info_t *skt)
+{
+	int status, i;
+
+	skt->socket.flags |= SS_OUTPUT_ENA | SS_RESET;
+	set_socket(skt, &skt->socket);
+	udelay((long)reset_time);
+
+	skt->socket.flags &= ~SS_RESET;
+	set_socket(skt, &skt->socket);
+
+	set_current_state(TASK_UNINTERRUPTIBLE);
+	schedule_timeout(cs_to_timeout(unreset_delay));
+	for (i = 0; i < unreset_limit; i++) {
+		get_socket_status(skt, &status);
+
+		if (!(status & SS_DETECT))
+			return CS_NO_CARD;
+
+		if (status & SS_READY)
+			return CS_SUCCESS;
+
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(cs_to_timeout(unreset_check));
+	}
+
+	pcmcia_error(skt, "time out after reset.\n");
+	return CS_GENERAL_FAILURE;
+}
+
+static int socket_setup(socket_info_t *skt, int initial_delay)
+{
+	int status, i;
+
+	get_socket_status(skt, &status);
+	if (!(status & SS_DETECT))
+		return CS_NO_CARD;
+
+	set_current_state(TASK_UNINTERRUPTIBLE);
+	schedule_timeout(cs_to_timeout(initial_delay));
+
+	for (i = 0; i < 100; i++) {
+		get_socket_status(skt, &status);
+		if (!(status & SS_DETECT))
+			return CS_NO_CARD;
+
+		if (!(status & SS_PENDING))
+			break;
+
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(cs_to_timeout(10));
+	}
+
+	if (status & SS_PENDING) {
+		pcmcia_error(skt, "voltage interrogation timed out.\n");
+		return CS_GENERAL_FAILURE;
+	}
+
+	if (status & SS_CARDBUS) {
+		skt->state |= SOCKET_CARDBUS;
+#ifndef CONFIG_CARDBUS
+		pcmcia_error(skt, "cardbus cards are not supported.\n");
+		return CS_BAD_TYPE;
+#endif
+	}
+
+	/*
+	 * Decode the card voltage requirements, and apply power to the card.
+	 */
+	if (status & SS_3VCARD)
+		skt->socket.Vcc = skt->socket.Vpp = 33;
+	else if (!(status & SS_XVCARD))
+		skt->socket.Vcc = skt->socket.Vpp = 50;
+	else {
+		pcmcia_error(skt, "unsupported voltage key.\n");
+		return CS_BAD_TYPE;
+	}
+	skt->state |= SOCKET_PRESENT;
+	skt->socket.flags = SS_DEBOUNCED;
+	set_socket(skt, &skt->socket);
+
+	/*
+	 * Wait "vcc_settle" for the supply to stabilise.
+	 */
+	set_current_state(TASK_UNINTERRUPTIBLE);
+	schedule_timeout(cs_to_timeout(vcc_settle));
+
+	return socket_reset(skt);
+}
+
+/*
+ * Handle card insertion.  Setup the socket, reset the card,
+ * and then tell the rest of PCMCIA that a card is present.
+ */
+static int socket_insert(socket_info_t *skt)
+{
+	int ret;
+
+	ret = socket_setup(skt, setup_delay);
+	if (ret == CS_SUCCESS) {
+#ifdef CONFIG_CARDBUS
+		if (skt->state & SOCKET_CARDBUS) {
+			cb_alloc(skt);
+			skt->state |= SOCKET_CARDBUS_CONFIG;
+		}
+#endif
+		send_event(skt, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW);
+		skt->socket.flags &= ~SS_DEBOUNCED;
+	} else
+		socket_shutdown(skt);
+
+	return ret;
+}
+
+static int socket_suspend(socket_info_t *skt)
+{
+	if (skt->state & SOCKET_SUSPEND)
+		return CS_IN_USE;
+
+	send_event(skt, CS_EVENT_PM_SUSPEND, CS_EVENT_PRI_LOW);
+	suspend_socket(skt);
+	skt->state |= SOCKET_SUSPEND;
+
+	return CS_SUCCESS;
+}
+
+/*
+ * Resume a socket.  If a card is present, verify its CIS against
+ * our cached copy.  If they are different, the card has been
+ * replaced, and we need to tell the drivers.
+ */
+static int socket_resume(socket_info_t *skt)
+{
+	int ret;
+
+	if (!(skt->state & SOCKET_SUSPEND))
+		return CS_IN_USE;
+
+	init_socket(skt);
+
+	ret = socket_setup(skt, resume_delay);
+	if (ret == CS_SUCCESS) {
+		/*
+		 * FIXME: need a better check here for cardbus cards.
+		 */
+		if (verify_cis_cache(skt) != 0) {
+			socket_remove_drivers(skt);
+			destroy_cis_cache(skt);
+			send_event(skt, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW);
+		} else {
+			send_event(skt, CS_EVENT_PM_RESUME, CS_EVENT_PRI_LOW);
+		}
+		skt->socket.flags &= ~SS_DEBOUNCED;
+	} else
+		socket_shutdown(skt);
+
+	skt->state &= ~SOCKET_SUSPEND;
+
+	return CS_SUCCESS;
+}
+
+static int pccardd(void *__skt)
+{
+	socket_info_t *skt = __skt;
+	DECLARE_WAITQUEUE(wait, current);
+
+	daemonize("pccardd");
+	skt->thread = current;
+	complete(&skt->thread_done);
+
+	add_wait_queue(&skt->thread_wait, &wait);
+	for (;;) {
+		unsigned long flags;
+		unsigned int events;
+
+		set_current_state(TASK_INTERRUPTIBLE);
+
+		spin_lock_irqsave(&skt->thread_lock, flags);
+		events = skt->thread_events;
+		skt->thread_events = 0;
+		spin_unlock_irqrestore(&skt->thread_lock, flags);
+
+		if (events) {
+			down(&skt->skt_sem);
+			if (events & SS_DETECT && !(skt->state & SOCKET_SUSPEND)) {
+				int status;
+
+				get_socket_status(skt, &status);
+				if ((skt->state & SOCKET_PRESENT) &&
+				     !(status & SS_DETECT))
+					socket_shutdown(skt);
+				if (status & SS_DETECT)
+					socket_insert(skt);
+			}
+			if (events & SS_BATDEAD)
+				send_event(skt, CS_EVENT_BATTERY_DEAD, CS_EVENT_PRI_LOW);
+			if (events & SS_BATWARN)
+				send_event(skt, CS_EVENT_BATTERY_LOW, CS_EVENT_PRI_LOW);
+			if (events & SS_READY)
+				send_event(skt, CS_EVENT_READY_CHANGE, CS_EVENT_PRI_LOW);
+			up(&skt->skt_sem);
+			continue;
+		}
+
+		schedule();
+		if (!skt->thread)
+			break;
+	}
+	remove_wait_queue(&skt->thread_wait, &wait);
+
+	socket_shutdown(skt);
+
+	complete_and_exit(&skt->thread_done, 0);
 }
 
 static void parse_events(void *info, u_int events)
 {
-    socket_info_t *s = info;
-    if (events & SS_DETECT) {
-	int status;
-
-	get_socket_status(s, &status);
-	if ((s->state & SOCKET_PRESENT) &&
-	    (!(s->state & SOCKET_SUSPEND) ||
-	     !(status & SS_DETECT)))
-	    do_shutdown(s);
-	if (status & SS_DETECT) {
-	    if (s->state & SOCKET_SETUP_PENDING) {
-		DEBUG(1, "cs: delaying pending setup\n");
-		return;
-	    }
-	    s->state |= SOCKET_SETUP_PENDING;
-	    if (s->state & SOCKET_SUSPEND)
-		cs_sleep(resume_delay);
-	    else
-		cs_sleep(setup_delay);
-	    s->socket.flags |= SS_DEBOUNCED;
-	    if (setup_socket(s) == 0)
-		s->state &= ~SOCKET_SETUP_PENDING;
-	    s->socket.flags &= ~SS_DEBOUNCED;
-	}
-    }
-    if (events & SS_BATDEAD)
-	send_event(s, CS_EVENT_BATTERY_DEAD, CS_EVENT_PRI_LOW);
-    if (events & SS_BATWARN)
-	send_event(s, CS_EVENT_BATTERY_LOW, CS_EVENT_PRI_LOW);
-    if (events & SS_READY) {
-	if (!(s->state & SOCKET_RESET_PENDING))
-	    send_event(s, CS_EVENT_READY_CHANGE, CS_EVENT_PRI_LOW);
-	else DEBUG(1, "cs: ready change during reset\n");
-    }
+	socket_info_t *s = info;
+
+	spin_lock(&s->thread_lock);
+	s->thread_events |= events;
+	spin_unlock(&s->thread_lock);
+
+	wake_up(&s->thread_wait);
 } /* parse_events */
 
 /*======================================================================
@@ -727,27 +813,18 @@
     
 ======================================================================*/
 
-void pcmcia_suspend_socket (socket_info_t *s)
+void pcmcia_suspend_socket (socket_info_t *skt)
 {
-    if ((s->state & SOCKET_PRESENT) && !(s->state & SOCKET_SUSPEND)) {
-	send_event(s, CS_EVENT_PM_SUSPEND, CS_EVENT_PRI_LOW);
-	suspend_socket(s);
-	s->state |= SOCKET_SUSPEND;
-    }
+	down(&skt->skt_sem);
+	socket_suspend(skt);
+	up(&skt->skt_sem);
 }
 
-void pcmcia_resume_socket (socket_info_t *s)
+void pcmcia_resume_socket (socket_info_t *skt)
 {
-    int	stat;
-
-    /* Do this just to reinitialize the socket */
-    init_socket(s);
-    get_socket_status(s, &stat);
-
-    /* If there was or is a card here, we need to do something
-    about it... but parse_events will sort it all out. */
-    if ((s->state & SOCKET_PRESENT) || (stat & SS_DETECT))
-	parse_events(s, SS_DETECT);
+	down(&skt->skt_sem);
+	socket_resume(skt);
+	up(&skt->skt_sem);
 }
 
 
@@ -1461,15 +1538,8 @@
 
     s = socket_table[ns];
     if (++s->real_clients == 1) {
-	int status;
 	register_callback(s, &parse_events, s);
-	get_socket_status(s, &status);
-	if ((status & SS_DETECT) &&
-	    !(s->state & SOCKET_SETUP_PENDING)) {
-	    s->state |= SOCKET_SETUP_PENDING;
-	    if (setup_socket(s) == 0)
-		    s->state &= ~SOCKET_SETUP_PENDING;
-	}
+	parse_events(s, SS_DETECT);
     }
 
     *handle = client;
@@ -2022,30 +2092,44 @@
 
 int pcmcia_reset_card(client_handle_t handle, client_req_t *req)
 {
-    int i, ret;
-    socket_info_t *s;
+	socket_info_t *skt;
+	int ret;
     
-    if (CHECK_HANDLE(handle))
-	return CS_BAD_HANDLE;
-    i = handle->Socket; s = socket_table[i];
-    if (!(s->state & SOCKET_PRESENT))
-	return CS_NO_CARD;
-    if (s->state & SOCKET_RESET_PENDING)
-	return CS_IN_USE;
-    s->state |= SOCKET_RESET_PENDING;
+	if (CHECK_HANDLE(handle))
+		return CS_BAD_HANDLE;
+	DEBUG(1, "cs: resetting socket %d\n", handle->Socket);
+	skt = SOCKET(handle);
+
+	down(&skt->skt_sem);
+	do {
+		if (!(skt->state & SOCKET_PRESENT)) {
+			ret = CS_NO_CARD;
+			break;
+		}
+		if (skt->state & SOCKET_SUSPEND) {
+			ret = CS_IN_USE;
+			break;
+		}
+		if (skt->state & SOCKET_CARDBUS) {
+			ret = CS_UNSUPPORTED_FUNCTION;
+			break;
+		}
 
-    ret = send_event(s, CS_EVENT_RESET_REQUEST, CS_EVENT_PRI_LOW);
-    if (ret != 0) {
-	s->state &= ~SOCKET_RESET_PENDING;
-	handle->event_callback_args.info = (void *)(u_long)ret;
-	EVENT(handle, CS_EVENT_RESET_COMPLETE, CS_EVENT_PRI_LOW);
-    } else {
-	DEBUG(1, "cs: resetting socket %d\n", i);
-	send_event(s, CS_EVENT_RESET_PHYSICAL, CS_EVENT_PRI_LOW);
-	s->reset_handle = handle;
-	reset_socket(s);
-    }
-    return CS_SUCCESS;
+		ret = send_event(skt, CS_EVENT_RESET_REQUEST, CS_EVENT_PRI_LOW);
+		if (ret == 0) {
+			send_event(skt, CS_EVENT_RESET_PHYSICAL, CS_EVENT_PRI_LOW);
+			if (socket_reset(skt) == CS_SUCCESS)
+				send_event(skt, CS_EVENT_CARD_RESET, CS_EVENT_PRI_LOW);
+		}
+
+		handle->event_callback_args.info = (void *)(u_long)ret;
+		EVENT(handle, CS_EVENT_RESET_COMPLETE, CS_EVENT_PRI_LOW);
+
+		ret = CS_SUCCESS;
+	} while (0);
+	up(&skt->skt_sem);
+
+	return ret;
 } /* reset_card */
 
 /*======================================================================
@@ -2057,42 +2141,56 @@
 
 int pcmcia_suspend_card(client_handle_t handle, client_req_t *req)
 {
-    int i;
-    socket_info_t *s;
+	socket_info_t *skt;
+	int ret;
     
-    if (CHECK_HANDLE(handle))
-	return CS_BAD_HANDLE;
-    i = handle->Socket; s = socket_table[i];
-    if (!(s->state & SOCKET_PRESENT))
-	return CS_NO_CARD;
-    if (s->state & SOCKET_SUSPEND)
-	return CS_IN_USE;
-
-    DEBUG(1, "cs: suspending socket %d\n", i);
-    send_event(s, CS_EVENT_PM_SUSPEND, CS_EVENT_PRI_LOW);
-    suspend_socket(s);
-    s->state |= SOCKET_SUSPEND;
+	if (CHECK_HANDLE(handle))
+		return CS_BAD_HANDLE;
+	DEBUG(1, "cs: suspending socket %d\n", handle->Socket);
+	skt = SOCKET(handle);
+
+	down(&skt->skt_sem);
+	do {
+		if (!(skt->state & SOCKET_PRESENT)) {
+			ret = CS_NO_CARD;
+			break;
+		}
+		if (skt->state & SOCKET_CARDBUS) {
+			ret = CS_UNSUPPORTED_FUNCTION;
+			break;
+		}
+		ret = socket_suspend(skt);
+	} while (0);
+	up(&skt->skt_sem);
 
-    return CS_SUCCESS;
+	return ret;
 } /* suspend_card */
 
 int pcmcia_resume_card(client_handle_t handle, client_req_t *req)
 {
-    int i;
-    socket_info_t *s;
+	socket_info_t *skt;
+	int ret;
     
-    if (CHECK_HANDLE(handle))
-	return CS_BAD_HANDLE;
-    i = handle->Socket; s = socket_table[i];
-    if (!(s->state & SOCKET_PRESENT))
-	return CS_NO_CARD;
-    if (!(s->state & SOCKET_SUSPEND))
-	return CS_IN_USE;
-
-    DEBUG(1, "cs: waking up socket %d\n", i);
-    setup_socket(s);
+	if (CHECK_HANDLE(handle))
+		return CS_BAD_HANDLE;
+	DEBUG(1, "cs: waking up socket %d\n", handle->Socket);
+	skt = SOCKET(handle);
+
+	down(&skt->skt_sem);
+	do {
+		if (!(skt->state & SOCKET_PRESENT)) {
+			ret = CS_NO_CARD;
+			break;
+		}
+		if (skt->state & SOCKET_CARDBUS) {
+			ret = CS_UNSUPPORTED_FUNCTION;
+			break;
+		}
+		ret = socket_resume(skt);
+	} while (0);
+	up(&skt->skt_sem);
 
-    return CS_SUCCESS;
+	return ret;
 } /* resume_card */
 
 /*======================================================================
@@ -2103,57 +2201,58 @@
 
 int pcmcia_eject_card(client_handle_t handle, client_req_t *req)
 {
-    int i, ret;
-    socket_info_t *s;
-    u_long flags;
+	socket_info_t *skt;
+	int ret;
     
-    if (CHECK_HANDLE(handle))
-	return CS_BAD_HANDLE;
-    i = handle->Socket; s = socket_table[i];
-    if (!(s->state & SOCKET_PRESENT))
-	return CS_NO_CARD;
+	if (CHECK_HANDLE(handle))
+		return CS_BAD_HANDLE;
+	DEBUG(1, "cs: user eject request on socket %d\n", handle->Socket);
+	skt = SOCKET(handle);
+
+	down(&skt->skt_sem);
+	do {
+		if (!(skt->state & SOCKET_PRESENT)) {
+			ret = CS_NO_CARD;
+			break;
+		}
 
-    DEBUG(1, "cs: user eject request on socket %d\n", i);
+		ret = send_event(skt, CS_EVENT_EJECTION_REQUEST, CS_EVENT_PRI_LOW);
+		if (ret != 0)
+			break;
 
-    ret = send_event(s, CS_EVENT_EJECTION_REQUEST, CS_EVENT_PRI_LOW);
-    if (ret != 0)
-	return ret;
+		socket_shutdown(skt);
+		ret = CS_SUCCESS;
+	} while (0);
+	up(&skt->skt_sem);
 
-    spin_lock_irqsave(&s->lock, flags);
-    do_shutdown(s);
-    spin_unlock_irqrestore(&s->lock, flags);
-    
-    return CS_SUCCESS;
-    
+	return ret;
 } /* eject_card */
 
 int pcmcia_insert_card(client_handle_t handle, client_req_t *req)
 {
-    int i, status;
-    socket_info_t *s;
-    u_long flags;
-    
-    if (CHECK_HANDLE(handle))
-	return CS_BAD_HANDLE;
-    i = handle->Socket; s = socket_table[i];
-    if (s->state & SOCKET_PRESENT)
-	return CS_IN_USE;
-
-    DEBUG(1, "cs: user insert request on socket %d\n", i);
+	socket_info_t *skt;
+	int ret;
 
-    spin_lock_irqsave(&s->lock, flags);
-    if (!(s->state & SOCKET_SETUP_PENDING)) {
-	s->state |= SOCKET_SETUP_PENDING;
-	spin_unlock_irqrestore(&s->lock, flags);
-	get_socket_status(s, &status);
-	if ((status & SS_DETECT) == 0 || (setup_socket(s) == 0)) {
-	    s->state &= ~SOCKET_SETUP_PENDING;
-	    return CS_NO_CARD;
-	}
-    } else
-	spin_unlock_irqrestore(&s->lock, flags);
+	if (CHECK_HANDLE(handle))
+		return CS_BAD_HANDLE;
+	DEBUG(1, "cs: user insert request on socket %d\n", handle->Socket);
+	skt = SOCKET(handle);
+
+	down(&skt->skt_sem);
+	do {
+		if (skt->state & SOCKET_PRESENT) {
+			ret = CS_IN_USE;
+			break;
+		}
+		if (socket_insert(skt) == CS_NO_CARD) {
+			ret = CS_NO_CARD;
+			break;
+		}
+		ret = CS_SUCCESS;
+	} while (0);
+	up(&skt->skt_sem);
 
-    return CS_SUCCESS;
+	return ret;
 } /* insert_card */
 
 /*======================================================================
diff -urN linux-2.5.69-bk9/drivers/pcmcia/cs_internal.h linux-2.5.69-bk10/drivers/pcmcia/cs_internal.h
--- linux-2.5.69-bk9/drivers/pcmcia/cs_internal.h	2003-05-04 16:52:48.000000000 -0700
+++ linux-2.5.69-bk10/drivers/pcmcia/cs_internal.h	2003-05-15 04:44:43.000000000 -0700
@@ -133,7 +133,6 @@
     u_short			lock_count;
     client_handle_t		clients;
     u_int			real_clients;
-    client_handle_t		reset_handle;
     pccard_mem_map		cis_mem;
     u_char			*cis_virt;
     config_t			*config;
@@ -155,6 +154,14 @@
 #ifdef CONFIG_PROC_FS
     struct proc_dir_entry	*proc;
 #endif
+
+    struct semaphore		skt_sem;	/* protects socket h/w state */
+
+    struct task_struct		*thread;
+    struct completion		thread_done;
+    wait_queue_head_t		thread_wait;
+    spinlock_t			thread_lock;	/* protects thread_events */
+    unsigned int		thread_events;
 } socket_info_t;
 
 /* Flags in config state */
diff -urN linux-2.5.69-bk9/drivers/pcmcia/sa11xx_core.c linux-2.5.69-bk10/drivers/pcmcia/sa11xx_core.c
--- linux-2.5.69-bk9/drivers/pcmcia/sa11xx_core.c	2003-05-04 16:53:03.000000000 -0700
+++ linux-2.5.69-bk10/drivers/pcmcia/sa11xx_core.c	2003-05-15 04:44:43.000000000 -0700
@@ -120,7 +120,6 @@
 	unsigned long flags;
 	unsigned short speed;
 	unsigned int bs_io, bs_mem, bs_attr;
-	int i;
 
 	speed = calc_speed(skt->spd_io, MAX_IO_WIN, SA1100_PCMCIA_IO_ACCESS);
 	bs_io = skt->ops->socket_get_timing(skt, cpu_clock, speed);
@@ -324,13 +323,15 @@
  * handling code performs scheduling operations which cannot be
  * executed from within an interrupt context.
  */
-static void sa1100_pcmcia_interrupt(int irq, void *dev, struct pt_regs *regs)
+static irqreturn_t sa1100_pcmcia_interrupt(int irq, void *dev, struct pt_regs *regs)
 {
 	struct sa1100_pcmcia_socket *skt = dev;
 
 	DEBUG(3, "%s(): servicing IRQ %d\n", __FUNCTION__, irq);
 
 	schedule_work(&skt->work);
+
+	return IRQ_HANDLED;
 }
 
 /* sa1100_pcmcia_register_callback()
diff -urN linux-2.5.69-bk9/drivers/pnp/pnpbios/core.c linux-2.5.69-bk10/drivers/pnp/pnpbios/core.c
--- linux-2.5.69-bk9/drivers/pnp/pnpbios/core.c	2003-05-04 16:52:50.000000000 -0700
+++ linux-2.5.69-bk10/drivers/pnp/pnpbios/core.c	2003-05-15 04:44:43.000000000 -0700
@@ -252,41 +252,59 @@
 {
 	switch(status) {
 	case PNP_SUCCESS:
-	printk(KERN_ERR "PnPBIOS: %s: function successful\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: function successful\n", module);
+		break;
 	case PNP_NOT_SET_STATICALLY:
-	printk(KERN_ERR "PnPBIOS: %s: unable to set static resources\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: unable to set static resources\n", module);
+		break;
 	case PNP_UNKNOWN_FUNCTION:
-	printk(KERN_ERR "PnPBIOS: %s: invalid function number passed\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: invalid function number passed\n", module);
+		break;
 	case PNP_FUNCTION_NOT_SUPPORTED:
-	printk(KERN_ERR "PnPBIOS: %s: function not supported on this system\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: function not supported on this system\n", module);
+		break;
 	case PNP_INVALID_HANDLE:
-	printk(KERN_ERR "PnPBIOS: %s: invalid handle\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: invalid handle\n", module);
+		break;
 	case PNP_BAD_PARAMETER:
-	printk(KERN_ERR "PnPBIOS: %s: invalid parameters were passed\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: invalid parameters were passed\n", module);
+		break;
 	case PNP_SET_FAILED:
-	printk(KERN_ERR "PnPBIOS: %s: unable to set resources\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: unable to set resources\n", module);
+		break;
 	case PNP_EVENTS_NOT_PENDING:
-	printk(KERN_ERR "PnPBIOS: %s: no events are pending\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: no events are pending\n", module);
+		break;
 	case PNP_SYSTEM_NOT_DOCKED:
-	printk(KERN_ERR "PnPBIOS: %s: the system is not docked\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: the system is not docked\n", module);
+		break;
 	case PNP_NO_ISA_PNP_CARDS:
-	printk(KERN_ERR "PnPBIOS: %s: no isapnp cards are installed on this system\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: no isapnp cards are installed on this system\n", module);
+		break;
 	case PNP_UNABLE_TO_DETERMINE_DOCK_CAPABILITIES:
-	printk(KERN_ERR "PnPBIOS: %s: cannot determine the capabilities of the docking station\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: cannot determine the capabilities of the docking station\n", module);
+		break;
 	case PNP_CONFIG_CHANGE_FAILED_NO_BATTERY:
-	printk(KERN_ERR "PnPBIOS: %s: unable to undock, the system does not have a battery\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: unable to undock, the system does not have a battery\n", module);
+		break;
 	case PNP_CONFIG_CHANGE_FAILED_RESOURCE_CONFLICT:
-	printk(KERN_ERR "PnPBIOS: %s: could not dock due to resource conflicts\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: could not dock due to resource conflicts\n", module);
+		break;
 	case PNP_BUFFER_TOO_SMALL:
-	printk(KERN_ERR "PnPBIOS: %s: the buffer passed is too small\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: the buffer passed is too small\n", module);
+		break;
 	case PNP_USE_ESCD_SUPPORT:
-	printk(KERN_ERR "PnPBIOS: %s: use ESCD instead\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: use ESCD instead\n", module);
+		break;
 	case PNP_MESSAGE_NOT_SUPPORTED:
-	printk(KERN_ERR "PnPBIOS: %s: the message is unsupported\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: the message is unsupported\n", module);
+		break;
 	case PNP_HARDWARE_ERROR:
-	printk(KERN_ERR "PnPBIOS: %s: a hardware failure has occured\n", module);
+		printk(KERN_ERR "PnPBIOS: %s: a hardware failure has occured\n", module);
+		break;
 	default:
-	printk(KERN_ERR "PnPBIOS: %s: unexpected status 0x%x\n", module, status);
+		printk(KERN_ERR "PnPBIOS: %s: unexpected status 0x%x\n", module, status);
+		break;
 	}
 }
 
diff -urN linux-2.5.69-bk9/drivers/scsi/ide-scsi.c linux-2.5.69-bk10/drivers/scsi/ide-scsi.c
--- linux-2.5.69-bk9/drivers/scsi/ide-scsi.c	2003-05-04 16:53:33.000000000 -0700
+++ linux-2.5.69-bk10/drivers/scsi/ide-scsi.c	2003-05-15 04:44:47.000000000 -0700
@@ -78,6 +78,7 @@
 #define PC_DMA_IN_PROGRESS		0	/* 1 while DMA in progress */
 #define PC_WRITING			1	/* Data direction */
 #define PC_TRANSFORM			2	/* transform SCSI commands */
+#define PC_DMA_OK			4	/* Use DMA */
 
 /*
  *	SCSI command transformation layer
@@ -494,6 +495,10 @@
 	ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), NULL);
 	/* Send the actual packet */
 	atapi_output_bytes(drive, scsi->pc->c, 12);
+	if (test_bit (PC_DMA_OK, &pc->flags)) {
+		set_bit (PC_DMA_IN_PROGRESS, &pc->flags);
+		(void) (HWIF(drive)->ide_dma_begin(drive));
+	}
 	return ide_started;
 }
 
@@ -527,10 +532,9 @@
 	HWIF(drive)->OUTB(bcount.b.high, IDE_BCOUNTH_REG);
 	HWIF(drive)->OUTB(bcount.b.low, IDE_BCOUNTL_REG);
 
-	if (feature.b.dma) {
-		set_bit(PC_DMA_IN_PROGRESS, &pc->flags);
-		(void) (HWIF(drive)->ide_dma_begin(drive));
-	}
+	if (feature.b.dma)
+		set_bit(PC_DMA_OK, &pc->flags);
+
 	if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) {
 		if (HWGROUP(drive)->handler != NULL)
 			BUG();
diff -urN linux-2.5.69-bk9/drivers/serial/21285.c linux-2.5.69-bk10/drivers/serial/21285.c
--- linux-2.5.69-bk9/drivers/serial/21285.c	2003-05-04 16:53:36.000000000 -0700
+++ linux-2.5.69-bk10/drivers/serial/21285.c	2003-05-15 04:44:49.000000000 -0700
@@ -85,7 +85,7 @@
 {
 }
 
-static void serial21285_rx_chars(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t serial21285_rx_chars(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct uart_port *port = dev_id;
 	struct tty_struct *tty = port->info->tty;
@@ -97,7 +97,7 @@
 			tty->flip.work.func((void *)tty);
 			if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
 				printk(KERN_WARNING "TTY_DONT_FLIP set\n");
-				return;
+				goto out;
 			}
 		}
 
@@ -143,9 +143,12 @@
 		status = *CSR_UARTFLG;
 	}
 	tty_flip_buffer_push(tty);
+
+ out:
+	return IRQ_HANDLED;
 }
 
-static void serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct uart_port *port = dev_id;
 	struct circ_buf *xmit = &port->info->xmit;
@@ -155,11 +158,11 @@
 		*CSR_UARTDR = port->x_char;
 		port->icount.tx++;
 		port->x_char = 0;
-		return;
+		goto out;
 	}
 	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
 		serial21285_stop_tx(port, 0);
-		return;
+		goto out;
 	}
 
 	do {
@@ -175,6 +178,9 @@
 
 	if (uart_circ_empty(xmit))
 		serial21285_stop_tx(port, 0);
+
+ out:
+	return IRQ_HANDLED;
 }
 
 static unsigned int serial21285_tx_empty(struct uart_port *port)
diff -urN linux-2.5.69-bk9/drivers/serial/amba.c linux-2.5.69-bk10/drivers/serial/amba.c
--- linux-2.5.69-bk9/drivers/serial/amba.c	2003-05-04 16:53:02.000000000 -0700
+++ linux-2.5.69-bk10/drivers/serial/amba.c	2003-05-15 04:44:49.000000000 -0700
@@ -278,7 +278,7 @@
 	wake_up_interruptible(&uap->port.info->delta_msr_wait);
 }
 
-static void ambauart_int(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t ambauart_int(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct uart_port *port = dev_id;
 	unsigned int status, pass_counter = AMBA_ISR_PASS_LIMIT;
@@ -302,6 +302,8 @@
 		status = UART_GET_INT_STATUS(port);
 	} while (status & (AMBA_UARTIIR_RTIS | AMBA_UARTIIR_RIS |
 			   AMBA_UARTIIR_TIS));
+
+	return IRQ_HANDLED;
 }
 
 static unsigned int ambauart_tx_empty(struct uart_port *port)
diff -urN linux-2.5.69-bk9/drivers/serial/sa1100.c linux-2.5.69-bk10/drivers/serial/sa1100.c
--- linux-2.5.69-bk9/drivers/serial/sa1100.c	2003-05-04 16:53:02.000000000 -0700
+++ linux-2.5.69-bk10/drivers/serial/sa1100.c	2003-05-15 04:44:50.000000000 -0700
@@ -312,7 +312,7 @@
 		sa1100_stop_tx(&sport->port, 0);
 }
 
-static void sa1100_int(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t sa1100_int(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct sa1100_port *sport = dev_id;
 	unsigned int status, pass_counter = 0;
@@ -347,6 +347,8 @@
 			  ~UTSR0_TFS;
 	} while (status & (UTSR0_TFS | UTSR0_RFS | UTSR0_RID));
 	spin_unlock(&sport->port.lock);
+
+	return IRQ_HANDLED;
 }
 
 /*
@@ -830,7 +832,7 @@
 	.setup		= sa1100_console_setup,
 	.flags		= CON_PRINTBUFFER,
 	.index		= -1,
-	.data		= sa1100_reg,
+	.data		= &sa1100_reg,
 };
 
 static int __init sa1100_rs_console_init(void)
diff -urN linux-2.5.69-bk9/drivers/sgi/char/sgiserial.c linux-2.5.69-bk10/drivers/sgi/char/sgiserial.c
--- linux-2.5.69-bk9/drivers/sgi/char/sgiserial.c	2003-05-15 04:44:29.000000000 -0700
+++ linux-2.5.69-bk10/drivers/sgi/char/sgiserial.c	2003-05-15 04:44:50.000000000 -0700
@@ -1232,7 +1232,7 @@
 	tmp.close_delay = info->close_delay;
 	tmp.closing_wait = info->closing_wait;
 	tmp.custom_divisor = info->custom_divisor;
-	return copy_to_user(retinfo,&tmp,sizeof(*retinfo));
+	return copy_to_user(retinfo,&tmp,sizeof(*retinfo)) ? -EFAULT : 0;
 }
 
 static int set_serial_info(struct sgi_serial * info,
diff -urN linux-2.5.69-bk9/drivers/usb/class/Kconfig linux-2.5.69-bk10/drivers/usb/class/Kconfig
--- linux-2.5.69-bk9/drivers/usb/class/Kconfig	2003-05-04 16:53:01.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/class/Kconfig	2003-05-15 04:44:50.000000000 -0700
@@ -90,6 +90,6 @@
 
 	  This code is also available as a module ( = code which can be
 	  inserted in and removed from the running kernel whenever you want).
-	  The module will be called printer. If you want to compile it as a
+	  The module will be called usblp. If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
diff -urN linux-2.5.69-bk9/drivers/usb/class/cdc-acm.c linux-2.5.69-bk10/drivers/usb/class/cdc-acm.c
--- linux-2.5.69-bk9/drivers/usb/class/cdc-acm.c	2003-05-15 04:44:29.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/class/cdc-acm.c	2003-05-15 04:44:50.000000000 -0700
@@ -252,7 +252,8 @@
 	unsigned char *data = urb->transfer_buffer;
 	int i = 0;
 
-	if (!ACM_READY(acm)) return;
+	if (!ACM_READY(acm))
+		return;
 
 	if (urb->status)
 		dbg("nonzero read bulk status received: %d", urb->status);
@@ -286,7 +287,8 @@
 {
 	struct acm *acm = (struct acm *)urb->context;
 
-	if (!ACM_READY(acm)) return;
+	if (!ACM_READY(acm))
+		return;
 
 	if (urb->status)
 		dbg("nonzero write bulk status received: %d", urb->status);
@@ -299,7 +301,8 @@
 	struct acm *acm = private;
 	struct tty_struct *tty = acm->tty;
 
-	if (!ACM_READY(acm)) return;
+	if (!ACM_READY(acm))
+		return;
 
 	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
 		(tty->ldisc.write_wakeup)(tty);
@@ -315,7 +318,8 @@
 {
 	struct acm *acm = acm_table[tty->index];
 
-	if (!acm || !acm->dev) return -EINVAL;
+	if (!acm || !acm->dev)
+		return -EINVAL;
 
 	tty->driver_data = acm;
 	acm->tty = tty;
@@ -350,7 +354,8 @@
 {
 	struct acm *acm = tty->driver_data;
 
-	if (!acm || !acm->used) return;
+	if (!acm || !acm->used)
+		return;
 
 	if (!--acm->used) {
 		if (acm->dev) {
@@ -373,9 +378,12 @@
 {
 	struct acm *acm = tty->driver_data;
 
-	if (!ACM_READY(acm)) return -EINVAL;
-	if (acm->writeurb->status == -EINPROGRESS) return 0;
-	if (!count) return 0;
+	if (!ACM_READY(acm))
+		return -EINVAL;
+	if (acm->writeurb->status == -EINPROGRESS)
+		return 0;
+	if (!count)
+		return 0;
 
 	count = (count > acm->writesize) ? acm->writesize : count;
 
@@ -397,28 +405,32 @@
 static int acm_tty_write_room(struct tty_struct *tty)
 {
 	struct acm *acm = tty->driver_data;
-	if (!ACM_READY(acm)) return -EINVAL;
+	if (!ACM_READY(acm))
+		return -EINVAL;
 	return acm->writeurb->status == -EINPROGRESS ? 0 : acm->writesize;
 }
 
 static int acm_tty_chars_in_buffer(struct tty_struct *tty)
 {
 	struct acm *acm = tty->driver_data;
-	if (!ACM_READY(acm)) return -EINVAL;
+	if (!ACM_READY(acm))
+		return -EINVAL;
 	return acm->writeurb->status == -EINPROGRESS ? acm->writeurb->transfer_buffer_length : 0;
 }
 
 static void acm_tty_throttle(struct tty_struct *tty)
 {
 	struct acm *acm = tty->driver_data;
-	if (!ACM_READY(acm)) return;
+	if (!ACM_READY(acm))
+		return;
 	acm->throttle = 1;
 }
 
 static void acm_tty_unthrottle(struct tty_struct *tty)
 {
 	struct acm *acm = tty->driver_data;
-	if (!ACM_READY(acm)) return;
+	if (!ACM_READY(acm))
+		return;
 	acm->throttle = 0;
 	if (acm->readurb->status != -EINPROGRESS)
 		acm_read_bulk(acm->readurb, NULL);
@@ -427,7 +439,8 @@
 static void acm_tty_break_ctl(struct tty_struct *tty, int state)
 {
 	struct acm *acm = tty->driver_data;
-	if (!ACM_READY(acm)) return;
+	if (!ACM_READY(acm))
+		return;
 	if (acm_send_break(acm, state ? 0xffff : 0))
 		dbg("send break failed");
 }
@@ -496,7 +509,8 @@
 	struct acm_line newline;
 	int newctrl = acm->ctrlout;
 
-	if (!ACM_READY(acm)) return;
+	if (!ACM_READY(acm))
+		return;
 
 	newline.speed = cpu_to_le32p(acm_tty_speed +
 		(termios->c_cflag & CBAUD & ~CBAUDEX) + (termios->c_cflag & CBAUDEX ? 15 : 0));
diff -urN linux-2.5.69-bk9/drivers/usb/class/usb-midi.c linux-2.5.69-bk10/drivers/usb/class/usb-midi.c
--- linux-2.5.69-bk9/drivers/usb/class/usb-midi.c	2003-05-04 16:52:49.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/class/usb-midi.c	2003-05-15 04:44:50.000000000 -0700
@@ -1355,8 +1355,10 @@
 		next = p2 + p2[0];
 		length -= p2[0];
 
-		if (p2[0] < 2 ) break;
-		if (p2[1] != USB_DT_CS_INTERFACE) break;
+		if (p2[0] < 2 )
+			break;
+		if (p2[1] != USB_DT_CS_INTERFACE)
+			break;
 		if (p2[2] == MIDI_IN_JACK && p2[0] >= 6 ) {
 			jack = p2[4];
 #ifdef HAVE_JACK_STRINGS
@@ -1366,7 +1368,8 @@
 			       jack, (p2[3] == EMBEDDED_JACK)?"EMBEDDED":"EXTERNAL" );
 		} else if ( p2[2] == MIDI_OUT_JACK && p2[0] >= 6) {
 			pins = p2[5];
-			if ( p2[0] < (6 + 2 * pins) ) continue;
+			if ( p2[0] < (6 + 2 * pins) )
+				continue;
 			jack = p2[4];
 #ifdef HAVE_JACK_STRINGS
 			jack2string[jack] = p2[5 + 2 * pins];
@@ -1375,9 +1378,11 @@
 			       jack, (p2[3] == EMBEDDED_JACK)?"EMBEDDED":"EXTERNAL", pins );
 		} else if ( p2[2] == ELEMENT_DESCRIPTOR  && p2[0]  >= 10) {
 			pins = p2[4];
-			if ( p2[0] < (9 + 2 * pins ) ) continue;
+			if ( p2[0] < (9 + 2 * pins ) )
+				continue;
 			nbytes = p2[8 + 2 * pins ];
-			if ( p2[0] < (10 + 2 * pins + nbytes) ) continue;
+			if ( p2[0] < (10 + 2 * pins + nbytes) )
+				continue;
 			longBits = 0L;
 			for ( offset = 0, shift = 0; offset < nbytes && offset < 8; offset ++, shift += 8) {
 				longBits |= ((long)(p2[9 + 2 * pins + offset])) << shift;
@@ -1408,7 +1413,8 @@
 			if ( p2 && next && ( p2 > next ) )
 				p2 = 0;
 
-			if ( p1[0] < 9 || !p2 || p2[0] < 4 ) continue;
+			if ( p1[0] < 9 || !p2 || p2[0] < 4 )
+				continue;
 
 			if ( (p1[2] & 0x80) == 0x80 ) {
 				if ( iep < 15 ) {
@@ -1417,7 +1423,8 @@
 						pins = 16;
 					u->in[iep].endpoint = p1[2];
 					u->in[iep].cableId = ( 1 << pins ) - 1;
-					if ( u->in[iep].cableId ) iep ++;
+					if ( u->in[iep].cableId )
+						iep ++;
 					if ( iep < 15 ) {
 						u->in[iep].endpoint = -1;
 						u->in[iep].cableId = -1;
@@ -1430,7 +1437,8 @@
 						pins = 16;
 					u->out[oep].endpoint = p1[2];
 					u->out[oep].cableId = ( 1 << pins ) - 1;
-					if ( u->out[oep].cableId ) oep ++;
+					if ( u->out[oep].cableId )
+						oep ++;
 					if ( oep < 15 ) {
 						u->out[oep].endpoint = -1;
 						u->out[oep].cableId = -1;
@@ -1446,7 +1454,8 @@
 			next = find_descriptor(buffer, bufSize, p1, USB_DT_ENDPOINT,
 					       ifnum, altSetting ); 
 	
-			if ( p1[0] < 7 ) continue;
+			if ( p1[0] < 7 )
+				continue;
 
 			if ( (p1[2] & 0x80) == 0x80 ) {
 				if ( iep < 15 ) {
@@ -1455,7 +1464,8 @@
 						pins = 16;
 					u->in[iep].endpoint = p1[2];
 					u->in[iep].cableId = ( 1 << pins ) - 1;
-					if ( u->in[iep].cableId ) iep ++;
+					if ( u->in[iep].cableId )
+						iep ++;
 					if ( iep < 15 ) {
 						u->in[iep].endpoint = -1;
 						u->in[iep].cableId = -1;
@@ -1468,7 +1478,8 @@
 						pins = 16;
 					u->out[oep].endpoint = p1[2];
 					u->out[oep].cableId = ( 1 << pins ) - 1;
-					if ( u->out[oep].cableId ) oep ++;
+					if ( u->out[oep].cableId )
+						oep ++;
 					if ( oep < 15 ) {
 						u->out[oep].endpoint = -1;
 						u->out[oep].cableId = -1;
@@ -1486,7 +1497,7 @@
 	return u;
 
 error_end:
-	if ( u ) kfree(u);
+	kfree(u);
 	return NULL;
 }
 
@@ -1501,7 +1512,8 @@
 	int ret=0;
 
 	for ( i=0 ; i<16 ; i++ ) {
-		if ( v & (1<<i) ) ret++;
+		if ( v & (1<<i) )
+			ret++;
 	}
 
 	return ret;
@@ -1578,7 +1590,8 @@
 	if ( alt < 0 ) {
 		alt = get_alt_setting( d, u->interface );
 	}
-	if ( alt < 0 ) { return -ENXIO; }
+	if ( alt < 0 )
+		return -ENXIO;
 
 	/* Configure interface */
 	if ( usb_set_interface( d, u->interface, alt ) < 0 ) {
@@ -1596,7 +1609,8 @@
 	       && u->in[inEndpoints].cableId >= 0 ) {
 		inDevs += on_bits((unsigned short)u->in[inEndpoints].cableId);
 		mins[inEndpoints] = alloc_midi_in_endpoint( d, u->in[inEndpoints].endpoint );
-		if ( mins[inEndpoints] == NULL ) { goto error_end; }
+		if ( mins[inEndpoints] == NULL )
+			goto error_end;
 		inEndpoints++;
 	}
 
@@ -1605,7 +1619,8 @@
 	       && u->out[outEndpoints].cableId >= 0 ) {
 		outDevs += on_bits((unsigned short)u->out[outEndpoints].cableId);
 		mouts[outEndpoints] = alloc_midi_out_endpoint( d, u->out[outEndpoints].endpoint );
-		if ( mouts[outEndpoints] == NULL ) { goto error_end; }
+		if ( mouts[outEndpoints] == NULL )
+			goto error_end;
 		outEndpoints++;
 	}
 
@@ -1707,7 +1722,8 @@
 		mout = mouts[outEndpoint];
 
 		mdevs[i] = allocMidiDev( s, min, mout, inCableId, outCableId );
-		if ( mdevs[i] == NULL ) { goto error_end; }
+		if ( mdevs[i] == NULL )
+			goto error_end;
 
 	}
 
@@ -1962,11 +1978,15 @@
 		return -EINVAL;
 	}
 
-	if ( ualt < 0 ) { ualt = -1; }
+	if ( ualt < 0 )
+		ualt = -1;
 
-	if ( umin   < 0 || umin   > 15 ) { umin   = 0x01 | USB_DIR_IN; }
-	if ( umout  < 0 || umout  > 15 ) { umout  = 0x01; }
-	if ( ucable < 0 || ucable > 15 ) { ucable = 0; }
+	if ( umin   < 0 || umin   > 15 )
+		umin   = 0x01 | USB_DIR_IN;
+	if ( umout  < 0 || umout  > 15 )
+		umout  = 0x01;
+	if ( ucable < 0 || ucable > 15 )
+		ucable = 0;
 
 	u.deviceName = 0; /* A flag for alloc_usb_midi_device to get device name
 			     from device. */
diff -urN linux-2.5.69-bk9/drivers/usb/class/usblp.c linux-2.5.69-bk10/drivers/usb/class/usblp.c
--- linux-2.5.69-bk9/drivers/usb/class/usblp.c	2003-05-15 04:44:29.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/class/usblp.c	2003-05-15 04:44:50.000000000 -0700
@@ -298,8 +298,10 @@
 	status = *usblp->statusbuf;
 	if (~status & LP_PERRORP) {
 		newerr = 3;
-		if (status & LP_POUTPA) newerr = 1;
-		if (~status & LP_PSELECD) newerr = 2;
+		if (status & LP_POUTPA)
+			newerr = 1;
+		if (~status & LP_PSELECD)
+			newerr = 2;
 	}
 
 	if (newerr != err)
@@ -926,8 +928,8 @@
 		if (usblp->readbuf)
 			usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
 				usblp->readbuf, usblp->writeurb->transfer_dma);
-		if (usblp->statusbuf) kfree(usblp->statusbuf);
-		if (usblp->device_id_string) kfree(usblp->device_id_string);
+		kfree(usblp->statusbuf);
+		kfree(usblp->device_id_string);
 		usb_free_urb(usblp->writeurb);
 		usb_free_urb(usblp->readurb);
 		kfree(usblp);
@@ -987,10 +989,12 @@
 				continue;
 
 			if (!(epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK)) {
-				if (!epwrite) epwrite=epd;
+				if (!epwrite)
+					epwrite = epd;
 
 			} else {
-				if (!epread) epread=epd;
+				if (!epread)
+					epread = epd;
 			}
 		}
 
@@ -1020,9 +1024,12 @@
 		return proto_bias;
 
 	/* Ordering is important here. */
-	if (usblp->protocol[2].alt_setting != -1) return 2;
-	if (usblp->protocol[1].alt_setting != -1) return 1;
-	if (usblp->protocol[3].alt_setting != -1) return 3;
+	if (usblp->protocol[2].alt_setting != -1)
+		return 2;
+	if (usblp->protocol[1].alt_setting != -1)
+		return 1;
+	if (usblp->protocol[3].alt_setting != -1)
+		return 3;
 
 	/* If nothing is available, then don't bind to this device. */
 	return -1;
@@ -1036,7 +1043,8 @@
 		return -EINVAL;
 
 	alts = usblp->protocol[protocol].alt_setting;
-	if (alts < 0) return -EINVAL;
+	if (alts < 0)
+		return -EINVAL;
 	r = usb_set_interface(usblp->dev, usblp->ifnum, alts);
 	if (r < 0) {
 		err("can't set desired altsetting %d on interface %d",
diff -urN linux-2.5.69-bk9/drivers/usb/core/hcd-pci.c linux-2.5.69-bk10/drivers/usb/core/hcd-pci.c
--- linux-2.5.69-bk9/drivers/usb/core/hcd-pci.c	2003-05-04 16:53:14.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/core/hcd-pci.c	2003-05-15 04:44:50.000000000 -0700
@@ -209,7 +209,8 @@
 		return;
 	dev_info (hcd->controller, "remove, state %x\n", hcd->state);
 
-	if (in_interrupt ()) BUG ();
+	if (in_interrupt ())
+		BUG ();
 
 	hub = hcd->self.root_hub;
 	hcd->state = USB_STATE_QUIESCING;
diff -urN linux-2.5.69-bk9/drivers/usb/gadget/Kconfig linux-2.5.69-bk10/drivers/usb/gadget/Kconfig
--- linux-2.5.69-bk9/drivers/usb/gadget/Kconfig	2003-05-15 04:44:29.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/gadget/Kconfig	2003-05-15 04:44:50.000000000 -0700
@@ -35,9 +35,8 @@
 #
 # USB Peripheral Controller Support
 #
-# FIXME convert to tristate choice when "choice" behaves as specified
-#
-comment "USB Peripheral Controller Support"
+choice
+	prompt "USB Peripheral Controller Support"
 	depends on USB_GADGET
 
 config USB_NET2280
@@ -55,19 +54,17 @@
 	   dynamically linked module called "net2280" and force all
 	   gadget drivers to also be dynamically linked.
 
+endchoice
+
 #
 # USB Gadget Drivers
 #
-# FIXME only one of these may be statically linked; choice/endchoice.
-#
-comment "USB Gadget Drivers"
+choice
+	prompt "USB Gadget Drivers"
 	depends on USB_GADGET
+	default USB_ETH
 
-# FIXME want better dependency/config approach for drivers.  with only
-# two knobs to tweak (driver y/m/n, and a hardware symbol) there's no
-# good excuse for Kconfig to cause such trouble here.  there are clear
-# bugs (coredumps, multiple choices enabled, and more) in its (boolean)
-# "choice" logic too ...
+# FIXME want a cleaner dependency/config approach for drivers.
 
 config USB_ZERO
 	tristate "Gadget Zero (DEVELOPMENT)"
@@ -150,4 +147,6 @@
 	depends on USB_ETH && USB_SA1100
 	default y
 
+endchoice
+
 # endmenuconfig
diff -urN linux-2.5.69-bk9/drivers/usb/gadget/net2280.c linux-2.5.69-bk10/drivers/usb/gadget/net2280.c
--- linux-2.5.69-bk9/drivers/usb/gadget/net2280.c	2003-05-15 04:44:29.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/gadget/net2280.c	2003-05-15 04:44:50.000000000 -0700
@@ -73,7 +73,7 @@
 #include <asm/unaligned.h>
 
 
-#define DRIVER_DESC		"NetChip 2280 USB Peripheral Controller"
+#define	DRIVER_DESC		"NetChip 2280 USB Peripheral Controller"
 #define	DRIVER_VERSION		"May Day 2003"
 
 #define	DMA_ADDR_INVALID	(~(dma_addr_t)0)
@@ -98,6 +98,15 @@
 /* "modprobe net2280 use_dma=n" etc */
 module_param (use_dma, bool, S_IRUGO|S_IWUSR);
 
+/* mode 0 == ep-{a,b,c,d} 1K fifo each
+ * mode 1 == ep-{a,b} 2K fifo each, ep-{c,d} unavailable
+ * mode 2 == ep-a 2K fifo, ep-{b,c} 1K each, ep-d unavailable
+ */
+static ushort fifo_mode = 0;
+
+/* "modprobe net2280 fifo_mode=1" etc */
+module_param (fifo_mode, ushort, 0644);
+
 #define	DIR_STRING(bAddress) (((bAddress) & USB_DIR_IN) ? "in" : "out")
 
 #if defined(USE_SYSFS_DEBUG_FILES) || defined (DEBUG)
@@ -384,7 +393,7 @@
 	struct net2280_request	*req;
 
 	ep = container_of (_ep, struct net2280_ep, ep);
-	if (!ep || !_req || (!ep->desc && ep->num != 0))
+	if (!ep || !_req)
 		return;
 
 	req = container_of (_req, struct net2280_request, req);
@@ -411,7 +420,7 @@
 #if	defined(CONFIG_X86)
 #define USE_KMALLOC
 
-#elif	define(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
+#elif	defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
 #define USE_KMALLOC
 
 /* FIXME there are other cases, including an x86-64 one ...  */
@@ -493,6 +502,7 @@
 {
 	struct net2280_ep_regs	*regs = ep->regs;
 	u8			*buf;
+	u32			tmp;
 	unsigned		count, total;
 
 	/* INVARIANT:  fifo is currently empty. (testable) */
@@ -516,14 +526,17 @@
 		 * should normally be full (4 bytes) and successive partial
 		 * lines are ok only in certain cases.
 		 */
-		writel (get_unaligned ((u32 *)buf), &regs->ep_data);
+		tmp = get_unaligned ((u32 *)buf);
+		cpu_to_le32s (&tmp);
+		writel (tmp, &regs->ep_data);
 		buf += 4;
 		count -= 4;
 	}
 
 	/* last fifo entry is "short" unless we wrote a full packet */
 	if (total < ep->ep.maxpacket) {
-		u32	tmp = count ? get_unaligned ((u32 *)buf) : count;
+		tmp = count ? get_unaligned ((u32 *)buf) : count;
+		cpu_to_le32s (&tmp);
 		set_fifo_bytecount (ep, count & 0x03);
 		writel (tmp, &regs->ep_data);
 	}
@@ -623,12 +636,15 @@
 			req, req->req.actual, req->req.length);
 
 	while (count >= 4) {
-		put_unaligned (readl (&regs->ep_data), (u32 *)buf);
+		tmp = readl (&regs->ep_data);
+		cpu_to_le32s (&tmp);
+		put_unaligned (tmp, (u32 *)buf);
 		buf += 4;
 		count -= 4;
 	}
 	if (count) {
 		tmp = readl (&regs->ep_data);
+		cpu_to_le32s (&tmp);
 		do {
 			*buf++ = (u8) tmp;
 			tmp >>= 8;
@@ -1193,11 +1209,13 @@
 
 	ep = container_of (_ep, struct net2280_ep, ep);
 	if (!_ep || (!ep->desc && ep->num != 0))
-		return -EINVAL;
+		return -ENODEV;
 	if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN)
 		return -ESHUTDOWN;
 
-	avail = readl (&ep->regs->ep_avail);
+	avail = readl (&ep->regs->ep_avail) & ((1 << 12) - 1);
+	if (avail > ep->fifo_size)
+		return -EOVERFLOW;
 	if (ep->is_in)
 		avail = ep->fifo_size - avail;
 	return avail;
@@ -1260,7 +1278,7 @@
 	if (!_gadget)
 		return 0;
 	dev = container_of (_gadget, struct net2280, gadget);
-	writel (1 << GENERATE_RESUME, dev->usb->usbstat);
+	writel (1 << GENERATE_RESUME, &dev->usb->usbstat);
 
 	/* pci writes may still be posted */
 	return 0;
@@ -1649,7 +1667,7 @@
 	writel (tmp, &dev->regs->devinit);
 
 	/* standard fifo and endpoint allocations */
-	set_fifo_mode (dev, 0);
+	set_fifo_mode (dev, (fifo_mode <= 2) ? fifo_mode : 0);
 }
 
 static void usb_reinit (struct net2280 *dev)
@@ -2119,6 +2137,10 @@
 			, &ep->regs->ep_stat);
 		u.raw [0] = readl (&dev->usb->setup0123);
 		u.raw [1] = readl (&dev->usb->setup4567);
+		
+		cpu_to_le32s (&u.raw [0]);
+		cpu_to_le32s (&u.raw [1]);
+
 		le16_to_cpus (&u.r.wValue);
 		le16_to_cpus (&u.r.wIndex);
 		le16_to_cpus (&u.r.wLength);
diff -urN linux-2.5.69-bk9/drivers/usb/host/ehci-hcd.c linux-2.5.69-bk10/drivers/usb/host/ehci-hcd.c
--- linux-2.5.69-bk9/drivers/usb/host/ehci-hcd.c	2003-05-15 04:44:29.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/host/ehci-hcd.c	2003-05-15 04:44:50.000000000 -0700
@@ -887,7 +887,6 @@
 	/* ASSERT:  any requests/urbs are being unlinked */
 	/* ASSERT:  nobody can be submitting urbs for this any more */
 
-	ehci_dbg (ehci, "ep %02x disable\n", ep);
 	epnum = ep & USB_ENDPOINT_NUMBER_MASK;
 	if (epnum != 0 && (ep & USB_DIR_IN))
 		epnum |= 0x10;
diff -urN linux-2.5.69-bk9/drivers/usb/host/ohci-hcd.c linux-2.5.69-bk10/drivers/usb/host/ohci-hcd.c
--- linux-2.5.69-bk9/drivers/usb/host/ohci-hcd.c	2003-05-04 16:53:01.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/host/ohci-hcd.c	2003-05-15 04:44:50.000000000 -0700
@@ -323,7 +323,6 @@
 	/* ASSERT:  any requests/urbs are being unlinked */
 	/* ASSERT:  nobody can be submitting urbs for this any more */
 
-	ohci_dbg (ohci, "ep %02x disable\n", ep);
 	epnum <<= 1;
 	if (epnum != 0 && !(ep & USB_DIR_IN))
 		epnum |= 1;
diff -urN linux-2.5.69-bk9/drivers/usb/host/ohci-sa1111.c linux-2.5.69-bk10/drivers/usb/host/ohci-sa1111.c
--- linux-2.5.69-bk9/drivers/usb/host/ohci-sa1111.c	2003-05-04 16:53:31.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/host/ohci-sa1111.c	2003-05-15 04:44:50.000000000 -0700
@@ -209,7 +209,8 @@
 
  err2:
 	hcd_buffer_destroy (hcd);
-	if (hcd) driver->hcd_free(hcd);
+	if (hcd)
+		driver->hcd_free(hcd);
  err1:
 	sa1111_stop_hc(dev);
 	release_mem_region(dev->res.start, dev->res.end - dev->res.start + 1);
@@ -237,7 +238,8 @@
 
 	info ("remove: %s, state %x", hcd->self.bus_name, hcd->state);
 
-	if (in_interrupt ()) BUG ();
+	if (in_interrupt ())
+		BUG ();
 
 	hub = hcd->self.root_hub;
 	hcd->state = USB_STATE_QUIESCING;
diff -urN linux-2.5.69-bk9/drivers/usb/input/hid-core.c linux-2.5.69-bk10/drivers/usb/input/hid-core.c
--- linux-2.5.69-bk9/drivers/usb/input/hid-core.c	2003-05-04 16:53:32.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/input/hid-core.c	2003-05-15 04:44:50.000000000 -0700
@@ -61,7 +61,8 @@
 		return NULL;
 	memset(report, 0, sizeof(struct hid_report));
 
-	if (id != 0) report_enum->numbered = 1;
+	if (id != 0)
+		report_enum->numbered = 1;
 
 	report->id = id;
 	report->type = type;
@@ -539,11 +540,13 @@
 
 		for (j = 0; j < 256; j++) {
 			struct hid_report *report = report_enum->report_id_hash[j];
-			if (report) hid_free_report(report);
+			if (report)
+				hid_free_report(report);
 		}
 	}
 
-	if (device->rdesc) kfree(device->rdesc);
+	if (device->rdesc)
+		kfree(device->rdesc);
 	kfree(device);
 }
 
@@ -741,7 +744,8 @@
 static __inline__ __u32 s32ton(__s32 value, unsigned n)
 {
 	__s32 a = value >> (n - 1);
-	if (a && a != -1) return value < 0 ? 1 << (n - 1) : (1 << (n - 1)) - 1;
+	if (a && a != -1)
+		return value < 0 ? 1 << (n - 1) : (1 << (n - 1)) - 1;
 	return value & ((1 << n) - 1);
 }
 
@@ -769,7 +773,10 @@
 
 static __inline__ int search(__s32 *array, __s32 value, unsigned n)
 {
-	while (n--) if (*array++ == value) return 0;
+	while (n--) {
+		if (*array++ == value)
+			return 0;
+	}
 	return -1;
 }
 
@@ -814,9 +821,11 @@
 		if (HID_MAIN_ITEM_VARIABLE & field->flags) {
 
 			if (field->flags & HID_MAIN_ITEM_RELATIVE) {
-				if (!value[n]) continue;
+				if (!value[n])
+					continue;
 			} else {
-				if (value[n] == field->value[n]) continue;
+				if (value[n] == field->value[n])
+					continue;
 			}	
 			hid_process_event(hid, field, &field->usage[n], value[n], regs);
 			continue;
@@ -1324,6 +1333,11 @@
 #define USB_VENDOR_ID_TOPMAX           0x0663
 #define USB_DEVICE_ID_TOPMAX_COBRAPAD  0x0103
 
+#define USB_VENDOR_ID_HAPP             0x078b
+#define USB_DEVICE_ID_UGCI_DRIVING     0x0010
+#define USB_DEVICE_ID_UGCI_FLYING      0x0020
+#define USB_DEVICE_ID_UGCI_FIGHTING    0x0030
+
 #define USB_VENDOR_ID_MGE              0x0463
 #define USB_DEVICE_ID_MGE_UPS          0xffff
 #define USB_DEVICE_ID_MGE_UPS1         0x0001
@@ -1357,11 +1371,11 @@
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 3, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 4, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 5, HID_QUIRK_IGNORE },
+	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 1, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 2, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 3, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 4, HID_QUIRK_IGNORE },
-	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 5, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_6000, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE },
@@ -1373,6 +1387,9 @@
 	{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_HIDDEV },
 	{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS1, HID_QUIRK_HIDDEV },
 	{ USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD },
+	{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD },
+	{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD },
+	{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD },
 	{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 100, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 200, HID_QUIRK_IGNORE },
@@ -1558,9 +1575,12 @@
 
 fail:
 
-	if (hid->urbin) usb_free_urb(hid->urbin);
-	if (hid->urbout) usb_free_urb(hid->urbout);
-	if (hid->urbctrl) usb_free_urb(hid->urbctrl);
+	if (hid->urbin)
+		usb_free_urb(hid->urbin);
+	if (hid->urbout)
+		usb_free_urb(hid->urbout);
+	if (hid->urbctrl)
+		usb_free_urb(hid->urbctrl);
 	hid_free_buffers(dev, hid);
 	hid_free_device(hid);
 
diff -urN linux-2.5.69-bk9/drivers/usb/input/hid-input.c linux-2.5.69-bk10/drivers/usb/input/hid-input.c
--- linux-2.5.69-bk9/drivers/usb/input/hid-input.c	2003-05-04 16:53:13.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/input/hid-input.c	2003-05-15 04:44:50.000000000 -0700
@@ -351,7 +351,8 @@
 		usage->code = find_next_zero_bit(bit, max + 1, usage->code);
 	}
 
-	if (usage->code > max) return;
+	if (usage->code > max)
+		return;
 
 	if (usage->type == EV_ABS) {
 		int a = field->logical_minimum;
diff -urN linux-2.5.69-bk9/drivers/usb/input/hid-lgff.c linux-2.5.69-bk10/drivers/usb/input/hid-lgff.c
--- linux-2.5.69-bk9/drivers/usb/input/hid-lgff.c	2003-05-04 16:53:36.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/input/hid-lgff.c	2003-05-15 04:44:50.000000000 -0700
@@ -154,7 +154,8 @@
 	}
 
 	private = kmalloc(sizeof(struct lgff_device), GFP_KERNEL);
-	if (!private) return -1;
+	if (!private)
+		return -1;
 	memset(private, 0, sizeof(struct lgff_device));
 	hid->ff_private = private;
 
@@ -216,7 +217,8 @@
 	struct hid_report* ret;
 
 	ret = kmalloc(sizeof(struct lgff_device), GFP_KERNEL);
-	if (!ret) return NULL;
+	if (!ret)
+		return NULL;
 	*ret = *report;
 
 	ret->field[0] = kmalloc(sizeof(struct hid_field), GFP_KERNEL);
diff -urN linux-2.5.69-bk9/drivers/usb/input/hid-tmff.c linux-2.5.69-bk10/drivers/usb/input/hid-tmff.c
--- linux-2.5.69-bk9/drivers/usb/input/hid-tmff.c	2003-05-04 16:53:33.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/input/hid-tmff.c	2003-05-15 04:44:50.000000000 -0700
@@ -112,7 +112,8 @@
 	struct list_head *pos;
 
 	private = kmalloc(sizeof(struct tmff_device), GFP_KERNEL);
-	if (!private) return -ENOMEM;
+	if (!private)
+		return -ENOMEM;
 
 	memset(private, 0, sizeof(struct tmff_device));
 	hid->ff_private = private;
diff -urN linux-2.5.69-bk9/drivers/usb/input/hiddev.c linux-2.5.69-bk10/drivers/usb/input/hiddev.c
--- linux-2.5.69-bk9/drivers/usb/input/hiddev.c	2003-05-15 04:44:29.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/input/hiddev.c	2003-05-15 04:44:50.000000000 -0700
@@ -96,16 +96,19 @@
 
 	case HID_REPORT_ID_FIRST:
 		list = report_enum->report_list.next;
-		if (list == &report_enum->report_list) return NULL;
+		if (list == &report_enum->report_list)
+			return NULL;
 		rinfo->report_id = ((struct hid_report *) list)->id;
 		break;
 		
 	case HID_REPORT_ID_NEXT:
 		list = (struct list_head *)
 			report_enum->report_id_hash[rinfo->report_id & HID_REPORT_ID_MASK];
-		if (list == NULL) return NULL;
+		if (list == NULL)
+			return NULL;
 		list = list->next;
-		if (list == &report_enum->report_list) return NULL;
+		if (list == &report_enum->report_list)
+			return NULL;
 		rinfo->report_id = ((struct hid_report *) list)->id;
 		break;
 		
@@ -311,7 +314,8 @@
 	event_size = ((list->flags & HIDDEV_FLAG_UREF) != 0) ?
 		sizeof(struct hiddev_usage_ref) : sizeof(struct hiddev_event);
 
-	if (count < event_size) return 0;
+	if (count < event_size)
+		return 0;
 
 	while (retval == 0) {
 		if (list->head == list->tail) {
@@ -404,7 +408,8 @@
 	struct hid_field *field;
 	int i;
 
-	if (!hiddev->exist) return -EIO;
+	if (!hiddev->exist)
+		return -EIO;
 
 	switch (cmd) {
 
@@ -646,18 +651,22 @@
 
 		if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGNAME(0))) {
 			int len;
-			if (!hid->name) return 0;
+			if (!hid->name)
+				return 0;
 			len = strlen(hid->name) + 1;
-			if (len > _IOC_SIZE(cmd)) len = _IOC_SIZE(cmd);
+			if (len > _IOC_SIZE(cmd))
+				 len = _IOC_SIZE(cmd);
 			return copy_to_user((char *) arg, hid->name, len) ?
 				-EFAULT : len;
 		}
 
 		if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGPHYS(0))) {
 			int len;
-			if (!hid->phys) return 0;
+			if (!hid->phys)
+				return 0;
 			len = strlen(hid->phys) + 1;
-			if (len > _IOC_SIZE(cmd)) len = _IOC_SIZE(cmd);
+			if (len > _IOC_SIZE(cmd))
+				len = _IOC_SIZE(cmd);
 			return copy_to_user((char *) arg, hid->phys, len) ?
 				-EFAULT : len;
 		}
diff -urN linux-2.5.69-bk9/drivers/usb/input/pid.c linux-2.5.69-bk10/drivers/usb/input/pid.c
--- linux-2.5.69-bk9/drivers/usb/input/pid.c	2003-05-04 16:53:41.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/input/pid.c	2003-05-15 04:44:50.000000000 -0700
@@ -117,7 +117,8 @@
 	unsigned wanted_report = HID_UP_PID | FF_PID_USAGE_BLOCK_FREE;  /*  PID Block Free Report */
 	int ret;
 
-	if (!CHECK_OWNERSHIP(id, pid)) return -EACCES;
+	if (!CHECK_OWNERSHIP(id, pid))
+		return -EACCES;
 
 	/* Find report */
 	ret =  hid_find_report_by_usage(hid, wanted_report, &report, HID_OUTPUT_REPORT);
@@ -214,7 +215,8 @@
 	}
 	else {
 		/* We want to update an effect */
-		if (!CHECK_OWNERSHIP(effect->id, pid_private)) return -EACCES;
+		if (!CHECK_OWNERSHIP(effect->id, pid_private))
+			return -EACCES;
 
 		/* Parameter type cannot be updated */
 		if (effect->type != pid_private->effects[effect->id].effect.type)
diff -urN linux-2.5.69-bk9/drivers/usb/input/usbkbd.c linux-2.5.69-bk10/drivers/usb/input/usbkbd.c
--- linux-2.5.69-bk9/drivers/usb/input/usbkbd.c	2003-05-04 16:53:42.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/input/usbkbd.c	2003-05-15 04:44:50.000000000 -0700
@@ -137,7 +137,8 @@
 {
 	struct usb_kbd *kbd = dev->private;
 
-	if (type != EV_LED) return -1;
+	if (type != EV_LED)
+		return -1;
 
 
 	kbd->newleds = (!!test_bit(LED_KANA,    dev->led) << 3) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
diff -urN linux-2.5.69-bk9/drivers/usb/media/ov511.c linux-2.5.69-bk10/drivers/usb/media/ov511.c
--- linux-2.5.69-bk9/drivers/usb/media/ov511.c	2003-05-04 16:53:09.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/media/ov511.c	2003-05-15 04:44:50.000000000 -0700
@@ -876,15 +876,18 @@
 
 	/* Select camera register */
 	rc = reg_w(ov, R51x_I2C_SADDR_3, reg);
-	if (rc < 0) return rc;
+	if (rc < 0)
+		return rc;
 
 	/* Write "value" to I2C data port of OV511 */
 	rc = reg_w(ov, R51x_I2C_DATA, value);
-	if (rc < 0) return rc;
+	if (rc < 0)
+		return rc;
 
 	/* Initiate 3-byte write cycle */
 	rc = reg_w(ov, R518_I2C_CTL, 0x01);
-	if (rc < 0) return rc;
+	if (rc < 0)
+		return rc;
 
 	return 0;
 }
@@ -903,33 +906,43 @@
 	for (retries = OV511_I2C_RETRIES; ; ) {
 		/* Select camera register */
 		rc = reg_w(ov, R51x_I2C_SADDR_3, reg);
-		if (rc < 0) return rc;
+		if (rc < 0)
+			break;
 
 		/* Write "value" to I2C data port of OV511 */
 		rc = reg_w(ov, R51x_I2C_DATA, value);
-		if (rc < 0) return rc;
+		if (rc < 0)
+			break;
 
 		/* Initiate 3-byte write cycle */
 		rc = reg_w(ov, R511_I2C_CTL, 0x01);
-		if (rc < 0) return rc;
+		if (rc < 0)
+			break;
 
-		do rc = reg_r(ov, R511_I2C_CTL);
-		while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
-		if (rc < 0) return rc;
+		/* Retry until idle */
+		do
+			rc = reg_r(ov, R511_I2C_CTL);
+		while (rc > 0 && ((rc&1) == 0)); 
+		if (rc < 0)
+			break;
 
-		if ((rc&2) == 0) /* Ack? */
+		/* Ack? */
+		if ((rc&2) == 0) {
+			rc = 0;
 			break;
+		}
 #if 0
 		/* I2C abort */
 		reg_w(ov, R511_I2C_CTL, 0x10);
 #endif
 		if (--retries < 0) {
 			err("i2c write retries exhausted");
-			return -1;
+			rc = -1;
+			break;
 		}
 	}
 
-	return 0;
+	return rc;
 }
 
 /* NOTE: Do not call this function directly!
@@ -944,15 +957,18 @@
 
 	/* Select camera register */
 	rc = reg_w(ov, R51x_I2C_SADDR_2, reg);
-	if (rc < 0) return rc;
+	if (rc < 0)
+		return rc;
 
 	/* Initiate 2-byte write cycle */
 	rc = reg_w(ov, R518_I2C_CTL, 0x03);
-	if (rc < 0) return rc;
+	if (rc < 0)
+		return rc;
 
 	/* Initiate 2-byte read cycle */
 	rc = reg_w(ov, R518_I2C_CTL, 0x05);
-	if (rc < 0) return rc;
+	if (rc < 0)
+		return rc;
 
 	value = reg_r(ov, R51x_I2C_DATA);
 
@@ -972,15 +988,20 @@
 	for (retries = OV511_I2C_RETRIES; ; ) {
 		/* Select camera register */
 		rc = reg_w(ov, R51x_I2C_SADDR_2, reg);
-		if (rc < 0) return rc;
+		if (rc < 0)
+			return rc;
 
 		/* Initiate 2-byte write cycle */
 		rc = reg_w(ov, R511_I2C_CTL, 0x03);
-		if (rc < 0) return rc;
+		if (rc < 0)
+			return rc;
 
-		do rc = reg_r(ov, R511_I2C_CTL);
-		while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
-		if (rc < 0) return rc;
+		/* Retry until idle */
+		do
+			 rc = reg_r(ov, R511_I2C_CTL);
+		while (rc > 0 && ((rc&1) == 0));
+		if (rc < 0)
+			return rc;
 
 		if ((rc&2) == 0) /* Ack? */
 			break;
@@ -998,18 +1019,23 @@
 	for (retries = OV511_I2C_RETRIES; ; ) {
 		/* Initiate 2-byte read cycle */
 		rc = reg_w(ov, R511_I2C_CTL, 0x05);
-		if (rc < 0) return rc;
+		if (rc < 0)
+			return rc;
 
-		do rc = reg_r(ov, R511_I2C_CTL);
-		while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
-		if (rc < 0) return rc;
+		/* Retry until idle */
+		do
+			rc = reg_r(ov, R511_I2C_CTL);
+		while (rc > 0 && ((rc&1) == 0));
+		if (rc < 0)
+			return rc;
 
 		if ((rc&2) == 0) /* Ack? */
 			break;
 
 		/* I2C abort */
 		rc = reg_w(ov, R511_I2C_CTL, 0x10);
-		if (rc < 0) return rc;
+		if (rc < 0)
+			return rc;
 
 		if (--retries < 0) {
 			err("i2c read retries exhausted");
@@ -1127,10 +1153,12 @@
 	int rc;
 
 	rc = reg_w(ov, R51x_I2C_W_SID, slave);
-	if (rc < 0) return rc;
+	if (rc < 0)
+		return rc;
 
 	rc = reg_w(ov, R51x_I2C_R_SID, slave + 1);
-	if (rc < 0) return rc;
+	if (rc < 0)
+		return rc;
 
 	return 0;
 }
@@ -1149,7 +1177,8 @@
 
 	/* Set new slave IDs */
 	rc = i2c_set_slave_internal(ov, slave);
-	if (rc < 0) goto out;
+	if (rc < 0)
+		goto out;
 
 	rc = ov51x_i2c_write_mask_internal(ov, reg, value, mask);
 
@@ -1174,7 +1203,8 @@
 
 	/* Set new slave IDs */
 	rc = i2c_set_slave_internal(ov, slave);
-	if (rc < 0) goto out;
+	if (rc < 0)
+		goto out;
 
 	if (ov->bclass == BCL_OV518)
 		rc = ov518_i2c_read_internal(ov, reg);
@@ -1199,12 +1229,11 @@
 	down(&ov->i2c_lock);
 
 	rc = i2c_set_slave_internal(ov, sid);
-	if (rc < 0) goto out;
+	if (rc < 0)
+		goto out;
 
 	// FIXME: Is this actually necessary?
 	rc = ov51x_reset(ov, OV511_RESET_NOREGS);
-	if (rc < 0) goto out;
-
 out:
 	up(&ov->i2c_lock);
 	return rc;
@@ -1403,7 +1432,8 @@
 	int i, success;
 
 	/* Reset the sensor */
-	if (i2c_w(ov, 0x12, 0x80) < 0) return -EIO;
+	if (i2c_w(ov, 0x12, 0x80) < 0)
+		return -EIO;
 
 	/* Wait for it to initialize */
 	schedule_timeout(1 + 150 * HZ / 1000);
@@ -1416,11 +1446,13 @@
 		}
 
 		/* Reset the sensor */
-		if (i2c_w(ov, 0x12, 0x80) < 0) return -EIO;
+		if (i2c_w(ov, 0x12, 0x80) < 0)
+			return -EIO;
 		/* Wait for it to initialize */
 		schedule_timeout(1 + 150 * HZ / 1000);
 		/* Dummy read to sync I2C */
-		if (i2c_r(ov, 0x00) < 0) return -EIO;
+		if (i2c_r(ov, 0x00) < 0)
+			return -EIO;
 	}
 
 	if (!success)
@@ -1442,24 +1474,37 @@
 	mult = size >> 5;
 
 	if (ov->bridge == BRG_OV511) {
-		if (size == 0) alt = OV511_ALT_SIZE_0;
-		else if (size == 257) alt = OV511_ALT_SIZE_257;
-		else if (size == 513) alt = OV511_ALT_SIZE_513;
-		else if (size == 769) alt = OV511_ALT_SIZE_769;
-		else if (size == 993) alt = OV511_ALT_SIZE_993;
+		if (size == 0)
+			alt = OV511_ALT_SIZE_0;
+		else if (size == 257)
+			alt = OV511_ALT_SIZE_257;
+		else if (size == 513)
+			alt = OV511_ALT_SIZE_513;
+		else if (size == 769)
+			alt = OV511_ALT_SIZE_769;
+		else if (size == 993)
+			alt = OV511_ALT_SIZE_993;
 		else {
 			err("Set packet size: invalid size (%d)", size);
 			return -EINVAL;
 		}
 	} else if (ov->bridge == BRG_OV511PLUS) {
-		if (size == 0) alt = OV511PLUS_ALT_SIZE_0;
-		else if (size == 33) alt = OV511PLUS_ALT_SIZE_33;
-		else if (size == 129) alt = OV511PLUS_ALT_SIZE_129;
-		else if (size == 257) alt = OV511PLUS_ALT_SIZE_257;
-		else if (size == 385) alt = OV511PLUS_ALT_SIZE_385;
-		else if (size == 513) alt = OV511PLUS_ALT_SIZE_513;
-		else if (size == 769) alt = OV511PLUS_ALT_SIZE_769;
-		else if (size == 961) alt = OV511PLUS_ALT_SIZE_961;
+		if (size == 0)
+			alt = OV511PLUS_ALT_SIZE_0;
+		else if (size == 33)
+			alt = OV511PLUS_ALT_SIZE_33;
+		else if (size == 129)
+			alt = OV511PLUS_ALT_SIZE_129;
+		else if (size == 257)
+			alt = OV511PLUS_ALT_SIZE_257;
+		else if (size == 385)
+			alt = OV511PLUS_ALT_SIZE_385;
+		else if (size == 513)
+			alt = OV511PLUS_ALT_SIZE_513;
+		else if (size == 769)
+			alt = OV511PLUS_ALT_SIZE_769;
+		else if (size == 961)
+			alt = OV511PLUS_ALT_SIZE_961;
 		else {
 			err("Set packet size: invalid size (%d)", size);
 			return -EINVAL;
@@ -1502,14 +1547,22 @@
 		return -EIO;
 
 	if (ov->bclass == BCL_OV518) {
-		if (size == 0) alt = OV518_ALT_SIZE_0;
-		else if (size == 128) alt = OV518_ALT_SIZE_128;
-		else if (size == 256) alt = OV518_ALT_SIZE_256;
-		else if (size == 384) alt = OV518_ALT_SIZE_384;
-		else if (size == 512) alt = OV518_ALT_SIZE_512;
-		else if (size == 640) alt = OV518_ALT_SIZE_640;
-		else if (size == 768) alt = OV518_ALT_SIZE_768;
-		else if (size == 896) alt = OV518_ALT_SIZE_896;
+		if (size == 0)
+			alt = OV518_ALT_SIZE_0;
+		else if (size == 128)
+			alt = OV518_ALT_SIZE_128;
+		else if (size == 256)
+			alt = OV518_ALT_SIZE_256;
+		else if (size == 384)
+			alt = OV518_ALT_SIZE_384;
+		else if (size == 512)
+			alt = OV518_ALT_SIZE_512;
+		else if (size == 640)
+			alt = OV518_ALT_SIZE_640;
+		else if (size == 768)
+			alt = OV518_ALT_SIZE_768;
+		else if (size == 896)
+			alt = OV518_ALT_SIZE_896;
 		else {
 			err("Set packet size: invalid size (%d)", size);
 			return -EINVAL;
@@ -3939,28 +3992,40 @@
 	ov->curframe = -1;
 
 	if (ov->bridge == BRG_OV511) {
-		if (cams == 1)				size = 993;
-		else if (cams == 2)			size = 513;
-		else if (cams == 3 || cams == 4)	size = 257;
+		if (cams == 1)
+			size = 993;
+		else if (cams == 2)
+			size = 513;
+		else if (cams == 3 || cams == 4)
+			size = 257;
 		else {
 			err("\"cams\" parameter too high!");
 			return -1;
 		}
 	} else if (ov->bridge == BRG_OV511PLUS) {
-		if (cams == 1)				size = 961;
-		else if (cams == 2)			size = 513;
-		else if (cams == 3 || cams == 4)	size = 257;
-		else if (cams >= 5 && cams <= 8)	size = 129;
-		else if (cams >= 9 && cams <= 31)	size = 33;
+		if (cams == 1)
+			size = 961;
+		else if (cams == 2)
+			size = 513;
+		else if (cams == 3 || cams == 4)
+			size = 257;
+		else if (cams >= 5 && cams <= 8)
+			size = 129;
+		else if (cams >= 9 && cams <= 31)
+			size = 33;
 		else {
 			err("\"cams\" parameter too high!");
 			return -1;
 		}
 	} else if (ov->bclass == BCL_OV518) {
-		if (cams == 1)				size = 896;
-		else if (cams == 2)			size = 512;
-		else if (cams == 3 || cams == 4)	size = 256;
-		else if (cams >= 5 && cams <= 8)	size = 128;
+		if (cams == 1)
+			size = 896;
+		else if (cams == 2)
+			size = 512;
+		else if (cams == 3 || cams == 4)
+			size = 256;
+		else if (cams >= 5 && cams <= 8)
+			size = 128;
 		else {
 			err("\"cams\" parameter too high!");
 			return -1;
@@ -5016,7 +5081,7 @@
 	struct proc_dir_entry *pde = PDE(inode);
 	struct usb_ov511 *ov;
 	void *arg = (void *) ularg;
-	int rc;
+	int rc = 0;
 
 	if (!pde)
 		return -ENOENT;
@@ -5037,81 +5102,79 @@
 
 		PDEBUG(4, "Get interface version: %d", ver);
 		if (copy_to_user(arg, &ver, sizeof(ver)))
-			return -EFAULT;
-
-		return 0;
+			rc = -EFAULT;
+		break;
 	}
 	case OV511IOC_GUSHORT:
 	{
 		struct ov511_ushort_opt opt;
 
-		if (copy_from_user(&opt, arg, sizeof(opt)))
-			return -EFAULT;
+		if (copy_from_user(&opt, arg, sizeof(opt))) {
+			rc = -EFAULT;
+			break;
+		}
 
 		switch (opt.optnum) {
 		case OV511_USOPT_BRIGHT:
 			rc = sensor_get_brightness(ov, &(opt.val));
-			if (rc)	return rc;
 			break;
 		case OV511_USOPT_SAT:
 			rc = sensor_get_saturation(ov, &(opt.val));
-			if (rc)	return rc;
 			break;
 		case OV511_USOPT_HUE:
 			rc = sensor_get_hue(ov, &(opt.val));
-			if (rc)	return rc;
 			break;
 		case OV511_USOPT_CONTRAST:
 			rc = sensor_get_contrast(ov, &(opt.val));
-			if (rc)	return rc;
 			break;
 		default:
 			err("Invalid get short option number");
-			return -EINVAL;
+			rc = -EINVAL;
 		}
 
+		if (rc < 0)
+			break;
 		if (copy_to_user(arg, &opt, sizeof(opt)))
-			return -EFAULT;
-
-		return 0;
+			rc = -EFAULT;
+		break;
 	}
 	case OV511IOC_SUSHORT:
 	{
 		struct ov511_ushort_opt opt;
 
-		if (copy_from_user(&opt, arg, sizeof(opt)))
-			return -EFAULT;
+		if (copy_from_user(&opt, arg, sizeof(opt))) {
+			rc = -EFAULT;
+			break;
+		}
 
 		switch (opt.optnum) {
 		case OV511_USOPT_BRIGHT:
 			rc = sensor_set_brightness(ov, opt.val);
-			if (rc)	return rc;
 			break;
 		case OV511_USOPT_SAT:
 			rc = sensor_set_saturation(ov, opt.val);
-			if (rc)	return rc;
 			break;
 		case OV511_USOPT_HUE:
 			rc = sensor_set_hue(ov, opt.val);
-			if (rc)	return rc;
 			break;
 		case OV511_USOPT_CONTRAST:
 			rc = sensor_set_contrast(ov, opt.val);
-			if (rc)	return rc;
 			break;
 		default:
 			err("Invalid set short option number");
-			return -EINVAL;
+			rc = -EINVAL;
 		}
 
-		return 0;
+		break;
 	}
 	case OV511IOC_GUINT:
 	{
 		struct ov511_uint_opt opt;
 
-		if (copy_from_user(&opt, arg, sizeof(opt)))
-			return -EFAULT;
+		if (copy_from_user(&opt, arg, sizeof(opt))) {
+			rc = -EFAULT;
+			break;
+		}
 
 		switch (opt.optnum) {
 		case OV511_UIOPT_POWER_FREQ:
@@ -5131,29 +5194,31 @@
 			break;
 		default:
 			err("Invalid get int option number");
-			return -EINVAL;
+			rc = -EINVAL;
 		}
 
+		if (rc < 0)
+			break;
 		if (copy_to_user(arg, &opt, sizeof(opt)))
-			return -EFAULT;
+			rc = -EFAULT;
 
-		return 0;
+		break;
 	}
 	case OV511IOC_SUINT:
 	{
 		struct ov511_uint_opt opt;
 
-		if (copy_from_user(&opt, arg, sizeof(opt)))
-			return -EFAULT;
+		if (copy_from_user(&opt, arg, sizeof(opt))) {
+			rc = -EFAULT;
+			break;
+		}
 
 		switch (opt.optnum) {
 		case OV511_UIOPT_POWER_FREQ:
 			rc = sensor_set_light_freq(ov, opt.val);
-			if (rc)	return rc;
 			break;
 		case OV511_UIOPT_BFILTER:
 			rc = sensor_set_banding_filter(ov, opt.val);
-			if (rc)	return rc;
 			break;
 		case OV511_UIOPT_LED:
 			if (opt.val <= 2) {
@@ -5162,15 +5227,14 @@
 					ov51x_led_control(ov, 0);
 				else if (ov->led_policy == LED_ON)
 					ov51x_led_control(ov, 1);
-			} else {
-				return -EINVAL;
-			}
+			} else
+				rc = -EINVAL;
 			break;
 		case OV511_UIOPT_DEBUG:
 			if (opt.val <= 5)
 				debug = opt.val;
 			else
-				return -EINVAL;
+				rc = -EINVAL;
 			break;
 		case OV511_UIOPT_COMPRESS:
 			ov->compress = opt.val;
@@ -5183,43 +5247,48 @@
 			break;
 		default:
 			err("Invalid get int option number");
-			return -EINVAL;
+			rc = -EINVAL;
 		}
 
-		return 0;
+		break;
 	}
 	case OV511IOC_WI2C:
 	{
 		struct ov511_i2c_struct w;
 
-		if (copy_from_user(&w, arg, sizeof(w)))
-			return -EFAULT;
+		if (copy_from_user(&w, arg, sizeof(w))) {
+			rc = -EFAULT;
+			break;
+		}
 
-		return i2c_w_slave(ov, w.slave, w.reg, w.value,	w.mask);
+		rc = i2c_w_slave(ov, w.slave, w.reg, w.value, w.mask);
+		break;
 	}
 	case OV511IOC_RI2C:
 	{
 		struct ov511_i2c_struct r;
 
-		if (copy_from_user(&r, arg, sizeof(r)))
-			return -EFAULT;
+		if (copy_from_user(&r, arg, sizeof(r))) {
+			rc = -EFAULT;
+			break;
+		}
 
 		rc = i2c_r_slave(ov, r.slave, r.reg);
 		if (rc < 0)
-			return rc;
+			break;
 
 		r.value = rc;
 
 		if (copy_to_user(arg, &r, sizeof(r)))
-			return -EFAULT;
+			rc = -EFAULT;
 
-		return 0;
+		break;
 	}
 	default:
-		return -EINVAL;
+		rc = -EINVAL;
 	} /* end switch */
 
-	return 0;
+	return rc;
 }
 #endif
 
@@ -5358,7 +5427,8 @@
 		PDEBUG(1, "OV7xx0 sensor initalized (method 1)");
 	} else {
 		/* Reset the 76xx */
-		if (i2c_w(ov, 0x12, 0x80) < 0) return -1;
+		if (i2c_w(ov, 0x12, 0x80) < 0)
+			return -1;
 
 		/* Wait for it to initialize */
 		schedule_timeout(1 + 150 * HZ / 1000);
@@ -5822,7 +5892,8 @@
 	if (ov->customid == 70)		/* USB Life TV (PAL/SECAM) */
 		ov->pal = 1;
 
-	if (write_regvals(ov, aRegvalsInit511)) goto error;
+	if (write_regvals(ov, aRegvalsInit511))
+		goto error;
 
 	if (ov->led_policy == LED_OFF || ov->led_policy == LED_AUTO)
 		ov51x_led_control(ov, 0);
@@ -5830,14 +5901,17 @@
 	/* The OV511+ has undocumented bits in the flow control register.
 	 * Setting it to 0xff fixes the corruption with moving objects. */
 	if (ov->bridge == BRG_OV511) {
-		if (write_regvals(ov, aRegvalsNorm511)) goto error;
+		if (write_regvals(ov, aRegvalsNorm511))
+			goto error;
 	} else if (ov->bridge == BRG_OV511PLUS) {
-		if (write_regvals(ov, aRegvalsNorm511Plus)) goto error;
+		if (write_regvals(ov, aRegvalsNorm511Plus))
+			goto error;
 	} else {
 		err("Invalid bridge");
 	}
 
-	if (ov511_init_compression(ov)) goto error;
+	if (ov511_init_compression(ov))
+		goto error;
 
 	ov->packet_numbering = 1;
 	ov511_set_packet_size(ov, 0);
@@ -5975,10 +6049,12 @@
 	/* Give it the default description */
 	ov->desc = symbolic(camlist, 0);
 
-	if (write_regvals(ov, aRegvalsInit518)) goto error;
+	if (write_regvals(ov, aRegvalsInit518))
+		goto error;
 
 	/* Set LED GPIO pin to output mode */
-	if (reg_w_mask(ov, 0x57, 0x00, 0x02) < 0) goto error;
+	if (reg_w_mask(ov, 0x57, 0x00, 0x02) < 0)
+		goto error;
 
 	/* LED is off by default with OV518; have to explicitly turn it on */
 	if (ov->led_policy == LED_OFF || ov->led_policy == LED_AUTO)
@@ -5994,16 +6070,20 @@
 	}
 
 	if (ov->bridge == BRG_OV518) {
-		if (write_regvals(ov, aRegvalsNorm518)) goto error;
+		if (write_regvals(ov, aRegvalsNorm518))
+			goto error;
 	} else if (ov->bridge == BRG_OV518PLUS) {
-		if (write_regvals(ov, aRegvalsNorm518Plus)) goto error;
+		if (write_regvals(ov, aRegvalsNorm518Plus))
+			goto error;
 	} else {
 		err("Invalid bridge");
 	}
 
-	if (reg_w(ov, 0x2f, 0x80) < 0) goto error;
+	if (reg_w(ov, 0x2f, 0x80) < 0)
+		goto error;
 
-	if (ov518_init_compression(ov)) goto error;
+	if (ov518_init_compression(ov))
+		goto error;
 
 	if (ov->bridge == BRG_OV518)
 	{
diff -urN linux-2.5.69-bk9/drivers/usb/media/se401.c linux-2.5.69-bk10/drivers/usb/media/se401.c
--- linux-2.5.69-bk9/drivers/usb/media/se401.c	2003-05-04 16:53:09.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/media/se401.c	2003-05-15 04:44:50.000000000 -0700
@@ -170,7 +170,8 @@
 	len -= off;
 	if (len < count) {
 		*eof = 1;
-			if (len <= 0) return 0;
+		if (len <= 0)
+			return 0;
 	} else
 		len = count;
 
@@ -749,7 +750,8 @@
 				}
 			} else {
 				if (vlc_cod==2) {
-					if (!bit) vlc_data=-(1<<vlc_size)+1;
+					if (!bit)
+						vlc_data =  -(1<<vlc_size) + 1;
 					vlc_cod--;
 				}
 				vlc_size--;
@@ -1046,15 +1048,12 @@
 
 	if (se401->user)
 		return -EBUSY;
-	se401->user=1;
-	se401->fbuf=rvmalloc(se401->maxframesize * SE401_NUMFRAMES);
-	if(!se401->fbuf) err=-ENOMEM;
-
-        if (0 != err) {
-		se401->user = 0;
-	} else {
+	se401->fbuf = rvmalloc(se401->maxframesize * SE401_NUMFRAMES);
+	if (se401->fbuf)
 		file->private_data = dev;
-	}
+	else 
+		err = -ENOMEM;
+	se401->user = !err;
 
 	return err;
 }
diff -urN linux-2.5.69-bk9/drivers/usb/media/vicam.c linux-2.5.69-bk10/drivers/usb/media/vicam.c
--- linux-2.5.69-bk9/drivers/usb/media/vicam.c	2003-05-15 04:44:29.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/media/vicam.c	2003-05-15 04:44:50.000000000 -0700
@@ -1139,7 +1139,8 @@
 
 	cam->proc_dir = create_proc_entry(name, S_IFDIR, vicam_proc_root);
 
-	if ( !cam->proc_dir ) return; // We should probably return an error here
+	if ( !cam->proc_dir )
+		return; // FIXME: We should probably return an error here
 	
 	ent =
 	    create_proc_entry("shutter", S_IFREG | S_IRUGO, cam->proc_dir);
diff -urN linux-2.5.69-bk9/drivers/usb/misc/auerswald.c linux-2.5.69-bk10/drivers/usb/misc/auerswald.c
--- linux-2.5.69-bk9/drivers/usb/misc/auerswald.c	2003-05-15 04:44:29.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/misc/auerswald.c	2003-05-15 04:44:50.000000000 -0700
@@ -572,7 +572,8 @@
         /* fill the list of free elements */
         for (;numElements; numElements--) {
                 acep = (pauerchainelement_t) kmalloc (sizeof (auerchainelement_t), GFP_KERNEL);
-                if (!acep) goto ac_fail;
+                if (!acep)
+			goto ac_fail;
 		memset (acep, 0, sizeof (auerchainelement_t));
                 INIT_LIST_HEAD (&acep->list);
                 list_add_tail (&acep->list, &acp->free_list);
@@ -780,16 +781,20 @@
         /* fill the list of free elements */
         for (;numElements; numElements--) {
                 bep = (pauerbuf_t) kmalloc (sizeof (auerbuf_t), GFP_KERNEL);
-                if (!bep) goto bl_fail;
+                if (!bep)
+			goto bl_fail;
 	        memset (bep, 0, sizeof (auerbuf_t));
                 bep->list = bcp;
                 INIT_LIST_HEAD (&bep->buff_list);
                 bep->bufp = (char *) kmalloc (bufsize, GFP_KERNEL);
-                if (!bep->bufp) goto bl_fail;
+                if (!bep->bufp)
+			goto bl_fail;
                 bep->dr = (struct usb_ctrlrequest *) kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL);
-                if (!bep->dr) goto bl_fail;
+                if (!bep->dr)
+			goto bl_fail;
                 bep->urbp = usb_alloc_urb (0, GFP_KERNEL);
-                if (!bep->urbp) goto bl_fail;
+                if (!bep->urbp)
+			goto bl_fail;
                 list_add_tail (&bep->buff_list, &bcp->free_buff_list);
         }
         return 0;
@@ -1242,7 +1247,8 @@
 static void auerswald_delete( pauerswald_t cp)
 {
 	dbg( "auerswald_delete");
-	if (cp == NULL) return;
+	if (cp == NULL)
+		return;
 
 	/* Wake up all processes waiting for a buffer */
 	wake_up (&cp->bufferwait);
@@ -1261,7 +1267,8 @@
 static void auerchar_delete( pauerchar_t ccp)
 {
 	dbg ("auerchar_delete");
-	if (ccp == NULL) return;
+	if (ccp == NULL)
+		return;
 
         /* wake up pending synchronous reads */
 	ccp->removed = 1;
@@ -1335,7 +1342,8 @@
 	dbg ("auerswald_removeservice called");
 
 	/* check if we have a service allocated */
-	if (scp->id == AUH_UNASSIGNED) return;
+	if (scp->id == AUH_UNASSIGNED)
+		return;
 
 	/* If there is a device: close the channel */
 	if (cp->usbdev) {
@@ -1494,7 +1502,8 @@
 		u = 0;	/* no data */
 		if (ccp->readbuf) {
 			int restlen = ccp->readbuf->len - ccp->readoffset;
-			if (restlen > 0) u = 1;
+			if (restlen > 0)
+				u = 1;
 		}
 		if (!u) {
         		if (!list_empty (&ccp->bufctl.rec_buff_list)) {
@@ -1787,7 +1796,8 @@
 	}
 
 	/* protect against too big write requests */
-	if (len > cp->maxControlLength) len = cp->maxControlLength;
+	if (len > cp->maxControlLength)
+		len = cp->maxControlLength;
 
 	/* Fill the buffer */
 	if (copy_from_user ( bp->bufp+AUH_SIZE, buf, len)) {
@@ -2096,7 +2106,8 @@
 		/* Inform all waiting readers */
 		for ( u = 0; u < AUH_TYPESIZE; u++) {
 			pauerscon_t scp = cp->services[u];
-			if (scp) scp->disconnect( scp);
+			if (scp)
+				scp->disconnect( scp);
 		}
 	}
 }
diff -urN linux-2.5.69-bk9/drivers/usb/misc/uss720.c linux-2.5.69-bk10/drivers/usb/misc/uss720.c
--- linux-2.5.69-bk9/drivers/usb/misc/uss720.c	2003-05-04 16:52:48.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/misc/uss720.c	2003-05-15 04:44:50.000000000 -0700
@@ -146,7 +146,7 @@
 	if (m <= ECR_PS2 && !(priv->reg[1] & 0x20)) {
 		/* This mode resets the FIFO, so we may
 		 * have to wait for it to drain first. */
-		long expire = jiffies + pp->physport->cad->timeout;
+		unsigned long expire = jiffies + pp->physport->cad->timeout;
 		switch (mode) {
 		case ECR_PPF: /* Parallel Port FIFO mode */
 		case ECR_ECP: /* ECP Parallel Port mode */
diff -urN linux-2.5.69-bk9/drivers/usb/net/catc.c linux-2.5.69-bk10/drivers/usb/net/catc.c
--- linux-2.5.69-bk9/drivers/usb/net/catc.c	2003-05-04 16:53:14.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/net/catc.c	2003-05-15 04:44:50.000000000 -0700
@@ -828,10 +828,14 @@
 	if ((!catc->ctrl_urb) || (!catc->tx_urb) || 
 	    (!catc->rx_urb) || (!catc->irq_urb)) {
 		err("No free urbs available.");
-		if (catc->ctrl_urb) usb_free_urb(catc->ctrl_urb);
-		if (catc->tx_urb)   usb_free_urb(catc->tx_urb);
-		if (catc->rx_urb)   usb_free_urb(catc->rx_urb);
-		if (catc->irq_urb)  usb_free_urb(catc->irq_urb);
+		if (catc->ctrl_urb)
+			usb_free_urb(catc->ctrl_urb);
+		if (catc->tx_urb)
+			usb_free_urb(catc->tx_urb);
+		if (catc->rx_urb)
+			usb_free_urb(catc->rx_urb);
+		if (catc->irq_urb)
+			usb_free_urb(catc->irq_urb);
 		kfree(netdev);
 		kfree(catc);
 		return -ENOMEM;
diff -urN linux-2.5.69-bk9/drivers/usb/net/kaweth.c linux-2.5.69-bk10/drivers/usb/net/kaweth.c
--- linux-2.5.69-bk9/drivers/usb/net/kaweth.c	2003-05-04 16:53:36.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/net/kaweth.c	2003-05-15 04:44:50.000000000 -0700
@@ -811,7 +811,8 @@
 {
 	__u16 packet_filter_bitmap = kaweth->packet_filter_bitmap;
 	kaweth->packet_filter_bitmap = 0;
-	if(packet_filter_bitmap == 0) return;
+	if (packet_filter_bitmap == 0)
+		return;
 
 	{
 	int result;
diff -urN linux-2.5.69-bk9/drivers/usb/serial/belkin_sa.c linux-2.5.69-bk10/drivers/usb/serial/belkin_sa.c
--- linux-2.5.69-bk9/drivers/usb/serial/belkin_sa.c	2003-05-04 16:53:32.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/serial/belkin_sa.c	2003-05-15 04:44:50.000000000 -0700
@@ -285,10 +285,13 @@
 		goto exit;
 	}
 
-	if (port_paranoia_check (port, __FUNCTION__)) return;
+	if (port_paranoia_check (port, __FUNCTION__))
+		return;
 
 	serial = port->serial;
-	if (serial_paranoia_check (serial, __FUNCTION__)) return;
+
+	if (serial_paranoia_check (serial, __FUNCTION__))
+		return;
 	
 	usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
 
diff -urN linux-2.5.69-bk9/drivers/usb/serial/console.c linux-2.5.69-bk10/drivers/usb/serial/console.c
--- linux-2.5.69-bk9/drivers/usb/serial/console.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/serial/console.c	2003-05-15 04:44:50.000000000 -0700
@@ -76,9 +76,12 @@
 		s = options;
 		while (*s >= '0' && *s <= '9')
 			s++;
-		if (*s)	parity = *s++;
-		if (*s)	bits   = *s++ - '0';
-		if (*s)	doflow = (*s++ == 'r');
+		if (*s)
+			parity = *s++;
+		if (*s)
+			bits   = *s++ - '0';
+		if (*s)
+			doflow = (*s++ == 'r');
 	}
 
 	/* build a cflag setting */
diff -urN linux-2.5.69-bk9/drivers/usb/serial/cyberjack.c linux-2.5.69-bk10/drivers/usb/serial/cyberjack.c
--- linux-2.5.69-bk9/drivers/usb/serial/cyberjack.c	2003-05-04 16:53:41.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/serial/cyberjack.c	2003-05-15 04:44:51.000000000 -0700
@@ -284,7 +284,8 @@
 	struct usb_serial *serial;
 	unsigned char *data = urb->transfer_buffer;
 
-	if (port_paranoia_check (port, __FUNCTION__)) return;
+	if (port_paranoia_check (port, __FUNCTION__))
+		return;
 
 	dbg("%s - port %d", __FUNCTION__, port->number);
 
@@ -293,7 +294,8 @@
 		return;
 
 	serial = port->serial;
-	if (serial_paranoia_check (serial, __FUNCTION__)) return;
+	if (serial_paranoia_check (serial, __FUNCTION__))
+		return;
 
 	usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
 
@@ -372,7 +374,8 @@
 	/* Reduce urbs to do by one. */
 	priv->rdtodo-=urb->actual_length;
 	/* Just to be sure */
-	if( priv->rdtodo<0 ) priv->rdtodo=0;
+	if ( priv->rdtodo<0 )
+		priv->rdtodo = 0;
 
 	dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo);
 
diff -urN linux-2.5.69-bk9/drivers/usb/serial/io_ti.c linux-2.5.69-bk10/drivers/usb/serial/io_ti.c
--- linux-2.5.69-bk9/drivers/usb/serial/io_ti.c	2003-05-04 16:53:42.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/serial/io_ti.c	2003-05-15 04:44:51.000000000 -0700
@@ -1553,7 +1553,8 @@
 	__u8 lsr = 0;
 
 #define MAP_FLAG(flagUmp, flagUart)    \
-	if (ti_lsr & flagUmp) lsr |= flagUart;
+	if (ti_lsr & flagUmp) \
+		lsr |= flagUart;
 
 	MAP_FLAG(UMP_UART_LSR_OV_MASK, LSR_OVER_ERR)	/* overrun */
 	MAP_FLAG(UMP_UART_LSR_PE_MASK, LSR_PAR_ERR)	/* parity error */
diff -urN linux-2.5.69-bk9/drivers/usb/serial/ir-usb.c linux-2.5.69-bk10/drivers/usb/serial/ir-usb.c
--- linux-2.5.69-bk9/drivers/usb/serial/ir-usb.c	2003-05-04 16:53:14.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/serial/ir-usb.c	2003-05-15 04:44:51.000000000 -0700
@@ -461,7 +461,8 @@
 			 * contains a busy indicator and baud rate change.
 			 * See section 5.4.1.2 of the USB IrDA spec.
 			 */
-			if((*data & 0x0f) > 0) ir_baud = *data & 0x0f;
+			if ((*data & 0x0f) > 0)
+				ir_baud = *data & 0x0f;
 
 			usb_serial_debug_data (
 				__FILE__,
diff -urN linux-2.5.69-bk9/drivers/usb/serial/pl2303.c linux-2.5.69-bk10/drivers/usb/serial/pl2303.c
--- linux-2.5.69-bk9/drivers/usb/serial/pl2303.c	2003-05-04 16:53:14.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/serial/pl2303.c	2003-05-15 04:44:51.000000000 -0700
@@ -579,7 +579,7 @@
 		state = BREAK_ON;
 	dbg("%s - turning break %s", state==BREAK_OFF ? "off" : "on", __FUNCTION__);
 
-	result = usb_control_msg (serial->dev, usb_rcvctrlpipe (serial->dev, 0),
+	result = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
 				  BREAK_REQUEST, BREAK_REQUEST_TYPE, state, 
 				  0, NULL, 0, 100);
 	if (result)
diff -urN linux-2.5.69-bk9/drivers/usb/storage/unusual_devs.h linux-2.5.69-bk10/drivers/usb/storage/unusual_devs.h
--- linux-2.5.69-bk9/drivers/usb/storage/unusual_devs.h	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/drivers/usb/storage/unusual_devs.h	2003-05-15 04:44:51.000000000 -0700
@@ -332,6 +332,15 @@
                 US_SC_8070, US_PR_CBI, NULL,
                 US_FL_FIX_INQUIRY ),
 
+/* Pentax Optio S digital camera
+ * submitted by Stefan M. Brandl <smb@smbnet.de>
+ */
+UNUSUAL_DEV( 0x0a17, 0x0006, 0x0000, 0xffff,
+		"Pentax",
+		"Optio S",
+		US_SC_8070, US_PR_CB, NULL,
+		US_FL_MODE_XLATE|US_FL_FIX_INQUIRY),
+
 #ifdef CONFIG_USB_STORAGE_ISD200
 UNUSUAL_DEV(  0x05ab, 0x0031, 0x0100, 0x0110,
 		"In-System",
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-anakin/time.h linux-2.5.69-bk10/include/asm-arm/arch-anakin/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-anakin/time.h	2003-05-04 16:53:28.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-anakin/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -14,10 +14,11 @@
 #ifndef __ASM_ARCH_TIME_H
 #define __ASM_ARCH_TIME_H
 
-static void
+static irqreturn_t
 anakin_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	do_timer(regs);
+	return IRQ_HANDLED;
 }
 
 void __init time_init(void)
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-arc/time.h linux-2.5.69-bk10/include/asm-arm/arch-arc/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-arc/time.h	2003-05-04 16:53:32.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-arc/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -14,11 +14,13 @@
  */
 extern void ioctime_init(void);
 
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	do_timer(regs);
 	do_set_rtc();
 	do_profile(regs);
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-cl7500/time.h linux-2.5.69-bk10/include/asm-arm/arch-cl7500/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-cl7500/time.h	2003-05-04 16:53:02.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-cl7500/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -11,7 +11,8 @@
 
 extern void ioctime_init(void);
 
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	do_timer(regs);
 	do_set_rtc();
@@ -26,6 +27,7 @@
 			*((volatile unsigned int *)LED_ADDRESS) = state;
 		}
 	}
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-clps711x/time.h linux-2.5.69-bk10/include/asm-arm/arch-clps711x/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-clps711x/time.h	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-clps711x/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -25,11 +25,13 @@
 /*
  * IRQ handler for the timer
  */
-static void p720t_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+p720t_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	do_leds();
 	do_timer(regs);
 	do_profile(regs);
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-ebsa110/time.h linux-2.5.69-bk10/include/asm-arm/arch-ebsa110/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-ebsa110/time.h	2003-05-04 16:53:08.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-ebsa110/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -74,7 +74,8 @@
 	return offset;
 }
 
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	u32 count;
 
@@ -91,6 +92,8 @@
 	do_leds();
 	do_timer(regs);
 	do_profile(regs);
+
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-ebsa285/time.h linux-2.5.69-bk10/include/asm-arm/arch-ebsa285/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-ebsa285/time.h	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-ebsa285/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -69,7 +69,8 @@
 	return count;
 }
 
-static void isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	if (machine_is_netwinder())
 		do_leds();
@@ -77,6 +78,8 @@
 	do_timer(regs);
 	do_set_rtc();
 	do_profile(regs);
+
+	return IRQ_HANDLED;
 }
 
 static unsigned long __init get_isa_cmos_time(void)
@@ -186,7 +189,8 @@
 	return ((tick_nsec / 1000) * value) / LATCH;
 }
 
-static void timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	*CSR_TIMER1_CLR = 0;
 
@@ -195,6 +199,8 @@
 	do_timer(regs);
 	do_set_rtc();
 	do_profile(regs);
+
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-epxa10db/time.h linux-2.5.69-bk10/include/asm-arm/arch-epxa10db/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-epxa10db/time.h	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-epxa10db/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -27,7 +27,8 @@
 /*
  * IRQ handler for the timer
  */
-static void excalibur_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+excalibur_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 
 	// ...clear the interrupt
@@ -36,6 +37,8 @@
 	do_leds();
 	do_timer(regs);
 	do_profile(regs);
+
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-integrator/time.h linux-2.5.69-bk10/include/asm-arm/arch-integrator/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-integrator/time.h	2003-05-04 16:53:36.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-integrator/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -98,7 +98,8 @@
 /*
  * IRQ handler for the timer
  */
-static void integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	volatile TimerStruct_t *timer1 = (volatile TimerStruct_t *)TIMER1_VA_BASE;
 
@@ -108,6 +109,8 @@
 	do_leds();
 	do_timer(regs);
 	do_profile(regs);
+
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-l7200/time.h linux-2.5.69-bk10/include/asm-arm/arch-l7200/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-l7200/time.h	2003-05-04 16:53:32.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-l7200/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -42,11 +42,14 @@
 /*
  * Handler for RTC timer interrupt
  */
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	do_timer(regs);
 	do_profile(regs);
 	RTC_RTCC = 0;				/* Clear interrupt */
+
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-nexuspci/time.h linux-2.5.69-bk10/include/asm-arm/arch-nexuspci/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-nexuspci/time.h	2003-05-04 16:53:09.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-nexuspci/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -14,7 +14,8 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	static int count = 25;
 	unsigned char stat = __raw_readb(DUART_BASE + 0x14);
@@ -40,7 +41,9 @@
 	__raw_readb(DUART_BASE + 0x14);
 	__raw_readb(DUART_BASE + 0x14);
 
-	do_timer(regs);	
+	do_timer(regs);
+
+	return IRQ_HANDLED;
 }
 
 void __init time_init(void)
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-pxa/irqs.h linux-2.5.69-bk10/include/asm-arm/arch-pxa/irqs.h
--- linux-2.5.69-bk9/include/asm-arm/arch-pxa/irqs.h	2003-05-04 16:53:02.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-pxa/irqs.h	2003-05-15 04:44:51.000000000 -0700
@@ -10,9 +10,10 @@
  * published by the Free Software Foundation.
  */
 
-#define PXA_IRQ_SKIP	8	/* The first 8 IRQs are reserved */
+#define PXA_IRQ_SKIP	7	/* The first 7 IRQs are not yet used */
 #define PXA_IRQ(x)		((x) - PXA_IRQ_SKIP)
 
+#define IRQ_HWUART	PXA_IRQ(7)	/* HWUART Transmit/Receive/Error */
 #define	IRQ_GPIO0	PXA_IRQ(8)	/* GPIO0 Edge Detect */
 #define	IRQ_GPIO1	PXA_IRQ(9)	/* GPIO1 Edge Detect */
 #define	IRQ_GPIO_2_80	PXA_IRQ(10)	/* GPIO[2-80] Edge Detect */
@@ -20,6 +21,8 @@
 #define	IRQ_PMU		PXA_IRQ(12)	/* Performance Monitoring Unit */
 #define	IRQ_I2S		PXA_IRQ(13)	/* I2S Interrupt */
 #define	IRQ_AC97	PXA_IRQ(14)	/* AC97 Interrupt */
+#define IRQ_ASSP	PXA_IRQ(15)	/* Audio SSP Service Request */
+#define IRQ_NSSP	PXA_IRQ(16)	/* Network SSP Service Request */
 #define	IRQ_LCD		PXA_IRQ(17)	/* LCD Controller Service Request */
 #define	IRQ_I2C		PXA_IRQ(18)	/* I2C Service Request */
 #define	IRQ_ICP		PXA_IRQ(19)	/* ICP Transmit/Receive/Error */
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-pxa/time.h linux-2.5.69-bk10/include/asm-arm/arch-pxa/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-pxa/time.h	2003-05-04 16:53:14.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-pxa/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -47,7 +47,8 @@
 	return usec;
 }
 
-static void pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	int next_match;
 
@@ -66,6 +67,8 @@
 		OSSR = OSSR_M0;  /* Clear match on timer 0 */
 		next_match = (OSMR0 += LATCH);
 	} while( (signed long)(next_match - OSCR) <= 0 );
+
+	return IRQ_HANDLED;
 }
 
 void __init time_init(void)
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-rpc/time.h linux-2.5.69-bk10/include/asm-arm/arch-rpc/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-rpc/time.h	2003-05-04 16:53:02.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-rpc/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -14,11 +14,14 @@
  */
 extern void ioctime_init(void);
 
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	do_timer(regs);
 	do_set_rtc();
 	do_profile(regs);
+
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-sa1100/time.h linux-2.5.69-bk10/include/asm-arm/arch-sa1100/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-sa1100/time.h	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-sa1100/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -72,7 +72,8 @@
  * lost_ticks (updated in do_timer()) and the match reg value, so we
  * can use do_gettimeofday() from interrupt handlers.
  */
-static void sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	unsigned int next_match;
 
@@ -85,6 +86,8 @@
 	} while ((signed long)(next_match - OSCR) <= 0);
 
 	do_profile(regs);
+
+	return IRQ_HANDLED;
 }
 
 void __init time_init(void)
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-shark/time.h linux-2.5.69-bk10/include/asm-arm/arch-shark/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-shark/time.h	2003-05-04 16:53:32.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-shark/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -13,11 +13,14 @@
 #define IRQ_TIMER 0
 #define HZ_TIME ((1193180 + HZ/2) / HZ)
 
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	do_leds();
 	do_timer(regs);
 	do_profile(regs);
+
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.69-bk9/include/asm-arm/arch-tbox/time.h linux-2.5.69-bk10/include/asm-arm/arch-tbox/time.h
--- linux-2.5.69-bk9/include/asm-arm/arch-tbox/time.h	2003-05-04 16:52:49.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/arch-tbox/time.h	2003-05-15 04:44:51.000000000 -0700
@@ -20,13 +20,16 @@
 
 #define update_rtc()
 
-static void timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
 {
 	/* Clear irq */
 	__raw_writel(1, FPGA1CONT + 0xc); 
 	__raw_writel(0, FPGA1CONT + 0xc);
 
 	do_timer(regs);
+
+	return IRQ_HANDLED;
 }
 
 void __init time_init(void)
diff -urN linux-2.5.69-bk9/include/asm-arm/bitops.h linux-2.5.69-bk10/include/asm-arm/bitops.h
--- linux-2.5.69-bk9/include/asm-arm/bitops.h	2003-05-04 16:52:49.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/bitops.h	2003-05-15 04:44:51.000000000 -0700
@@ -173,7 +173,7 @@
  */
 static inline int __test_bit(int nr, const unsigned long * p)
 {
-	return p[nr >> 5] & (1UL << (nr & 31));
+	return (p[nr >> 5] >> (nr & 31)) & 1UL;
 }
 
 /*
@@ -277,6 +277,8 @@
 
 #endif
 
+#if __LINUX_ARM_ARCH__ < 5
+
 /*
  * ffz = Find First Zero in word. Undefined if no zero exists,
  * so code should check against ~0UL first..
@@ -326,6 +328,23 @@
 
 #define ffs(x) generic_ffs(x)
 
+#else
+
+/*
+ * On ARMv5 and above those functions can be implemented around
+ * the clz instruction for much better code efficiency.
+ */
+
+extern __inline__ int generic_fls(int x);
+#define fls(x) \
+	( __builtin_constant_p(x) ? generic_fls(x) : \
+	  ({ int __r; asm("clz%?\t%0, %1" : "=r"(__r) : "r"(x)); 32-__r; }) )
+#define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); })
+#define __ffs(x) (ffs(x) - 1)
+#define ffz(x) __ffs( ~(x) )
+
+#endif
+
 /*
  * Find first bit set in a 168-bit bitmap, where the first
  * 128 bits are unlikely to be set.
diff -urN linux-2.5.69-bk9/include/asm-arm/bugs.h linux-2.5.69-bk10/include/asm-arm/bugs.h
--- linux-2.5.69-bk9/include/asm-arm/bugs.h	2003-05-04 16:53:36.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/bugs.h	2003-05-15 04:44:51.000000000 -0700
@@ -10,8 +10,6 @@
 #ifndef __ASM_BUGS_H
 #define __ASM_BUGS_H
 
-#include <asm/proc-fns.h>
-
 #define check_bugs() do { } while (0)
 
 #endif
diff -urN linux-2.5.69-bk9/include/asm-arm/mach/arch.h linux-2.5.69-bk10/include/asm-arm/mach/arch.h
--- linux-2.5.69-bk9/include/asm-arm/mach/arch.h	2003-05-04 16:53:41.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/mach/arch.h	2003-05-15 04:44:51.000000000 -0700
@@ -54,39 +54,37 @@
 #define MACHINE_START(_type,_name)		\
 const struct machine_desc __mach_desc_##_type	\
  __attribute__((__section__(".arch.info"))) = {	\
-	nr:		MACH_TYPE_##_type,	\
-	name:		_name,
+	.nr		= MACH_TYPE_##_type,	\
+	.name		= _name,
 
 #define MAINTAINER(n)
 
 #define BOOT_MEM(_pram,_pio,_vio)		\
-	phys_ram:	_pram,	                \
-	phys_io:	_pio,  	                \
-	io_pg_offst:	((_vio)>>18)&0xfffc,
+	.phys_ram	= _pram,		\
+	.phys_io	= _pio,			\
+	.io_pg_offst	= ((_vio)>>18)&0xfffc,
 
 #define BOOT_PARAMS(_params)			\
-	param_offset:	_params,
+	.param_offset	= _params,
 
 #define VIDEO(_start,_end)			\
-	video_start:	_start,			\
-	video_end:	_end,
+	.video_start	= _start,		\
+	.video_end	= _end,
 
 #define DISABLE_PARPORT(_n)			\
-	reserve_lp##_n:	1,
-
-#define BROKEN_HLT /* unused */
+	.reserve_lp##_n	= 1,
 
 #define SOFT_REBOOT				\
-	soft_reboot:	1,
+	.soft_reboot	= 1,
 
 #define FIXUP(_func)				\
-	fixup:		_func,
+	.fixup		= _func,
 
 #define MAPIO(_func)				\
-	map_io:		_func,
+	.map_io		= _func,
 
 #define INITIRQ(_func)				\
-	init_irq:	_func,
+	.init_irq	= _func,
 
 #define MACHINE_END				\
 };
diff -urN linux-2.5.69-bk9/include/asm-arm/processor.h linux-2.5.69-bk10/include/asm-arm/processor.h
--- linux-2.5.69-bk9/include/asm-arm/processor.h	2003-05-04 16:53:14.000000000 -0700
+++ linux-2.5.69-bk10/include/asm-arm/processor.h	2003-05-15 04:44:51.000000000 -0700
@@ -74,6 +74,29 @@
  */
 extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
 
+/*
+ * Prefetching support - only ARMv5.
+ */
+#if __LINUX_ARM_ARCH__ >= 5
+
+#define ARCH_HAS_PREFETCH
+#define prefetch(ptr)				\
+	({					\
+		__asm__ __volatile__(		\
+		"pld\t%0"			\
+		:				\
+		: "o" (*(char *)(ptr))		\
+		: "cc");			\
+	})
+
+#define ARCH_HAS_PREFETCHW
+#define prefetchw(ptr)	prefetch(ptr)
+
+#define ARCH_HAS_SPINLOCK_PREFETCH
+#define spin_lock_prefetch(x) do { } while (0)
+
+#endif
+
 #endif
 
 #endif /* __ASM_ARM_PROCESSOR_H */
diff -urN linux-2.5.69-bk9/include/asm-arm/traps.h linux-2.5.69-bk10/include/asm-arm/traps.h
--- linux-2.5.69-bk9/include/asm-arm/traps.h	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.5.69-bk10/include/asm-arm/traps.h	2003-05-15 04:44:51.000000000 -0700
@@ -0,0 +1,18 @@
+#ifndef _ASMARM_TRAP_H
+#define _ASMARM_TRAP_H
+
+#include <linux/list.h>
+
+struct undef_hook {
+	struct list_head node;
+	u32 instr_mask;
+	u32 instr_val;
+	u32 cpsr_mask;
+	u32 cpsr_val;
+	int (*fn)(struct pt_regs *regs, unsigned int instr);
+};
+
+void register_undef_hook(struct undef_hook *hook);
+void unregister_undef_hook(struct undef_hook *hook);
+
+#endif
diff -urN linux-2.5.69-bk9/include/linux/bio.h linux-2.5.69-bk10/include/linux/bio.h
--- linux-2.5.69-bk9/include/linux/bio.h	2003-05-04 16:53:36.000000000 -0700
+++ linux-2.5.69-bk10/include/linux/bio.h	2003-05-15 04:44:52.000000000 -0700
@@ -131,6 +131,7 @@
 #define bio_iovec(bio)		bio_iovec_idx((bio), (bio)->bi_idx)
 #define bio_page(bio)		bio_iovec((bio))->bv_page
 #define bio_offset(bio)		bio_iovec((bio))->bv_offset
+#define bio_segments(bio)	((bio)->bi_vcnt - (bio)->bi_idx)
 #define bio_sectors(bio)	((bio)->bi_size >> 9)
 #define bio_cur_sectors(bio)	(bio_iovec(bio)->bv_len >> 9)
 #define bio_data(bio)		(page_address(bio_page((bio))) + bio_offset((bio)))
@@ -226,12 +227,12 @@
 #ifdef CONFIG_HIGHMEM
 /*
  * remember to add offset! and never ever reenable interrupts between a
- * bio_kmap_irq and bio_kunmap_irq!!
+ * bvec_kmap_irq and bvec_kunmap_irq!!
  *
  * This function MUST be inlined - it plays with the CPU interrupt flags.
  * Hence the `extern inline'.
  */
-extern inline char *bio_kmap_irq(struct bio *bio, unsigned long *flags)
+extern inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags)
 {
 	unsigned long addr;
 
@@ -240,15 +241,15 @@
 	 * balancing is a lot nicer this way
 	 */
 	local_irq_save(*flags);
-	addr = (unsigned long) kmap_atomic(bio_page(bio), KM_BIO_SRC_IRQ);
+	addr = (unsigned long) kmap_atomic(bvec->bv_page, KM_BIO_SRC_IRQ);
 
 	if (addr & ~PAGE_MASK)
 		BUG();
 
-	return (char *) addr + bio_offset(bio);
+	return (char *) addr + bvec->bv_offset;
 }
 
-extern inline void bio_kunmap_irq(char *buffer, unsigned long *flags)
+extern inline void bvec_kunmap_irq(char *buffer, unsigned long *flags)
 {
 	unsigned long ptr = (unsigned long) buffer & PAGE_MASK;
 
@@ -257,8 +258,19 @@
 }
 
 #else
-#define bio_kmap_irq(bio, flags)	(bio_data(bio))
-#define bio_kunmap_irq(buf, flags)	do { *(flags) = 0; } while (0)
+#define bvec_kmap_irq(bvec, flags)	(page_address((bvec)->bv_page) + (bvec)->bv_offset)
+#define bvec_kunmap_irq(buf, flags)	do { *(flags) = 0; } while (0)
 #endif
 
+extern inline char *__bio_kmap_irq(struct bio *bio, unsigned short idx,
+				   unsigned long *flags)
+{
+	return bvec_kmap_irq(bio_iovec_idx(bio, idx), flags);
+}
+#define __bio_kunmap_irq(buf, flags)	bvec_kunmap_irq(buf, flags)
+
+#define bio_kmap_irq(bio, flags) \
+	__bio_kmap_irq((bio), (bio)->bi_idx, (flags))
+#define bio_kunmap_irq(buf,flags)	__bio_kunmap_irq(buf, flags)
+
 #endif /* __LINUX_BIO_H */
diff -urN linux-2.5.69-bk9/include/linux/blkdev.h linux-2.5.69-bk10/include/linux/blkdev.h
--- linux-2.5.69-bk9/include/linux/blkdev.h	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/include/linux/blkdev.h	2003-05-15 04:44:52.000000000 -0700
@@ -11,6 +11,7 @@
 #include <linux/backing-dev.h>
 #include <linux/wait.h>
 #include <linux/mempool.h>
+#include <linux/bio.h>
 
 #include <asm/scatterlist.h>
 
@@ -36,25 +37,35 @@
 				     * blkdev_dequeue_request! */
 	unsigned long flags;		/* see REQ_ bits below */
 
-	sector_t sector;
-	unsigned long nr_sectors;
+	/* Maintain bio traversal state for part by part I/O submission.
+	 * hard_* are block layer internals, no driver should touch them!
+	 */
+
+	sector_t sector;		/* next sector to submit */
+	unsigned long nr_sectors;	/* no. of sectors left to submit */
+	/* no. of sectors left to submit in the current segment */
 	unsigned int current_nr_sectors;
 
+	sector_t hard_sector;		/* next sector to complete */
+	unsigned long hard_nr_sectors;	/* no. of sectors left to complete */
+	/* no. of sectors left to complete in the current segment */
+	unsigned int hard_cur_sectors;
+
+	/* no. of segments left to submit in the current bio */
+	unsigned short nr_cbio_segments;
+	/* no. of sectors left to submit in the current bio */
+	unsigned long nr_cbio_sectors;
+
+	struct bio *cbio;		/* next bio to submit */
+	struct bio *bio;		/* next unfinished bio to complete */
+	struct bio *biotail;
+
 	void *elevator_private;
 
 	int rq_status;	/* should split this into a few status bits */
 	struct gendisk *rq_disk;
 	int errors;
 	unsigned long start_time;
-	sector_t hard_sector;		/* the hard_* are block layer
-					 * internals, no driver should
-					 * touch them
-					 */
-	unsigned long hard_nr_sectors;
-	unsigned int hard_cur_sectors;
-
-	struct bio *bio;
-	struct bio *biotail;
 
 	/* Number of scatter-gather DMA addr+len pairs after
 	 * physical address coalescing is performed.
@@ -284,6 +295,32 @@
  */
 #define blk_queue_headactive(q, head_active)
 
+/* current index into bio being processed for submission */
+#define blk_rq_idx(rq)	((rq)->cbio->bi_vcnt - (rq)->nr_cbio_segments)
+
+/* current bio vector being processed */
+#define blk_rq_vec(rq)	(bio_iovec_idx((rq)->cbio, blk_rq_idx(rq)))
+
+/* current offset with respect to start of the segment being submitted */
+#define blk_rq_offset(rq) \
+	(((rq)->hard_cur_sectors - (rq)->current_nr_sectors) << 9)
+
+/*
+ * temporarily mapping a (possible) highmem bio (typically for PIO transfer)
+ */
+
+/* Assumes rq->cbio != NULL */
+static inline char * rq_map_buffer(struct request *rq, unsigned long *flags)
+{
+	return (__bio_kmap_irq(rq->cbio, blk_rq_idx(rq), flags)
+		+ blk_rq_offset(rq));
+}
+
+static inline void rq_unmap_buffer(char *buffer, unsigned long *flags)
+{
+	__bio_kunmap_irq(buffer, flags);
+}
+
 /*
  * q->prep_rq_fn return values
  */
@@ -362,6 +399,7 @@
 extern int end_that_request_first(struct request *, int, int);
 extern int end_that_request_chunk(struct request *, int, int);
 extern void end_that_request_last(struct request *);
+extern int process_that_request_first(struct request *, unsigned int);
 extern void end_request(struct request *req, int uptodate);
 
 static inline void blkdev_dequeue_request(struct request *req)
diff -urN linux-2.5.69-bk9/include/linux/mmzone.h linux-2.5.69-bk10/include/linux/mmzone.h
--- linux-2.5.69-bk9/include/linux/mmzone.h	2003-05-04 16:53:31.000000000 -0700
+++ linux-2.5.69-bk10/include/linux/mmzone.h	2003-05-15 04:44:53.000000000 -0700
@@ -146,6 +146,7 @@
 #define ZONE_NORMAL		1
 #define ZONE_HIGHMEM		2
 #define MAX_NR_ZONES		3
+#define GFP_ZONEMASK	0x03
 
 /*
  * One allocation request operates on a zonelist. A zonelist
@@ -162,7 +163,6 @@
 	struct zone *zones[MAX_NUMNODES * MAX_NR_ZONES + 1]; // NULL delimited
 };
 
-#define GFP_ZONEMASK	0x0f
 
 /*
  * The pg_data_t structure is used in machines with CONFIG_DISCONTIGMEM
@@ -178,7 +178,7 @@
 struct bootmem_data;
 typedef struct pglist_data {
 	struct zone node_zones[MAX_NR_ZONES];
-	struct zonelist node_zonelists[GFP_ZONEMASK+1];
+	struct zonelist node_zonelists[MAX_NR_ZONES];
 	int nr_zones;
 	struct page *node_mem_map;
 	unsigned long *valid_addr_bitmap;
diff -urN linux-2.5.69-bk9/include/net/ax25.h linux-2.5.69-bk10/include/net/ax25.h
--- linux-2.5.69-bk9/include/net/ax25.h	2003-05-04 16:53:33.000000000 -0700
+++ linux-2.5.69-bk10/include/net/ax25.h	2003-05-15 04:44:54.000000000 -0700
@@ -360,8 +360,8 @@
 extern void ax25_register_sysctl(void);
 extern void ax25_unregister_sysctl(void);
 #else
-extern inline void ax25_register_sysctl(void) {};
-extern inline void ax25_unregister_sysctl(void) {};
+static inline void ax25_register_sysctl(void) {};
+static inline void ax25_unregister_sysctl(void) {};
 #endif /* CONFIG_SYSCTL */
 
 #endif
diff -urN linux-2.5.69-bk9/include/net/ip.h linux-2.5.69-bk10/include/net/ip.h
--- linux-2.5.69-bk9/include/net/ip.h	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/include/net/ip.h	2003-05-15 04:44:54.000000000 -0700
@@ -141,7 +141,7 @@
 void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg,
 		   unsigned int len); 
 
-extern __inline__ int ip_finish_output(struct sk_buff *skb);
+extern int ip_finish_output(struct sk_buff *skb);
 
 struct ipv4_config
 {
diff -urN linux-2.5.69-bk9/include/net/tcp.h linux-2.5.69-bk10/include/net/tcp.h
--- linux-2.5.69-bk9/include/net/tcp.h	2003-05-04 16:53:02.000000000 -0700
+++ linux-2.5.69-bk10/include/net/tcp.h	2003-05-15 04:44:54.000000000 -0700
@@ -222,7 +222,6 @@
 extern atomic_t tcp_orphan_count;
 extern int tcp_tw_count;
 extern void tcp_time_wait(struct sock *sk, int state, int timeo);
-extern void tcp_timewait_kill(struct tcp_tw_bucket *tw);
 extern void tcp_tw_schedule(struct tcp_tw_bucket *tw, int timeo);
 extern void tcp_tw_deschedule(struct tcp_tw_bucket *tw);
 
@@ -615,19 +614,19 @@
  * and worry about wraparound (automatic with unsigned arithmetic).
  */
 
-extern __inline int before(__u32 seq1, __u32 seq2)
+static inline int before(__u32 seq1, __u32 seq2)
 {
         return (__s32)(seq1-seq2) < 0;
 }
 
-extern __inline int after(__u32 seq1, __u32 seq2)
+static inline int after(__u32 seq1, __u32 seq2)
 {
 	return (__s32)(seq2-seq1) < 0;
 }
 
 
 /* is s2<=s1<=s3 ? */
-extern __inline int between(__u32 seq1, __u32 seq2, __u32 seq3)
+static inline int between(__u32 seq1, __u32 seq2, __u32 seq3)
 {
 	return seq3 - seq2 >= seq1 - seq2;
 }
@@ -643,7 +642,7 @@
 #define TCP_ADD_STATS_BH(field, val)	SNMP_ADD_STATS_BH(tcp_statistics, field, val)
 #define TCP_ADD_STATS_USER(field, val)	SNMP_ADD_STATS_USER(tcp_statistics, field, val)
 
-extern __inline__ void		tcp_put_port(struct sock *sk);
+extern inline void		tcp_put_port(struct sock *sk);
 extern void			tcp_inherit_port(struct sock *sk, struct sock *child);
 
 extern void			tcp_v4_err(struct sk_buff *skb, u32);
diff -urN linux-2.5.69-bk9/init/Kconfig linux-2.5.69-bk10/init/Kconfig
--- linux-2.5.69-bk9/init/Kconfig	2003-05-04 16:53:37.000000000 -0700
+++ linux-2.5.69-bk10/init/Kconfig	2003-05-15 04:44:54.000000000 -0700
@@ -142,7 +142,7 @@
 	  This option allows you to force a module to unload, even if the
 	  kernel believes it is unsafe: the kernel will remove the module
 	  without waiting for anyone to stop using it (using the -f option to
-	  rmmod).  This is mainly for kernel developers and desparate users.
+	  rmmod).  This is mainly for kernel developers and desperate users.
 	  If unsure, say N.
 
 config OBSOLETE_MODPARM
diff -urN linux-2.5.69-bk9/kernel/rcupdate.c linux-2.5.69-bk10/kernel/rcupdate.c
--- linux-2.5.69-bk9/kernel/rcupdate.c	2003-05-04 16:52:49.000000000 -0700
+++ linux-2.5.69-bk10/kernel/rcupdate.c	2003-05-15 04:44:54.000000000 -0700
@@ -121,9 +121,8 @@
 {
 	int cpu = smp_processor_id();
 
-	if (!test_bit(cpu, &rcu_ctrlblk.rcu_cpu_mask)) {
+	if (!test_bit(cpu, &rcu_ctrlblk.rcu_cpu_mask))
 		return;
-	}
 
 	/* 
 	 * Races with local timer interrupt - in the worst case
@@ -134,23 +133,22 @@
 		RCU_last_qsctr(cpu) = RCU_qsctr(cpu);
 		return;
 	}
-	if (RCU_qsctr(cpu) == RCU_last_qsctr(cpu)) {
+	if (RCU_qsctr(cpu) == RCU_last_qsctr(cpu))
 		return;
-	}
 
 	spin_lock(&rcu_ctrlblk.mutex);
-	if (!test_bit(cpu, &rcu_ctrlblk.rcu_cpu_mask)) {
-		spin_unlock(&rcu_ctrlblk.mutex);
-		return;
-	}
+	if (!test_bit(cpu, &rcu_ctrlblk.rcu_cpu_mask))
+		goto out_unlock;
+
 	clear_bit(cpu, &rcu_ctrlblk.rcu_cpu_mask);
 	RCU_last_qsctr(cpu) = RCU_QSCTR_INVALID;
-	if (rcu_ctrlblk.rcu_cpu_mask != 0) {
-		spin_unlock(&rcu_ctrlblk.mutex);
-		return;
-	}
+	if (rcu_ctrlblk.rcu_cpu_mask != 0)
+		goto out_unlock;
+
 	rcu_ctrlblk.curbatch++;
 	rcu_start_batch(rcu_ctrlblk.maxbatch);
+
+out_unlock:
 	spin_unlock(&rcu_ctrlblk.mutex);
 }
 
diff -urN linux-2.5.69-bk9/lib/inflate.c linux-2.5.69-bk10/lib/inflate.c
--- linux-2.5.69-bk9/lib/inflate.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/lib/inflate.c	2003-05-15 04:44:54.000000000 -0700
@@ -1015,7 +1015,7 @@
 
 static ulg crc_32_tab[256];
 static ulg crc;		/* initialized in makecrc() so it'll reside in bss */
-#define CRC_VALUE (crc ^ 0xffffffffL)
+#define CRC_VALUE (crc ^ 0xffffffffUL)
 
 /*
  * Code to compute the CRC-32 table. Borrowed from 
@@ -1055,7 +1055,7 @@
   }
 
   /* this is initialized here so this code could reside in ROM */
-  crc = (ulg)0xffffffffL; /* shift register contents */
+  crc = (ulg)0xffffffffUL; /* shift register contents */
 }
 
 /* gzip flag byte */
diff -urN linux-2.5.69-bk9/mm/page_alloc.c linux-2.5.69-bk10/mm/page_alloc.c
--- linux-2.5.69-bk9/mm/page_alloc.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/mm/page_alloc.c	2003-05-15 04:44:54.000000000 -0700
@@ -1041,7 +1041,7 @@
 
 	local_node = pgdat->node_id;
 	printk("Building zonelist for node : %d\n", local_node);
-	for (i = 0; i <= GFP_ZONEMASK; i++) {
+	for (i = 0; i < MAX_NR_ZONES; i++) {
 		struct zonelist *zonelist;
 
 		zonelist = pgdat->node_zonelists + i;
diff -urN linux-2.5.69-bk9/net/appletalk/ddp.c linux-2.5.69-bk10/net/appletalk/ddp.c
--- linux-2.5.69-bk9/net/appletalk/ddp.c	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/net/appletalk/ddp.c	2003-05-15 04:44:54.000000000 -0700
@@ -88,7 +88,8 @@
 struct sock *atalk_sockets;
 rwlock_t atalk_sockets_lock = RW_LOCK_UNLOCKED;
 
-extern inline void atalk_insert_socket(struct sock *sk)
+#if 0 /* currently unused -DaveM */
+static inline void atalk_insert_socket(struct sock *sk)
 {
 	write_lock_bh(&atalk_sockets_lock);
 	sk->next = atalk_sockets;
@@ -98,8 +99,9 @@
 	sk->pprev = &atalk_sockets;
 	write_unlock_bh(&atalk_sockets_lock);
 }
+#endif
 
-extern inline void atalk_remove_socket(struct sock *sk)
+static inline void atalk_remove_socket(struct sock *sk)
 {
 	write_lock_bh(&atalk_sockets_lock);
 	if (sk->pprev) {
@@ -198,7 +200,7 @@
 	}
 }
 
-extern inline void atalk_destroy_socket(struct sock *sk)
+static inline void atalk_destroy_socket(struct sock *sk)
 {
 	atalk_remove_socket(sk);
 	skb_queue_purge(&sk->receive_queue);
diff -urN linux-2.5.69-bk9/net/bridge/br_input.c linux-2.5.69-bk10/net/bridge/br_input.c
--- linux-2.5.69-bk9/net/bridge/br_input.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/net/bridge/br_input.c	2003-05-15 04:44:55.000000000 -0700
@@ -64,7 +64,7 @@
 	smp_read_barrier_depends();
 
 	if (p == NULL || p->state == BR_STATE_DISABLED) {
-		kfree(skb);
+		kfree_skb(skb);
 		goto out;
 	}
 
diff -urN linux-2.5.69-bk9/net/core/dev.c linux-2.5.69-bk10/net/core/dev.c
--- linux-2.5.69-bk9/net/core/dev.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/net/core/dev.c	2003-05-15 04:44:55.000000000 -0700
@@ -726,7 +726,7 @@
 
 #else
 
-extern inline void dev_load(const char *unused){;}
+static inline void dev_load(const char *unused){;}
 
 #endif
 
diff -urN linux-2.5.69-bk9/net/core/rtnetlink.c linux-2.5.69-bk10/net/core/rtnetlink.c
--- linux-2.5.69-bk9/net/core/rtnetlink.c	2003-05-04 16:53:57.000000000 -0700
+++ linux-2.5.69-bk10/net/core/rtnetlink.c	2003-05-15 04:44:55.000000000 -0700
@@ -442,7 +442,7 @@
  * Malformed skbs with wrong lengths of messages are discarded silently.
  */
 
-extern __inline__ int rtnetlink_rcv_skb(struct sk_buff *skb)
+static inline int rtnetlink_rcv_skb(struct sk_buff *skb)
 {
 	int err;
 	struct nlmsghdr * nlh;
diff -urN linux-2.5.69-bk9/net/decnet/netfilter/dn_rtmsg.c linux-2.5.69-bk10/net/decnet/netfilter/dn_rtmsg.c
--- linux-2.5.69-bk9/net/decnet/netfilter/dn_rtmsg.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/net/decnet/netfilter/dn_rtmsg.c	2003-05-15 04:44:55.000000000 -0700
@@ -55,7 +55,7 @@
 
 nlmsg_failure:
 	if (skb)
-		kfree(skb);
+		kfree_skb(skb);
 	*errp = -ENOMEM;
 	if (net_ratelimit())
 		printk(KERN_ERR "dn_rtmsg: error creating netlink message\n");
diff -urN linux-2.5.69-bk9/net/ipv4/tcp.c linux-2.5.69-bk10/net/ipv4/tcp.c
--- linux-2.5.69-bk9/net/ipv4/tcp.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/net/ipv4/tcp.c	2003-05-15 04:44:56.000000000 -0700
@@ -2101,7 +2101,7 @@
 
 /* These states need RST on ABORT according to RFC793 */
 
-extern __inline__ int tcp_need_reset(int state)
+static inline int tcp_need_reset(int state)
 {
 	return (1 << state) &
 	       (TCPF_ESTABLISHED | TCPF_CLOSE_WAIT | TCPF_FIN_WAIT1 |
diff -urN linux-2.5.69-bk9/net/ipv4/tcp_diag.c linux-2.5.69-bk10/net/ipv4/tcp_diag.c
--- linux-2.5.69-bk9/net/ipv4/tcp_diag.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/net/ipv4/tcp_diag.c	2003-05-15 04:44:56.000000000 -0700
@@ -603,7 +603,7 @@
 }
 
 
-extern __inline__ void tcpdiag_rcv_skb(struct sk_buff *skb)
+static inline void tcpdiag_rcv_skb(struct sk_buff *skb)
 {
 	int err;
 	struct nlmsghdr * nlh;
diff -urN linux-2.5.69-bk9/net/ipv4/tcp_ipv4.c linux-2.5.69-bk10/net/ipv4/tcp_ipv4.c
--- linux-2.5.69-bk9/net/ipv4/tcp_ipv4.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/net/ipv4/tcp_ipv4.c	2003-05-15 04:44:56.000000000 -0700
@@ -171,7 +171,7 @@
 	spin_unlock(&head->lock);
 }
 
-__inline__ void tcp_inherit_port(struct sock *sk, struct sock *child)
+inline void tcp_inherit_port(struct sock *sk, struct sock *child)
 {
 	local_bh_disable();
 	__tcp_inherit_port(sk, child);
@@ -316,7 +316,7 @@
 	spin_unlock(&head->lock);
 }
 
-__inline__ void tcp_put_port(struct sock *sk)
+inline void tcp_put_port(struct sock *sk)
 {
 	local_bh_disable();
 	__tcp_put_port(sk);
@@ -458,8 +458,8 @@
 }
 
 /* Optimize the common listener case. */
-__inline__ struct sock *tcp_v4_lookup_listener(u32 daddr, unsigned short hnum,
-					       int dif)
+inline struct sock *tcp_v4_lookup_listener(u32 daddr, unsigned short hnum,
+					   int dif)
 {
 	struct sock *sk;
 
@@ -529,8 +529,8 @@
 	return sk ? : tcp_v4_lookup_listener(daddr, hnum, dif);
 }
 
-__inline__ struct sock *tcp_v4_lookup(u32 saddr, u16 sport, u32 daddr,
-				      u16 dport, int dif)
+inline struct sock *tcp_v4_lookup(u32 saddr, u16 sport, u32 daddr,
+				  u16 dport, int dif)
 {
 	struct sock *sk;
 
@@ -633,7 +633,6 @@
 	} else if (tw) {
 		/* Silly. Should hash-dance instead... */
 		tcp_tw_deschedule(tw);
-		tcp_timewait_kill(tw);
 		NET_INC_STATS_BH(TimeWaitRecycled);
 
 		tcp_tw_put(tw);
@@ -737,7 +736,6 @@
 
  		if (tw) {
  			tcp_tw_deschedule(tw);
- 			tcp_timewait_kill(tw);
  			tcp_tw_put(tw);
  		}
 
@@ -1853,7 +1851,6 @@
 							  tcp_v4_iif(skb));
 		if (sk2) {
 			tcp_tw_deschedule((struct tcp_tw_bucket *)sk);
-			tcp_timewait_kill((struct tcp_tw_bucket *)sk);
 			tcp_tw_put((struct tcp_tw_bucket *)sk);
 			sk = sk2;
 			goto process;
diff -urN linux-2.5.69-bk9/net/ipv4/tcp_minisocks.c linux-2.5.69-bk10/net/ipv4/tcp_minisocks.c
--- linux-2.5.69-bk9/net/ipv4/tcp_minisocks.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/net/ipv4/tcp_minisocks.c	2003-05-15 04:44:56.000000000 -0700
@@ -54,7 +54,7 @@
 
 
 /* Must be called with locally disabled BHs. */
-void tcp_timewait_kill(struct tcp_tw_bucket *tw)
+static void tcp_timewait_kill(struct tcp_tw_bucket *tw)
 {
 	struct tcp_ehash_bucket *ehead;
 	struct tcp_bind_hashbucket *bhead;
@@ -166,7 +166,6 @@
 		if (!th->fin || TCP_SKB_CB(skb)->end_seq != tw->rcv_nxt+1) {
 kill_with_rst:
 			tcp_tw_deschedule(tw);
-			tcp_timewait_kill(tw);
 			tcp_tw_put(tw);
 			return TCP_TW_RST;
 		}
@@ -223,7 +222,6 @@
 			if (sysctl_tcp_rfc1337 == 0) {
 kill:
 				tcp_tw_deschedule(tw);
-				tcp_timewait_kill(tw);
 				tcp_tw_put(tw);
 				return TCP_TW_SUCCESS;
 			}
@@ -484,6 +482,7 @@
 			del_timer(&tcp_tw_timer);
 	}
 	spin_unlock(&tw_death_lock);
+	tcp_timewait_kill(tw);
 }
 
 /* Short-time timewait calendar */
diff -urN linux-2.5.69-bk9/net/ipv6/reassembly.c linux-2.5.69-bk10/net/ipv6/reassembly.c
--- linux-2.5.69-bk9/net/ipv6/reassembly.c	2003-05-04 16:53:09.000000000 -0700
+++ linux-2.5.69-bk10/net/ipv6/reassembly.c	2003-05-15 04:44:56.000000000 -0700
@@ -132,19 +132,19 @@
 atomic_t ip6_frag_mem = ATOMIC_INIT(0);
 
 /* Memory Tracking Functions. */
-extern __inline__ void frag_kfree_skb(struct sk_buff *skb)
+static inline void frag_kfree_skb(struct sk_buff *skb)
 {
 	atomic_sub(skb->truesize, &ip6_frag_mem);
 	kfree_skb(skb);
 }
 
-extern __inline__ void frag_free_queue(struct frag_queue *fq)
+static inline void frag_free_queue(struct frag_queue *fq)
 {
 	atomic_sub(sizeof(struct frag_queue), &ip6_frag_mem);
 	kfree(fq);
 }
 
-extern __inline__ struct frag_queue *frag_alloc_queue(void)
+static inline struct frag_queue *frag_alloc_queue(void)
 {
 	struct frag_queue *fq = kmalloc(sizeof(struct frag_queue), GFP_ATOMIC);
 
diff -urN linux-2.5.69-bk9/net/ipv6/tcp_ipv6.c linux-2.5.69-bk10/net/ipv6/tcp_ipv6.c
--- linux-2.5.69-bk9/net/ipv6/tcp_ipv6.c	2003-05-04 16:53:32.000000000 -0700
+++ linux-2.5.69-bk10/net/ipv6/tcp_ipv6.c	2003-05-15 04:44:56.000000000 -0700
@@ -370,9 +370,9 @@
 	return tcp_v6_lookup_listener(daddr, hnum, dif);
 }
 
-__inline__ struct sock *tcp_v6_lookup(struct in6_addr *saddr, u16 sport,
-				      struct in6_addr *daddr, u16 dport,
-				      int dif)
+inline struct sock *tcp_v6_lookup(struct in6_addr *saddr, u16 sport,
+				  struct in6_addr *daddr, u16 dport,
+				  int dif)
 {
 	struct sock *sk;
 
@@ -505,7 +505,6 @@
 		/* Silly. Should hash-dance instead... */
 		local_bh_disable();
 		tcp_tw_deschedule(tw);
-		tcp_timewait_kill(tw);
 		NET_INC_STATS_BH(TimeWaitRecycled);
 		local_bh_enable();
 
@@ -1698,7 +1697,6 @@
 		sk2 = tcp_v6_lookup_listener(&skb->nh.ipv6h->daddr, ntohs(th->dest), tcp_v6_iif(skb));
 		if (sk2 != NULL) {
 			tcp_tw_deschedule((struct tcp_tw_bucket *)sk);
-			tcp_timewait_kill((struct tcp_tw_bucket *)sk);
 			tcp_tw_put((struct tcp_tw_bucket *)sk);
 			sk = sk2;
 			goto process;
diff -urN linux-2.5.69-bk9/net/key/af_key.c linux-2.5.69-bk10/net/key/af_key.c
--- linux-2.5.69-bk9/net/key/af_key.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/net/key/af_key.c	2003-05-15 04:44:56.000000000 -0700
@@ -1090,6 +1090,7 @@
 	return x;
 
 out:
+	x->km.state = XFRM_STATE_DEAD;
 	xfrm_state_put(x);
 	return ERR_PTR(-ENOBUFS);
 }
diff -urN linux-2.5.69-bk9/net/netlink/af_netlink.c linux-2.5.69-bk10/net/netlink/af_netlink.c
--- linux-2.5.69-bk9/net/netlink/af_netlink.c	2003-05-04 16:53:28.000000000 -0700
+++ linux-2.5.69-bk10/net/netlink/af_netlink.c	2003-05-15 04:44:56.000000000 -0700
@@ -1082,7 +1082,7 @@
        remove_proc_entry("net/netlink", NULL);
 }
 
-subsys_initcall(netlink_proto_init);
+core_initcall(netlink_proto_init);
 module_exit(netlink_proto_exit);
 
 MODULE_LICENSE("GPL");
diff -urN linux-2.5.69-bk9/net/netrom/nr_loopback.c linux-2.5.69-bk10/net/netrom/nr_loopback.c
--- linux-2.5.69-bk9/net/netrom/nr_loopback.c	2003-05-04 16:53:41.000000000 -0700
+++ linux-2.5.69-bk10/net/netrom/nr_loopback.c	2003-05-15 04:44:57.000000000 -0700
@@ -76,6 +76,9 @@
 		if (dev == NULL || nr_rx_frame(skb, dev) == 0)
 			kfree_skb(skb);
 
+		if (dev != NULL)
+			dev_put(dev);
+
 		if (!skb_queue_empty(&loopback_queue) && !nr_loopback_running())
 			nr_set_loopback_timer();
 	}
diff -urN linux-2.5.69-bk9/net/netsyms.c linux-2.5.69-bk10/net/netsyms.c
--- linux-2.5.69-bk9/net/netsyms.c	2003-05-15 04:44:30.000000000 -0700
+++ linux-2.5.69-bk10/net/netsyms.c	2003-05-15 04:44:57.000000000 -0700
@@ -420,7 +420,6 @@
 EXPORT_SYMBOL(tcp_rcv_state_process);
 EXPORT_SYMBOL(tcp_timewait_state_process);
 EXPORT_SYMBOL(tcp_timewait_cachep);
-EXPORT_SYMBOL(tcp_timewait_kill);
 EXPORT_SYMBOL(tcp_sendmsg);
 EXPORT_SYMBOL(tcp_v4_rebuild_header);
 EXPORT_SYMBOL(tcp_v4_send_check);
diff -urN linux-2.5.69-bk9/net/sched/sch_csz.c linux-2.5.69-bk10/net/sched/sch_csz.c
--- linux-2.5.69-bk9/net/sched/sch_csz.c	2003-05-04 16:53:32.000000000 -0700
+++ linux-2.5.69-bk10/net/sched/sch_csz.c	2003-05-15 04:44:57.000000000 -0700
@@ -301,8 +301,8 @@
 
 #if 0
 /* Scan forward */
-extern __inline__ void csz_insert_finish(struct csz_head *b,
-					 struct csz_flow *this)
+static inline void csz_insert_finish(struct csz_head *b,
+				     struct csz_flow *this)
 {
 	struct csz_head *f = b->fnext;
 	unsigned long finish = this->finish;
@@ -318,8 +318,8 @@
 }
 #else
 /* Scan backward */
-extern __inline__ void csz_insert_finish(struct csz_head *b,
-					 struct csz_flow *this)
+static inline void csz_insert_finish(struct csz_head *b,
+				     struct csz_flow *this)
 {
 	struct csz_head *f = b->fprev;
 	unsigned long finish = this->finish;
@@ -339,8 +339,8 @@
    flow with greater start number.
  */
 
-extern __inline__ void csz_insert_start(struct csz_head *b,
-					struct csz_flow *this)
+static inline void csz_insert_start(struct csz_head *b,
+				    struct csz_flow *this)
 {
 	struct csz_head *f = b->snext;
 	unsigned long start = this->start;
diff -urN linux-2.5.69-bk9/net/sched/sch_sfq.c linux-2.5.69-bk10/net/sched/sch_sfq.c
--- linux-2.5.69-bk9/net/sched/sch_sfq.c	2003-05-04 16:53:41.000000000 -0700
+++ linux-2.5.69-bk10/net/sched/sch_sfq.c	2003-05-15 04:44:57.000000000 -0700
@@ -166,7 +166,7 @@
 	return sfq_fold_hash(q, h, h2);
 }
 
-extern __inline__ void sfq_link(struct sfq_sched_data *q, sfq_index x)
+static inline void sfq_link(struct sfq_sched_data *q, sfq_index x)
 {
 	sfq_index p, n;
 	int d = q->qs[x].qlen + SFQ_DEPTH;
@@ -178,7 +178,7 @@
 	q->dep[p].next = q->dep[n].prev = x;
 }
 
-extern __inline__ void sfq_dec(struct sfq_sched_data *q, sfq_index x)
+static inline void sfq_dec(struct sfq_sched_data *q, sfq_index x)
 {
 	sfq_index p, n;
 
@@ -193,7 +193,7 @@
 	sfq_link(q, x);
 }
 
-extern __inline__ void sfq_inc(struct sfq_sched_data *q, sfq_index x)
+static inline void sfq_inc(struct sfq_sched_data *q, sfq_index x)
 {
 	sfq_index p, n;
 	int d;
diff -urN linux-2.5.69-bk9/net/unix/af_unix.c linux-2.5.69-bk10/net/unix/af_unix.c
--- linux-2.5.69-bk9/net/unix/af_unix.c	2003-05-15 04:44:31.000000000 -0700
+++ linux-2.5.69-bk10/net/unix/af_unix.c	2003-05-15 04:44:58.000000000 -0700
@@ -169,7 +169,7 @@
 	return peer;
 }
 
-extern inline void unix_release_addr(struct unix_address *addr)
+static inline void unix_release_addr(struct unix_address *addr)
 {
 	if (atomic_dec_and_test(&addr->refcnt))
 		kfree(addr);
diff -urN linux-2.5.69-bk9/scripts/ver_linux linux-2.5.69-bk10/scripts/ver_linux
--- linux-2.5.69-bk9/scripts/ver_linux	2003-05-04 16:53:32.000000000 -0700
+++ linux-2.5.69-bk10/scripts/ver_linux	2003-05-15 04:44:58.000000000 -0700
@@ -28,7 +28,7 @@
 
 mount --version | awk -F\- '{print "mount                 ", $NF}'
 
-depmod -V  2>&1 | awk 'NR==1 {print "module-init-tools     ",$NF}'
+depmod -V  2>&1 | grep version | awk 'NR==1 {print "module-init-tools     ",$NF}'
 
 tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' |  awk \
 'NR==1 {print "e2fsprogs             ", $2}'
diff -urN linux-2.5.69-bk9/sound/oss/i810_audio.c linux-2.5.69-bk10/sound/oss/i810_audio.c
--- linux-2.5.69-bk9/sound/oss/i810_audio.c	2003-05-04 16:53:36.000000000 -0700
+++ linux-2.5.69-bk10/sound/oss/i810_audio.c	2003-05-15 04:44:58.000000000 -0700
@@ -66,16 +66,19 @@
  *
  *	This driver is cursed. (Ben LaHaise)
  *
+ *  ICH 3 caveats
+ *	Intel errata #7 for ICH3 IO. We need to disable SMI stuff
+ *	when codec probing. [Not Yet Done]
  *
  *  ICH 4 caveats
  *
- *      The ICH4 has the feature, that the codec ID doesn't have to be 
- *      congruent with the IO connection.
+ *	The ICH4 has the feature, that the codec ID doesn't have to be 
+ *	congruent with the IO connection.
  * 
- *      Therefore, from driver version 0.23 on, there is a "codec ID" <->
- *      "IO register base offset" mapping (card->ac97_id_map) field.
+ *	Therefore, from driver version 0.23 on, there is a "codec ID" <->
+ *	"IO register base offset" mapping (card->ac97_id_map) field.
  *   
- *      Juergen "George" Sawinski (jsaw) 
+ *	Juergen "George" Sawinski (jsaw) 
  */
  
 #include <linux/module.h>
@@ -640,6 +643,10 @@
 	int	aud_reg;
 	struct ac97_codec *codec = state->card->ac97_codec[0];
 
+	/* No codec, no setup */
+	if(codec == NULL)
+		return;
+
 	aud_reg = i810_ac97_get(codec, AC97_EXTENDED_STATUS);
 	aud_reg |= AC97_EA_PRI | AC97_EA_PRJ | AC97_EA_PRK;
 	state->card->ac97_status &= ~(SURR_ON | CENTER_LFE_ON);
