rpms/kernel/FC-4 linux-2.6-debug-dual-line-backtrace.patch, NONE, 1.1 linux-2.6-debug-no-quiet.patch, NONE, 1.1 linux-2.6-debug-oops-pause.patch, NONE, 1.1 linux-2.6-debug-slab-leak-detector.patch, NONE, 1.1 linux-2.6-debug-sysfs-crash-debugging.patch, NONE, 1.1 linux-2.6-debug-taint-proprietary-helpers.patch, NONE, 1.1 linux-2.6-firmware-loader-timeout.patch, NONE, 1.1 linux-2.6-hvc-console.patch, NONE, 1.1 linux-2.6-hvc-rtas-console.patch, NONE, 1.1 linux-2.6-ide-cd-shutup.patch, NONE, 1.1 linux-2.6-powerpc-parport.patch, NONE, 1.1 linux-2.6-ppc-rtas-check.patch, NONE, 1.1 linux-2.6-sata-enable-atapi-by-default.patch, NONE, 1.1 linux-2.6-ub.patch, NONE, 1.1 linux-2.6-valid-ether-addr.patch, NONE, 1.1 linux-2.6-x86_64-disable-hotplug-guessing.patch, NONE, 1.1 linux-2.6-x86_64-silence-up-apic-errors.patch, NONE, 1.1 linux-2.6.14-intel-cache-build.patch, NONE, 1.1 linux-2.6.15-default-powerpc.patch, NONE, 1.1 linux-2.6.15-mv643xx-fixes.patch, NONE, 1.1 linux-2.6.15-rc1-ppc64-syscallpath.patch, NONE, 1.1 linu! x-2.6.15.tar.bz2.sign, NONE, 1.1 .cvsignore, 1.169, 1.170 Makefile.config, 1.26, 1.27 kernel-2.6.spec, 1.1554, 1.1555 linux-2.6-NFSD-ctlbits.patch, 1.1, 1.2 linux-2.6-build-nonintconfig.patch, 1.3, 1.4 linux-2.6-build-userspace-headers-warning.patch, 1.3, 1.4 linux-2.6-bzimage.patch, 1.3, 1.4 linux-2.6-compile-fixes.patch, 1.6, 1.7 linux-2.6-crashdump-common.patch, 1.5, 1.6 linux-2.6-crashdump-reboot-exports.patch, 1.5, 1.6 linux-2.6-debug-spinlock-panic.patch, 1.3, 1.4 linux-2.6-debug-spinlock-taint.patch, 1.3, 1.4 linux-2.6-debug-taint-vm.patch, 1.3, 1.4 linux-2.6-devmem.patch, 1.1, 1.2 linux-2.6-diskdump.patch, 1.4, 1.5 linux-2.6-dump_smp_call_function.patch, 1.7, 1.8 linux-2.6-execshield.patch, 1.2, 1.3 linux-2.6-modsign-include.patch, 1.1, 1.2 linux-2.6-netdump.patch, 1.4, 1.5 linux-2.6-radeon-backlight.patch, 1.3, 1.4 linux-2.6-scsi-advansys-pcitable.patch, 1.1, 1.2 linux-2.6-serial-of.patch, 1.1, 1.2 linux-2.6-serial-tickle-nmi.patch, 1.1, 1.2 linux-2.6-tux.patch, 1.4, 1.5 linux-2.6-vm-debug.patch, 1.2, 1.3 linux-2.6-! write-protect-rodata.patch,1.3,1.4 linux-2.6-x86-apic-off-by-d! efault.p

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Jan 6 05:42:22 UTC 2006


Author: davej

Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv7762

Modified Files:
	.cvsignore Makefile.config kernel-2.6.spec 
	linux-2.6-NFSD-ctlbits.patch 
	linux-2.6-build-nonintconfig.patch 
	linux-2.6-build-userspace-headers-warning.patch 
	linux-2.6-bzimage.patch linux-2.6-compile-fixes.patch 
	linux-2.6-crashdump-common.patch 
	linux-2.6-crashdump-reboot-exports.patch 
	linux-2.6-debug-spinlock-panic.patch 
	linux-2.6-debug-spinlock-taint.patch 
	linux-2.6-debug-taint-vm.patch linux-2.6-devmem.patch 
	linux-2.6-diskdump.patch 
	linux-2.6-dump_smp_call_function.patch 
	linux-2.6-execshield.patch linux-2.6-modsign-include.patch 
	linux-2.6-netdump.patch linux-2.6-radeon-backlight.patch 
	linux-2.6-scsi-advansys-pcitable.patch 
	linux-2.6-serial-of.patch linux-2.6-serial-tickle-nmi.patch 
	linux-2.6-tux.patch linux-2.6-vm-debug.patch 
	linux-2.6-write-protect-rodata.patch 
	linux-2.6-x86-apic-off-by-default.patch 
	linux-2.6-x86-tune-p4.patch sources upstream 
Added Files:
	linux-2.6-debug-dual-line-backtrace.patch 
	linux-2.6-debug-no-quiet.patch 
	linux-2.6-debug-oops-pause.patch 
	linux-2.6-debug-slab-leak-detector.patch 
	linux-2.6-debug-sysfs-crash-debugging.patch 
	linux-2.6-debug-taint-proprietary-helpers.patch 
	linux-2.6-firmware-loader-timeout.patch 
	linux-2.6-hvc-console.patch linux-2.6-hvc-rtas-console.patch 
	linux-2.6-ide-cd-shutup.patch linux-2.6-powerpc-parport.patch 
	linux-2.6-ppc-rtas-check.patch 
	linux-2.6-sata-enable-atapi-by-default.patch 
	linux-2.6-ub.patch linux-2.6-valid-ether-addr.patch 
	linux-2.6-x86_64-disable-hotplug-guessing.patch 
	linux-2.6-x86_64-silence-up-apic-errors.patch 
	linux-2.6.14-intel-cache-build.patch 
	linux-2.6.15-default-powerpc.patch 
	linux-2.6.15-mv643xx-fixes.patch 
	linux-2.6.15-rc1-ppc64-syscallpath.patch 
	linux-2.6.15.tar.bz2.sign 
Removed Files:
	linux-2.6-8139too-suspend.patch 
	linux-2.6-NFSD-locking-fix.patch linux-2.6-acpi-20050902.patch 
	linux-2.6-acpi-enable-ecburst.patch linux-2.6-acpi-ht.patch 
	linux-2.6-acpi-owner_id-limit.patch 
	linux-2.6-acpi-silence-cutoff.patch 
	linux-2.6-alsa-maestro-hang.patch 
	linux-2.6-build-qconfig-qt-lib64.patch 
	linux-2.6-cx88-silence-debug.patch 
	linux-2.6-debug-spinlock-emerg.patch 
	linux-2.6-default-clocksource-tsc.patch 
	linux-2.6-default-elevator.patch linux-2.6-fs-locks-leak.patch 
	linux-2.6-ide-scsi-check_condition.patch 
	linux-2.6-kauditd-suspend.patch 
	linux-2.6-libata-intel-combined-quirk.patch 
	linux-2.6-mcs-canonicalise-getxattr.patch 
	linux-2.6-net-atm-lanai-nodev-rmmod.patch 
	linux-2.6-net-bridge-feature-consolidation.patch 
	linux-2.6-net-nf_queue-oops.patch 
	linux-2.6-net-rtnetlink-infinite-loop.patch 
	linux-2.6-net-sk98lin-vpd.patch 
	linux-2.6-optimise-for-size.patch linux-2.6-ppc64-build.patch 
	linux-2.6-ppc64-eeh-panic.patch 
	linux-2.6-scsi-runqueue-oops.patch 
	linux-2.6-suspend-mxcsr.patch linux-2.6-usbhid-wacom.patch 
	linux-2.6-usbhid-wireless-security-lock.patch 
	linux-2.6.14.4pre.patch linux-2.6.15-various-fixes.patch 
	patch-2.6.14.5.bz2.sign 
Log Message:
2.6.15 rebase. Let the fun begin. (again).


linux-2.6-debug-dual-line-backtrace.patch:
 traps.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletion(-)

--- NEW FILE linux-2.6-debug-dual-line-backtrace.patch ---
--- linux-2.6.14/arch/i386/kernel/traps.c~	2005-12-01 04:25:36.000000000 -0500
+++ linux-2.6.14/arch/i386/kernel/traps.c	2005-12-01 04:36:19.000000000 -0500
@@ -116,6 +116,7 @@ static inline unsigned long print_contex
 				unsigned long *stack, unsigned long ebp)
 {
 	unsigned long addr;
+	char space=0;
 
 #ifdef	CONFIG_FRAME_POINTER
 	while (valid_stack_ptr(tinfo, (void *)ebp)) {
@@ -131,9 +132,17 @@ static inline unsigned long print_contex
 		if (__kernel_text_address(addr)) {
 			printk(" [<%08lx>]", addr);
 			print_symbol(" %s", addr);
-			printk("\n");
+			if (space == 0) {
+				printk("    ");
+				space = 1;
+			} else {
+				printk("\n");
+				space = 0;
+			}
 		}
 	}
+	if (space==1)
+		printk("\n");
 #endif
 	return ebp;
 }

linux-2.6-debug-no-quiet.patch:
 main.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-debug-no-quiet.patch ---
--- linux-2.6.14/init/main.c~	2005-12-02 01:23:31.000000000 -0500
+++ linux-2.6.14/init/main.c	2005-12-02 01:23:51.000000000 -0500
@@ -210,7 +210,7 @@ static int __init quiet_kernel(char *str
 {
 	if (*str)
 		return 0;
-	console_loglevel = 4;
+	console_loglevel = 10;
 	return 1;
 }
 

linux-2.6-debug-oops-pause.patch:
 traps.c |    9 +++++++++
 1 files changed, 9 insertions(+)

--- NEW FILE linux-2.6-debug-oops-pause.patch ---

if we oops, pause for a two minutes..
should help those 'it scrolled off the screen' bugs,
and hopefully give people enough time to grab a digital camera
to take a screenshot of the oops.

(Wow, I'm really getting desperate for better debug data).

--- linux-2.6.14/arch/i386/kernel/traps.c~	2005-12-16 03:00:16.000000000 -0500
+++ linux-2.6.14/arch/i386/kernel/traps.c	2005-12-16 03:07:12.000000000 -0500
@@ -271,6 +271,15 @@ void show_registers(struct pt_regs *regs
 		}
 	}
 	printk("\n");
+	{
+		int i;
+		for (i=120;i>0;i--) {
+			mdelay(1000);
+			touch_nmi_watchdog();
+			printk("Continuing in %d seconds. \r", i);
+		}
+		printk("\n");
+	}
 }	
 
 static void handle_BUG(struct pt_regs *regs)

linux-2.6-debug-slab-leak-detector.patch:
 slab.c |   46 +++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 43 insertions(+), 3 deletions(-)

--- NEW FILE linux-2.6-debug-slab-leak-detector.patch ---

http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.15-rc5/2.6.15-rc5-mm1/broken-out/slab-leak-detector.patch

From: Manfred Spraul <manfred at colorfullife.com>

Maintenance work from Alexander Nyberg <alexn at telia.com>

With the patch applied,

	echo "size-4096 0 0 0" > /proc/slabinfo

walks the objects in the size-4096 slab, printing out the calling address
of whoever allocated that object.

It is for leak detection.

Signed-off-by: Andrew Morton <akpm at osdl.org>
---

 mm/slab.c |   46 +++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 43 insertions(+), 3 deletions(-)

diff -puN mm/slab.c~slab-leak-detector mm/slab.c
--- devel/mm/slab.c~slab-leak-detector	2005-11-18 19:15:09.000000000 -0800
+++ devel-akpm/mm/slab.c	2005-11-18 19:16:22.000000000 -0800
@@ -199,7 +199,7 @@
  * is less than 512 (PAGE_SIZE<<3), but greater than 256.
  */
 
-typedef unsigned int kmem_bufctl_t;
+typedef unsigned long kmem_bufctl_t;
 #define BUFCTL_END	(((kmem_bufctl_t)(~0U))-0)
 #define BUFCTL_FREE	(((kmem_bufctl_t)(~0U))-1)
 #define	SLAB_LIMIT	(((kmem_bufctl_t)(~0U))-2)
@@ -2380,7 +2380,7 @@ bad:
 				cachep->name, cachep->num, slabp, slabp->inuse);
 		for (i=0;i<sizeof(slabp)+cachep->num*sizeof(kmem_bufctl_t);i++) {
 			if ((i%16)==0)
-				printk("\n%03x:", i);
+				printk("\n%04lx:", i);
 			printk(" %02x", ((unsigned char*)slabp)[i]);
 		}
 		printk("\n");
@@ -2563,6 +2563,15 @@ static void *cache_alloc_debugcheck_afte
 		*dbg_redzone1(cachep, objp) = RED_ACTIVE;
 		*dbg_redzone2(cachep, objp) = RED_ACTIVE;
 	}
+	{
+		int objnr;
+		struct slab *slabp;
+
+		slabp = page_get_slab(virt_to_page(objp));
+
+		objnr = (objp - slabp->s_mem) / cachep->objsize;
+		slab_bufctl(slabp)[objnr] = (unsigned long)caller;
+	}
 	objp += obj_dbghead(cachep);
 	if (cachep->ctor && cachep->flags & SLAB_POISON) {
 		unsigned long ctor_flags = SLAB_CTOR_CONSTRUCTOR;
@@ -2713,7 +2722,7 @@ static void free_block(kmem_cache_t * ca
 		check_spinlock_acquired_node(cachep, node);
 		check_slabp(cachep, slabp);
 
-#if DEBUG
+#if 0	/* disabled, not compatible with leak detection */
 		/* Verify that the slab belongs to the intended node */
 		WARN_ON(slabp->nodeid != node);
 
@@ -3604,6 +3613,36 @@ struct seq_operations slabinfo_op = {
 	.show = s_show,
 };
 
+static void do_dump_slabp(kmem_cache_t *cachep)
+{
+#if DEBUG
+	struct list_head *q;
+	int node;
+
+	check_irq_on();
+	spin_lock_irq(&cachep->spinlock);
+	for_each_online_node(node) {
+		struct kmem_list3 *rl3 = cachep->nodelists[node];
+		spin_lock(&rl3->list_lock);
+
+		list_for_each(q, &rl3->slabs_full) {
+			int i;
+			struct slab *slabp = list_entry(q, struct slab, list);
+
+			for (i = 0; i < cachep->num; i++) {
+				unsigned long sym = slab_bufctl(slabp)[i];
+
+				printk("obj %p/%d: %p", slabp, i, (void *)sym);
+				print_symbol(" <%s>", sym);
+				printk("\n");
+			}
+		}
+		spin_unlock(&rl3->list_lock);
+	}
+	spin_unlock_irq(&cachep->spinlock);
+#endif
+}
+
 #define MAX_SLABINFO_WRITE 128
 /**
  * slabinfo_write - Tuning for the slab allocator
@@ -3641,6 +3641,7 @@ ssize_t slabinfo_write(struct file *file
 			    batchcount < 1 ||
 			    batchcount > limit ||
 			    shared < 0) {
+				do_dump_slabp(cachep);
 				res = 0;
 			} else {
 				res = do_tune_cpucache(cachep, limit,

linux-2.6-debug-sysfs-crash-debugging.patch:
 devel-akpm/arch/i386/kernel/traps.c     |    5 +++++
 devel-akpm/fs/sysfs/file.c              |    8 ++++++++
 linux-2.6.14/arch/x86_64/kernel/traps.c |    5 +++++
 3 files changed, 18 insertions(+)

--- NEW FILE linux-2.6-debug-sysfs-crash-debugging.patch ---

From: Andrew Morton <akpm at osdl.org>

Display the most-recently-opened sysfs file's name when oopsing.

From: Adrian Bunk <bunk at stusta.de>

  Build fix

Signed-off-by: Adrian Bunk <bunk at stusta.de>
Signed-off-by: Andrew Morton <akpm at osdl.org>
---

 arch/i386/kernel/traps.c |    5 +++++
 fs/sysfs/file.c          |    8 ++++++++
 2 files changed, 13 insertions(+)

diff -puN fs/sysfs/file.c~sysfs-crash-debugging fs/sysfs/file.c
--- devel/fs/sysfs/file.c~sysfs-crash-debugging	2005-11-22 22:31:16.000000000 -0800
+++ devel-akpm/fs/sysfs/file.c	2005-11-22 22:31:16.000000000 -0800
@@ -6,6 +6,8 @@
 #include <linux/fsnotify.h>
 #include <linux/kobject.h>
 #include <linux/namei.h>
+#include <linux/limits.h>
+
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>
 
@@ -324,8 +326,14 @@ static int check_perm(struct inode * ino
 	return error;
 }
 
+char last_sysfs_file[PATH_MAX];
+
 static int sysfs_open_file(struct inode * inode, struct file * filp)
 {
+	char *p = d_path(filp->f_dentry, sysfs_mount, last_sysfs_file,
+			sizeof(last_sysfs_file));
+	if (p)
+		memmove(last_sysfs_file, p, strlen(p) + 1);
 	return check_perm(inode,filp);
 }
 
diff -puN arch/i386/kernel/traps.c~sysfs-crash-debugging arch/i386/kernel/traps.c
--- devel/arch/i386/kernel/traps.c~sysfs-crash-debugging	2005-11-22 22:31:16.000000000 -0800
+++ devel-akpm/arch/i386/kernel/traps.c	2005-11-22 22:31:16.000000000 -0800
@@ -95,6 +95,8 @@ static int kstack_depth_to_print = 24;
 struct notifier_block *i386die_chain;
 static DEFINE_SPINLOCK(die_notifier_lock);
 
+extern char last_sysfs_file[];
+
 int register_die_notifier(struct notifier_block *nb)
 {
 	int err = 0;
@@ -346,6 +346,9 @@ void die(const char * str, struct pt_reg
 #endif
 		if (nl)
 			printk("\n");
+#ifdef CONFIG_SYSFS
+		printk(KERN_ALERT "last sysfs file: %s\n", last_sysfs_file);
+#endif
 	notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
 		show_registers(regs);
 		try_crashdump(regs);
--- linux-2.6.14/arch/x86_64/kernel/traps.c~	2005-12-02 18:38:28.000000000 -0500
+++ linux-2.6.14/arch/x86_64/kernel/traps.c	2005-12-02 18:38:57.000000000 -0500
@@ -75,6 +75,8 @@ asmlinkage void call_debug(void);
 struct notifier_block *die_chain;
 static DEFINE_SPINLOCK(die_notifier_lock);
 
+extern char last_sysfs_file[];
+
 int register_die_notifier(struct notifier_block *nb)
 {
 	int err = 0;
@@ -385,6 +387,9 @@ void __die(const char * str, struct pt_r
 	printk("DEBUG_PAGEALLOC");
 #endif
 	printk("\n");
+#ifdef CONFIG_SYSFS
+	printk(KERN_ALERT "last sysfs file: %s\n", last_sysfs_file);
+#endif
 	notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
 	show_registers(regs);
 	/* Executive summary in case the oops scrolled away */

linux-2.6-debug-taint-proprietary-helpers.patch:
 module.c |    5 +++++
 1 files changed, 5 insertions(+)

--- NEW FILE linux-2.6-debug-taint-proprietary-helpers.patch ---

Kernels that have had Windows drivers loaded into them are
undebuggable.  As we're not interested in those bug reports,
make sure any oopses are marked accordingly.

Signed-off-by: Dave Jones <davej at redhat.com>

--- linux-2.6.14/kernel/module.c~	2005-11-29 16:44:00.000000000 -0500
+++ linux-2.6.14/kernel/module.c	2005-11-29 17:03:55.000000000 -0500
@@ -1723,6 +1723,11 @@ static struct module *load_module(void _
 	/* Set up license info based on the info section */
 	set_license(mod, get_modinfo(sechdrs, infoindex, "license"));
 
+	if (strcmp(mod->name, "ndiswrapper") == 0)
+		add_taint(TAINT_PROPRIETARY_MODULE);
+	if (strcmp(mod->name, "driverloader") == 0)
+		add_taint(TAINT_PROPRIETARY_MODULE);
+
 #ifdef CONFIG_MODULE_UNLOAD
 	/* Set up MODINFO_ATTR fields */
 	setup_modinfo(mod, sechdrs, infoindex);

linux-2.6-firmware-loader-timeout.patch:
 firmware_class.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-firmware-loader-timeout.patch ---

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=174589

The ipw driver sometimes takes a long time to load its firmware.
Whilst the ipw driver should be using the async interface of
the firmware loader to make this a non-issue, this is a minimal fix.

Signed-off-by: Dave Jones <davej at redhat.com>

--- linux-2.6.14/drivers/base/firmware_class.c~	2005-12-01 16:56:29.000000000 -0500
+++ linux-2.6.14/drivers/base/firmware_class.c	2005-12-01 16:56:35.000000000 -0500
@@ -31,7 +31,7 @@ enum {
 	FW_STATUS_READY_NOHOTPLUG,
 };
 
-static int loading_timeout = 10;	/* In seconds */
+static int loading_timeout = 60;	/* In seconds */
 
 /* fw_lock could be moved to 'struct firmware_priv' but since it is just
  * guarding for corner cases a global lock should be OK */

linux-2.6-hvc-console.patch:
 arch/powerpc/kernel/setup-common.c |   11 ++
 drivers/char/Kconfig               |   13 +++
 drivers/char/Makefile              |    6 -
 drivers/char/hvc_console.c         |   25 ------
 drivers/char/hvc_console.h         |   83 ++++++++++++++++++++
 drivers/char/hvc_fss.c             |  149 +++++++++++++++++++++++++++++++++++++
 drivers/char/hvc_vio.c             |    1 
 include/asm-powerpc/hvconsole.h    |   21 -----
 8 files changed, 262 insertions(+), 47 deletions(-)

--- NEW FILE linux-2.6-hvc-console.patch ---
diff -uNr --exclude '*.orig' linux-2.6.14.cons/arch/powerpc/kernel/setup-common.c linux-2.6.14/arch/powerpc/kernel/setup-common.c
--- linux-2.6.14.cons/arch/powerpc/kernel/setup-common.c	2005-12-07 16:33:31.000000000 +0100
+++ linux-2.6.14/arch/powerpc/kernel/setup-common.c	2005-12-07 16:34:00.000000000 +0100
@@ -304,6 +304,15 @@
 
 	DBG(" -> set_preferred_console()\n");
 
+#ifdef CONFIG_HVC_FSS
+	/* if we're on the full system simulator just circumvent the whole
+	 * picking process because there is no device tree in which we'll
+	 * find the console device. */
+	if(__onsim()) {
+		DBG("Found hvc_fss console\n");
+		return add_preferred_console("hvc", 0, NULL);
+	}
+#endif
 	/* The user has requested a console so this is already set up. */
 	if (strstr(saved_command_line, "console=")) {
 		DBG(" console was specified !\n");
@@ -385,7 +393,7 @@
  		} else {
  			/* pSeries LPAR virtual console */
 			of_node_put(prom_stdout);
-			DBG("Found hvc console\n");
+			DBG("Found hvc_vio console\n");
  			return add_preferred_console("hvc", 0, NULL);
  		}
 	}
diff -uNr --exclude '*.orig' linux-2.6.14.cons/drivers/char/hvc_console.c linux-2.6.14/drivers/char/hvc_console.c
--- linux-2.6.14.cons/drivers/char/hvc_console.c	2005-12-07 16:33:35.000000000 +0100
+++ linux-2.6.14/drivers/char/hvc_console.c	2005-12-07 16:33:56.000000000 +0100
@@ -40,7 +40,7 @@
 #include <linux/spinlock.h>
 #include <linux/delay.h>
 #include <asm/uaccess.h>
-#include <asm/hvconsole.h>
+#include "hvc_console.h"
 
 #define HVC_MAJOR	229
 #define HVC_MINOR	0
@@ -61,11 +61,6 @@
  */
 #define HVC_ALLOC_TTY_ADAPTERS	8
 
-#define N_OUTBUF	16
-#define N_INBUF		16
-
-#define __ALIGNED__	__attribute__((__aligned__(8)))
-
 static struct tty_driver *hvc_driver;
 static struct task_struct *hvc_task;
 
@@ -76,22 +71,6 @@
 static int sysrq_pressed;
 #endif
 
-struct hvc_struct {
-	spinlock_t lock;
-	int index;
-	struct tty_struct *tty;
-	unsigned int count;
-	int do_wakeup;
-	char outbuf[N_OUTBUF] __ALIGNED__;
-	int n_outbuf;
-	uint32_t vtermno;
-	struct hv_ops *ops;
-	int irq_requested;
-	int irq;
-	struct list_head next;
-	struct kobject kobj; /* ref count & hvc_struct lifetime */
-};
-
 /* dynamic list of hvc_struct instances */
 static struct list_head hvc_structs = LIST_HEAD_INIT(hvc_structs);
 
@@ -136,7 +115,6 @@
 	return hp;
 }
 
-
 /*
  * Initial console vtermnos for console API usage prior to full console
  * initialization.  Any vty adapter outside this range will not have usable
@@ -154,6 +132,7 @@
 
 void hvc_console_print(struct console *co, const char *b, unsigned count)
 {
+	/* This [16] should probably use a #define */
 	char c[16] __ALIGNED__;
 	unsigned i = 0, n = 0;
 	int r, donecr = 0, index = co->index;
diff -uNr --exclude '*.orig' linux-2.6.14.cons/drivers/char/hvc_console.h linux-2.6.14/drivers/char/hvc_console.h
--- linux-2.6.14.cons/drivers/char/hvc_console.h	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.14/drivers/char/hvc_console.h	2005-12-07 16:33:56.000000000 +0100
@@ -0,0 +1,83 @@
+/*
+ * hvc_console.h
+ * Copyright (C) 2005 IBM Corporation
+ *
+ * Author(s):
+ * 	Ryan S. Arnold <rsa at us.ibm.com>
+ *
+ * hvc_console header information:
+ *      moved here from include/asm-ppc64/hvconsole.h
+ *      and drivers/char/hvc_console.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+#ifndef HVC_CONSOLE_H
+#define HVC_CONSOLE_H
+
+#include <linux/spinlock.h>
+#include <linux/list.h>
+#include <linux/kobject.h>
+
+/*
+ * This is the max number of console adapters that can/will be found as
+ * console devices on first stage console init.  Any number beyond this range
+ * can't be used as a console device but is still a valid tty device.
+ */
+#define MAX_NR_HVC_CONSOLES	16
+
+/*
+ * This is a design shortcoming, the number '16' is a vio required buffer
+ * size.  This should be changeable per architecture, but hvc_struct relies
+ * upon it and that struct is used by all hvc_console backend drivers.  This
+ * needs to be fixed.
+ */
+#define N_OUTBUF	16
+#define N_INBUF		16
+
+#define __ALIGNED__ __attribute__((__aligned__(sizeof(long))))
+
+/* implemented by a low level driver */
+struct hv_ops {
+	int (*get_chars)(uint32_t vtermno, char *buf, int count);
+	int (*put_chars)(uint32_t vtermno, const char *buf, int count);
+};
+
+struct hvc_struct {
+	spinlock_t lock;
+	int index;
+	struct tty_struct *tty;
+	unsigned int count;
+	int do_wakeup;
+	char outbuf[N_OUTBUF] __ALIGNED__;
+	int n_outbuf;
+	uint32_t vtermno;
+	struct hv_ops *ops;
+	int irq_requested;
+	int irq;
+	struct list_head next;
+	struct kobject kobj; /* ref count & hvc_struct lifetime */
+};
+
+/* Register a vterm and a slot index for use as a console (console_init) */
+extern int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops);
+
+/* register a vterm for hvc tty operation (module_init or hotplug add) */
+extern struct hvc_struct * __devinit hvc_alloc(uint32_t vtermno, int irq,
+						 struct hv_ops *ops);
+/* remove a vterm from hvc tty operation (modele_exit or hotplug remove) */
+extern int __devexit hvc_remove(struct hvc_struct *hp);
+
+#endif // HVC_CONSOLE_H
diff -uNr --exclude '*.orig' linux-2.6.14.cons/drivers/char/hvc_fss.c linux-2.6.14/drivers/char/hvc_fss.c
--- linux-2.6.14.cons/drivers/char/hvc_fss.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.14/drivers/char/hvc_fss.c	2005-12-07 16:34:02.000000000 +0100
@@ -0,0 +1,149 @@
+/*
+ * IBM Full System Simulator driver interface to hvc_console.c
+ *
+ * (C) Copyright IBM Corporation 2001-2005
+ * Author(s): Maximino Augilar <IBM STI Design Center>
+ *          : Ryan S. Arnold <rsa at us.ibm.com>
+ *
+ *    inspired by drivers/char/hvc_console.c
+ *    written by Anton Blanchard and Paul Mackerras
+ *
+ * Some code is from the IBM Full System Simulator Group in ARL.
+ * Author: Patrick Bohrer <IBM Austin Research Lab>
+ *
+ * Much of this code was moved here from the IBM Full System Simulator
+ * Bogus console driver in order to reuse the framework provided by the hvc
+ * console driver. Ryan S. Arnold <rsa at us.ibm.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/err.h>
+#include <asm/irq.h>
+#include "hvc_console.h"
+
+static uint32_t hvc_fss_vtermno = 0;
+struct hvc_struct *hvc_fss_dev;
+
+static inline int callthru0(int command)
+{
+	register int c asm ("r3") = command;
+
+	asm volatile (".long 0x000EAEB0" : "=r" (c): "r" (c));
+	return((c));
+}
+
+static inline int callthru3(int command, unsigned long arg1, unsigned long arg2, unsigned long arg3)
+{
+	register int c asm ("r3") = command;
+	register unsigned long a1 asm ("r4") = arg1;
+	register unsigned long a2 asm ("r5") = arg2;
+	register unsigned long a3 asm ("r6") = arg3;
+
+	asm volatile (".long 0x000EAEB0" : "=r" (c): "r" (c), "r" (a1), "r" (a2), "r" (a3));
+	return((c));
+}
+
+static inline int hvc_fss_write_console(uint32_t vtermno, const char *buf, int count)
+{
+	int ret = 0;
+	ret = callthru3(0, (unsigned long)buf,
+		(unsigned long)count, (unsigned long)1);
+	if (ret != 0) {
+		return (count - ret); /* is this right? */
+	}
+
+	/* the calling routine expects to receive the number of bytes sent */
+	return count;
+}
+
+static inline int hvc_fss_read_console(uint32_t vtermno, char *buf, int count)
+{
+	unsigned long got;
+	int c;	
+	int i;
+
+	for (got = 0, i = 0; i < count; i++) {
+	
+		if (( c = callthru0(60) ) != -1) {
+			buf[i] = c;
+			++got;
+		}
+		else
+			break;
+	}
+	return got;
+}
+
+static struct hv_ops hvc_fss_get_put_ops = {
+	.get_chars = hvc_fss_read_console,
+	.put_chars = hvc_fss_write_console,
+};
+
+static int hvc_fss_init(void)
+{
+	/* Register a single device with the driver */
+	struct hvc_struct *hp;
+
+	if(!__onsim()) {
+		return -1;
+	}
+
+	if(hvc_fss_dev) {
+		return -1; /* This shouldn't happen */
+	}
+
+	/* Allocate an hvc_struct for the console device we instantiated
+	 * earlier.  Save off hp so that we can return it on exit */
+	hp = hvc_alloc(hvc_fss_vtermno, NO_IRQ, &hvc_fss_get_put_ops);
+	if (IS_ERR(hp))
+		return PTR_ERR(hp);
+	hvc_fss_dev = hp;
+	return 0;
+}
+module_init(hvc_fss_init);
+
+/* This will tear down the tty portion of the driver */
+static void __exit hvc_fss_exit(void)
+{
+	struct hvc_struct *hp_safe;
+	/* Hopefully this isn't premature */
+	if (!hvc_fss_dev)
+		return;
+
+	hp_safe = hvc_fss_dev;
+	hvc_fss_dev = NULL;
+
+	/* Really the fun isn't over until the worker thread breaks down and the
+	 * tty cleans up */
+	hvc_remove(hp_safe);
+}
+module_exit(hvc_fss_exit); /* before drivers/char/hvc_console.c */
+
+/* This will happen prior to module init.  There is no tty at this time? */
+static int hvc_fss_console_init(void)
+{
+	/* Don't register if we aren't running on the simulator */
+	if (__onsim()) {
+		/* Tell the driver we know of one console device.  We
+		 * shouldn't get a collision on the index as long as no-one
+		 * else instantiates on hardware they don't have. */
+		hvc_instantiate(hvc_fss_vtermno, 0, &hvc_fss_get_put_ops );
+	}
+	return 0;
+}
+console_initcall(hvc_fss_console_init);
diff -uNr --exclude '*.orig' linux-2.6.14.cons/drivers/char/Kconfig linux-2.6.14/drivers/char/Kconfig
--- linux-2.6.14.cons/drivers/char/Kconfig	2005-12-07 16:33:33.000000000 +0100
+++ linux-2.6.14/drivers/char/Kconfig	2005-12-07 16:33:58.000000000 +0100
@@ -552,14 +552,27 @@
 
 	  If unsure, say N.
 
+config HVC_DRIVER
+	bool
+	depends on PPC_PSERIES || PPC_CELL || PPC_RTAS
+
 config HVC_CONSOLE
 	bool "pSeries Hypervisor Virtual Console support"
 	depends on PPC_PSERIES
+	select HVC_DRIVER
 	help
 	  pSeries machines when partitioned support a hypervisor virtual
 	  console. This driver allows each pSeries partition to have a console
 	  which is accessed via the HMC.
 
+config HVC_FSS
+	bool "IBM Full System Simulator Console support"
+	depends on MAMBO
+	select HVC_DRIVER
+	help
+	  IBM Full System Simulator Console device driver which makes use of
+	  the HVC_DRIVER front end.
+
 config HVCS
 	tristate "IBM Hypervisor Virtual Console Server support"
 	depends on PPC_PSERIES
diff -uNr --exclude '*.orig' linux-2.6.14.cons/drivers/char/Makefile linux-2.6.14/drivers/char/Makefile
--- linux-2.6.14.cons/drivers/char/Makefile	2005-12-07 16:33:33.000000000 +0100
+++ linux-2.6.14/drivers/char/Makefile	2005-12-07 16:33:58.000000000 +0100
@@ -40,11 +40,13 @@
 obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
 obj-$(CONFIG_SX)		+= sx.o generic_serial.o
 obj-$(CONFIG_RIO)		+= rio/ generic_serial.o
-obj-$(CONFIG_HVC_CONSOLE)	+= hvc_console.o hvc_vio.o hvsi.o
+obj-$(CONFIG_HVC_DRIVER)	+= hvc_console.o
+obj-$(CONFIG_HVC_CONSOLE)	+= hvc_vio.o hvsi.o
+obj-$(CONFIG_HVC_FSS)		+= hvc_fss.o
 obj-$(CONFIG_RAW_DRIVER)	+= raw.o
 obj-$(CONFIG_SGI_SNSC)		+= snsc.o snsc_event.o
 obj-$(CONFIG_MMTIMER)		+= mmtimer.o
-obj-$(CONFIG_VIOCONS) += viocons.o
+obj-$(CONFIG_VIOCONS)		+= viocons.o
 obj-$(CONFIG_VIOTAPE)		+= viotape.o
 obj-$(CONFIG_HVCS)		+= hvcs.o
 obj-$(CONFIG_SGI_MBCS)		+= mbcs.o
diff -uNr --exclude '*.orig' linux-2.6.14.cons/include/asm-powerpc/hvconsole.h linux-2.6.14/include/asm-powerpc/hvconsole.h
--- linux-2.6.14.cons/include/asm-powerpc/hvconsole.h	2005-12-07 16:33:35.000000000 +0100
+++ linux-2.6.14/include/asm-powerpc/hvconsole.h	2005-12-07 16:33:56.000000000 +0100
@@ -22,28 +22,7 @@
 #ifndef _PPC64_HVCONSOLE_H
 #define _PPC64_HVCONSOLE_H
 
-/*
- * This is the max number of console adapters that can/will be found as
- * console devices on first stage console init.  Any number beyond this range
- * can't be used as a console device but is still a valid tty device.
- */
-#define MAX_NR_HVC_CONSOLES	16
-
-/* implemented by a low level driver */
-struct hv_ops {
-	int (*get_chars)(uint32_t vtermno, char *buf, int count);
-	int (*put_chars)(uint32_t vtermno, const char *buf, int count);
-};
 extern int hvc_get_chars(uint32_t vtermno, char *buf, int count);
 extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count);
 
-struct hvc_struct;
-
-/* Register a vterm and a slot index for use as a console (console_init) */
-extern int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops);
-/* register a vterm for hvc tty operation (module_init or hotplug add) */
-extern struct hvc_struct * __devinit hvc_alloc(uint32_t vtermno, int irq,
-						 struct hv_ops *ops);
-/* remove a vterm from hvc tty operation (modele_exit or hotplug remove) */
-extern int __devexit hvc_remove(struct hvc_struct *hp);
 #endif /* _PPC64_HVCONSOLE_H */
--- linux-2.6.14/drivers/char/hvc_vio.c~	2005-12-07 17:46:48.000000000 +0100
+++ linux-2.6.14/drivers/char/hvc_vio.c	2005-12-07 18:03:23.000000000 +0100
@@ -34,6 +34,7 @@
 #include <asm/hvconsole.h>
 #include <asm/vio.h>
 #include <asm/prom.h>
+#include "hvc_console.h"
 
 char hvc_driver_name[] = "hvc_console";
 

linux-2.6-hvc-rtas-console.patch:
 Kconfig    |    7 ++
 Makefile   |    1 
 hvc_rtas.c |  161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 169 insertions(+)

--- NEW FILE linux-2.6-hvc-rtas-console.patch ---
--- linux-2.6.14/drivers/char/hvc_rtas.c~	2005-12-07 18:12:59.000000000 +0100
+++ linux-2.6.14/drivers/char/hvc_rtas.c	2005-12-07 18:15:39.000000000 +0100
@@ -0,0 +1,161 @@
+/*
+ * IBM RTAS driver interface to hvc_console.c
+ *
+ * (C) Copyright IBM Corporation 2001-2005
+ * (C) Copyright Red Hat, Inc. 2005
+ *
+ * Author(s): Maximino Augilar <IBM STI Design Center>
+ *          : Ryan S. Arnold <rsa at us.ibm.com>
+ *          : Utz Bacher <utz.bacher at de.ibm.com>
+ *          : David Woodhouse <dwmw2 at infradead.org>
+ *
+ *    inspired by drivers/char/hvc_console.c
+ *    written by Anton Blanchard and Paul Mackerras
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/err.h>
+#include <linux/delay.h>
+#include <asm/rtas.h>
+#include <asm/irq.h>
+#include "hvc_console.h"
+
+static uint32_t hvc_rtas_vtermno = 0;
+struct hvc_struct *hvc_rtas_dev;
+
+#define RTASCONS_PUT_ATTEMPTS  16
+
+static int rtascons_put_char_token = -1;
+static int rtascons_get_char_token = -1;
+static int rtascons_put_delay;
+
+static inline int hvc_rtas_write_console(uint32_t vtermno, const char *buf, int count)
+{
+       int result = 0;
+       int attempts = RTASCONS_PUT_ATTEMPTS;
+       int done = 0;
+
+       /* if there is more than one character to be displayed, wait a bit */
+       for (; done < count && attempts; udelay(rtascons_put_delay)) {
+               attempts--;
+               result = rtas_call(rtascons_put_char_token, 1, 1, NULL, buf[done]);
+
+               if (!result) {
+			attempts = RTASCONS_PUT_ATTEMPTS;
+			done++;
+		}
+       }
+	/* the calling routine expects to receive the number of bytes sent */
+	return done?:result;
+}
+
+static inline int rtascons_get_char(void)
+{
+       int result;
+
+       if (rtas_call(rtascons_get_char_token, 0, 2, &result))
+               result = -1;
+
+       return result;
+}
+
+static int hvc_rtas_read_console(uint32_t vtermno, char *buf, int count)
+{
+	unsigned long got;
+	int c;	
+	int i;
+
+	for (got = 0, i = 0; i < count; i++) {
+	
+		if (( c = rtascons_get_char() ) != -1) {
+			buf[i] = c;
+			++got;
+		}
+		else
+			break;
+	}
+	return got;
+}
+
+static struct hv_ops hvc_rtas_get_put_ops = {
+	.get_chars = hvc_rtas_read_console,
+	.put_chars = hvc_rtas_write_console,
+};
+
+static int hvc_rtas_init(void)
+{
+	struct hvc_struct *hp;
+
+	if (rtascons_put_char_token == -1)
+		rtascons_put_char_token = rtas_token("put-term-char");
+	if (rtascons_put_char_token == -1)
+		return -EIO;
+
+	if (rtascons_get_char_token == -1)
+		rtascons_get_char_token = rtas_token("get-term-char");
+	if (rtascons_get_char_token == -1)
+		return -EIO;
+
+	if (__onsim())
+		rtascons_put_delay = 0;
+	else
+		rtascons_put_delay = 100;
+
+	BUG_ON(hvc_rtas_dev);
+
+	/* Allocate an hvc_struct for the console device we instantiated
+	 * earlier.  Save off hp so that we can return it on exit */
+	hp = hvc_alloc(hvc_rtas_vtermno, NO_IRQ, &hvc_rtas_get_put_ops);
+	if (IS_ERR(hp))
+		return PTR_ERR(hp);
+	hvc_rtas_dev = hp;
+	return 0;
+}
+module_init(hvc_rtas_init);
+
+/* This will tear down the tty portion of the driver */
+static void __exit hvc_rtas_exit(void)
+{
+	struct hvc_struct *hp_safe;
+	/* Hopefully this isn't premature */
+	if (!hvc_rtas_dev)
+		return;
+
+	hp_safe = hvc_rtas_dev;
+	hvc_rtas_dev = NULL;
+
+	/* Really the fun isn't over until the worker thread breaks down and the
+	 * tty cleans up */
+	hvc_remove(hp_safe);
+}
+module_exit(hvc_rtas_exit); /* before drivers/char/hvc_console.c */
+
+/* This will happen prior to module init.  There is no tty at this time? */
+static int hvc_rtas_console_init(void)
+{
+	rtascons_put_char_token = rtas_token("put-term-char");
+	if (rtascons_put_char_token == -1)
+		return -EIO;
+	rtascons_get_char_token = rtas_token("get-term-char");
+	if (rtascons_get_char_token == -1)
+		return -EIO;
+
+	hvc_instantiate(hvc_rtas_vtermno, 0, &hvc_rtas_get_put_ops );
+	return 0;
+}
+console_initcall(hvc_rtas_console_init);
--- linux-2.6.14/drivers/char/Makefile~	2005-12-07 17:47:05.000000000 +0100
+++ linux-2.6.14/drivers/char/Makefile	2005-12-07 18:12:07.000000000 +0100
@@ -43,6 +43,7 @@ obj-$(CONFIG_RIO)		+= rio/ generic_seria
 obj-$(CONFIG_HVC_DRIVER)	+= hvc_console.o
 obj-$(CONFIG_HVC_CONSOLE)	+= hvc_vio.o hvsi.o
 obj-$(CONFIG_HVC_FSS)		+= hvc_fss.o
+obj-$(CONFIG_HVC_RTAS)		+= hvc_rtas.o
 obj-$(CONFIG_RAW_DRIVER)	+= raw.o
 obj-$(CONFIG_SGI_SNSC)		+= snsc.o snsc_event.o
 obj-$(CONFIG_MMTIMER)		+= mmtimer.o
--- linux-2.6.14/drivers/char/Kconfig~	2005-12-07 17:47:05.000000000 +0100
+++ linux-2.6.14/drivers/char/Kconfig	2005-12-07 18:17:14.000000000 +0100
@@ -575,6 +575,13 @@ config HVC_FSS
 	  IBM Full System Simulator Console device driver which makes use of
 	  the HVC_DRIVER front end.
 
+config HVC_RTAS
+	bool "IBM RTAS Console support"
+	depends on PPC_RTAS
+	select HVC_DRIVER
+	help
+	  IBM Console device driver which makes use of RTAS
+
 config HVCS
 	tristate "IBM Hypervisor Virtual Console Server support"
 	depends on PPC_PSERIES

linux-2.6-ide-cd-shutup.patch:
 ide-cd.c |    6 ++++++
 1 files changed, 6 insertions(+)

--- NEW FILE linux-2.6-ide-cd-shutup.patch ---
--- linux-2.6.14/drivers/ide/ide-cd.c~	2005-12-14 15:11:39.000000000 -0500
+++ linux-2.6.14/drivers/ide/ide-cd.c	2005-12-14 15:12:21.000000000 -0500
@@ -386,6 +386,12 @@ static int cdrom_log_sense(ide_drive_t *
 			 */
 			if (sense->asc == 0x3a || sense->asc == 0x04)
 				break;
+			/*
+			 * some drives spew this for an empty drive
+			 */
+			if (rq->cmd[0] == GPCMD_READ_CDVD_CAPACITY &&
+			    sense->asc == 0x30)
+				break;
 			log = 1;
 			break;
 		case ILLEGAL_REQUEST:

linux-2.6-powerpc-parport.patch:
 parport.h |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

--- NEW FILE linux-2.6-powerpc-parport.patch ---
Patch stops parport from accessing non existant ports.

Signed-off-by: Michael Neuling <mikey at neuling.org>

 include/asm-powerpc/parport.h |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

Index: linux-2.6-powerpc.nobackup/include/asm-powerpc/parport.h
===================================================================
--- linux-2.6-powerpc.nobackup.orig/include/asm-powerpc/parport.h
+++ linux-2.6-powerpc.nobackup/include/asm-powerpc/parport.h
@@ -9,10 +9,34 @@
 #ifndef _ASM_POWERPC_PARPORT_H
 #define _ASM_POWERPC_PARPORT_H
 
-static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
+#include <asm/prom.h>
+
+extern struct parport *parport_pc_probe_port (unsigned long int base,
+                                              unsigned long int base_hi,
+                                              int irq, int dma,
+                                              struct pci_dev *dev);
+
 static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
 {
-	return parport_pc_find_isa_ports (autoirq, autodma);
+	struct device_node *np;
+	u32 *prop;
+	u32 io1, io2;
+	int propsize;
+	int count = 0;
+	for (np = NULL; (np = of_find_compatible_node(np,
+						      "parallel",
+						      "pnpPNP,400")) != NULL;) {
+		prop = (u32 *)get_property(np, "reg", &propsize);
+		if (!prop || propsize > 6*sizeof(u32))
+			continue;
+		io1 = prop[1]; io2 = prop[2];
+		prop = (u32 *)get_property(np, "interrupts", NULL);
+		if (!prop)
+			continue;
+		if (parport_pc_probe_port(io1, io2, prop[0], autodma, NULL) != NULL)
+			count++;
+	}
+	return count;
 }
 
 #endif /* !(_ASM_POWERPC_PARPORT_H) */

linux-2.6-ppc-rtas-check.patch:
 prom_init.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-ppc-rtas-check.patch ---
--- linux-2.6.14/arch/powerpc/kernel/prom_init.c~	2005-12-07 23:33:20.000000000 +0100
+++ linux-2.6.14/arch/powerpc/kernel/prom_init.c	2005-12-07 23:33:38.000000000 +0100
@@ -1051,7 +1051,7 @@ static void __init prom_instantiate_rtas
 
 	if (call_prom_ret("call-method", 3, 2, &entry,
 			  ADDR("instantiate-rtas"),
-			  rtas_inst, base) != 0
+			  rtas_inst, base) == PROM_ERROR
 	    || entry == 0) {
 		prom_printf(" failed\n");
 		return;

linux-2.6-sata-enable-atapi-by-default.patch:
 libata-core.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-sata-enable-atapi-by-default.patch ---
--- linux-2.6.14/drivers/scsi/libata-core.c~	2005-11-22 11:33:25.000000000 -0500
+++ linux-2.6.14/drivers/scsi/libata-core.c	2005-11-22 11:33:37.000000000 -0500
@@ -78,7 +78,7 @@ static void __ata_qc_complete(struct ata
 static unsigned int ata_unique_id = 1;
 static struct workqueue_struct *ata_wq;
 
-int atapi_enabled = 0;
+int atapi_enabled = 1;
 module_param(atapi_enabled, int, 0444);
 MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)");
 

linux-2.6-ub.patch:
 drivers/block/ub.c                                            |  482 +++++++---
 linux-2.6.14-1.1674_FC5-ub/drivers/block/Kconfig              |    3 
 linux-2.6.14-1.1674_FC5-ub/drivers/block/ub.c                 |   23 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Kconfig        |   14 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Makefile       |    4 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/libusual.c     |  266 +++++
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/protocol.h     |   14 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/transport.h    |   31 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/unusual_devs.h |   24 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.c          |  123 --
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.h          |   31 
 linux-2.6.14-1.1674_FC5-ub/include/linux/usb_usual.h          |  123 ++
 linux-2.6.14/drivers/usb/Makefile                             |    1 
 13 files changed, 828 insertions(+), 311 deletions(-)

--- NEW FILE linux-2.6-ub.patch ---
diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/block/Kconfig linux-2.6.14-1.1674_FC5-ub/drivers/block/Kconfig
--- linux-2.6.14-1.1674_FC5/drivers/block/Kconfig	2005-11-15 12:20:27.000000000 -0800
+++ linux-2.6.14-1.1674_FC5-ub/drivers/block/Kconfig	2005-11-15 13:30:19.000000000 -0800
@@ -358,7 +358,8 @@ config BLK_DEV_UB
 	  This driver supports certain USB attached storage devices
 	  such as flash keys.
 
-	  Warning: Enabling this cripples the usb-storage driver.
+	  If you enable this driver, it is recommended to avoid conflicts
+	  with usb-storage by enabling USB_LIBUSUAL.
 
 	  If unsure, say N.
 
diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/block/ub.c linux-2.6.14-1.1674_FC5-ub/drivers/block/ub.c
--- linux-2.6.14-1.1674_FC5/drivers/block/ub.c	2005-11-15 12:19:32.000000000 -0800
+++ linux-2.6.14-1.1674_FC5-ub/drivers/block/ub.c	2005-11-15 13:30:19.000000000 -0800
@@ -29,6 +29,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/usb.h>
+#include <linux/usb_usual.h>
 #include <linux/blkdev.h>
 #include <linux/devfs_fs_kernel.h>
 #include <linux/timer.h>
@@ -107,16 +108,6 @@
  */
 
 /*
- * Definitions which have to be scattered once we understand the layout better.
- */
-
-/* Transport (despite PR in the name) */
-#define US_PR_BULK	0x50		/* bulk only */
-
-/* Protocol */
-#define US_SC_SCSI	0x06		/* Transparent */
-
-/*
  * This many LUNs per USB device.
  * Every one of them takes a host, see UB_MAX_HOSTS.
  */
@@ -422,13 +413,18 @@ static int ub_probe_lun(struct ub_dev *s
 
 /*
  */
+#ifdef CONFIG_USB_LIBUSUAL
+
+#define ub_usb_ids  storage_usb_ids
+#else
+
 static struct usb_device_id ub_usb_ids[] = {
-	// { USB_DEVICE_VER(0x0781, 0x0002, 0x0009, 0x0009) },	/* SDDR-31 */
 	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_BULK) },
 	{ }
 };
 
 MODULE_DEVICE_TABLE(usb, ub_usb_ids);
+#endif /* CONFIG_USB_LIBUSUAL */
 
 /*
  * Find me a way to identify "next free minor" for add_disk(),
@@ -2172,6 +2168,9 @@ static int ub_probe(struct usb_interface
 	int rc;
 	int i;
 
+	if (usb_usual_check_type(dev_id, USB_US_TYPE_UB))
+		return -ENXIO;
+
 	rc = -ENOMEM;
 	if ((sc = kmalloc(sizeof(struct ub_dev), GFP_KERNEL)) == NULL)
 		goto err_core;
@@ -2479,6 +2478,7 @@ static int __init ub_init(void)
 	if ((rc = usb_register(&ub_driver)) != 0)
 		goto err_register;
 
+	usb_usual_set_present(USB_US_TYPE_UB);
 	return 0;
 
 err_register:
@@ -2494,6 +2494,7 @@ static void __exit ub_exit(void)
 
 	devfs_remove(DEVFS_NAME);
 	unregister_blkdev(UB_MAJOR, DRV_NAME);
+	usb_usual_clear_present(USB_US_TYPE_UB);
 }
 
 module_init(ub_init);
diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/Kconfig linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Kconfig
--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/Kconfig	2005-11-15 12:19:56.000000000 -0800
+++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Kconfig	2005-11-15 13:30:19.000000000 -0800
@@ -124,3 +124,17 @@ config USB_STORAGE_ONETOUCH
 	  hard drive's as an input device. An action can be associated with
 	  this input in any keybinding software. (e.g. gnome's keyboard short-
 	  cuts)
+
+config USB_LIBUSUAL
+	bool "The shared table of common (or usual) storage devices"
+	depends on USB
+	help
+	  This module contains a table of common (or usual) devices
+	  for usb-storage and ub drivers, and allows to switch binding
+	  of these devices without rebuilding modules.
+
+	  Typical syntax of /etc/modprobe.conf is:
+
+		options libusual bias="ub"
+
+	  If unsure, say N.
diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/libusual.c linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/libusual.c
--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/libusual.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/libusual.c	2005-11-15 13:30:19.000000000 -0800
@@ -0,0 +1,266 @@
+/*
+ * libusual
+ *
+ * The libusual contains the table of devices common for ub and usb-storage.
+ */
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+#include <linux/usb_usual.h>
+#include <linux/vmalloc.h>
+
+/*
+ */
+#define USU_MOD_FL_THREAD   1	/* Thread is running */
+#define USU_MOD_FL_PRESENT  2	/* The module is loaded */
+
+struct mod_status {
+	unsigned long fls;
+};
+
+static struct mod_status stat[3];
+static DEFINE_SPINLOCK(usu_lock);
+
+/*
+ */
+#define USB_US_DEFAULT_BIAS	USB_US_TYPE_STOR
+
+#define BIAS_NAME_SIZE  (sizeof("usb-storage"))
+static char bias[BIAS_NAME_SIZE];
+static int usb_usual_bias;
+static const char *bias_names[3] = { "none", "usb-storage", "ub" };
+
+static DECLARE_MUTEX_LOCKED(usu_init_notify);
+static DECLARE_COMPLETION(usu_end_notify);
+static atomic_t total_threads = ATOMIC_INIT(0);
+
+static int usu_probe_thread(void *arg);
+static int parse_bias(const char *bias_s);
+
+/*
+ * The table.
+ */
+#define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \
+		    vendorName, productName,useProtocol, useTransport, \
+		    initFunction, flags) \
+{ USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin,bcdDeviceMax), \
+  .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
+
+#define USUAL_DEV(useProto, useTrans, useType) \
+{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, useProto, useTrans), \
+  .driver_info = ((useType)<<24) }
+
+struct usb_device_id storage_usb_ids [] = {
+#	include "unusual_devs.h"
+	{ } /* Terminating entry */
+};
+
+#undef USUAL_DEV
+#undef UNUSUAL_DEV
+
+MODULE_DEVICE_TABLE(usb, storage_usb_ids);
+EXPORT_SYMBOL(storage_usb_ids);
+
+/*
+ * @type: the module type as an integer
+ */
+void usb_usual_set_present(int type)
+{
+	struct mod_status *st;
+	unsigned long flags;
+
+	if (type <= 0 || type >= 3)
+		return;
+	st = &stat[type];
+	spin_lock_irqsave(&usu_lock, flags);
+	st->fls |= USU_MOD_FL_PRESENT;
+	spin_unlock_irqrestore(&usu_lock, flags);
+}
+EXPORT_SYMBOL(usb_usual_set_present);
+
+void usb_usual_clear_present(int type)
+{
+	struct mod_status *st;
+	unsigned long flags;
+
+	if (type <= 0 || type >= 3)
+		return;
+	st = &stat[type];
+	spin_lock_irqsave(&usu_lock, flags);
+	st->fls &= ~USU_MOD_FL_PRESENT;
+	spin_unlock_irqrestore(&usu_lock, flags);
+}
+EXPORT_SYMBOL(usb_usual_clear_present);
+
+/*
+ * Match the calling driver type against the table.
+ * Returns: 0 if the device matches.
+ */
+int usb_usual_check_type(const struct usb_device_id *id, int caller_type)
+{
+	int id_type = USB_US_TYPE(id->driver_info);
+
+	if (caller_type <= 0 || caller_type >= 3)
+		return -EINVAL;
+
+	/* Drivers grab fixed assignment devices */
+	if (id_type == caller_type)
+		return 0;
+	/* Drivers grab devices biased to them */
+	if (id_type == USB_US_TYPE_NONE && caller_type == usb_usual_bias)
+		return 0;
+	return -ENODEV;
+}
+EXPORT_SYMBOL(usb_usual_check_type);
+
+/*
+ */
+static int usu_probe(struct usb_interface *intf,
+			 const struct usb_device_id *id)
+{
+	int type;
+	int rc;
+	unsigned long flags;
+
+	type = USB_US_TYPE(id->driver_info);
+	if (type == 0)
+		type = usb_usual_bias;
+
+	spin_lock_irqsave(&usu_lock, flags);
+	if ((stat[type].fls & (USU_MOD_FL_THREAD|USU_MOD_FL_PRESENT)) != 0) {
+		spin_unlock_irqrestore(&usu_lock, flags);
+		return -ENXIO;
+	}
+	stat[type].fls |= USU_MOD_FL_THREAD;
+	spin_unlock_irqrestore(&usu_lock, flags);
+
+	rc = kernel_thread(usu_probe_thread, (void*)type, CLONE_VM);
+	if (rc < 0) {
+		printk(KERN_WARNING "libusual: "
+		    "Unable to start the thread for %s: %d\n",
+		    bias_names[type], rc);
+		spin_lock_irqsave(&usu_lock, flags);
+		stat[type].fls &= ~USU_MOD_FL_THREAD;
+		spin_unlock_irqrestore(&usu_lock, flags);
+		return rc;	/* Not being -ENXIO causes a message printed */
+	}
+	atomic_inc(&total_threads);
+
+	return -ENXIO;
+}
+
+static void usu_disconnect(struct usb_interface *intf)
+{
+	;	/* We should not be here. */
+}
+
+static struct usb_driver usu_driver = {
+	.owner =	THIS_MODULE,
+	.name =		"libusual",
+	.probe =	usu_probe,
+	.disconnect =	usu_disconnect,
+	.id_table =	storage_usb_ids,
+};
+
+/*
+ * A whole new thread for a purpose of request_module seems quite stupid.
+ * The request_module forks once inside again. However, if we attempt
+ * to load a storage module from our own modprobe thread, that module
+ * references our symbols, which cannot be resolved until our module is
+ * initialized. I wish there was a way to wait for the end of initialization.
+ * The module notifier reports MODULE_STATE_COMING only.
+ * So, we wait until module->init ends as the next best thing.
+ */
+static int usu_probe_thread(void *arg)
+{
+	int type = (unsigned long) arg;
+	struct mod_status *st = &stat[type];
+	int rc;
+	unsigned long flags;
+
+	daemonize("libusual_%d", type);	/* "usb-storage" is kinda too long */
+
+	/* A completion does not work here because it's counted. */
+	down(&usu_init_notify);
+	up(&usu_init_notify);
+
+	rc = request_module(bias_names[type]);
+	spin_lock_irqsave(&usu_lock, flags);
+	if (rc == 0 && (st->fls & USU_MOD_FL_PRESENT) == 0) {
+		/*
+		 * This should not happen, but let us keep tabs on it.
+		 */
+		printk(KERN_NOTICE "libusual: "
+		    "modprobe for %s succeeded, but module is not present\n",
+		    bias_names[type]);
+	}
+	st->fls &= ~USU_MOD_FL_THREAD;
+	spin_unlock_irqrestore(&usu_lock, flags);
+
+	complete_and_exit(&usu_end_notify, 0);
+}
+
+/*
+ */
+static int __init usb_usual_init(void)
+{
+	int rc;
+
+	bias[BIAS_NAME_SIZE-1] = 0;
+	usb_usual_bias = parse_bias(bias);
+
+	rc = usb_register(&usu_driver);
+	up(&usu_init_notify);
+	return rc;
+}
+
+static void __exit usb_usual_exit(void)
+{
+	/*
+	 * We do not check for any drivers present, because
+	 * they keep us pinned with symbol references.
+	 */
+
+	usb_deregister(&usu_driver);
+
+	while (atomic_read(&total_threads) > 0) {
+		wait_for_completion(&usu_end_notify);
+		atomic_dec(&total_threads);
+	}
+}
+
+/*
+ * Validate and accept the bias parameter.
+ * Maybe make an sysfs method later. XXX
+ */
+static int parse_bias(const char *bias_s)
+{
+	int i;
+	int bias_n = 0;
+
+	if (bias_s[0] == 0 || bias_s[0] == ' ') {
+		bias_n = USB_US_DEFAULT_BIAS;
+	} else {
+		for (i = 1; i < 3; i++) {
+			if (strcmp(bias_s, bias_names[i]) == 0) {
+				bias_n = i;
+				break;
+			}
+		}
+		if (bias_n == 0) {
+			bias_n = USB_US_DEFAULT_BIAS;
+			printk(KERN_INFO
+			    "libusual: unknown bias \"%s\", using \"%s\"\n",
+			    bias_s, bias_names[bias_n]);
+		}
+	}
+	return bias_n;
+}
+
+module_init(usb_usual_init);
+module_exit(usb_usual_exit);
+
+module_param_string(bias, bias, BIAS_NAME_SIZE,  S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(bias, "Bias to usb-storage or ub");
+
+MODULE_LICENSE("GPL");
diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/Makefile linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Makefile
--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/Makefile	2005-10-27 17:02:08.000000000 -0700
+++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Makefile	2005-11-15 13:30:19.000000000 -0800
@@ -22,3 +22,7 @@ usb-storage-obj-$(CONFIG_USB_STORAGE_ONE
 
 usb-storage-objs :=	scsiglue.o protocol.o transport.o usb.o \
 			initializers.o $(usb-storage-obj-y)
+
+ifneq ($(CONFIG_USB_LIBUSUAL),)
+	obj-$(CONFIG_USB)	+= libusual.o
+endif
diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/protocol.h linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/protocol.h
--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/protocol.h	2005-10-27 17:02:08.000000000 -0700
+++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/protocol.h	2005-11-15 13:30:19.000000000 -0800
@@ -41,20 +41,6 @@
 #ifndef _PROTOCOL_H_
 #define _PROTOCOL_H_
 
-/* Sub Classes */
-
-#define US_SC_RBC	0x01		/* Typically, flash devices */
-#define US_SC_8020	0x02		/* CD-ROM */
-#define US_SC_QIC	0x03		/* QIC-157 Tapes */
-#define US_SC_UFI	0x04		/* Floppy */
-#define US_SC_8070	0x05		/* Removable media */
-#define US_SC_SCSI	0x06		/* Transparent */
-#define US_SC_ISD200    0x07		/* ISD200 ATA */
-#define US_SC_MIN	US_SC_RBC
-#define US_SC_MAX	US_SC_ISD200
-
-#define US_SC_DEVICE	0xff		/* Use device's value */
-
 /* Protocol handling routines */
 extern void usb_stor_ATAPI_command(struct scsi_cmnd*, struct us_data*);
 extern void usb_stor_qic157_command(struct scsi_cmnd*, struct us_data*);
diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/transport.h linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/transport.h
--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/transport.h	2005-11-15 12:19:56.000000000 -0800
+++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/transport.h	2005-11-15 13:36:41.000000000 -0800
@@ -41,39 +41,8 @@
 #ifndef _TRANSPORT_H_
 #define _TRANSPORT_H_
 
-#include <linux/config.h>
 #include <linux/blkdev.h>
 
-/* Protocols */
-
-#define US_PR_CBI	0x00		/* Control/Bulk/Interrupt */
-#define US_PR_CB	0x01		/* Control/Bulk w/o interrupt */
-#define US_PR_BULK	0x50		/* bulk only */
-#ifdef CONFIG_USB_STORAGE_USBAT
-#define US_PR_USBAT	0x80		/* SCM-ATAPI bridge */
-#endif
-#ifdef CONFIG_USB_STORAGE_SDDR09
-#define US_PR_EUSB_SDDR09	0x81	/* SCM-SCSI bridge for SDDR-09 */
-#endif
-#ifdef CONFIG_USB_STORAGE_SDDR55
-#define US_PR_SDDR55	0x82		/* SDDR-55 (made up) */
-#endif
-#define US_PR_DPCM_USB  0xf0		/* Combination CB/SDDR09 */
-
-#ifdef CONFIG_USB_STORAGE_FREECOM
-#define US_PR_FREECOM   0xf1		/* Freecom */
-#endif
-
-#ifdef CONFIG_USB_STORAGE_DATAFAB
-#define US_PR_DATAFAB   0xf2		/* Datafab chipsets */
-#endif
-
-#ifdef CONFIG_USB_STORAGE_JUMPSHOT
-#define US_PR_JUMPSHOT  0xf3		/* Lexar Jumpshot */
-#endif
-
-#define US_PR_DEVICE	0xff		/* Use device's value */
-
 /*
  * Bulk only data structures
  */
diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/unusual_devs.h linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/unusual_devs.h
--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/unusual_devs.h	2005-11-15 12:19:56.000000000 -0800
+++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/unusual_devs.h	2005-11-15 13:30:20.000000000 -0800
@@ -1125,3 +1125,27 @@ UNUSUAL_DEV(  0x55aa, 0xa103, 0x0000, 0x
 		US_SC_SCSI, US_PR_SDDR55, NULL,
 		US_FL_SINGLE_LUN),
 #endif
+
+/* Control/Bulk transport for all SubClass values */
+USUAL_DEV(US_SC_RBC, US_PR_CB, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_8020, US_PR_CB, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_QIC, US_PR_CB, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_UFI, US_PR_CB, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_8070, US_PR_CB, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_SCSI, US_PR_CB, USB_US_TYPE_STOR),
+
+/* Control/Bulk/Interrupt transport for all SubClass values */
+USUAL_DEV(US_SC_RBC, US_PR_CBI, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_8020, US_PR_CBI, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_QIC, US_PR_CBI, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_UFI, US_PR_CBI, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_8070, US_PR_CBI, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_SCSI, US_PR_CBI, USB_US_TYPE_STOR),
+
+/* Bulk-only transport for all SubClass values */
+USUAL_DEV(US_SC_RBC, US_PR_BULK, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_8020, US_PR_BULK, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_QIC, US_PR_BULK, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_UFI, US_PR_BULK, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_8070, US_PR_BULK, USB_US_TYPE_STOR),
+USUAL_DEV(US_SC_SCSI, US_PR_BULK, 0),
diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/usb.c linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.c
--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/usb.c	2005-11-15 12:19:56.000000000 -0800
+++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.c	2005-11-15 13:38:47.000000000 -0800
@@ -112,49 +112,33 @@ static atomic_t total_threads = ATOMIC_I
 static DECLARE_COMPLETION(threads_gone);
 
 
-/* The entries in this table, except for final ones here
- * (USB_MASS_STORAGE_CLASS and the empty entry), correspond,
- * line for line with the entries of us_unsuaul_dev_list[].
+/*
+ * The entries in this table correspond, line for line,
+ * with the entries of us_unusual_dev_list[].
  */
+#ifndef CONFIG_USB_LIBUSUAL
 
 #define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \
 		    vendorName, productName,useProtocol, useTransport, \
 		    initFunction, flags) \
-{ USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin,bcdDeviceMax) }
+{ USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin,bcdDeviceMax), \
+  .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
+
+#define USUAL_DEV(useProto, useTrans, useType) \
+{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, useProto, useTrans), \
+  .driver_info = (USB_US_TYPE_STOR<<24) }
 
 static struct usb_device_id storage_usb_ids [] = {
 
 #	include "unusual_devs.h"
 #undef UNUSUAL_DEV
-	/* Control/Bulk transport for all SubClass values */
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_RBC, US_PR_CB) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8020, US_PR_CB) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_QIC, US_PR_CB) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_UFI, US_PR_CB) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8070, US_PR_CB) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_CB) },
-
-	/* Control/Bulk/Interrupt transport for all SubClass values */
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_RBC, US_PR_CBI) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8020, US_PR_CBI) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_QIC, US_PR_CBI) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_UFI, US_PR_CBI) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8070, US_PR_CBI) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_CBI) },
-
-	/* Bulk-only transport for all SubClass values */
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_RBC, US_PR_BULK) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8020, US_PR_BULK) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_QIC, US_PR_BULK) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_UFI, US_PR_BULK) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_8070, US_PR_BULK) },
-	{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_BULK) },
-
+#undef USUAL_DEV
 	/* Terminating entry */
 	{ }
 };
 
 MODULE_DEVICE_TABLE (usb, storage_usb_ids);
+#endif /* CONFIG_USB_LIBUSUAL */
 
 /* This is the list of devices we recognize, along with their flag data */
 
@@ -167,7 +151,6 @@ MODULE_DEVICE_TABLE (usb, storage_usb_id
  * are free to use as many characters as you like.
  */
 
-#undef UNUSUAL_DEV
 #define UNUSUAL_DEV(idVendor, idProduct, bcdDeviceMin, bcdDeviceMax, \
 		    vendor_name, product_name, use_protocol, use_transport, \
 		    init_function, Flags) \
@@ -177,53 +160,18 @@ MODULE_DEVICE_TABLE (usb, storage_usb_id
 	.useProtocol = use_protocol,	\
 	.useTransport = use_transport,	\
 	.initFunction = init_function,	\
-	.flags = Flags, \
+}
+
+#define USUAL_DEV(use_protocol, use_transport, use_type) \
+{ \
+	.useProtocol = use_protocol,	\
+	.useTransport = use_transport,	\
 }
 
 static struct us_unusual_dev us_unusual_dev_list[] = {
 #	include "unusual_devs.h" 
 #	undef UNUSUAL_DEV
-	/* Control/Bulk transport for all SubClass values */
-	{ .useProtocol = US_SC_RBC,
-	  .useTransport = US_PR_CB},
-	{ .useProtocol = US_SC_8020,
-	  .useTransport = US_PR_CB},
-	{ .useProtocol = US_SC_QIC,
-	  .useTransport = US_PR_CB},
-	{ .useProtocol = US_SC_UFI,
-	  .useTransport = US_PR_CB},
-	{ .useProtocol = US_SC_8070,
-	  .useTransport = US_PR_CB},
-	{ .useProtocol = US_SC_SCSI,
-	  .useTransport = US_PR_CB},
-
-	/* Control/Bulk/Interrupt transport for all SubClass values */
-	{ .useProtocol = US_SC_RBC,
-	  .useTransport = US_PR_CBI},
-	{ .useProtocol = US_SC_8020,
-	  .useTransport = US_PR_CBI},
-	{ .useProtocol = US_SC_QIC,
-	  .useTransport = US_PR_CBI},
-	{ .useProtocol = US_SC_UFI,
-	  .useTransport = US_PR_CBI},
-	{ .useProtocol = US_SC_8070,
-	  .useTransport = US_PR_CBI},
-	{ .useProtocol = US_SC_SCSI,
-	  .useTransport = US_PR_CBI},
-
-	/* Bulk-only transport for all SubClass values */
-	{ .useProtocol = US_SC_RBC,
-	  .useTransport = US_PR_BULK},
-	{ .useProtocol = US_SC_8020,
-	  .useTransport = US_PR_BULK},
-	{ .useProtocol = US_SC_QIC,
-	  .useTransport = US_PR_BULK},
-	{ .useProtocol = US_SC_UFI,
-	  .useTransport = US_PR_BULK},
-	{ .useProtocol = US_SC_8070,
-	  .useTransport = US_PR_BULK},
-	{ .useProtocol = US_SC_SCSI,
-	  .useTransport = US_PR_BULK},
+#	undef USUAL_DEV
 
 	/* Terminating entry */
 	{ NULL }
@@ -483,15 +431,21 @@ static int associate_dev(struct us_data 
 	}
 	return 0;
 }
+ 
+/* Find an unusual_dev descriptor (always succeeds in the current code) */
+static struct us_unusual_dev *find_unusual(const struct usb_device_id *id)
+{
+	const int id_index = id - storage_usb_ids;
+	return &us_unusual_dev_list[id_index];
+}
 
 /* Get the unusual_devs entries and the string descriptors */
-static void get_device_info(struct us_data *us, int id_index)
+static void get_device_info(struct us_data *us, const struct usb_device_id *id)
 {
 	struct usb_device *dev = us->pusb_dev;
 	struct usb_interface_descriptor *idesc =
 		&us->pusb_intf->cur_altsetting->desc;
-	struct us_unusual_dev *unusual_dev = &us_unusual_dev_list[id_index];
-	struct usb_device_id *id = &storage_usb_ids[id_index];
+	struct us_unusual_dev *unusual_dev = find_unusual(id);
 
 	/* Store the entries */
 	us->unusual_dev = unusual_dev;
@@ -501,7 +455,7 @@ static void get_device_info(struct us_da
 	us->protocol = (unusual_dev->useTransport == US_PR_DEVICE) ?
 			idesc->bInterfaceProtocol :
 			unusual_dev->useTransport;
-	us->flags = unusual_dev->flags;
+	us->flags = USB_US_ORIG_FLAGS(id->driver_info);
 
 	/*
 	 * This flag is only needed when we're in high-speed, so let's
@@ -529,7 +483,7 @@ static void get_device_info(struct us_da
 		if (unusual_dev->useTransport != US_PR_DEVICE &&
 			us->protocol == idesc->bInterfaceProtocol)
 			msg += 2;
-		if (msg >= 0 && !(unusual_dev->flags & US_FL_NEED_OVERRIDE))
+		if (msg >= 0 && !(us->flags & US_FL_NEED_OVERRIDE))
 			printk(KERN_NOTICE USB_STORAGE "This device "
 				"(%04x,%04x,%04x S %02x P %02x)"
 				" has %s in unusual_devs.h\n"
@@ -921,10 +875,12 @@ static int storage_probe(struct usb_inte
 {
 	struct Scsi_Host *host;
 	struct us_data *us;
-	const int id_index = id - storage_usb_ids; 
 	int result;
 	struct task_struct *th;
 
+	if (usb_usual_check_type(id, USB_US_TYPE_STOR))
+		return -ENXIO;
+
 	US_DEBUGP("USB Mass Storage device detected\n");
 
 	/*
@@ -952,12 +908,8 @@ static int storage_probe(struct usb_inte
 
 	/*
 	 * Get the unusual_devs entries and the descriptors
-	 *
-	 * id_index is calculated in the declaration to be the index number
-	 * of the match from the usb_device_id table, so we can find the
-	 * corresponding entry in the private table.
 	 */
-	get_device_info(us, id_index);
+	get_device_info(us, id);
 
 #ifdef CONFIG_USB_STORAGE_SDDR09
 	if (us->protocol == US_PR_EUSB_SDDR09 ||
@@ -1062,9 +1014,10 @@ static int __init usb_stor_init(void)
 
 	/* register the driver, return usb_register return code if error */
 	retval = usb_register(&usb_storage_driver);
-	if (retval == 0)
+	if (retval == 0) {
 		printk(KERN_INFO "USB Mass Storage support registered.\n");
-
+		usb_usual_set_present(USB_US_TYPE_STOR);
+	}
 	return retval;
 }
 
@@ -1088,6 +1041,8 @@ static void __exit usb_stor_exit(void)
 		wait_for_completion(&threads_gone);
 		atomic_dec(&total_threads);
 	}
+
+	usb_usual_clear_present(USB_US_TYPE_STOR);
 }
 
 module_init(usb_stor_init);
diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/usb.h linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.h
--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/usb.h	2005-11-15 12:19:56.000000000 -0800
+++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.h	2005-11-15 13:30:20.000000000 -0800
@@ -45,6 +45,7 @@
 #define _USB_H_
 
 #include <linux/usb.h>
+#include <linux/usb_usual.h>
 #include <linux/blkdev.h>
 #include <linux/smp_lock.h>
 #include <linux/completion.h>
@@ -63,38 +64,8 @@ struct us_unusual_dev {
 	__u8  useProtocol;
 	__u8  useTransport;
 	int (*initFunction)(struct us_data *);
-	unsigned int flags;
 };
 
-/*
- * Static flag definitions.  We use this roundabout technique so that the
- * proc_info() routine can automatically display a message for each flag.
- */
-#define US_DO_ALL_FLAGS						\
-	US_FLAG(SINGLE_LUN,	0x00000001)			\
-		/* allow access to only LUN 0 */		\
-	US_FLAG(NEED_OVERRIDE,	0x00000002)			\
-		/* unusual_devs entry is necessary */		\
-	US_FLAG(SCM_MULT_TARG,	0x00000004)			\
-		/* supports multiple targets */			\
-	US_FLAG(FIX_INQUIRY,	0x00000008)			\
-		/* INQUIRY response needs faking */		\
-	US_FLAG(FIX_CAPACITY,	0x00000010)			\
-		/* READ CAPACITY response too big */		\
-	US_FLAG(IGNORE_RESIDUE,	0x00000020)			\
-		/* reported residue is wrong */			\
-	US_FLAG(BULK32,		0x00000040)			\
-		/* Uses 32-byte CBW length */			\
-	US_FLAG(NOT_LOCKABLE,	0x00000080)			\
-		/* PREVENT/ALLOW not supported */		\
-	US_FLAG(GO_SLOW,	0x00000100)			\
-		/* Need delay after Command phase */		\
-	US_FLAG(NO_WP_DETECT,	0x00000200)			\
-		/* Don't check for write-protect */		\
-
-#define US_FLAG(name, value)	US_FL_##name = value ,
-enum { US_DO_ALL_FLAGS };
-#undef US_FLAG
 
 /* Dynamic flag definitions: used in set_bit() etc. */
 #define US_FLIDX_URB_ACTIVE	18  /* 0x00040000  current_urb is in use  */
diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/include/linux/usb_usual.h linux-2.6.14-1.1674_FC5-ub/include/linux/usb_usual.h
--- linux-2.6.14-1.1674_FC5/include/linux/usb_usual.h	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.6.14-1.1674_FC5-ub/include/linux/usb_usual.h	2005-11-15 13:35:50.000000000 -0800
@@ -0,0 +1,123 @@
+/*
+ * Interface to the libusual.
+ *
+ * Copyright (c) 2005 Pete Zaitcev <zaitcev at redhat.com>
+ * Copyright (c) 1999-2002 Matthew Dharm (mdharm-usb at one-eyed-alien.net)
+ * Copyright (c) 1999 Michael Gee (michael at linuxspecific.com)
+ */
+
+#ifndef __LINUX_USB_USUAL_H
+#define __LINUX_USB_USUAL_H
+
+#include <linux/config.h>
+
+/* We should do this for cleanliness... But other usb_foo.h do not do this. */
+/* #include <linux/usb.h> */
+
+/*
+ * The flags field, which we store in usb_device_id.driver_info.
+ * It is compatible with the old usb-storage flags in lower 24 bits.
+ */
+
+/*
+ * Static flag definitions.  We use this roundabout technique so that the
+ * proc_info() routine can automatically display a message for each flag.
+ */
+#define US_DO_ALL_FLAGS						\
+	US_FLAG(SINGLE_LUN,	0x00000001)			\
+		/* allow access to only LUN 0 */		\
+	US_FLAG(NEED_OVERRIDE,	0x00000002)			\
+		/* unusual_devs entry is necessary */		\
+	US_FLAG(SCM_MULT_TARG,	0x00000004)			\
+		/* supports multiple targets */			\
+	US_FLAG(FIX_INQUIRY,	0x00000008)			\
+		/* INQUIRY response needs faking */		\
+	US_FLAG(FIX_CAPACITY,	0x00000010)			\
+		/* READ CAPACITY response too big */		\
+	US_FLAG(IGNORE_RESIDUE,	0x00000020)			\
+		/* reported residue is wrong */			\
+	US_FLAG(BULK32,		0x00000040)			\
+		/* Uses 32-byte CBW length */			\
+	US_FLAG(NOT_LOCKABLE,	0x00000080)			\
+		/* PREVENT/ALLOW not supported */		\
+	US_FLAG(GO_SLOW,	0x00000100)			\
+		/* Need delay after Command phase */		\
+	US_FLAG(NO_WP_DETECT,	0x00000200)			\
+		/* Don't check for write-protect */		\
+
+#define US_FLAG(name, value)	US_FL_##name = value ,
+enum { US_DO_ALL_FLAGS };
+#undef US_FLAG
+
+/*
+ * The bias field for libusual and friends.
+ */
+#define USB_US_TYPE_NONE   0
+#define USB_US_TYPE_STOR   1		/* usb-storage */
+#define USB_US_TYPE_UB     2		/* ub */
+
+#define USB_US_TYPE(flags) 		(((flags) >> 24) & 0xFF)
+#define USB_US_ORIG_FLAGS(flags)	((flags) & 0x00FFFFFF)
+
+/*
+ * This is probably not the best place to keep these constants, conceptually.
+ * But it's the only header included into all places which need them.
+ */
+
+/* Sub Classes */
+
+#define US_SC_RBC	0x01		/* Typically, flash devices */
+#define US_SC_8020	0x02		/* CD-ROM */
+#define US_SC_QIC	0x03		/* QIC-157 Tapes */
+#define US_SC_UFI	0x04		/* Floppy */
+#define US_SC_8070	0x05		/* Removable media */
+#define US_SC_SCSI	0x06		/* Transparent */
+#define US_SC_ISD200    0x07		/* ISD200 ATA */
+#define US_SC_MIN	US_SC_RBC
+#define US_SC_MAX	US_SC_ISD200
+
+#define US_SC_DEVICE	0xff		/* Use device's value */
+
+/* Protocols */
+
+#define US_PR_CBI	0x00		/* Control/Bulk/Interrupt */
+#define US_PR_CB	0x01		/* Control/Bulk w/o interrupt */
+#define US_PR_BULK	0x50		/* bulk only */
+#ifdef CONFIG_USB_STORAGE_USBAT
+#define US_PR_USBAT	0x80		/* SCM-ATAPI bridge */
+#endif
+#ifdef CONFIG_USB_STORAGE_SDDR09
+#define US_PR_EUSB_SDDR09	0x81	/* SCM-SCSI bridge for SDDR-09 */
+#endif
+#ifdef CONFIG_USB_STORAGE_SDDR55
+#define US_PR_SDDR55	0x82		/* SDDR-55 (made up) */
+#endif
+#define US_PR_DPCM_USB  0xf0		/* Combination CB/SDDR09 */
+#ifdef CONFIG_USB_STORAGE_FREECOM
+#define US_PR_FREECOM   0xf1		/* Freecom */
+#endif
+#ifdef CONFIG_USB_STORAGE_DATAFAB
+#define US_PR_DATAFAB   0xf2		/* Datafab chipsets */
+#endif
+#ifdef CONFIG_USB_STORAGE_JUMPSHOT
+#define US_PR_JUMPSHOT  0xf3		/* Lexar Jumpshot */
+#endif
+
+#define US_PR_DEVICE	0xff		/* Use device's value */
+
+/*
+ */
+#ifdef CONFIG_USB_LIBUSUAL
+
+extern struct usb_device_id storage_usb_ids[];
+extern void usb_usual_set_present(int type);
+extern void usb_usual_clear_present(int type);
+extern int usb_usual_check_type(const struct usb_device_id *, int type);
+#else
+
+#define usb_usual_set_present(t)	do { } while(0)
+#define usb_usual_clear_present(t)	do { } while(0)
+#define usb_usual_check_type(id, t)	(0)
+#endif /* CONFIG_USB_LIBUSUAL */
+
+#endif /* __LINUX_USB_USUAL_H */

--- linux-2.6.14/drivers/usb/Makefile~	2005-11-15 21:51:46.000000000 -0500
+++ linux-2.6.14/drivers/usb/Makefile	2005-11-15 21:52:24.000000000 -0500
@@ -22,6 +22,7 @@ obj-$(CONFIG_USB_MIDI)		+= class/
 obj-$(CONFIG_USB_PRINTER)	+= class/
 
 obj-$(CONFIG_USB_STORAGE)	+= storage/
+obj-$(CONFIG_USB)		+= storage/
 
 obj-$(CONFIG_USB_AIPTEK)	+= input/
 obj-$(CONFIG_USB_ATI_REMOTE)	+= input/



--- linux-2.6.14-1.1740_FC5/drivers/block/ub.c	2005-12-06 23:47:49.000000000 -0800
+++ linux-2.6.14-1.1740_FC5-rtr3/drivers/block/ub.c	2005-12-17 01:19:43.000000000 -0800
@@ -9,7 +9,6 @@
  *
  * TODO (sorted by decreasing priority)
  *  -- Kill first_open (Al Viro fixed the block layer now)
- *  -- Do resets with usb_device_reset (needs a thread context, use khubd)
  *  -- set readonly flag for CDs, set removable flag for CF readers
  *  -- do inquiry and verify we got a disk and not a tape (for LUN mismatch)
  *  -- special case some senses, e.g. 3a/0 -> no media present, reduce retries
@@ -236,6 +235,13 @@ struct ub_scsi_cmd {
 	void *back;
 };
 
+struct ub_request {
+	struct request *rq;
+	unsigned int current_try;
+	unsigned int nsg;		/* sgv[nsg] */
+	struct scatterlist sgv[UB_MAX_REQ_SG];
+};
+
 /*
  */
 struct ub_capacity {
@@ -331,6 +337,8 @@ struct ub_lun {
 	int readonly;
 	int first_open;			/* Kludge. See ub_bd_open. */
 
+	struct ub_request urq;
+
 	/* Use Ingo's mempool if or when we have more than one command. */
 	/*
 	 * Currently we never need more than one command for the whole device.
@@ -351,6 +359,7 @@ struct ub_dev {
 	atomic_t poison;		/* The USB device is disconnected */
 	int openc;			/* protected by ub_lock! */
 					/* kref is too implicit for our taste */
+	int reset;			/* Reset is running */
 	unsigned int tagcnt;
 	char name[12];
 	struct usb_device *dev;
@@ -378,6 +387,9 @@ struct ub_dev {
 	struct bulk_cs_wrap work_bcs;
 	struct usb_ctrlrequest work_cr;
 
+	struct work_struct reset_work;
+	wait_queue_head_t reset_wait;
+
 	int sg_stat[6];
 	struct ub_scsi_trace tr;
 };
@@ -386,12 +398,14 @@ struct ub_dev {
  */
 static void ub_cleanup(struct ub_dev *sc);
 static int ub_request_fn_1(struct ub_lun *lun, struct request *rq);
-static int ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun,
-    struct ub_scsi_cmd *cmd, struct request *rq);
-static int ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun,
-    struct ub_scsi_cmd *cmd, struct request *rq);
+static void ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun,
+    struct ub_scsi_cmd *cmd, struct ub_request *urq);
+static void ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun,
+    struct ub_scsi_cmd *cmd, struct ub_request *urq);
 static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
 static void ub_end_rq(struct request *rq, int uptodate);
+static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,
+    struct ub_request *urq, struct ub_scsi_cmd *cmd);
 static int ub_submit_scsi(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
 static void ub_urb_complete(struct urb *urb, struct pt_regs *pt);
 static void ub_scsi_action(unsigned long _dev);
@@ -406,6 +420,8 @@ static void ub_state_sense(struct ub_dev
 static int ub_submit_clear_stall(struct ub_dev *sc, struct ub_scsi_cmd *cmd,
     int stalled_pipe);
 static void ub_top_sense_done(struct ub_dev *sc, struct ub_scsi_cmd *scmd);
+static void ub_reset_enter(struct ub_dev *sc);
+static void ub_reset_task(void *arg);
 static int ub_sync_tur(struct ub_dev *sc, struct ub_lun *lun);
 static int ub_sync_read_cap(struct ub_dev *sc, struct ub_lun *lun,
     struct ub_capacity *ret);
@@ -518,6 +534,9 @@ static ssize_t ub_diag_show(struct devic
 	spin_lock_irqsave(&sc->lock, flags);
 
 	cnt += sprintf(page + cnt,
+	    "poison %d reset %d\n",
+	    atomic_read(&sc->poison), sc->reset);
+	cnt += sprintf(page + cnt,
 	    "qlen %d qmax %d\n",
 	    sc->cmd_queue.qlen, sc->cmd_queue.qmax);
 	cnt += sprintf(page + cnt,
@@ -766,7 +785,8 @@ static int ub_request_fn_1(struct ub_lun
 {
 	struct ub_dev *sc = lun->udev;
 	struct ub_scsi_cmd *cmd;
-	int rc;
+	struct ub_request *urq;
+	int n_elem;
 
 	if (atomic_read(&sc->poison) || lun->changed) {
 		blkdev_dequeue_request(rq);
@@ -774,65 +794,70 @@ static int ub_request_fn_1(struct ub_lun
 		return 0;
 	}
 
+	if (lun->urq.rq != NULL)
+		return -1;
 	if ((cmd = ub_get_cmd(lun)) == NULL)
 		return -1;
 	memset(cmd, 0, sizeof(struct ub_scsi_cmd));
 
 	blkdev_dequeue_request(rq);
+
+	urq = &lun->urq;
+	memset(urq, 0, sizeof(struct ub_request));
+	urq->rq = rq;
+
+	/*
+	 * get scatterlist from block layer
+	 */
+	n_elem = blk_rq_map_sg(lun->disk->queue, rq, &urq->sgv[0]);
+	if (n_elem < 0) {
+		printk(KERN_INFO "%s: failed request map (%d)\n",
+		    lun->name, n_elem); /* P3 */
+		goto drop;
+	}
+	if (n_elem > UB_MAX_REQ_SG) {	/* Paranoia */
+		printk(KERN_WARNING "%s: request with %d segments\n",
+		    lun->name, n_elem);
+		goto drop;
+	}
+	urq->nsg = n_elem;
+	sc->sg_stat[n_elem < 5 ? n_elem : 5]++;
+
 	if (blk_pc_request(rq)) {
-		rc = ub_cmd_build_packet(sc, lun, cmd, rq);
+		ub_cmd_build_packet(sc, lun, cmd, urq);
 	} else {
-		rc = ub_cmd_build_block(sc, lun, cmd, rq);
-	}
-	if (rc != 0) {
-		ub_put_cmd(lun, cmd);
-		ub_end_rq(rq, 0);
-		return 0;
+		ub_cmd_build_block(sc, lun, cmd, urq);
 	}
 	cmd->state = UB_CMDST_INIT;
 	cmd->lun = lun;
 	cmd->done = ub_rw_cmd_done;
-	cmd->back = rq;
+	cmd->back = urq;
 
 	cmd->tag = sc->tagcnt++;
-	if (ub_submit_scsi(sc, cmd) != 0) {
-		ub_put_cmd(lun, cmd);
-		ub_end_rq(rq, 0);
-		return 0;
-	}
+	if (ub_submit_scsi(sc, cmd) != 0)
+		goto drop;
 
 	return 0;
+
+drop:
+	ub_put_cmd(lun, cmd);
+	ub_end_rq(rq, 0);
+	return 0;
 }
 
-static int ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun,
-    struct ub_scsi_cmd *cmd, struct request *rq)
+static void ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun,
+    struct ub_scsi_cmd *cmd, struct ub_request *urq)
 {
-	int ub_dir;
-	int n_elem;
+	struct request *rq = urq->rq;
 	unsigned int block, nblks;
 
 	if (rq_data_dir(rq) == WRITE)
-		ub_dir = UB_DIR_WRITE;
+		cmd->dir = UB_DIR_WRITE;
 	else
-		ub_dir = UB_DIR_READ;
-	cmd->dir = ub_dir;
+		cmd->dir = UB_DIR_READ;
 
-	/*
-	 * get scatterlist from block layer
-	 */
-	n_elem = blk_rq_map_sg(lun->disk->queue, rq, &cmd->sgv[0]);
-	if (n_elem <= 0) {
-		printk(KERN_INFO "%s: failed request map (%d)\n",
-		    sc->name, n_elem); /* P3 */
-		return -1;		/* request with no s/g entries? */
-	}
-	if (n_elem > UB_MAX_REQ_SG) {	/* Paranoia */
-		printk(KERN_WARNING "%s: request with %d segments\n",
-		    sc->name, n_elem);
-		return -1;
-	}
-	cmd->nsg = n_elem;
-	sc->sg_stat[n_elem < 5 ? n_elem : 5]++;
+	cmd->nsg = urq->nsg;
+	memcpy(cmd->sgv, urq->sgv, sizeof(struct scatterlist) * cmd->nsg);
 
 	/*
 	 * build the command
@@ -843,7 +868,7 @@ static int ub_cmd_build_block(struct ub_
 	block = rq->sector >> lun->capacity.bshift;
 	nblks = rq->nr_sectors >> lun->capacity.bshift;
 
-	cmd->cdb[0] = (ub_dir == UB_DIR_READ)? READ_10: WRITE_10;
+	cmd->cdb[0] = (cmd->dir == UB_DIR_READ)? READ_10: WRITE_10;
 	/* 10-byte uses 4 bytes of LBA: 2147483648KB, 2097152MB, 2048GB */
 	cmd->cdb[2] = block >> 24;
 	cmd->cdb[3] = block >> 16;
@@ -854,14 +879,12 @@ static int ub_cmd_build_block(struct ub_
 	cmd->cdb_len = 10;
 
 	cmd->len = rq->nr_sectors * 512;
-
-	return 0;
 }
 
-static int ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun,
-    struct ub_scsi_cmd *cmd, struct request *rq)
+static void ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun,
+    struct ub_scsi_cmd *cmd, struct ub_request *urq)
 {
-	int n_elem;
+	struct request *rq = urq->rq;
 
 	if (rq->data_len == 0) {
 		cmd->dir = UB_DIR_NONE;
@@ -870,40 +893,26 @@ static int ub_cmd_build_packet(struct ub
 			cmd->dir = UB_DIR_WRITE;
 		else
 			cmd->dir = UB_DIR_READ;
-
 	}
 
-	/*
-	 * get scatterlist from block layer
-	 */
-	n_elem = blk_rq_map_sg(lun->disk->queue, rq, &cmd->sgv[0]);
-	if (n_elem < 0) {
-		printk(KERN_INFO "%s: failed request map (%d)\n",
-		    sc->name, n_elem); /* P3 */
-		return -1;
-	}
-	if (n_elem > UB_MAX_REQ_SG) {	/* Paranoia */
-		printk(KERN_WARNING "%s: request with %d segments\n",
-		    sc->name, n_elem);
-		return -1;
-	}
-	cmd->nsg = n_elem;
-	sc->sg_stat[n_elem < 5 ? n_elem : 5]++;
+	cmd->nsg = urq->nsg;
+	memcpy(cmd->sgv, urq->sgv, sizeof(struct scatterlist) * cmd->nsg);
 
 	memcpy(&cmd->cdb, rq->cmd, rq->cmd_len);
 	cmd->cdb_len = rq->cmd_len;
 
 	cmd->len = rq->data_len;
-
-	return 0;
 }
 
 static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
 {
-	struct request *rq = cmd->back;
 	struct ub_lun *lun = cmd->lun;
+	struct ub_request *urq = cmd->back;
+	struct request *rq;
 	int uptodate;
 
+	rq = urq->rq;
+
 	if (cmd->error == 0) {
 		uptodate = 1;
 
@@ -924,9 +933,16 @@ static void ub_rw_cmd_done(struct ub_dev
 				rq->errors = SAM_STAT_CHECK_CONDITION;
 			else
 				rq->errors = DID_ERROR << 16;
+		} else {
+			if (cmd->error == -EIO) {
+				if (ub_rw_cmd_retry(sc, lun, urq, cmd) == 0)
+					return;
+			}
 		}
 	}
 
+	urq->rq = NULL;
+
 	ub_put_cmd(lun, cmd);
 	ub_end_rq(rq, uptodate);
 	blk_start_queue(lun->disk->queue);
@@ -941,6 +957,41 @@ static void ub_end_rq(struct request *rq
 	end_that_request_last(rq);
 }
 
+static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,
+    struct ub_request *urq, struct ub_scsi_cmd *cmd)
+{
+
+	if (atomic_read(&sc->poison))
+		return -ENXIO;
+
+	ub_reset_enter(sc);
+
+	if (urq->current_try >= 3)
+		return -EIO;
+	urq->current_try++;
+	/* P3 */ printk("%s: dir %c len/act %d/%d "
+	    "[sense %x %02x %02x] retry %d\n",
+	    sc->name, UB_DIR_CHAR(cmd->dir), cmd->len, cmd->act_len,
+	    cmd->key, cmd->asc, cmd->ascq, urq->current_try);
+
+	memset(cmd, 0, sizeof(struct ub_scsi_cmd));
+	ub_cmd_build_block(sc, lun, cmd, urq);
+
+	cmd->state = UB_CMDST_INIT;
+	cmd->lun = lun;
+	cmd->done = ub_rw_cmd_done;
+	cmd->back = urq;
+
+	cmd->tag = sc->tagcnt++;
+
+#if 0 /* Wasteful */
+	return ub_submit_scsi(sc, cmd);
+#else
+	ub_cmdq_add(sc, cmd);
+	return 0;
+#endif
+}
+
 /*
  * Submit a regular SCSI operation (not an auto-sense).
  *
@@ -1071,7 +1122,7 @@ static void ub_scsi_dispatch(struct ub_d
 	struct ub_scsi_cmd *cmd;
 	int rc;
 
-	while ((cmd = ub_cmdq_peek(sc)) != NULL) {
+	while (!sc->reset && (cmd = ub_cmdq_peek(sc)) != NULL) {
 		if (cmd->state == UB_CMDST_DONE) {
 			ub_cmdq_pop(sc);
 			(*cmd->done)(sc, cmd);
@@ -1094,11 +1145,12 @@ static void ub_scsi_urb_compl(struct ub_
 {
 	struct urb *urb = &sc->work_urb;
 	struct bulk_cs_wrap *bcs;
+	int len;
 	int rc;
 
 	if (atomic_read(&sc->poison)) {
-		/* A little too simplistic, I feel... */
-		goto Bad_End;
+		ub_state_done(sc, cmd, -ENODEV);
+		return;
 	}
 
 	if (cmd->state == UB_CMDST_CLEAR) {
@@ -1106,7 +1158,6 @@ static void ub_scsi_urb_compl(struct ub_
 			/*
 			 * STALL while clearning STALL.
 			 * The control pipe clears itself - nothing to do.
-			 * XXX Might try to reset the device here and retry.
 			 */
 			printk(KERN_NOTICE "%s: stall on control pipe\n",
 			    sc->name);
@@ -1125,11 +1176,6 @@ static void ub_scsi_urb_compl(struct ub_
 
 	} else if (cmd->state == UB_CMDST_CLR2STS) {
 		if (urb->status == -EPIPE) {
-			/*
-			 * STALL while clearning STALL.
-			 * The control pipe clears itself - nothing to do.
-			 * XXX Might try to reset the device here and retry.
-			 */
 			printk(KERN_NOTICE "%s: stall on control pipe\n",
 			    sc->name);
 			goto Bad_End;
@@ -1147,11 +1193,6 @@ static void ub_scsi_urb_compl(struct ub_
 
 	} else if (cmd->state == UB_CMDST_CLRRS) {
 		if (urb->status == -EPIPE) {
-			/*
-			 * STALL while clearning STALL.
-			 * The control pipe clears itself - nothing to do.
-			 * XXX Might try to reset the device here and retry.
-			 */
 			printk(KERN_NOTICE "%s: stall on control pipe\n",
 			    sc->name);
 			goto Bad_End;
@@ -1168,7 +1209,12 @@ static void ub_scsi_urb_compl(struct ub_
 		ub_state_stat_counted(sc, cmd);
 
 	} else if (cmd->state == UB_CMDST_CMD) {
-		if (urb->status == -EPIPE) {
+		switch (urb->status) {
+		case 0:
+			break;
+		case -EOVERFLOW:
+			goto Bad_End;
+		case -EPIPE:
 			rc = ub_submit_clear_stall(sc, cmd, sc->last_pipe);
 			if (rc != 0) {
 				printk(KERN_NOTICE "%s: "
@@ -1178,17 +1224,20 @@ static void ub_scsi_urb_compl(struct ub_
 				 * This is typically ENOMEM or some other such shit.
 				 * Retrying is pointless. Just do Bad End on it...
 				 */
-				goto Bad_End;
+				ub_state_done(sc, cmd, rc);
+				return;
 			}
 			cmd->state = UB_CMDST_CLEAR;
 			ub_cmdtr_state(sc, cmd);
 			return;
-		}
-		if (urb->status != 0) {
+		case -ESHUTDOWN:	/* unplug */
+		case -EILSEQ:		/* unplug timeout on uhci */
+			ub_state_done(sc, cmd, -ENODEV);
+			return;
+		default:
 			goto Bad_End;
 		}
 		if (urb->actual_length != US_BULK_CB_WRAP_LEN) {
-			/* XXX Must do reset here to unconfuse the device */
 			goto Bad_End;
 		}
 
@@ -1207,11 +1256,8 @@ static void ub_scsi_urb_compl(struct ub_
 				printk(KERN_NOTICE "%s: "
 				    "unable to submit clear (%d)\n",
 				    sc->name, rc);
-				/*
-				 * This is typically ENOMEM or some other such shit.
-				 * Retrying is pointless. Just do Bad End on it...
-				 */
-				goto Bad_End;
+				ub_state_done(sc, cmd, rc);
+				return;
 			}
 			cmd->state = UB_CMDST_CLR2STS;
 			ub_cmdtr_state(sc, cmd);
@@ -1220,14 +1266,50 @@ static void ub_scsi_urb_compl(struct ub_
 		if (urb->status == -EOVERFLOW) {
 			/*
 			 * A babble? Failure, but we must transfer CSW now.
-			 * XXX This is going to end in perpetual babble. Reset.
 			 */
 			cmd->error = -EOVERFLOW;	/* A cheap trick... */
 			ub_state_stat(sc, cmd);
 			return;
 		}
-		if (urb->status != 0)
-			goto Bad_End;
+
+		if (cmd->dir == UB_DIR_WRITE) {
+			/*
+			 * Do not continue writes in case of a failure.
+			 * Doing so would cause sectors to be mixed up,
+			 * which is worse than sectors lost.
+			 *
+			 * We must try to read the CSW, or many devices
+			 * get confused.
+			 */
+			len = urb->actual_length;
+			if (urb->status != 0 ||
+			    len != cmd->sgv[cmd->current_sg].length) {
+				cmd->act_len += len;
+				ub_cmdtr_act_len(sc, cmd);
+
+				cmd->error = -EIO;
+				ub_state_stat(sc, cmd);
+				return;
+			}
+
+		} else {
+			/*
+			 * If an error occurs on read, we record it, and
+			 * continue to fetch data in order to avoid bubble.
+			 *
+			 * As a small shortcut, we stop if we detect that
+			 * a CSW mixed into data.
+			 */
+			if (urb->status != 0)
+				cmd->error = -EIO;
+
+			len = urb->actual_length;
+			if (urb->status != 0 ||
+			    len != cmd->sgv[cmd->current_sg].length) {
+				if ((len & 0x1FF) == US_BULK_CS_WRAP_LEN)
+					goto Bad_End;
+			}
+		}
 
 		cmd->act_len += urb->actual_length;
 		ub_cmdtr_act_len(sc, cmd);
@@ -1245,11 +1327,8 @@ static void ub_scsi_urb_compl(struct ub_
 				printk(KERN_NOTICE "%s: "
 				    "unable to submit clear (%d)\n",
 				    sc->name, rc);
-				/*
-				 * This is typically ENOMEM or some other such shit.
-				 * Retrying is pointless. Just do Bad End on it...
-				 */
-				goto Bad_End;
+				ub_state_done(sc, cmd, rc);
+				return;
 			}
 
 			/*
@@ -1262,14 +1341,8 @@ static void ub_scsi_urb_compl(struct ub_
 			ub_cmdtr_state(sc, cmd);
 			return;
 		}
-		if (urb->status == -EOVERFLOW) {
-			/*
-			 * XXX We are screwed here. Retrying is pointless,
-			 * because the pipelined data will not get in until
-			 * we read with a big enough buffer. We must reset XXX.
-			 */
-			goto Bad_End;
-		}
+
+		/* Catch everything, including -EOVERFLOW and other nasties. */
 		if (urb->status != 0)
 			goto Bad_End;
 
@@ -1315,15 +1388,15 @@ static void ub_scsi_urb_compl(struct ub_
 			return;
 		}
 
-		rc = le32_to_cpu(bcs->Residue);
-		if (rc != cmd->len - cmd->act_len) {
+		len = le32_to_cpu(bcs->Residue);
+		if (len != cmd->len - cmd->act_len) {
 			/*
 			 * It is all right to transfer less, the caller has
 			 * to check. But it's not all right if the device
 			 * counts disagree with our counts.
 			 */
 			/* P3 */ printk("%s: resid %d len %d act %d\n",
-			    sc->name, rc, cmd->len, cmd->act_len);
+			    sc->name, len, cmd->len, cmd->act_len);
 			goto Bad_End;
 		}
 
@@ -1334,13 +1407,13 @@ static void ub_scsi_urb_compl(struct ub_
 			ub_state_sense(sc, cmd);
 			return;
 		case US_BULK_STAT_PHASE:
-			/* XXX We must reset the transport here */
 			/* P3 */ printk("%s: status PHASE\n", sc->name);
 			goto Bad_End;
 		default:
 			printk(KERN_INFO "%s: unknown CSW status 0x%x\n",
 			    sc->name, bcs->Status);
-			goto Bad_End;
+			ub_state_done(sc, cmd, -EINVAL);
+			return;
 		}
 
 		/* Not zeroing error to preserve a babble indicator */
@@ -1360,7 +1433,8 @@ static void ub_scsi_urb_compl(struct ub_
 		printk(KERN_WARNING "%s: "
 		    "wrong command state %d\n",
 		    sc->name, cmd->state);
-		goto Bad_End;
+		ub_state_done(sc, cmd, -EINVAL);
+		return;
 	}
 	return;
 
@@ -1608,6 +1682,93 @@ static void ub_top_sense_done(struct ub_
 }
 
 /*
+ * Reset management
+ */
+
+static void ub_reset_enter(struct ub_dev *sc)
+{
+
+	if (sc->reset) {
+		/* This happens often on multi-LUN devices. */
+		return;
+	}
+	sc->reset = 1;
+
+#if 0 /* Not needed because the disconnect waits for us. */
+	unsigned long flags;
+	spin_lock_irqsave(&ub_lock, flags);
+	sc->openc++;
+	spin_unlock_irqrestore(&ub_lock, flags);
+#endif
+
+#if 0 /* We let them stop themselves. */
+	struct list_head *p;
+	struct ub_lun *lun;
+	list_for_each(p, &sc->luns) {
+		lun = list_entry(p, struct ub_lun, link);
+		blk_stop_queue(lun->disk->queue);
+	}
+#endif
+
+	schedule_work(&sc->reset_work);
+}
+
+static void ub_reset_task(void *arg)
+{
+	struct ub_dev *sc = arg;
+	unsigned long flags;
+	struct list_head *p;
+	struct ub_lun *lun;
+	int lkr, rc;
+
+	if (!sc->reset) {
+		printk(KERN_WARNING "%s: Running reset unrequested\n",
+		    sc->name);
+		return;
+	}
+
+	if (atomic_read(&sc->poison)) {
+		printk(KERN_NOTICE "%s: Not resetting disconnected device\n",
+		    sc->name); /* P3 This floods. Remove soon. XXX */
+	} else if (sc->dev->actconfig->desc.bNumInterfaces != 1) {
+		printk(KERN_NOTICE "%s: Not resetting multi-interface device\n",
+		    sc->name); /* P3 This floods. Remove soon. XXX */
+	} else {
+		if ((lkr = usb_lock_device_for_reset(sc->dev, sc->intf)) < 0) {
+			printk(KERN_NOTICE
+			    "%s: usb_lock_device_for_reset failed (%d)\n",
+			    sc->name, lkr);
+		} else {
+			rc = usb_reset_device(sc->dev);
+			if (rc < 0) {
+				printk(KERN_NOTICE "%s: "
+				    "usb_lock_device_for_reset failed (%d)\n",
+				    sc->name, rc);
+			}
+
+			if (lkr)
+				usb_unlock_device(sc->dev);
+		}
+	}
+
+	/*
+	 * In theory, no commands can be running while reset is active,
+	 * so nobody can ask for another reset, and so we do not need any
+	 * queues of resets or anything. We do need a spinlock though,
+	 * to interact with block layer.
+	 */
+	spin_lock_irqsave(&sc->lock, flags);
+	sc->reset = 0;
+	tasklet_schedule(&sc->tasklet);
+	list_for_each(p, &sc->luns) {
+		lun = list_entry(p, struct ub_lun, link);
+		blk_start_queue(lun->disk->queue);
+	}
+	wake_up(&sc->reset_wait);
+	spin_unlock_irqrestore(&sc->lock, flags);
+}
+
+/*
  * This is called from a process context.
  */
 static void ub_revalidate(struct ub_dev *sc, struct ub_lun *lun)
@@ -2142,7 +2303,7 @@ static int ub_get_pipes(struct ub_dev *s
 	if (ep_in == NULL || ep_out == NULL) {
 		printk(KERN_NOTICE "%s: failed endpoint check\n",
 		    sc->name);
-		return -EIO;
+		return -ENODEV;
 	}
 
 	/* Calculate and store the pipe values */
@@ -2180,6 +2341,8 @@ static int ub_probe(struct usb_interface
 	usb_init_urb(&sc->work_urb);
 	tasklet_init(&sc->tasklet, ub_scsi_action, (unsigned long)sc);
 	atomic_set(&sc->poison, 0);
+	INIT_WORK(&sc->reset_work, ub_reset_task, sc);
+	init_waitqueue_head(&sc->reset_wait);
 
 	init_timer(&sc->work_timer);
 	sc->work_timer.data = (unsigned long) sc;
@@ -2200,7 +2363,8 @@ static int ub_probe(struct usb_interface
 
 	/* XXX Verify that we can handle the device (from descriptors) */
 
-	ub_get_pipes(sc, sc->dev, intf);
+	if (ub_get_pipes(sc, sc->dev, intf) != 0)
+		goto err_dev_desc;
 
 	if (device_create_file(&sc->intf->dev, &dev_attr_diag) != 0)
 		goto err_diag;
@@ -2271,6 +2435,7 @@ static int ub_probe(struct usb_interface
 
 	/* device_remove_file(&sc->intf->dev, &dev_attr_diag); */
 err_diag:
+err_dev_desc:
 	usb_set_intfdata(intf, NULL);
 	// usb_put_intf(sc->intf);
 	usb_put_dev(sc->dev);
@@ -2379,6 +2544,11 @@ static void ub_disconnect(struct usb_int
 	atomic_set(&sc->poison, 1);
 
 	/*
+	 * Wait for reset to end, if any.
+	 */
+	wait_event(sc->reset_wait, !sc->reset);
+
+	/*
 	 * Blow away queued commands.
 	 *
 	 * Actually, this never works, because before we get here
@@ -2391,7 +2561,7 @@ static void ub_disconnect(struct usb_int
 	{
 		struct ub_scsi_cmd *cmd;
 		int cnt = 0;
-		while ((cmd = ub_cmdq_pop(sc)) != NULL) {
+		while ((cmd = ub_cmdq_peek(sc)) != NULL) {
 			cmd->error = -ENOTCONN;
 			cmd->state = UB_CMDST_DONE;
 			ub_cmdtr_state(sc, cmd);


On Fri, 9 Dec 2005 13:55:21 -0500, Dave Jones <davej at redhat.com> wrote:

>  > > [311578.273186] BUG: spinlock bad magic on CPU#1, pdflush/30788 (Not tainted)
>[...]
>  > > [311578.499972] RIP: 0010:[<ffffffff8021f8bd>] <ffffffff8021f8bd>{spin_bug+138}
>  > > [311578.798449] Call Trace:<ffffffff8021fbdb>{_raw_spin_lock+25} <ffffffff802174a4>{cfq_exit_single_io_context+85}
>  > > [311578.828782]        <ffffffff80217527>{cfq_exit_io_context+33} <ffffffff8020d07d>{exit_io_context+137}
>  > > [311578.856762]        <ffffffff8013f937>{do_exit+183} <ffffffff80152c90>{keventd_create_kthread+0}
>  > > [311578.883192]        <ffffffff80110c25>{child_rip+15} <ffffffff80152c90>{keventd_create_kthread+0}
>  > > [311578.909852]        <ffffffff80152d86>{kthread+0} <ffffffff80110c16>{child_rip+0}

> Hmm, I may have also been experimenting at the time with Pete Zaitcev's
> ub driver. Pete, could ub have been doing something bad here?

Yes, this is ub's fault. I thought that blk_cleanup_queue frees the queue,
but this is not the case. In recent kernels, it only decrements its refcount.
If CFQ is around, it keeps the queue pinned and uses the queue's spinlock.
But when ub calls blk_init_queue(), it passes a spinlock located in its data
structure (ub_dev), which corresponds to a device. The ub_dev is refcounted
and freed when the device is disconnected or closed. As you can see, this
leaves the queue's spinlock pointer dangling.

The code was taken from Carmel, and it used to work fine for a long time.
I suspect now that Carmel is vulnerable, if it's hot-removed while open.
Maybe Jeff wants to look into it.

The usb-storage is immune to this problem, because SCSI passes NULL to
blk_init_queue.

Schedulers other than CFQ use their own spinlocks, so they do not hit
this problem.

The attached patch works around this issue by using spinlocks which are
static to the ub module. Thus, it places ub into the same group as floppy.
This is not ideal, in case someone manages to remove the module yet have
queues remaining... But I am reluctant to copy what scsi_request_fn is
doing. After all, ub is supposed to be simpler.

Any comments before I send this to Greg?

With Christmas cheers,
-- Pete

--- linux-2.6.15-rc6-git4-gregkh/drivers/block/ub.c	2005-12-28 13:40:36.000000000 -0800
+++ linux-2.6.15-rc7-lem/drivers/block/ub.c	2005-12-26 15:02:35.000000000 -0800
@@ -355,7 +355,7 @@ struct ub_lun {
  * The USB device instance.
  */
 struct ub_dev {
-	spinlock_t lock;
+	spinlock_t *lock;
 	atomic_t poison;		/* The USB device is disconnected */
 	int openc;			/* protected by ub_lock! */
 					/* kref is too implicit for our taste */
@@ -452,6 +452,10 @@ MODULE_DEVICE_TABLE(usb, ub_usb_ids);
 #define UB_MAX_HOSTS  26
 static char ub_hostv[UB_MAX_HOSTS];
 
+#define UB_QLOCK_NUM 5
+static spinlock_t ub_qlockv[UB_QLOCK_NUM];
+static int ub_qlock_next = 0;
+
 static DEFINE_SPINLOCK(ub_lock);	/* Locks globals and ->openc */
 
 /*
@@ -531,7 +535,7 @@ static ssize_t ub_diag_show(struct devic
 		return 0;
 
 	cnt = 0;
-	spin_lock_irqsave(&sc->lock, flags);
+	spin_lock_irqsave(sc->lock, flags);
 
 	cnt += sprintf(page + cnt,
 	    "poison %d reset %d\n",
@@ -579,7 +583,7 @@ static ssize_t ub_diag_show(struct devic
 		if (++nc == SCMD_TRACE_SZ) nc = 0;
 	}
 
-	spin_unlock_irqrestore(&sc->lock, flags);
+	spin_unlock_irqrestore(sc->lock, flags);
 	return cnt;
 }
 
@@ -627,6 +631,24 @@ static void ub_id_put(int id)
 }
 
 /*
+ * This is necessitated by the fact that blk_cleanup_queue does not
+ * necesserily destroy the queue. Instead, it may merely decrease q->refcnt.
+ * Since our blk_init_queue() passes a spinlock common with ub_dev,
+ * we have life time issues when ub_cleanup frees ub_dev.
+ */
+static spinlock_t *ub_next_lock(void)
+{
+	unsigned long flags;
+	spinlock_t *ret;
+
+	spin_lock_irqsave(&ub_lock, flags);
+	ret = &ub_qlockv[ub_qlock_next];
+	ub_qlock_next = (ub_qlock_next + 1) % UB_QLOCK_NUM;
+	spin_unlock_irqrestore(&ub_lock, flags);
+	return ret;
+}
+
+/*
  * Downcount for deallocation. This rides on two assumptions:
  *  - once something is poisoned, its refcount cannot grow
  *  - opens cannot happen at this time (del_gendisk was done)
@@ -1083,9 +1105,9 @@ static void ub_urb_timeout(unsigned long
 	struct ub_dev *sc = (struct ub_dev *) arg;
 	unsigned long flags;
 
-	spin_lock_irqsave(&sc->lock, flags);
+	spin_lock_irqsave(sc->lock, flags);
 	usb_unlink_urb(&sc->work_urb);
-	spin_unlock_irqrestore(&sc->lock, flags);
+	spin_unlock_irqrestore(sc->lock, flags);
 }
 
 /*
@@ -1108,10 +1130,10 @@ static void ub_scsi_action(unsigned long
 	struct ub_dev *sc = (struct ub_dev *) _dev;
 	unsigned long flags;
 
-	spin_lock_irqsave(&sc->lock, flags);
+	spin_lock_irqsave(sc->lock, flags);
 	del_timer(&sc->work_timer);
 	ub_scsi_dispatch(sc);
-	spin_unlock_irqrestore(&sc->lock, flags);
+	spin_unlock_irqrestore(sc->lock, flags);
 }
 
 static void ub_scsi_dispatch(struct ub_dev *sc)
@@ -1754,7 +1776,7 @@ static void ub_reset_task(void *arg)
 	 * queues of resets or anything. We do need a spinlock though,
 	 * to interact with block layer.
 	 */
-	spin_lock_irqsave(&sc->lock, flags);
+	spin_lock_irqsave(sc->lock, flags);
 	sc->reset = 0;
 	tasklet_schedule(&sc->tasklet);
 	list_for_each(p, &sc->luns) {
@@ -1762,7 +1784,7 @@ static void ub_reset_task(void *arg)
 		blk_start_queue(lun->disk->queue);
 	}
 	wake_up(&sc->reset_wait);
-	spin_unlock_irqrestore(&sc->lock, flags);
+	spin_unlock_irqrestore(sc->lock, flags);
 }
 
 /*
@@ -1990,11 +2012,11 @@ static int ub_sync_tur(struct ub_dev *sc
 	cmd->done = ub_probe_done;
 	cmd->back = &compl;
 
-	spin_lock_irqsave(&sc->lock, flags);
+	spin_lock_irqsave(sc->lock, flags);
 	cmd->tag = sc->tagcnt++;
 
 	rc = ub_submit_scsi(sc, cmd);
-	spin_unlock_irqrestore(&sc->lock, flags);
+	spin_unlock_irqrestore(sc->lock, flags);
 
 	if (rc != 0) {
 		printk("ub: testing ready: submit error (%d)\n", rc); /* P3 */
@@ -2052,11 +2074,11 @@ static int ub_sync_read_cap(struct ub_de
 	cmd->done = ub_probe_done;
 	cmd->back = &compl;
 
-	spin_lock_irqsave(&sc->lock, flags);
+	spin_lock_irqsave(sc->lock, flags);
 	cmd->tag = sc->tagcnt++;
 
 	rc = ub_submit_scsi(sc, cmd);
-	spin_unlock_irqrestore(&sc->lock, flags);
+	spin_unlock_irqrestore(sc->lock, flags);
 
 	if (rc != 0) {
 		printk("ub: reading capacity: submit error (%d)\n", rc); /* P3 */
@@ -2333,7 +2355,7 @@ static int ub_probe(struct usb_interface
 	if ((sc = kmalloc(sizeof(struct ub_dev), GFP_KERNEL)) == NULL)
 		goto err_core;
 	memset(sc, 0, sizeof(struct ub_dev));
-	spin_lock_init(&sc->lock);
+	sc->lock = ub_next_lock();
 	INIT_LIST_HEAD(&sc->luns);
 	usb_init_urb(&sc->work_urb);
 	tasklet_init(&sc->tasklet, ub_scsi_action, (unsigned long)sc);
@@ -2483,7 +2505,7 @@ static int ub_probe_lun(struct ub_dev *s
 	disk->driverfs_dev = &sc->intf->dev;
 
 	rc = -ENOMEM;
-	if ((q = blk_init_queue(ub_request_fn, &sc->lock)) == NULL)
+	if ((q = blk_init_queue(ub_request_fn, sc->lock)) == NULL)
 		goto err_blkqinit;
 
 	disk->queue = q;
@@ -2554,7 +2576,7 @@ static void ub_disconnect(struct usb_int
 	 * and the whole queue drains. So, we just use this code to
 	 * print warnings.
 	 */
-	spin_lock_irqsave(&sc->lock, flags);
+	spin_lock_irqsave(sc->lock, flags);
 	{
 		struct ub_scsi_cmd *cmd;
 		int cnt = 0;
@@ -2571,7 +2593,7 @@ static void ub_disconnect(struct usb_int
 			    "%d was queued after shutdown\n", sc->name, cnt);
 		}
 	}
-	spin_unlock_irqrestore(&sc->lock, flags);
+	spin_unlock_irqrestore(sc->lock, flags);
 
 	/*
 	 * Unregister the upper layer.
@@ -2590,19 +2612,15 @@ static void ub_disconnect(struct usb_int
 	}
 
 	/*
-	 * Taking a lock on a structure which is about to be freed
-	 * is very nonsensual. Here it is largely a way to do a debug freeze,
-	 * and a bracket which shows where the nonsensual code segment ends.
-	 *
 	 * Testing for -EINPROGRESS is always a bug, so we are bending
 	 * the rules a little.
 	 */
-	spin_lock_irqsave(&sc->lock, flags);
+	spin_lock_irqsave(sc->lock, flags);
 	if (sc->work_urb.status == -EINPROGRESS) {	/* janitors: ignore */
 		printk(KERN_WARNING "%s: "
 		    "URB is active after disconnect\n", sc->name);
 	}
-	spin_unlock_irqrestore(&sc->lock, flags);
+	spin_unlock_irqrestore(sc->lock, flags);
 
 	/*
 	 * There is virtually no chance that other CPU runs times so long
@@ -2636,6 +2655,10 @@ static struct usb_driver ub_driver = {
 static int __init ub_init(void)
 {
 	int rc;
+	int i;
+
+	for (i = 0; i < UB_QLOCK_NUM; i++)
+		spin_lock_init(&ub_qlockv[i]);
 
 	if ((rc = register_blkdev(UB_MAJOR, DRV_NAME)) != 0)
 		goto err_regblkdev;


linux-2.6-valid-ether-addr.patch:
 etherdevice.h |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

--- NEW FILE linux-2.6-valid-ether-addr.patch ---
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -91,9 +91,8 @@ static inline int is_broadcast_ether_add
  */
 static inline int is_valid_ether_addr(const u8 *addr)
 {
-	/* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to
-	 * explicitly check for it here. */
-	return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr);
+	return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr) &&
+	       !is_broadcast_ether_addr(addr);
 }
 
 /**

linux-2.6-x86_64-disable-hotplug-guessing.patch:
 mpparse.c |    2 +-
 smpboot.c |    7 +------
 2 files changed, 2 insertions(+), 7 deletions(-)

--- NEW FILE linux-2.6-x86_64-disable-hotplug-guessing.patch ---

Disable useless heuristic for guessing how many hotplug CPUs to enable.

--- linux-2.6.14/arch/x86_64/kernel/smpboot.c~	2005-12-09 22:54:48.000000000 -0500
+++ linux-2.6.14/arch/x86_64/kernel/smpboot.c	2005-12-09 22:56:27.000000000 -0500
@@ -938,13 +938,8 @@ __init void prefill_possible_map(void)
 	int possible;
 
  	if (additional_cpus == -1) {
- 		if (disabled_cpus > 0) {
+ 		if (disabled_cpus >= 0)
  			additional_cpus = disabled_cpus;
- 		} else {
- 			additional_cpus = num_processors / 2;
- 			if (additional_cpus == 0)
- 				additional_cpus = 2;
- 		}
  	}
 	possible = num_processors + additional_cpus;
 	if (possible > NR_CPUS) 
--- linux-2.6.14/arch/x86_64/kernel/mpparse.c~	2005-12-16 02:10:58.000000000 -0500
+++ linux-2.6.14/arch/x86_64/kernel/mpparse.c	2005-12-16 02:11:01.000000000 -0500
@@ -67,7 +67,7 @@ unsigned int boot_cpu_id = -1U;
 /* Internal processor count */
 unsigned int num_processors __initdata = 0;
 
-unsigned disabled_cpus __initdata;
+unsigned disabled_cpus __initdata = 0;
 
 /* Bitmask of physically existing CPUs */
 physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE;

linux-2.6-x86_64-silence-up-apic-errors.patch:
 apic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE linux-2.6-x86_64-silence-up-apic-errors.patch ---
Quite a few UP x86-64 laptops print APIC error 40's repeatedly
when they run an SMP kernel (And Fedora doesn't ship a UP x86-64 kernel
any more).  We can suppress this as there's not really anything we
can do about them.

--- linux-2.6.14/arch/x86_64/kernel/apic.c~	2005-12-07 15:17:33.000000000 -0500
+++ linux-2.6.14/arch/x86_64/kernel/apic.c	2005-12-07 15:18:16.000000000 -0500
@@ -1032,7 +1032,8 @@ asmlinkage void smp_error_interrupt(void
 	   6: Received illegal vector
 	   7: Illegal register address
 	*/
-	printk (KERN_DEBUG "APIC error on CPU%d: %02x(%02x)\n",
+	if (num_online_cpus() > 1)
+		printk (KERN_DEBUG "APIC error on CPU%d: %02x(%02x)\n",
 	        smp_processor_id(), v , v1);
 	irq_exit();
 }

linux-2.6.14-intel-cache-build.patch:
 intel_cacheinfo.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6.14-intel-cache-build.patch ---
--- linux-2.6.14/arch/i386/kernel/cpu/intel_cacheinfo.c.orig	2005-11-02 11:25:14.000000000 +0000
+++ linux-2.6.14/arch/i386/kernel/cpu/intel_cacheinfo.c	2005-11-02 11:25:23.000000000 +0000
@@ -569,7 +569,7 @@ static int __cpuinit cache_add_dev(struc
 	return retval;
 }
 
-static void __cpuexit cache_remove_dev(struct sys_device * sys_dev)
+static void cache_remove_dev(struct sys_device * sys_dev)
 {
 	unsigned int cpu = sys_dev->id;
 	unsigned long i;

linux-2.6.15-default-powerpc.patch:
 Makefile |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6.15-default-powerpc.patch ---
--- linux-2.6.14/Makefile.orig	2005-11-19 17:13:52.000000000 +0000
+++ linux-2.6.14/Makefile	2005-11-19 17:14:04.000000000 +0000
@@ -169,7 +169,7 @@ KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$
 SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
 				  -e s/arm.*/arm/ -e s/sa110/arm/ \
 				  -e s/s390x/s390/ -e s/parisc64/parisc/ \
-				  -e s/ppc64/powerpc/ )
+				  -e s/ppc.*/powerpc/ )
 
 # Cross compiling and selecting different set of gcc/bin-utils
 # ---------------------------------------------------------------------------

linux-2.6.15-mv643xx-fixes.patch:
 mv643xx_eth.c |  209 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 204 insertions(+), 5 deletions(-)

--- NEW FILE linux-2.6.15-mv643xx-fixes.patch ---
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -78,6 +78,7 @@
 static int eth_port_link_is_up(unsigned int eth_port_num);
 static void eth_port_uc_addr_get(struct net_device *dev,
 						unsigned char *MacAddr);
+static void eth_port_set_multicast_list(struct net_device *);
 static int mv643xx_eth_real_open(struct net_device *);
 static int mv643xx_eth_real_stop(struct net_device *);
 static int mv643xx_eth_change_mtu(struct net_device *, int);
@@ -175,12 +176,17 @@ static void mv643xx_eth_rx_task(void *da
 		panic("%s: Error in test_set_bit / clear_bit", dev->name);
 
 	while (mp->rx_ring_skbs < (mp->rx_ring_size - 5)) {
-		skb = dev_alloc_skb(RX_SKB_SIZE);
+		skb = dev_alloc_skb(RX_SKB_SIZE+4);
 		if (!skb)
 			break;
 		mp->rx_ring_skbs++;
 		pkt_info.cmd_sts = ETH_RX_ENABLE_INTERRUPT;
 		pkt_info.byte_cnt = RX_SKB_SIZE;
+
+		/* Must have 8-byte alignment */
+		if ((unsigned long)skb->data & 4)
+			skb_reserve(skb, 4);
+
 		pkt_info.buf_ptr = dma_map_single(NULL, skb->data, RX_SKB_SIZE,
 							DMA_FROM_DEVICE);
 		pkt_info.return_info = skb;
@@ -267,6 +273,8 @@ static void mv643xx_eth_set_rx_mode(stru
 		mp->port_config &= ~(u32) MV643XX_ETH_UNICAST_PROMISCUOUS_MODE;
 
 	mv_write(MV643XX_ETH_PORT_CONFIG_REG(mp->port_num), mp->port_config);
+
+	eth_port_set_multicast_list(dev);
 }
 
 /*
@@ -2053,6 +2061,197 @@ static int eth_port_uc_addr(unsigned int
 	return 1;
 }
 
+static void eth_port_set_filter_table_entry(int table, unsigned char entry)
+{
+	unsigned int table_reg;
+	unsigned int tbl_offset;
+	unsigned int reg_offset;
+
+	tbl_offset = (entry / 4) * 4;	/* Register offset of DA table entry */
+	reg_offset = entry % 4;		/* Entry offset within the register */
+
+	/* Set "accepts frame bit" at specified table entry */
+	table_reg = mv_read(table + tbl_offset);
+	table_reg |= 0x01 << (8 * reg_offset);
+	mv_write(table + tbl_offset, table_reg);
+}
+
+/*******************************************************************************
+* eth_port_mc_addr - Multicast address settings.
+*
+* DESCRIPTION:
+*	This function controls the MV device MAC multicast support.
+*	The MV device supports multicast using two tables:
+*	1) Special Multicast Table for MAC addresses of the form
+*	   0x01-00-5E-00-00-XX (where XX is between 0x00 and 0x_FF).
+*	   The MAC DA[7:0] bits are used as a pointer to the Special Multicast
+*	   Table entries in the DA-Filter table.
+*	2) Other Multicast Table for multicast of another type. A CRC-8bit
+*	   is used as an index to the Other Multicast Table entries in the
+*	   DA-Filter table.  This function calculates the CRC-8bit value.
+*	In either case, eth_port_set_filter_table_entry() is then called
+*	to set to set the actual table entry.
+* INPUT:
+*	unsigned int 	eth_port_num	Port number.
+*	unsigned char 	*p_addr		Unicast MAC Address.
+*
+* OUTPUT:
+*	See description.
+*
+* RETURN:
+*	None.
+*
+*******************************************************************************/
+static void eth_port_mc_addr(unsigned int eth_port_num, unsigned char *p_addr)
+{
+	unsigned int mac_h;
+	unsigned int mac_l;
+	unsigned char crc_result = 0;
+	int table;
+	int mac_array[48];
+	int crc[8];
+	int i;
+
+	if ((p_addr[0] == 0x01) && (p_addr[1] == 0x00) &&
+	    (p_addr[2] == 0x5E) && (p_addr[3] == 0x00) && (p_addr[4] == 0x00)) {
+		table = MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE
+					(eth_port_num);
+		eth_port_set_filter_table_entry(table, p_addr[5]);
+		return;
+	}
+
+	/* Calculate CRC-8 out of the given address */
+	mac_h = (p_addr[0] << 8) | (p_addr[1]);
+	mac_l = (p_addr[2] << 24) | (p_addr[3] << 16) |
+			(p_addr[4] << 8) | (p_addr[5] << 0);
+
+	for (i = 0; i < 32; i++)
+		mac_array[i] = (mac_l >> i) & 0x1;
+	for (i = 32; i < 48; i++)
+		mac_array[i] = (mac_h >> (i - 32)) & 0x1;
+
+	crc[0] = mac_array[45] ^ mac_array[43] ^ mac_array[40] ^ mac_array[39] ^
+		 mac_array[35] ^ mac_array[34] ^ mac_array[31] ^ mac_array[30] ^
+		 mac_array[28] ^ mac_array[23] ^ mac_array[21] ^ mac_array[19] ^
+		 mac_array[18] ^ mac_array[16] ^ mac_array[14] ^ mac_array[12] ^
+		 mac_array[8]  ^ mac_array[7]  ^ mac_array[6]  ^ mac_array[0];
+
+	crc[1] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^ mac_array[43] ^
+		 mac_array[41] ^ mac_array[39] ^ mac_array[36] ^ mac_array[34] ^
+		 mac_array[32] ^ mac_array[30] ^ mac_array[29] ^ mac_array[28] ^
+		 mac_array[24] ^ mac_array[23] ^ mac_array[22] ^ mac_array[21] ^
+		 mac_array[20] ^ mac_array[18] ^ mac_array[17] ^ mac_array[16] ^
+		 mac_array[15] ^ mac_array[14] ^ mac_array[13] ^ mac_array[12] ^
+		 mac_array[9]  ^ mac_array[6]  ^ mac_array[1]  ^ mac_array[0];
+
+	crc[2] = mac_array[47] ^ mac_array[46] ^ mac_array[44] ^ mac_array[43] ^
+		 mac_array[42] ^ mac_array[39] ^ mac_array[37] ^ mac_array[34] ^
+		 mac_array[33] ^ mac_array[29] ^ mac_array[28] ^ mac_array[25] ^
+		 mac_array[24] ^ mac_array[22] ^ mac_array[17] ^ mac_array[15] ^
+		 mac_array[13] ^ mac_array[12] ^ mac_array[10] ^ mac_array[8]  ^
+		 mac_array[6]  ^ mac_array[2]  ^ mac_array[1]  ^ mac_array[0];
+
+	crc[3] = mac_array[47] ^ mac_array[45] ^ mac_array[44] ^ mac_array[43] ^
+		 mac_array[40] ^ mac_array[38] ^ mac_array[35] ^ mac_array[34] ^
+		 mac_array[30] ^ mac_array[29] ^ mac_array[26] ^ mac_array[25] ^
+		 mac_array[23] ^ mac_array[18] ^ mac_array[16] ^ mac_array[14] ^
+		 mac_array[13] ^ mac_array[11] ^ mac_array[9]  ^ mac_array[7]  ^
+		 mac_array[3]  ^ mac_array[2]  ^ mac_array[1];
+
+	crc[4] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^ mac_array[41] ^
+		 mac_array[39] ^ mac_array[36] ^ mac_array[35] ^ mac_array[31] ^
+		 mac_array[30] ^ mac_array[27] ^ mac_array[26] ^ mac_array[24] ^
+		 mac_array[19] ^ mac_array[17] ^ mac_array[15] ^ mac_array[14] ^
+		 mac_array[12] ^ mac_array[10] ^ mac_array[8]  ^ mac_array[4]  ^
+		 mac_array[3]  ^ mac_array[2];
+
+	crc[5] = mac_array[47] ^ mac_array[46] ^ mac_array[45] ^ mac_array[42] ^
+		 mac_array[40] ^ mac_array[37] ^ mac_array[36] ^ mac_array[32] ^
+		 mac_array[31] ^ mac_array[28] ^ mac_array[27] ^ mac_array[25] ^
+		 mac_array[20] ^ mac_array[18] ^ mac_array[16] ^ mac_array[15] ^
+		 mac_array[13] ^ mac_array[11] ^ mac_array[9]  ^ mac_array[5]  ^
+		 mac_array[4]  ^ mac_array[3];
+
+	crc[6] = mac_array[47] ^ mac_array[46] ^ mac_array[43] ^ mac_array[41] ^
+		 mac_array[38] ^ mac_array[37] ^ mac_array[33] ^ mac_array[32] ^
+		 mac_array[29] ^ mac_array[28] ^ mac_array[26] ^ mac_array[21] ^
+		 mac_array[19] ^ mac_array[17] ^ mac_array[16] ^ mac_array[14] ^
+		 mac_array[12] ^ mac_array[10] ^ mac_array[6]  ^ mac_array[5]  ^
+		 mac_array[4];
+
+	crc[7] = mac_array[47] ^ mac_array[44] ^ mac_array[42] ^ mac_array[39] ^
+		 mac_array[38] ^ mac_array[34] ^ mac_array[33] ^ mac_array[30] ^
+		 mac_array[29] ^ mac_array[27] ^ mac_array[22] ^ mac_array[20] ^
+		 mac_array[18] ^ mac_array[17] ^ mac_array[15] ^ mac_array[13] ^
+		 mac_array[11] ^ mac_array[7]  ^ mac_array[6]  ^ mac_array[5];
+
+	for (i = 0; i < 8; i++)
+		crc_result = crc_result | (crc[i] << i);
+
+	table = MV643XX_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE(eth_port_num);
+	eth_port_set_filter_table_entry(table, crc_result);
+}
+
+/** Set the entire multicast list base on dev->mc_list. **/
+static void eth_port_set_multicast_list(struct net_device *dev)
+{
+
+	struct dev_mc_list	*mc_list;
+	int			i;
+	int			table_index;
+	struct mv643xx_private	*mp = netdev_priv(dev);
+	unsigned int		eth_port_num = mp->port_num;
+
+	/** If the device is in promiscuous mode or in all multicast mode,
+	 ** we will fully populate both multicast tables with accept.
+	 ** This is guaranteed to yield a match on all multicast addresses...
+	 **/
+	if ((dev->flags & IFF_PROMISC) || (dev->flags & IFF_ALLMULTI)) {
+		for (table_index = 0; table_index <= 0xFC; table_index += 4) {
+			 /** Set all entries in DA filter special multicast
+			  ** table (Ex_dFSMT)
+			  ** Set for ETH_Q0 for now
+			  ** Bits
+			  ** 0	  Accept=1, Drop=0
+			  ** 3-1  Queue	 ETH_Q0=0
+			  ** 7-4  Reserved = 0;
+			  **/
+			 mv_write(MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
+
+			 /** Set all entries in DA filter other multicast
+			  ** table (Ex_dFOMT)
+			  ** Set for ETH_Q0 for now
+			  ** Bits
+			  ** 0	  Accept=1, Drop=0
+			  ** 3-1  Queue	 ETH_Q0=0
+			  ** 7-4  Reserved = 0;
+			  **/
+			 mv_write(MV643XX_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
+       	}
+		return;
+	}
+
+	/** We will clear out multicast tables everytime we get the list.
+	 ** Then add the entire new list...
+	 **/
+	for (table_index = 0; table_index <= 0xFC; table_index += 4) {
+		/* Clear DA filter special multicast table (Ex_dFSMT) */
+		mv_write(MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE
+				(eth_port_num) + table_index, 0);
+
+		/* Clear DA filter other multicast table (Ex_dFOMT) */
+		mv_write(MV643XX_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE
+				(eth_port_num) + table_index, 0);
+	}
+
+	/** Get pointer to net_device multicast list and add each one... **/
+	for(i = 0, mc_list = dev->mc_list;
+			(i < 256) && (mc_list != NULL) && (i < dev->mc_count);
+			i++, mc_list = mc_list->next)
+		if (mc_list->dmi_addrlen == 6)
+			eth_port_mc_addr(eth_port_num, mc_list->dmi_addr);
+}
+
 /*
  * eth_port_init_mac_tables - Clear all entrance in the UC, SMC and OMC tables
  *
@@ -2080,11 +2279,11 @@ static void eth_port_init_mac_tables(uns
 
 	for (table_index = 0; table_index <= 0xFC; table_index += 4) {
 		/* Clear DA filter special multicast table (Ex_dFSMT) */
-		mv_write((MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE
-					(eth_port_num) + table_index), 0);
+		mv_write(MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE
+					(eth_port_num) + table_index, 0);
 		/* Clear DA filter other multicast table (Ex_dFOMT) */
-		mv_write((MV643XX_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE
-					(eth_port_num) + table_index), 0);
+		mv_write(MV643XX_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE
+					(eth_port_num) + table_index, 0);
 	}
 }
 

linux-2.6.15-rc1-ppc64-syscallpath.patch:
 arch/powerpc/kernel/asm-offsets.c |    4 
 arch/powerpc/kernel/entry_32.S    |  167 +++++++++++++++++------------
 arch/powerpc/kernel/entry_64.S    |  214 ++++++++++++++++++++------------------
 arch/powerpc/kernel/signal_32.c   |   68 +++++-------
 arch/powerpc/kernel/signal_64.c   |   23 +++-
 arch/powerpc/kernel/systbl.S      |   10 -
 include/asm-powerpc/ptrace.h      |    2 
 include/asm-powerpc/thread_info.h |   12 +-
 8 files changed, 278 insertions(+), 222 deletions(-)

--- NEW FILE linux-2.6.15-rc1-ppc64-syscallpath.patch ---
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 91538d2..3bf89d1 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -92,9 +92,9 @@ int main(void)
 
 	DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
 	DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
-	DEFINE(TI_SC_NOERR, offsetof(struct thread_info, syscall_noerror));
-#ifdef CONFIG_PPC32
+	DEFINE(TI_SIGFRAME, offsetof(struct thread_info, nvgprs_frame));
 	DEFINE(TI_TASK, offsetof(struct thread_info, task));
+#ifdef CONFIG_PPC32
 	DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
 	DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
 #endif /* CONFIG_PPC32 */
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 2e99ae4..8fed953 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -200,8 +200,6 @@ _GLOBAL(DoSyscall)
 	bl	do_show_syscall
 #endif /* SHOW_SYSCALLS */
 	rlwinm	r10,r1,0,0,(31-THREAD_SHIFT)	/* current_thread_info() */
-	li	r11,0
-	stb	r11,TI_SC_NOERR(r10)
 	lwz	r11,TI_FLAGS(r10)
 	andi.	r11,r11,_TIF_SYSCALL_T_OR_A
 	bne-	syscall_dotrace
@@ -222,25 +220,21 @@ ret_from_syscall:
 	bl	do_show_syscall_exit
 #endif
 	mr	r6,r3
-	li	r11,-_LAST_ERRNO
-	cmplw	0,r3,r11
 	rlwinm	r12,r1,0,0,(31-THREAD_SHIFT)	/* current_thread_info() */
-	blt+	30f
-	lbz	r11,TI_SC_NOERR(r12)
-	cmpwi	r11,0
-	bne	30f
-	neg	r3,r3
-	lwz	r10,_CCR(r1)	/* Set SO bit in CR */
-	oris	r10,r10,0x1000
-	stw	r10,_CCR(r1)
-
 	/* disable interrupts so current_thread_info()->flags can't change */
-30:	LOAD_MSR_KERNEL(r10,MSR_KERNEL)	/* doesn't include MSR_EE */
+	LOAD_MSR_KERNEL(r10,MSR_KERNEL)	/* doesn't include MSR_EE */
 	SYNC
 	MTMSRD(r10)
 	lwz	r9,TI_FLAGS(r12)
-	andi.	r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SIGPENDING|_TIF_NEED_RESCHED)
+	li	r8,-_LAST_ERRNO
+	andi.	r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_RESTOREALL)
 	bne-	syscall_exit_work
+	cmplw	0,r3,r8
+	blt+	syscall_exit_cont
+	lwz	r11,_CCR(r1)			/* Load CR */
+	neg	r3,r3
+	oris	r11,r11,0x1000	/* Set SO bit in CR */
+	stw	r11,_CCR(r1)
 syscall_exit_cont:
 #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
 	/* If the process has its own DBCR0 value, load it up.  The single
@@ -292,46 +286,113 @@ syscall_dotrace:
 	b	syscall_dotrace_cont
 
 syscall_exit_work:
-	stw	r6,RESULT(r1)	/* Save result */
+	andi.	r0,r9,_TIF_RESTOREALL
+	bne-	2f
+	cmplw	0,r3,r8
+	blt+	1f
+	andi.	r0,r9,_TIF_NOERROR
+	bne-	1f
+	lwz	r11,_CCR(r1)			/* Load CR */
+	neg	r3,r3
+	oris	r11,r11,0x1000	/* Set SO bit in CR */
+	stw	r11,_CCR(r1)
+
+1:	stw	r6,RESULT(r1)	/* Save result */
 	stw	r3,GPR3(r1)	/* Update return value */
-	andi.	r0,r9,_TIF_SYSCALL_T_OR_A
-	beq	5f
-	ori	r10,r10,MSR_EE
-	SYNC
-	MTMSRD(r10)		/* re-enable interrupts */
+2:	andi.	r0,r9,(_TIF_PERSYSCALL_MASK)
+	beq	4f
+
+	/* Clear per-syscall TIF flags if any are set, but _leave_
+	_TIF_SAVE_NVGPRS set in r9 since we haven't dealt with that
+	yet.  */
+
+	li	r11,_TIF_PERSYSCALL_MASK
+	addi	r12,r12,TI_FLAGS
+3:	lwarx	r8,0,r12
+	andc	r8,r8,r11
+#ifdef CONFIG_IBM405_ERR77
+	dcbt	0,r12
+#endif
+	stwcx.	r8,0,r12
+	bne-	3b
+	subi	r12,r12,TI_FLAGS
+	
+4:	/* Anything which requires enabling interrupts? */
+	andi.	r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_SAVE_NVGPRS)
+	beq	7f
+
+	/* Save NVGPRS if they're not saved already */
 	lwz	r4,_TRAP(r1)
 	andi.	r4,r4,1
-	beq	4f
+	beq	5f
 	SAVE_NVGPRS(r1)
 	li	r4,0xc00
 	stw	r4,_TRAP(r1)
-4:
+
+	/* Re-enable interrupts */
+5:	ori	r10,r10,MSR_EE
+	SYNC
+	MTMSRD(r10)
+
+	andi.	r0,r9,_TIF_SAVE_NVGPRS
+	bne	save_user_nvgprs
+
+save_user_nvgprs_cont:
+	andi.	r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP)
+	beq	7f
+
 	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	do_syscall_trace_leave
 	REST_NVGPRS(r1)
-2:
-	lwz	r3,GPR3(r1)
+
+6:	lwz	r3,GPR3(r1)
 	LOAD_MSR_KERNEL(r10,MSR_KERNEL)	/* doesn't include MSR_EE */
 	SYNC
 	MTMSRD(r10)		/* disable interrupts again */
 	rlwinm	r12,r1,0,0,(31-THREAD_SHIFT)	/* current_thread_info() */
 	lwz	r9,TI_FLAGS(r12)
-5:
+7:
 	andi.	r0,r9,_TIF_NEED_RESCHED
-	bne	1f
+	bne	8f
 	lwz	r5,_MSR(r1)
 	andi.	r5,r5,MSR_PR
-	beq	syscall_exit_cont
+	beq	ret_from_except
 	andi.	r0,r9,_TIF_SIGPENDING
-	beq	syscall_exit_cont
+	beq	ret_from_except
 	b	do_user_signal
-1:
+8:
 	ori	r10,r10,MSR_EE
 	SYNC
 	MTMSRD(r10)		/* re-enable interrupts */
 	bl	schedule
-	b	2b
+	b	6b
+
+save_user_nvgprs:
+	lwz	r8,TI_SIGFRAME(r12)
 
+.macro savewords start, end
+  1:	stw \start,4*(\start)(r8)
+	.section __ex_table,"a"
+	.align	2
+	.long	1b,save_user_nvgprs_fault
+	.previous
+	.if \end - \start
+	savewords "(\start+1)",\end
+	.endif
+.endm	
+	savewords 14,31
+	b	save_user_nvgprs_cont
+
+	
+save_user_nvgprs_fault:
+	li	r3,11		/* SIGSEGV */
+	lwz	r4,TI_TASK(r12)
+	bl	force_sigsegv
+
+	rlwinm	r12,r1,0,0,(31-THREAD_SHIFT)	/* current_thread_info() */
+	lwz	r9,TI_FLAGS(r12)
+	b	save_user_nvgprs_cont
+	
 #ifdef SHOW_SYSCALLS
 do_show_syscall:
 #ifdef SHOW_SYSCALLS_TASK
@@ -401,28 +462,10 @@ show_syscalls_task:
 #endif /* SHOW_SYSCALLS */
 
 /*
- * The sigsuspend and rt_sigsuspend system calls can call do_signal
- * and thus put the process into the stopped state where we might
- * want to examine its user state with ptrace.  Therefore we need
- * to save all the nonvolatile registers (r13 - r31) before calling
- * the C code.
+ * The fork/clone functions need to copy the full register set into
+ * the child process. Therefore we need to save all the nonvolatile
+ * registers (r13 - r31) before calling the C code.
  */
-	.globl	ppc_sigsuspend
-ppc_sigsuspend:
-	SAVE_NVGPRS(r1)
-	lwz	r0,_TRAP(r1)
-	rlwinm	r0,r0,0,0,30		/* clear LSB to indicate full */
-	stw	r0,_TRAP(r1)		/* register set saved */
-	b	sys_sigsuspend
-
-	.globl	ppc_rt_sigsuspend
-ppc_rt_sigsuspend:
-	SAVE_NVGPRS(r1)
-	lwz	r0,_TRAP(r1)
-	rlwinm	r0,r0,0,0,30
-	stw	r0,_TRAP(r1)
-	b	sys_rt_sigsuspend
-
 	.globl	ppc_fork
 ppc_fork:
 	SAVE_NVGPRS(r1)
@@ -447,14 +490,6 @@ ppc_clone:
 	stw	r0,_TRAP(r1)		/* register set saved */
 	b	sys_clone
 
-	.globl	ppc_swapcontext
-ppc_swapcontext:
-	SAVE_NVGPRS(r1)
-	lwz	r0,_TRAP(r1)
-	rlwinm	r0,r0,0,0,30		/* clear LSB to indicate full */
-	stw	r0,_TRAP(r1)		/* register set saved */
-	b	sys_swapcontext
-
 /*
  * Top-level page fault handling.
  * This is in assembler because if do_page_fault tells us that
@@ -626,16 +661,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_601)
 	.long	ret_from_except
 #endif
 
-	.globl	sigreturn_exit
-sigreturn_exit:
-	subi	r1,r3,STACK_FRAME_OVERHEAD
-	rlwinm	r12,r1,0,0,(31-THREAD_SHIFT)	/* current_thread_info() */
-	lwz	r9,TI_FLAGS(r12)
-	andi.	r0,r9,_TIF_SYSCALL_T_OR_A
-	beq+	ret_from_except_full
-	bl	do_syscall_trace_leave
-	/* fall through */
-
 	.globl	ret_from_except_full
 ret_from_except_full:
 	REST_NVGPRS(r1)
@@ -658,7 +683,7 @@ user_exc_return:		/* r10 contains MSR_KE
 	/* Check current_thread_info()->flags */
 	rlwinm	r9,r1,0,0,(31-THREAD_SHIFT)
 	lwz	r9,TI_FLAGS(r9)
-	andi.	r0,r9,(_TIF_SIGPENDING|_TIF_NEED_RESCHED)
+	andi.	r0,r9,(_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_RESTOREALL)
 	bne	do_work
 
 restore_user:
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 2d22bf0..83b9edf 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -113,9 +113,7 @@ system_call_common:
 	addi	r9,r1,STACK_FRAME_OVERHEAD
 #endif
 	clrrdi	r11,r1,THREAD_SHIFT
-	li	r12,0
 	ld	r10,TI_FLAGS(r11)
-	stb	r12,TI_SC_NOERR(r11)
 	andi.	r11,r10,_TIF_SYSCALL_T_OR_A
 	bne-	syscall_dotrace
 syscall_dotrace_cont:
@@ -144,24 +142,12 @@ system_call:			/* label this so stack tr
 	bctrl			/* Call handler */
 
 syscall_exit:
+	std	r3,RESULT(r1)
 #ifdef SHOW_SYSCALLS
-	std	r3,GPR3(r1)
 	bl	.do_show_syscall_exit
-	ld	r3,GPR3(r1)
+	ld	r3,RESULT(r1)
 #endif
-	std	r3,RESULT(r1)
-	ld	r5,_CCR(r1)
-	li	r10,-_LAST_ERRNO
-	cmpld	r3,r10
 	clrrdi	r12,r1,THREAD_SHIFT
-	bge-	syscall_error
-syscall_error_cont:
-
-	/* check for syscall tracing or audit */
-	ld	r9,TI_FLAGS(r12)
-	andi.	r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP)
-	bne-	syscall_exit_trace
-syscall_exit_trace_cont:
 
 	/* disable interrupts so current_thread_info()->flags can't change,
 	   and so that we don't get interrupted after loading SRR0/1. */
@@ -173,8 +159,13 @@ syscall_exit_trace_cont:
 	rotldi	r10,r10,16
 	mtmsrd	r10,1
 	ld	r9,TI_FLAGS(r12)
-	andi.	r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SIGPENDING|_TIF_NEED_RESCHED)
+	li	r11,-_LAST_ERRNO
+	andi.	r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_RESTOREALL|_TIF_SAVE_NVGPRS|_TIF_NOERROR)
 	bne-	syscall_exit_work
+	cmpld	r3,r11
+	ld	r5,_CCR(r1)
+	bge-	syscall_error
+syscall_error_cont:
 	ld	r7,_NIP(r1)
 	stdcx.	r0,0,r1			/* to clear the reservation */
 	andi.	r6,r8,MSR_PR
@@ -193,21 +184,12 @@ syscall_exit_trace_cont:
 	rfid
 	b	.	/* prevent speculative execution */
 
-syscall_enosys:
-	li	r3,-ENOSYS
-	std	r3,RESULT(r1)
-	clrrdi	r12,r1,THREAD_SHIFT
-	ld	r5,_CCR(r1)
-
-syscall_error:
-	lbz	r11,TI_SC_NOERR(r12)
-	cmpwi	0,r11,0
-	bne-	syscall_error_cont
-	neg	r3,r3
+syscall_error:	
 	oris	r5,r5,0x1000	/* Set SO bit in CR */
+	neg	r3,r3
 	std	r5,_CCR(r1)
 	b	syscall_error_cont
-        
+	
 /* Traced system call support */
 syscall_dotrace:
 	bl	.save_nvgprs
@@ -225,21 +207,69 @@ syscall_dotrace:
 	ld	r10,TI_FLAGS(r10)
 	b	syscall_dotrace_cont
 
-syscall_exit_trace:
-	std	r3,GPR3(r1)
-	bl	.save_nvgprs
+syscall_enosys:
+	li	r3,-ENOSYS
+	b	syscall_exit
+	
+syscall_exit_work:
+	/* If TIF_RESTOREALL is set, don't scribble on either r3 or ccr.
+	 If TIF_NOERROR is set, just save r3 as it is. */
+
+	andi.	r0,r9,_TIF_RESTOREALL
+	bne-	2f
+	cmpld	r3,r11		/* r10 is -LAST_ERRNO */
+	blt+	1f
+	andi.	r0,r9,_TIF_NOERROR
+	bne-	1f
+	ld	r5,_CCR(r1)
+	neg	r3,r3
+	oris	r5,r5,0x1000	/* Set SO bit in CR */
+	std	r5,_CCR(r1)
+1:	std	r3,GPR3(r1)
+2:	andi.	r0,r9,(_TIF_PERSYSCALL_MASK)
+	beq	4f
+
+	/* Clear per-syscall TIF flags if any are set, but _leave_
+	_TIF_SAVE_NVGPRS set in r9 since we haven't dealt with that
+	yet.  */
+
+	li	r11,_TIF_PERSYSCALL_MASK
+	addi	r12,r12,TI_FLAGS
+3:	ldarx	r10,0,r12
+	andc	r10,r10,r11
+	stdcx.	r10,0,r12
+	bne-	3b
+	subi	r12,r12,TI_FLAGS
+	
+4:	bl	.save_nvgprs
+	/* Anything else left to do? */
+	andi.	r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_SAVE_NVGPRS)
+	beq	.ret_from_except_lite
+
+	/* Re-enable interrupts */
+	mfmsr	r10
+	ori	r10,r10,MSR_EE
+	mtmsrd	r10,1
+
+	andi.	r0,r9,_TIF_SAVE_NVGPRS
+	bne	save_user_nvgprs
+
+	/* If tracing, re-enable interrupts and do it */
+save_user_nvgprs_cont:	
+	andi.	r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP)
+	beq	5f
+	
 	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	.do_syscall_trace_leave
 	REST_NVGPRS(r1)
-	ld	r3,GPR3(r1)
-	ld	r5,_CCR(r1)
 	clrrdi	r12,r1,THREAD_SHIFT
-	b	syscall_exit_trace_cont
 
-/* Stuff to do on exit from a system call. */
-syscall_exit_work:
-	std	r3,GPR3(r1)
-	std	r5,_CCR(r1)
+	/* Disable interrupts again and handle other work if any */
+5:	mfmsr	r10
+	rldicl	r10,r10,48,1
+	rotldi	r10,r10,16
+	mtmsrd	r10,1
+
 	b	.ret_from_except_lite
 
 /* Save non-volatile GPRs, if not already saved. */
@@ -252,6 +282,52 @@ _GLOBAL(save_nvgprs)
 	std	r0,_TRAP(r1)
 	blr
 
+
+save_user_nvgprs:
+	ld	r10,TI_SIGFRAME(r12)
+	andi.	r0,r9,_TIF_32BIT
+	beq-	save_user_nvgprs_64
+
+	/* 32-bit save to userspace */
+
+.macro savewords start, end
+  1:	stw \start,4*(\start)(r10)
+	.section __ex_table,"a"
+	.align	3
+	.llong	1b,save_user_nvgprs_fault
+	.previous
+	.if \end - \start
+	savewords "(\start+1)",\end
+	.endif
+.endm	
+	savewords 14,31
+	b	save_user_nvgprs_cont
+
+save_user_nvgprs_64:
+	/* 64-bit save to userspace */
+
+.macro savelongs start, end
+  1:	std \start,8*(\start)(r10)
+	.section __ex_table,"a"
+	.align	3
+	.llong	1b,save_user_nvgprs_fault
+	.previous
+	.if \end - \start
+	savelongs "(\start+1)",\end
+	.endif
+.endm	
+	savelongs 14,31
+	b	save_user_nvgprs_cont
+
+save_user_nvgprs_fault:
+	li	r3,11		/* SIGSEGV */
+	ld	r4,TI_TASK(r12)
+	bl	.force_sigsegv
+
+	clrrdi	r12,r1,THREAD_SHIFT
+	ld	r9,TI_FLAGS(r12)
+	b	save_user_nvgprs_cont
+	
 /*
  * The sigsuspend and rt_sigsuspend system calls can call do_signal
  * and thus put the process into the stopped state where we might
@@ -260,35 +336,6 @@ _GLOBAL(save_nvgprs)
  * the C code.  Similarly, fork, vfork and clone need the full
  * register state on the stack so that it can be copied to the child.
  */
-_GLOBAL(ppc32_sigsuspend)
-	bl	.save_nvgprs
-	bl	.compat_sys_sigsuspend
-	b	70f
-
-_GLOBAL(ppc64_rt_sigsuspend)
-	bl	.save_nvgprs
-	bl	.sys_rt_sigsuspend
-	b	70f
-
-_GLOBAL(ppc32_rt_sigsuspend)
-	bl	.save_nvgprs
-	bl	.compat_sys_rt_sigsuspend
-70:	cmpdi	0,r3,0
-	/* If it returned an error, we need to return via syscall_exit to set
-	   the SO bit in cr0 and potentially stop for ptrace. */
-	bne	syscall_exit
-	/* If sigsuspend() returns zero, we are going into a signal handler. We
-	   may need to call audit_syscall_exit() to mark the exit from sigsuspend() */
-#ifdef CONFIG_AUDITSYSCALL
-	ld	r3,PACACURRENT(r13)
-	ld	r4,AUDITCONTEXT(r3)
-	cmpdi	0,r4,0
-	beq	.ret_from_except	/* No audit_context: Leave immediately. */
-	li	r4, 2			/* AUDITSC_FAILURE */
-	li	r5,-4			/* It's always -EINTR */
-	bl	.audit_syscall_exit
-#endif
-	b	.ret_from_except
 
 _GLOBAL(ppc_fork)
 	bl	.save_nvgprs
@@ -305,37 +352,6 @@ _GLOBAL(ppc_clone)
 	bl	.sys_clone
 	b	syscall_exit
 
-_GLOBAL(ppc32_swapcontext)
-	bl	.save_nvgprs
-	bl	.compat_sys_swapcontext
-	b	80f
-	
-_GLOBAL(ppc64_swapcontext)
-	bl	.save_nvgprs
-	bl	.sys_swapcontext
-	b	80f
-
-_GLOBAL(ppc32_sigreturn)
-	bl	.compat_sys_sigreturn
-	b	80f
-
-_GLOBAL(ppc32_rt_sigreturn)
-	bl	.compat_sys_rt_sigreturn
-	b	80f
-
-_GLOBAL(ppc64_rt_sigreturn)
-	bl	.sys_rt_sigreturn
-
-80:	cmpdi	0,r3,0
-	blt	syscall_exit
-	clrrdi	r4,r1,THREAD_SHIFT
-	ld	r4,TI_FLAGS(r4)
-	andi.	r4,r4,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP)
-	beq+	81f
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	bl	.do_syscall_trace_leave
-81:	b	.ret_from_except
-
 _GLOBAL(ret_from_fork)
 	bl	.schedule_tail
 	REST_NVGPRS(r1)
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index 5a2eba6..c9d0275 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -76,7 +76,6 @@
  * registers from *regs.  This is what we need
  * to do when a signal has been delivered.
  */
-#define sigreturn_exit(regs)	return 0
 
 #define GP_REGS_SIZE	min(sizeof(elf_gregset_t32), sizeof(struct pt_regs32))
 #undef __SIGNAL_FRAMESIZE
@@ -156,9 +155,17 @@ static inline int save_general_regs(stru
 	elf_greg_t64 *gregs = (elf_greg_t64 *)regs;
 	int i;
 
-	for (i = 0; i <= PT_RESULT; i ++)
+	if (!FULL_REGS(regs)) {
+		set_thread_flag(TIF_SAVE_NVGPRS);
+		current_thread_info()->nvgprs_frame = frame->mc_gregs;
+	}
+
+	for (i = 0; i <= PT_RESULT; i ++) {
+		if (i == 14 && !FULL_REGS(regs))
+			i = 32;
 		if (__put_user((unsigned int)gregs[i], &frame->mc_gregs[i]))
 			return -EFAULT;
+	}
 	return 0;
 }
 
@@ -179,8 +186,6 @@ static inline int restore_general_regs(s
 
 #else /* CONFIG_PPC64 */
 
-extern void sigreturn_exit(struct pt_regs *);
-
 #define GP_REGS_SIZE	min(sizeof(elf_gregset_t), sizeof(struct pt_regs))
 
 static inline int put_sigset_t(sigset_t __user *uset, sigset_t *set)
@@ -219,5 +219,14 @@ static inline int get_old_sigaction(stru
 static inline int save_general_regs(struct pt_regs *regs,
 		struct mcontext __user *frame)
 {
+	if (!FULL_REGS(regs)) {
+		/* Zero out the unsaved GPRs to avoid information
+		   leak, and set TIF_SAVE_NVGPRS to ensure that the
+		   registers do actually get saved later. */
+		memset(&regs->gpr[14], 0, 18 * sizeof(unsigned long));
+		current_thread_info()->nvgprs_frame = &frame->mc_gregs;
+		set_thread_flag(TIF_SAVE_NVGPRS);
+	}
+
 	return __copy_to_user(&frame->mc_gregs, regs, GP_REGS_SIZE);
 }
@@ -256,8 +261,10 @@ long sys_sigsuspend(old_sigset_t mask, i
 	while (1) {
 		current->state = TASK_INTERRUPTIBLE;
 		schedule();
-		if (do_signal(&saveset, regs))
-			sigreturn_exit(regs);
+		if (do_signal(&saveset, regs)) {
+			set_thread_flag(TIF_RESTOREALL);
+			return 0;
+		}
 	}
 }
 
@@ -292,8 +299,10 @@ long sys_rt_sigsuspend(
 	while (1) {
 		current->state = TASK_INTERRUPTIBLE;
 		schedule();
-		if (do_signal(&saveset, regs))
-			sigreturn_exit(regs);
+		if (do_signal(&saveset, regs)) {
+			set_thread_flag(TIF_RESTOREALL);
+			return 0;
+		}
 	}
 }
 
@@ -391,9 +400,6 @@ struct rt_sigframe {
 static int save_user_regs(struct pt_regs *regs, struct mcontext __user *frame,
 		int sigret)
 {
-#ifdef CONFIG_PPC32
-	CHECK_FULL_REGS(regs);
-#endif
 	/* Make sure floating point registers are stored in regs */
 	flush_fp_to_thread(current);
 
@@ -828,12 +834,6 @@ static int handle_rt_signal(unsigned lon
 	regs->gpr[6] = (unsigned long) rt_sf;
 	regs->nip = (unsigned long) ka->sa.sa_handler;
 	regs->trap = 0;
-#ifdef CONFIG_PPC64
-	regs->result = 0;
-
-	if (test_thread_flag(TIF_SINGLESTEP))
-		ptrace_notify(SIGTRAP);
-#endif
 	return 1;
 
 badframe:
@@ -911,8 +911,8 @@ long sys_swapcontext(struct ucontext __u
 	 */
 	if (do_setcontext(new_ctx, regs, 0))
 		do_exit(SIGSEGV);
-	sigreturn_exit(regs);
-	/* doesn't actually return back to here */
+
+	set_thread_flag(TIF_RESTOREALL);
 	return 0;
 }
 
@@ -945,12 +945,11 @@ long sys_rt_sigreturn(int r3, int r4, in
 	 * nobody does any...
 	 */
 	compat_sys_sigaltstack((u32)(u64)&rt_sf->uc.uc_stack, 0, 0, 0, 0, 0, regs);
-	return (int)regs->result;
 #else
 	do_sigaltstack(&rt_sf->uc.uc_stack, NULL, regs->gpr[1]);
-	sigreturn_exit(regs);		/* doesn't return here */
-	return 0;
 #endif
+	set_thread_flag(TIF_RESTOREALL);
+	return 0;
 
  bad:
 	force_sig(SIGSEGV, current);
@@ -1041,9 +1040,7 @@ int sys_debug_setcontext(struct ucontext
 	 */
 	do_sigaltstack(&ctx->uc_stack, NULL, regs->gpr[1]);
 
-	sigreturn_exit(regs);
-	/* doesn't actually return back to here */
-
+	set_thread_flag(TIF_RESTOREALL);
  out:
 	return 0;
 }
@@ -1107,12 +1104,6 @@ static int handle_signal(unsigned long s
 	regs->gpr[4] = (unsigned long) sc;
 	regs->nip = (unsigned long) ka->sa.sa_handler;
 	regs->trap = 0;
-#ifdef CONFIG_PPC64
-	regs->result = 0;
-
-	if (test_thread_flag(TIF_SINGLESTEP))
-		ptrace_notify(SIGTRAP);
-#endif
 
 	return 1;
 
@@ -1160,12 +1151,8 @@ long sys_sigreturn(int r3, int r4, int r
 	    || restore_user_regs(regs, sr, 1))
 		goto badframe;
 
-#ifdef CONFIG_PPC64
-	return (int)regs->result;
-#else
-	sigreturn_exit(regs);		/* doesn't return */
+	set_thread_flag(TIF_RESTOREALL);
 	return 0;
-#endif
 
 badframe:
 	force_sig(SIGSEGV, current);
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 1decf27..5462bef 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -96,8 +96,10 @@ long sys_rt_sigsuspend(sigset_t __user *
 	while (1) {
 		current->state = TASK_INTERRUPTIBLE;
 		schedule();
-		if (do_signal(&saveset, regs))
+		if (do_signal(&saveset, regs)) {
+			set_thread_flag(TIF_RESTOREALL);
 			return 0;
+		}
 	}
 }
 
@@ -152,6 +154,14 @@ static long setup_sigcontext(struct sigc
 	err |= __put_user(0, &sc->v_regs);
 #endif /* CONFIG_ALTIVEC */
 	err |= __put_user(&sc->gp_regs, &sc->regs);
+	if (!FULL_REGS(regs)) {
+		/* Zero out the unsaved GPRs to avoid information
+		   leak, and set TIF_SAVE_NVGPRS to ensure that the
+		   registers do actually get saved later. */
+		memset(&regs->gpr[14], 0, 18 * sizeof(unsigned long));
+		set_thread_flag(TIF_SAVE_NVGPRS);
+		current_thread_info()->nvgprs_frame = &sc->gp_regs;
+	}
 	err |= __copy_to_user(&sc->gp_regs, regs, GP_REGS_SIZE);
 	err |= __copy_to_user(&sc->fp_regs, &current->thread.fpr, FP_REGS_SIZE);
 	err |= __put_user(signr, &sc->signal);
@@ -340,6 +350,7 @@ int sys_swapcontext(struct ucontext __us
 		do_exit(SIGSEGV);
 
 	/* This returns like rt_sigreturn */
+	set_thread_flag(TIF_RESTOREALL);
 	return 0;
 }
 
@@ -372,7 +383,8 @@ int sys_rt_sigreturn(unsigned long r3, u
 	 */
 	do_sigaltstack(&uc->uc_stack, NULL, regs->gpr[1]);
 
-	return regs->result;
+	set_thread_flag(TIF_RESTOREALL);
+	return 0;
 
 badframe:
 #if DEBUG_SIG
@@ -454,9 +466,6 @@ static int setup_rt_frame(int signr, str
 	if (err)
 		goto badframe;
 
-	if (test_thread_flag(TIF_SINGLESTEP))
-		ptrace_notify(SIGTRAP);
-
 	return 1;
 
 badframe:
@@ -502,6 +511,8 @@ static inline void syscall_restart(struc
 		 * we only get here if there is a handler, we dont restart.
 		 */
 		regs->result = -EINTR;
+		regs->gpr[3] = EINTR;
+		regs->ccr |= 0x10000000;
 		break;
 	case -ERESTARTSYS:
 		/* ERESTARTSYS means to restart the syscall if there is no
@@ -509,6 +520,8 @@ static inline void syscall_restart(struc
 		 */
 		if (!(ka->sa.sa_flags & SA_RESTART)) {
 			regs->result = -EINTR;
+			regs->gpr[3] = EINTR;
+			regs->ccr |= 0x10000000;
 			break;
 		}
 		/* fallthrough */
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S
index 65eaea9..4bb3650 100644
--- a/arch/powerpc/kernel/systbl.S
+++ b/arch/powerpc/kernel/systbl.S
@@ -113,7 +113,7 @@ SYSCALL(sgetmask)
 COMPAT_SYS(ssetmask)
 SYSCALL(setreuid)
 SYSCALL(setregid)
-SYSX(sys_ni_syscall,ppc32_sigsuspend,ppc_sigsuspend)
+SYS32ONLY(sigsuspend)
 COMPAT_SYS(sigpending)
 COMPAT_SYS(sethostname)
 COMPAT_SYS(setrlimit)
@@ -160,7 +160,7 @@ SYSCALL(swapoff)
 COMPAT_SYS(sysinfo)
 COMPAT_SYS(ipc)
 SYSCALL(fsync)
-SYSX(sys_ni_syscall,ppc32_sigreturn,sys_sigreturn)
+SYS32ONLY(sigreturn)
 PPC_SYS(clone)
 COMPAT_SYS(setdomainname)
 PPC_SYS(newuname)
@@ -213,13 +213,13 @@ COMPAT_SYS(nfsservctl)
 SYSCALL(setresgid)
 SYSCALL(getresgid)
 COMPAT_SYS(prctl)
-SYSX(ppc64_rt_sigreturn,ppc32_rt_sigreturn,sys_rt_sigreturn)
+COMPAT_SYS(rt_sigreturn)
 COMPAT_SYS(rt_sigaction)
 COMPAT_SYS(rt_sigprocmask)
 COMPAT_SYS(rt_sigpending)
 COMPAT_SYS(rt_sigtimedwait)
 COMPAT_SYS(rt_sigqueueinfo)
-SYSX(ppc64_rt_sigsuspend,ppc32_rt_sigsuspend,ppc_rt_sigsuspend)
+COMPAT_SYS(rt_sigsuspend)
 COMPAT_SYS(pread64)
 COMPAT_SYS(pwrite64)
 SYSCALL(chown)
@@ -290,7 +290,7 @@ COMPAT_SYS(clock_settime)
 COMPAT_SYS(clock_gettime)
 COMPAT_SYS(clock_getres)
 COMPAT_SYS(clock_nanosleep)
-SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext)
+COMPAT_SYS(swapcontext)
 COMPAT_SYS(tgkill)
 COMPAT_SYS(utimes)
 COMPAT_SYS(statfs64)
diff --git a/include/asm-powerpc/ptrace.h b/include/asm-powerpc/ptrace.h
index 1f7ecdb..9c550b3 100644
--- a/include/asm-powerpc/ptrace.h
+++ b/include/asm-powerpc/ptrace.h
@@ -87,7 +87,7 @@ extern unsigned long profile_pc(struct p
 
 #define force_successful_syscall_return()   \
 	do { \
-		current_thread_info()->syscall_noerror = 1; \
+		set_thread_flag(TIF_NOERROR); \
 	} while(0)
 
 /*
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h
index e525f49..ac1e80e 100644
--- a/include/asm-powerpc/thread_info.h
+++ b/include/asm-powerpc/thread_info.h
@@ -37,8 +37,7 @@ struct thread_info {
 	int		preempt_count;		/* 0 => preemptable,
 						   <0 => BUG */
 	struct restart_block restart_block;
-	/* set by force_successful_syscall_return */
-	unsigned char	syscall_noerror;
+	void *nvgprs_frame;
 	/* low level flags - has atomic operations done on it */
 	unsigned long	flags ____cacheline_aligned_in_smp;
 };
@@ -123,6 +122,9 @@ static inline struct thread_info *curren
 #define TIF_SINGLESTEP		9	/* singlestepping active */
 #define TIF_MEMDIE		10
 #define TIF_SECCOMP		11	/* secure computing */
+#define TIF_RESTOREALL		12	/* Restore all regs (implies NOERROR) */
+#define TIF_SAVE_NVGPRS		13	/* Save r14-r31 in signal frame */
+#define TIF_NOERROR		14	/* Force successful syscall return */
 
 /* as above, but as bit values */
 #define _TIF_SYSCALL_TRACE	(1<<TIF_SYSCALL_TRACE)
@@ -136,10 +138,14 @@ static inline struct thread_info *curren
 #define _TIF_SYSCALL_AUDIT	(1<<TIF_SYSCALL_AUDIT)
 #define _TIF_SINGLESTEP		(1<<TIF_SINGLESTEP)
 #define _TIF_SECCOMP		(1<<TIF_SECCOMP)
+#define _TIF_RESTOREALL		(1<<TIF_RESTOREALL)
+#define _TIF_SAVE_NVGPRS	(1<<TIF_SAVE_NVGPRS)
+#define _TIF_NOERROR		(1<<TIF_NOERROR)
 #define _TIF_SYSCALL_T_OR_A	(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP)
 
 #define _TIF_USER_WORK_MASK	(_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \
-				 _TIF_NEED_RESCHED)
+				 _TIF_NEED_RESCHED | _TIF_RESTOREALL)
+#define _TIF_PERSYSCALL_MASK	(_TIF_RESTOREALL|_TIF_NOERROR|_TIF_SAVE_NVGPRS)
 
 #endif /* __KERNEL__ */
 


--- NEW FILE linux-2.6.15.tar.bz2.sign ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: See http://www.kernel.org/signature.html for info

iD8DBQBDuglHyGugalF9Dw4RAiIPAKCT5NvV2+aomkNCE3v8M2P10V7xdQCgjyeh
aDrnyZ0H/GvnVRLmUrUUbV8=
=lIis
-----END PGP SIGNATURE-----


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/.cvsignore,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -r1.169 -r1.170
--- .cvsignore	27 Dec 2005 23:35:22 -0000	1.169
+++ .cvsignore	6 Jan 2006 05:42:17 -0000	1.170
@@ -1,5 +1,4 @@
 kernel-2.6.*.config
 temp-*
-kernel-2.6.14
-linux-2.6.14.tar.bz2
-patch-2.6.14.5.bz2
+kernel-2.6.15
+linux-2.6.15.tar.bz2


Index: Makefile.config
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/Makefile.config,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- Makefile.config	29 Sep 2005 23:04:13 -0000	1.26
+++ Makefile.config	6 Jan 2006 05:42:17 -0000	1.27
@@ -15,7 +15,7 @@
 	$(CFG)-i686-xen0.config $(CFG)-i686-xenU.config \
 	$(CFG)-x86_64-xen0.config $(CFG)-x86_64-xenU.config
 
-PLATFORMS	= x86 x86_64 ppc64 s390 ppc ia64 # sparc sparc64
+PLATFORMS	= x86 x86_64 powerpc powerpc32 powerpc64 s390 ia64 # sparc sparc64
 TEMPFILES	= $(addprefix temp-, $(addsuffix -generic, $(PLATFORMS)))
 
 configs: $(CONFIGFILES)
@@ -43,13 +43,16 @@
 temp-sparc64-generic: configs/config-sparc64-generic temp-generic
 	perl scripts/merge.pl $^  > $@
 
-temp-ppc64-generic: configs/config-ppc64-generic temp-generic
+temp-powerpc-generic: configs/config-powerpc-generic temp-generic
 	perl scripts/merge.pl $^  > $@
 
-temp-s390-generic: configs/config-s390-generic temp-generic
-	perl scripts/merge.pl $^ > $@
+temp-powerpc64-generic: configs/config-powerpc64-generic temp-powerpc-generic
+	perl scripts/merge.pl $^  > $@
 
-temp-ppc-generic: configs/config-ppc-generic temp-generic
+temp-powerpc32-generic: configs/config-powerpc32-generic temp-powerpc-generic
+	perl scripts/merge.pl $^  > $@
+
+temp-s390-generic: configs/config-s390-generic temp-generic
 	perl scripts/merge.pl $^ > $@
 
 temp-ia64-generic: configs/config-ia64-generic temp-generic
@@ -91,11 +94,11 @@
 kernel-$(VERSION)-sparc64.config: configs/config-sparc64 temp-sparc-generic 
 	perl scripts/merge.pl $^ sparc64 > $@
 
-kernel-$(VERSION)-ppc64.config: configs/config-ppc64 temp-ppc64-generic
-	perl scripts/merge.pl $^ ppc64 > $@
+kernel-$(VERSION)-ppc64.config: configs/config-powerpc64 temp-powerpc64-generic
+	perl scripts/merge.pl $^ powerpc > $@
 
-kernel-$(VERSION)-ppc64iseries.config: configs/config-ppc64-iseries temp-ppc64-generic
-	perl scripts/merge.pl $^ ppc64 > $@
+kernel-$(VERSION)-ppc64iseries.config: configs/config-powerpc64-iseries temp-powerpc64-generic
+	perl scripts/merge.pl $^ powerpc > $@
 
 kernel-$(VERSION)-s390.config: configs/config-s390 temp-s390-generic
 	perl scripts/merge.pl $^ s390 > $@
@@ -103,11 +106,11 @@
 kernel-$(VERSION)-s390x.config: configs/config-s390x temp-s390-generic
 	perl scripts/merge.pl $^ s390 > $@
 
-kernel-$(VERSION)-ppc.config: configs/config-ppc-pmac temp-ppc-generic
-	perl scripts/merge.pl $^ ppc > $@
+kernel-$(VERSION)-ppc.config: /dev/null temp-powerpc32-generic
+	perl scripts/merge.pl $^ powerpc > $@
 
-kernel-$(VERSION)-ppc-smp.config: configs/config-ppc-pmac-smp temp-ppc-generic
-	perl scripts/merge.pl $^ ppc > $@
+kernel-$(VERSION)-ppc-smp.config: configs/config-powerpc32-smp temp-powerpc32-generic
+	perl scripts/merge.pl $^ powerpc > $@
 
 kernel-$(VERSION)-ia64.config: configs/config-ia64 temp-ia64-generic
 	perl scripts/merge.pl $^ ia64 > $@


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1554
retrieving revision 1.1555
diff -u -r1.1554 -r1.1555
--- kernel-2.6.spec	6 Jan 2006 03:08:40 -0000	1.1554
+++ kernel-2.6.spec	6 Jan 2006 05:42:17 -0000	1.1555
@@ -16,13 +16,14 @@
 # that the kernel isn't the stock distribution kernel, for example by
 # adding some text to the end of the version number.
 #
-%define sublevel 14
+%define sublevel 15
 %define kversion 2.6.%{sublevel}
 %define rpmversion 2.6.%{sublevel}
 %define rhbsys  %([ -r /etc/beehive-root -o -n "%{?__beehive_build}" ] && echo || echo .`whoami`)
 %define release %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})_FC4%{rhbsys}
 %define signmodules 0
 %define make_target bzImage
+%define kernel_image arch/$Arch/boot/bzImage
 
 %define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
 
@@ -67,7 +68,8 @@
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ppc64*.config
 %define image_install_path boot
 %define signmodules 1
-%define make_target bzImage
+%define make_target vmlinux
+%define kernel_image vmlinux
 %endif
 
 %ifarch ppc64iseries
@@ -75,7 +77,8 @@
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ppc64*.config
 %define image_install_path boot
 %define signmodules 1
-%define make_target bzImage
+%define make_target vmlinux
+%define kernel_image vmlinux
 %endif
 
 %ifarch s390
@@ -101,8 +104,9 @@
 
 %ifarch ppc
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ppc*.config
-%define buildsmp 1
 %define image_install_path boot
+%define make_target vmlinux
+%define kernel_image vmlinux
 %endif
 
 %ifarch ia64
@@ -133,7 +137,7 @@
 
 #
 # Several packages had bugs in them that became obvious when the NPTL
-# threading code got integrated. 
+# threading code got integrated.
 #
 %define nptl_conflicts SysVinit < 2.84-13, pam < 0.75-48, vixie-cron < 3.0.1-73, privoxy < 3.0.0-8, spamassassin < 2.44-4.8.x,  cups < 1.1.17-13
 
@@ -202,8 +206,7 @@
 #
 # Patches 0 through 100 are meant for core subsystem upgrades
 #
-Patch1: patch-2.6.14.5.bz2
-Patch2: linux-2.6.15-various-fixes.patch
+#Patch1: patch-2.6.15.1.bz2
 
 # Patches 100 through 500 are meant for architecture patches
 Patch100: linux-2.6-bzimage.patch
@@ -213,13 +216,19 @@
 Patch200: linux-2.6-x86-tune-p4.patch
 Patch201: linux-2.6-x86-apic-off-by-default.patch
 Patch202: linux-2.6-x86-vga-vidfail.patch
-Patch203: linux-2.6-x86-hp-reboot.patch
-Patch204: linux-2.6-x86_64-ati-apic-timer.patch
+Patch203: linux-2.6.14-intel-cache-build.patch
+Patch204: linux-2.6-x86_64-silence-up-apic-errors.patch
+Patch205: linux-2.6-x86_64-disable-hotplug-guessing.patch
 
 # 300 - 399   ppc(64)
-Patch300: linux-2.6-ppc64-build.patch
-Patch301: linux-2.6-ppc64-eeh-panic.patch
-Patch302: linux-2.6-serial-of.patch
+Patch300: linux-2.6.15-default-powerpc.patch
+Patch301: linux-2.6-serial-of.patch
+Patch302: linux-2.6.15-rc1-ppc64-syscallpath.patch
+Patch303: linux-2.6.15-mv643xx-fixes.patch
+Patch304: linux-2.6-hvc-console.patch
+Patch305: linux-2.6-hvc-rtas-console.patch
+Patch306: linux-2.6-ppc-rtas-check.patch
+Patch307: linux-2.6-powerpc-parport.patch
 
 # 400 - 499   ia64
 # 500 - 599   s390(x)
@@ -236,8 +245,7 @@
 #
 Patch800: linux-2.6-build-nonintconfig.patch
 Patch801: linux-2.6-build-userspace-headers-warning.patch
-Patch802: linux-2.6-build-qconfig-qt-lib64.patch
-Patch803: linux-2.6-build-reference-discarded-opd.patch
+Patch802: linux-2.6-build-reference-discarded-opd.patch
 
 # Exec-shield.
 Patch810: linux-2.6-execshield.patch
@@ -273,7 +281,12 @@
 Patch1020: linux-2.6-debug-sleep-in-irq-warning.patch
 Patch1021: linux-2.6-debug-reference-discarded-return-result.patch
 Patch1022: linux-2.6-debug-panic-stackdump.patch
-Patch1023: linux-2.6-debug-spinlock-emerg.patch
+Patch1023: linux-2.6-debug-taint-proprietary-helpers.patch
+Patch1024: linux-2.6-debug-dual-line-backtrace.patch
+Patch1025: linux-2.6-debug-sysfs-crash-debugging.patch
+Patch1026: linux-2.6-debug-no-quiet.patch
+Patch1027: linux-2.6-debug-slab-leak-detector.patch
+Patch1028: linux-2.6-debug-oops-pause.patch
 
 # Restrict /dev/mem usage.
 Patch1050: linux-2.6-devmem.patch
@@ -286,29 +299,20 @@
 Patch1070: linux-2.6-sleepon.patch
 
 # Tweak some defaults.
-Patch1080: linux-2.6-default-elevator.patch
 Patch1081: linux-2.6-max-symlinks.patch
-Patch1082: linux-2.6-optimise-for-size.patch
 
 # SCSI bits.
 Patch1101: linux-2.6-scsi-advansys-enabler.patch
 Patch1102: linux-2.6-scsi-megaraid-legacy.patch
 Patch1103: linux-2.6-scsi-advansys-pcitable.patch
-Patch1104: linux-2.6-scsi-runqueue-oops.patch
 
 # NFS bits.
 Patch1200: linux-2.6-NFSD-non-null-getxattr.patch
 Patch1201: linux-2.6-NFSD-ctlbits.patch
-Patch1202: linux-2.6-NFSD-locking-fix.patch
 Patch1203: linux-2.6-NFSD-badness.patch
 
 # NIC driver updates
 Patch1301: linux-2.6-net-sundance-ip100A.patch
-Patch1302: linux-2.6-net-atm-lanai-nodev-rmmod.patch
-Patch1303: linux-2.6-net-acenic-use-after-free.patch
-Patch1304: linux-2.6-net-sk98lin-vpd.patch
-
-Patch1400: linux-2.6-pcmcia-disable-warning.patch
 
 # Netdump and Diskdump bits.
 Patch1500: linux-2.6-crashdump-common.patch
@@ -321,41 +325,24 @@
 # Misc bits.
 Patch1600: linux-2.6-procfs-i_nlink-miscalculate.patch
 Patch1610: linux-2.6-atkbd-dell-multimedia.patch
-Patch1620: linux-2.6-mcs-canonicalise-getxattr.patch
 Patch1630: linux-2.6-module_version.patch
-Patch1650: linux-2.6-cx88-silence-debug.patch
-Patch1660: linux-2.6-swsusp-nofreeze.patch
-Patch1670: linux-2.6-input-kill-stupid-messages.patch
-Patch1680: linux-2.6-input-usblegacy.patch
-Patch1690: linux-2.6-serial-tickle-nmi.patch
-Patch1700: linux-2.6-missing-exports.patch
-Patch1710: linux-2.6-radeon-backlight.patch
-Patch1720: linux-2.6-ide-tune-locking.patch
-Patch1730: linux-2.6-autofs-pathlookup.patch
-Patch1740: linux-2.6-alsa-maestro-hang.patch
-Patch1750: linux-2.6-8139too-suspend.patch
-Patch1751: linux-2.6-selinux-hush.patch
-Patch1753: linux-2.6-smsc-ircc2-pnp.patch
-Patch1754: linux-2.6-ide-scsi-check_condition.patch
-Patch1755: linux-2.6-usbhid-wireless-security-lock.patch
-Patch1756: linux-2.6-net-rtnetlink-infinite-loop.patch
-Patch1757: linux-2.6-w1-hush-debug.patch
-Patch1758: linux-2.6-pwc-powerup-by-default.patch
-Patch1759: linux-2.6-kauditd-suspend.patch
-Patch1760: linux-2.6-firmware-timeout.patch
-Patch1761: linux-2.6-suspend-mxcsr.patch
-Patch1771: linux-2.6-sata-promise-pata-ports.patch
-Patch1782: linux-2.6-selinux-mls-compat.patch
-Patch1783: linux-2.6-usbhid-wacom.patch
-Patch1790: linux-2.6-block-reduce-stack.patch
+Patch1640: linux-2.6-swsusp-nofreeze.patch
+Patch1650: linux-2.6-input-kill-stupid-messages.patch
+Patch1660: linux-2.6-input-usblegacy.patch
+Patch1670: linux-2.6-serial-tickle-nmi.patch
+Patch1680: linux-2.6-missing-exports.patch
+Patch1690: linux-2.6-radeon-backlight.patch
+Patch1700: linux-2.6-ide-tune-locking.patch
+Patch1710: linux-2.6-autofs-pathlookup.patch
+Patch1720: linux-2.6-selinux-hush.patch
+Patch1730: linux-2.6-ide-cd-shutup.patch
+Patch1750: linux-2.6-ub.patch
+Patch1760: linux-2.6-sata-enable-atapi-by-default.patch
+Patch1770: linux-2.6-valid-ether-addr.patch
+Patch1780: linux-2.6-firmware-loader-timeout.patch
 
 # ACPI patches.
-Patch1800: linux-2.6-acpi-enable-ecburst.patch
-Patch1801: linux-2.6-acpi-silence-cutoff.patch
-Patch1802: linux-2.6-acpi-thinkpad-c2c3.patch
-Patch1803: linux-2.6-acpi-20050902.patch
-Patch1804: linux-2.6-acpi-ht.patch
-Patch1805: linux-2.6-acpi-owner_id-limit.patch
+Patch1800: linux-2.6-acpi-thinkpad-c2c3.patch
 
 # Warn about usage of various obsolete functionality that may go away.
 Patch1900: linux-2.6-obsolete-idescsi-warning.patch
@@ -364,20 +351,18 @@
 # no external module should use these symbols.
 Patch1910: linux-2.6-unexport-symbols.patch
 
-
 # VM bits.
 Patch2000: linux-2.6-vm-oomkiller-debugging.patch
 Patch2001: linux-2.6-vm-silence-atomic-alloc-failures.patch
-Patch2003: linux-2.6-vm-clear-unreclaimable.patch
-Patch2004: linux-2.6-vm-debug.patch
-
+Patch2002: linux-2.6-vm-debug.patch
 
 #
 # 10000 to 20000 is for stuff that has to come last due to the
 # amount of drivers they touch. But only these should go here. 
 # Not patches you're too lazy for to put in the proper place.
 #
-Patch10000: linux-2.6-compile-fixes.patch
+
+Patch10004: linux-2.6-compile-fixes.patch
 
 # END OF PATCH DEFINITIONS
 
@@ -528,24 +513,24 @@
 This package provides kernel headers and makefiles sufficient to build modules
 against the kernel package.
 
-
-
 %prep
 if [ ! -d kernel-%{kversion}/vanilla ]; then
- # Ok, first time we do a make prep.
+  # Ok, first time we do a make prep.
 %setup -q -n %{name}-%{version} -c
- rm -f pax_global_header
- mv linux-%{kversion} vanilla
+  rm -f pax_global_header
+  mv linux-%{kversion} vanilla
 else
- # We already have a vanilla dir.
- cd kernel-%{kversion}
- rm -rf linux-%{kversion}
+  # We already have a vanilla dir.
+  cd kernel-%{kversion}
+  mv linux-%{kversion} deleteme
+  rm -rf deleteme &
 fi
 cp -rl vanilla linux-%{kversion}
 cd linux-%{kversion}
 
-%patch1 -p1
-%patch2 -p1
+# Update to latest upstream.
+#%patch1 -p1
+#%patch2 -p1
 
 #
 # Patches 10 through 100 are meant for core subsystem upgrades
@@ -566,27 +551,32 @@
 # Compile 686 kernels tuned for Pentium4.
 %patch200 -p1
 # Keep UP APIC off by default.
-#%patch201 -p1
+%patch201 -p1
 # add vidfail capability; 
 # without this patch specifying a framebuffer on the kernel prompt would
 # make the boot stop if there's no supported framebuffer device; this is bad
 # for the installer cd that wants to automatically fall back to textmode
 # in that case
 %patch202 -p1
-# Reboot through the BIOS on newer HP laptops
+# exitfunc called from initfunc.
 %patch203 -p1
-# Workaround ATI 'clock going too fast' bug
+# Suppress APIC errors on UP x86-64.
 %patch204 -p1
+# Disable guessing of how many hotplug cpus to add.
+%patch205 -p1
 
 # 
 # ppc64
 #
 
-# Patch for Kconfig and Makefile build issues
 %patch300 -p1
 %patch301 -p1
-# Don't probe serial ports if they don't exist
 %patch302 -p1
+%patch303 -p1
+%patch304 -p1
+%patch305 -p1
+%patch306 -p1
+%patch307 -p1
 
 #
 # Xen
@@ -609,10 +599,8 @@
 %patch800 -p1
 # Warn if someone tries to build userspace using kernel headers
 %patch801 -p1
-# Fix qt config tool compilation on 64bit.
-%patch802 -p1
 # reference_discarded additions.
-%patch803 -p1
+%patch802 -p1
 
 # Exec shield 
 %patch810 -p1
@@ -644,7 +632,7 @@
 %patch905 -p1
 
 # Tux
-#%patch910 -p1
+%patch910 -p1
 
 #
 # Patches 1000 to 5000 are reserved for bugfixes to drivers and filesystems
@@ -666,6 +654,11 @@
 %patch1021 -p1
 %patch1022 -p1
 %patch1023 -p1
+%patch1024 -p1
+%patch1025 -p1
+%patch1026 -p1
+%patch1027 -p1
+%patch1028 -p1
 
 #
 # Make /dev/mem a need-to-know function 
@@ -689,12 +682,8 @@
 %patch1070 -p1
 
 # Adjust some defaults.
-# Make CFQ default elevator again
-%patch1080 -p1
 # Bump up the number of recursive symlinks.
 %patch1081 -p1
-# Make optimise for size available without selecting CONFIG_EMBEDDED
-%patch1082 -p1
 
 #
 # SCSI Bits.
@@ -705,8 +694,6 @@
 %patch1102 -p1
 # Add a pci table to advansys driver.
 %patch1103 -p1
-# fix usb storage oops
-%patch1104 -p1
 
 #
 # Various upstream NFS/NFSD fixes.
@@ -714,23 +701,12 @@
 %patch1200 -p1
 # kNFSD: fixed '-p port' arg to rpc.nfsd and enables the defining proto versions and transports
 %patch1201 -p1
-# Fix badness in NFSD locking
-%patch1202 -p1
-# more NFS badness
+# Fix badness.
 %patch1203 -p1
 
 # NIC driver fixes.
 # New PCI ID for sundance driver.
 %patch1301 -p1
-# Fix rmmod lanai
-%patch1302 -p1
-# Acenic use after free
-%patch1303 -p1
-# sk98lin vpd fix
-%patch1304 -p1
-
-# disable pcmcia warnings
-%patch1400 -p1
 
 # netdump bits
 %patch1500 -p1
@@ -749,74 +725,40 @@
 %patch1600 -p1
 # Make multimedia buttons on Dell Inspiron 8200 work.
 %patch1610 -p1
-# Canonicalise getxattr results.
-%patch1620 -p1
 # Add missing MODULE_VERSION tags to some modules.
 %patch1630 -p1
-# Silence silly debug message in cx88. (#168931)
-%patch1650 -p1
 # Fix suspend to sbp devices. (166452)
-%patch1660 -p1
+%patch1640 -p1
 # The input layer spews crap no-one cares about.
-%patch1670 -p1
+%patch1650 -p1
 # usb legacy workaround.
-%patch1680 -p1
+%patch1660 -p1
 # Tickle the NMI whilst doing serial writes.
-%patch1690 -p1
+%patch1670 -p1
 # Missing EXPORT_SYMBOL's
-%patch1700 -p1
+%patch1680 -p1
 # Radeon on thinkpad backlight power-management goodness.
-%patch1710 -p1
+%patch1690 -p1
 # Fix IDE locking bug.
-%patch1720 -p1
+%patch1700 -p1
 # autofs4 looks up wrong path element when ghosting is enabled
+%patch1710 -p1
+# Silence some selinux messages.
+%patch1720 -p1
+# Silence noisy CD drive spew
 %patch1730 -p1
-# Fix maestro driver hangs
-%patch1740 -p1
-# 8139 suspend fix.
+# Enable USB storage,UB & libusual magick.
 %patch1750 -p1
-# Silence some SELinux msgs
-%patch1751 -p1
-# IRDA fix
-%patch1753 -p1
-# check condition in ide-scsi
-%patch1754 -p1
-# usbhid wireless security lock fix
-%patch1755 -p1
-# Fix infinite loop in rtnetlink
-%patch1756 -p1
-# silence w1 debug output
-%patch1757 -p1
-# power up pwc cameras by default
-%patch1758 -p1
-# stop kauditd from breaking suspend.
-%patch1759 -p1
-# Increase timeout on firmware loader.
+# Enable SATA ATAPI by default.
 %patch1760 -p1
-# Fix FPU corruption on return from S3
-%patch1761 -p1
-# Make PATA ports on Promise SATA work again.
-%patch1771 -p1
-# SELinux MLS compat.
-%patch1782 -p1
-# usbhid incorrectly claimed wacom penpartner tablet.
-%patch1783 -p1
-# Decrease stack usage in block layer
-%patch1790 -p1
+# 
+%patch1770 -p1
+# Increase timeout on firmware loader.
+%patch1780 -p1
 
 # ACPI patches.
-# Enable EC burst
-#%patch1800 -p1
-# Change printk level of cutoff msg.
-%patch1801 -p1
 # Blacklist another 'No C2/C3 states' Thinkpad R40e BIOS.
-%patch1802 -p1
-# update to 2.6.15 era acpi
-%patch1803 -p1
-# Fix HT slowdown issue
-%patch1804 -p1
-# Increase owner_id limit
-%patch1805 -p1
+%patch1800 -p1
 
 # Warn about obsolete functionality usage.
 %patch1900 -p1
@@ -831,10 +773,8 @@
 %patch2000 -p1
 # Silence GFP_ATOMIC failures.
 %patch2001 -p1
-# prevent OOM kills and page allocation failures under load.
-%patch2003 -p1
-# debug-fu
-%patch2004 -p1
+# Debug-fu
+%patch2002 -p1
 
 #
 # Patches 5000 to 6000 are reserved for new drivers that are about to
@@ -845,11 +785,11 @@
 #
 # final stuff
 #
-%patch10000 -p1
 
 #
 # misc small stuff to make things compile or otherwise improve performance
 #
+#%patch10004 -p1
 
 
 # END OF PATCH APPLICATIONS
@@ -858,23 +798,23 @@
 
 mkdir configs
 
-cp -fv %{all_arch_configs} .
+cp -f %{all_arch_configs} .
 
 
 # now run oldconfig over all the config files
 for i in *.config
 do 
-	mv $i .config 
-	Arch=`head -1 .config | cut -b 3-`
+  mv $i .config 
+  Arch=`head -1 .config | cut -b 3-`
 %if %{includexen}
-	make ARCH=$Arch nonint_oldconfig > /dev/null
+  make ARCH=$Arch nonint_oldconfig > /dev/null
 %else
-	if [ "$Arch" != "xen" ]; then
-	  make ARCH=$Arch nonint_oldconfig > /dev/null
-	fi
+  if [ "$Arch" != "xen" ]; then
+    make ARCH=$Arch nonint_oldconfig > /dev/null
+  fi
 %endif
-	echo "# $Arch" > configs/$i
-	cat .config >> configs/$i 
+  echo "# $Arch" > configs/$i
+  cat .config >> configs/$i 
 done
 
 # make sure the kernel has the sublevel we know it has. This looks weird
@@ -884,14 +824,12 @@
 perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -prep/" Makefile
 
 # get rid of unwanted files resulting from patch fuzz
-find . -name "*.orig" -exec rm -fv {} \;
-find . -name "*~" -exec rm -fv {} \;
+find . -name "*.orig" -o -name "*~" -exec rm -f {} \; >/dev/null &
 
 ###
 ### build
 ###
 %build
-
 #
 # Create gpg keys for signing the modules
 #
@@ -909,13 +847,13 @@
 
     # Pick the right config file for the kernel we're building
     if [ -n "$1" ] ; then
-	Config=kernel-%{kversion}-%{_target_cpu}-$1.config
-	DevelDir=/usr/src/kernels/%{KVERREL}-$1-%{_target_cpu}
-	DevelLink=/usr/src/kernels/%{KVERREL}$1-%{_target_cpu}
+      Config=kernel-%{kversion}-%{_target_cpu}-$1.config
+      DevelDir=/usr/src/kernels/%{KVERREL}-$1-%{_target_cpu}
+      DevelLink=/usr/src/kernels/%{KVERREL}$1-%{_target_cpu}
     else
-	Config=kernel-%{kversion}-%{_target_cpu}.config
-	DevelDir=/usr/src/kernels/%{KVERREL}-%{_target_cpu}
-	DevelLink=
+      Config=kernel-%{kversion}-%{_target_cpu}.config
+      DevelDir=/usr/src/kernels/%{KVERREL}-%{_target_cpu}
+      DevelLink=
     fi
 
     KernelVer=%{version}-%{release}$1
@@ -947,10 +885,10 @@
     mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
     install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
     install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer
-    cp arch/$Arch/boot/bzImage $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
-	if [ -f arch/$Arch/boot/zImage.stub ]; then
+    cp %{kernel_image} $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
+    if [ -f arch/$Arch/boot/zImage.stub ]; then
       cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/%{image_install_path}/zImage.stub-$KernelVer || :
-	fi
+    fi
 
     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
     make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer
@@ -966,6 +904,9 @@
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/source
     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
     (cd $RPM_BUILD_ROOT/lib/modules/$KernelVer ; ln -s build source)
+	# dirs for additional modules per module-init-tools, kbuild/modules.txt
+	mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
+	mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
     # first copy everything
     cp --parents `find  -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build 
     cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
@@ -985,8 +926,6 @@
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*.o
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*/*.o
     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    cp -a drivers/media/dvb/frontends/*.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/drivers/media/dvb/frontends
-    cp -a drivers/media/dvb/dvb-core/*.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/drivers/media/dvb/dvb-core
     cd include
     cp -a acpi config linux math-emu media net pcmcia rxrpc scsi sound video asm asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
 %if %{buildxen}
@@ -996,13 +935,14 @@
     if [ "$Arch" = "x86_64" ]; then
       cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
     fi
-    if [ "$Arch" = "ppc64" ]; then
-      cp -a asm-ppc $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    fi
-    if [ "$Arch" = "ppc" -o "$Arch" = "ppc64" ]; then
-      cp -a asm-powerpc $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
+    # While arch/powerpc/include/asm is still a symlink to the old
+    # include/asm-ppc{64,} directory, include that in kernel-devel too.
+    if [ "$Arch" = "powerpc" -a -r ../arch/powerpc/include/asm ]; then
+      cp -a `readlink ../arch/powerpc/include/asm` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
       mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/$Arch/include
-      ln -sf ../../../include/asm-powerpc $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/$Arch/include/asm
+      pushd $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/$Arch/include
+      ln -sf ../../../include/asm-ppc* asm
+      popd
     fi
     # Make sure the Makefile and version.h have a matching timestamp so that
     # external modules can be built
@@ -1018,37 +958,41 @@
     cp vmlinux $RPM_BUILD_ROOT/usr/lib/debug/lib/modules/$KernelVer
 %endif
 
+    find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames
+
     # gpg sign the modules
 %if %{signmodules}
     gcc -o scripts/modsign/mod-extract scripts/modsign/mod-extract.c -Wall
-	KEYFLAGS="--no-default-keyring --homedir .." 
-	KEYFLAGS="$KEYFLAGS --secret-keyring ../kernel.sec" 
-	KEYFLAGS="$KEYFLAGS --keyring ../kernel.pub" 
-	export KEYFLAGS 
-    for i in ` find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f`
-	do
-		sh ./scripts/modsign/modsign.sh $i Red
-        mv -f $i.signed $i
+    KEYFLAGS="--no-default-keyring --homedir .." 
+    KEYFLAGS="$KEYFLAGS --secret-keyring ../kernel.sec" 
+    KEYFLAGS="$KEYFLAGS --keyring ../kernel.pub" 
+    export KEYFLAGS 
+
+    for i in `cat modnames`
+    do
+      sh ./scripts/modsign/modsign.sh $i Red
+      mv -f $i.signed $i
     done
-	unset KEYFLAGS
+    unset KEYFLAGS
 %endif
 
     # mark modules executable so that strip-to-file can strip them
-    find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f  | xargs chmod u+x
+    cat modnames | xargs chmod u+x
 
     # detect missing or incorrect license tags
-    for i in `find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" `
-	do
-		echo -n "$i " 
-		/sbin/modinfo -l $i >> modinfo
-	done
+    for i in `cat modnames`
+    do
+      echo -n "$i " 
+      /sbin/modinfo -l $i >> modinfo
+    done
     cat modinfo |\
-		grep -v "^GPL" |
-		grep -v "^Dual BSD/GPL" |\
-		grep -v "^Dual MPL/GPL" |\
-		grep -v "^GPL and additional rights" |\
-		grep -v "^GPL v2" && exit 1 
+      grep -v "^GPL" |
+      grep -v "^Dual BSD/GPL" |\
+      grep -v "^Dual MPL/GPL" |\
+      grep -v "^GPL and additional rights" |\
+      grep -v "^GPL v2" && exit 1 
     rm -f modinfo
+    rm -f modnames
     # remove files that will be auto generated by depmod at rpm -i time
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.*
 
@@ -1080,7 +1024,6 @@
 BuildKernel xenU
 %endif
 
-
 ###
 ### install
 ###
@@ -1139,9 +1082,9 @@
 
 %post devel
 if [ -x /usr/sbin/hardlink ] ; then
-pushd /usr/src/kernels/%{KVERREL}-%{_target_cpu} > /dev/null
-/usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
-popd > /dev/null
+  pushd /usr/src/kernels/%{KVERREL}-%{_target_cpu} > /dev/null
+  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
+  popd > /dev/null
 fi
 
 %post smp
@@ -1150,9 +1093,9 @@
 
 %post smp-devel
 if [ -x /usr/sbin/hardlink ] ; then
-pushd /usr/src/kernels/%{KVERREL}-smp-%{_target_cpu} > /dev/null
-/usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
-popd > /dev/null
+  pushd /usr/src/kernels/%{KVERREL}-smp-%{_target_cpu} > /dev/null
+  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
+  popd > /dev/null
 fi
 
 %post xen0
@@ -1162,38 +1105,37 @@
 
 %post xen0-devel
 if [ -x /usr/sbin/hardlink ] ; then
-pushd /usr/src/kernels/%{KVERREL}-xen0-%{_target_cpu} > /dev/null
-/usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
-popd > /dev/null
+  pushd /usr/src/kernels/%{KVERREL}-xen0-%{_target_cpu} > /dev/null
+  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
+  popd > /dev/null
 fi
 
 %post xenU
-[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade
+[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade 
 [ ! -x /sbin/ldconfig ] || /sbin/ldconfig -X
 
 %post xenU-devel
 if [ -x /usr/sbin/hardlink ] ; then
-pushd /usr/src/kernels/%{KVERREL}-xenU-%{_target_cpu} > /dev/null
-/usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
-popd > /dev/null
+  pushd /usr/src/kernels/%{KVERREL}-xenU-%{_target_cpu} > /dev/null
+  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
+  popd > /dev/null
 fi
 
-
 %preun 
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}
+/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}
 
 %preun smp
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}smp
+/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}smp
 
 %preun xen0
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}xen0
+/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}xen0
 
 %preun xenU
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --rmmoddep --remove %{KVERREL}xenU
+/sbin/new-kernel-pkg --rmmoddep --remove %{KVERREL}xenU
 
 
 ###
@@ -1210,6 +1152,8 @@
 /lib/modules/%{KVERREL}/kernel
 /lib/modules/%{KVERREL}/build
 /lib/modules/%{KVERREL}/source
+/lib/modules/%{KVERREL}/extra
+/lib/modules/%{KVERREL}/updates
 
 %files devel
 %defattr(-,root,root)
@@ -1226,6 +1170,8 @@
 /lib/modules/%{KVERREL}smp/kernel
 /lib/modules/%{KVERREL}smp/build
 /lib/modules/%{KVERREL}smp/source
+/lib/modules/%{KVERREL}smp/extra
+/lib/modules/%{KVERREL}smp/updates
 
 %files smp-devel
 %defattr(-,root,root)
@@ -1244,6 +1190,8 @@
 %verify(not mtime) /lib/modules/%{KVERREL}xen0/build
 /lib/modules/%{KVERREL}xen0/source
 /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf
+/lib/modules/%{KVERREL}xen0/extra
+/lib/modules/%{KVERREL}xen0/updates
 
 %files xen0-devel
 %defattr(-,root,root)
@@ -1260,6 +1208,8 @@
 %verify(not mtime) /lib/modules/%{KVERREL}xenU/build
 /lib/modules/%{KVERREL}xenU/source
 /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf
+/lib/modules/%{KVERREL}xenU/extra
+/lib/modules/%{KVERREL}xenU/updates
 
 %files xenU-devel
 %defattr(-,root,root)
@@ -1279,203 +1229,497 @@
 %endif
 
 %changelog
-* Thu Jan  5 2006 Dave Jones <davej at redhat.com> [2.6.14-1.1656_FC4]
-- Rebuild.
+* Tue Jan  3 2006 Dave Jones <davej at redhat.com>
+- 2.6.15
+
+* Sun Jan 01 2006 Dave Jones <davej at redhat.com>
+- 2.6.15-rc7-git6
 
-* Tue Jan  3 2006 Dave Jones <davej at redhat.com> [2.6.14-1.1655_FC4]
-- Small fixes from 2.6.15
-  sysctl: don't overflow the user-supplied buffer with '0'
-  sysctl: make sure to terminate strings with a NUL
-  Insanity avoidance in /proc
-
-* Sun Jan  1 2006 Dave Jones <davej at redhat.com>
-- Fix the ACPI whitelist date again.
-
-* Wed Dec 28 2005 Dave Jones <davej at redhat.com>
-- Tighten permissions on /proc/pid/smaps. (#176687)
-
-* Wed Dec 28 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1654_FC4]
-- Fix usb storage oops. (#176576)
-- Fix ACPI owner_id limit.
-- Decrease stack usage in block layer.
+* Sat Dec 31 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc7-git5
+
+* Fri Dec 30 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc7-git4
+
+* Thu Dec 29 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc7-git3
 
 * Tue Dec 27 2005 Dave Jones <davej at redhat.com>
-- 2.6.14.5
-- usbhid incorrectly claimed wacom penpartner tablet. (#161241)
-- Reinstate the y2k ACPI blacklist cutoff.
-  It broke working suspend for apm users.
+- 2.6.15-rc7-git1
+
+* Fri Dec 23 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc6-git4
+
+* Thu Dec 22 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc6-git3
+
+* Wed Dec 21 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc6-git2
+
+* Tue Dec 20 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc6-git1
+- Make APM work again
+
+* Mon Dec 19 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc6
+- Update ACPICA
+
+* Sat Dec 17 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc5-git7
 
 * Fri Dec 16 2005 Dave Jones <davej at redhat.com>
-- Rebase to final 2.6.14.4
+- 2.6.15-rc5-git6
+
+* Thu Dec 15 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc5-git5
+
+* Wed Dec 14 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc5-git4
+- Try 'optimise for size' again.
+- Silence noisy CD drives that spew msgs when probed whilst empty.
+
+* Tue Dec 13 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc5-git3
+- Use MMIO instead of PIO for 8139too
+
+* Tue Dec 13 2005 David Woodhouse <dwmw2 at redhat.com>
+- Remove workaround for fixed GCC PR25248
 
-* Tue Dec 13 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1653_FC4]
-- Use MMIO instead of PIO for 8139too driver.
+* Mon Dec 12 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc5-git2
 
-* Tue Dec 13 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1652_FC4]
-- Include a bunch of patches likely to appear in 2.6.14.4
-- Hopefully fix ACPI performance issue with HT CPUs.
-
-* Sun Dec 11 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1651_FC4]
-- More Promise PATA fixes.
-
-* Sat Dec 10 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1650_FC4]
-- Update ACPI to 2.6.15 era.
-
-* Sat Dec 10 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1649_FC4]
-- Fix some possible problems with unnecessary OOM kills.
-- Fix compile error in parport_pc when debugging on. (#175340)
-- Disable voluntary preemption temporarily to diagnose some
-  strange bugs.
-
-* Fri Dec  9 2005 Dave Jones <davej at redhat.com>
-- Drop change timesource default patch, it causes strange
-  interactions on some systems. (#171554)
-- Make PATA ports on Promise SATA work again. (#172913)
-
-* Tue Dec  6 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1648_FC4]
-- Disable ACPI blacklist.
-  The interpretor is a lot better these days. Sadly, BIOS authors aren't.
-- Re-enable i2o ioctls. (#174748)
+* Mon Dec 12 2005 David Woodhouse <dwmw2 at redhat.com>
+- Make mambo_disk not run on real hardware; only on sim
+- Also make it a module
+- Handle iommu on DD3 boards
+- Fix parport patch
+
+* Sun Dec 11 2005 Dave Jones <davej at redhat.com>
+- Re-add ISA soundblaster drivers. (#175492)
+
+* Sat Dec 10 2005 Dave Jones <davej at redhat.com>
+- Disable guessing of how many x86-64 hotplug cpus to add.
+
+* Sat Dec 10 2005 David Woodhouse <dwmw2 at redhat.com>
+- Work around GCC PR25248 
+- Fix parport_pc driver to check before poking at legacy I/O ports
+
+* Thu Dec  8 2005 David Woodhouse <dwmw2 at redhat.com>
+- Clean up Cell patches, make it boot on real hardware
+
+* Wed Dec  7 2005 Dave Jones <davej at redhat.com>
+- Merge slab leak detector.
+- Suppress APIC errors on UP x86-64. (#175193)
+
+* Tue Dec  6 2005 Dave Jones <davej at redhat.com>
+- Test build with gcc4.1
+
+* Mon Dec 05 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc5-git1
+
+* Sun Dec  4 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc5
+
+* Sat Dec 03 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc4-git2
+
+* Fri Dec 02 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc4-git1
+- sysfs debug on x86-64 too.
 
 * Fri Dec  2 2005 Dave Jones <davej at redhat.com>
-- SELinux MLS compatability.
+- Better fix for the NFSD cache_change_attribute fix. (#174010)
+
+* Thu Dec  1 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc4
+- Flip default ioscheduler back to cfq.
+- Increase firmware loader timeout. (#174589)
+- Add sysfs debug info to oops output.
 
 * Wed Nov 30 2005 Dave Jones <davej at redhat.com>
-- Reboot through the BIOS on newer HP laptops
-- Workaround for ATI 'clock goes too fast' bug.
+- Revert a broken NFS change from upstream. (#174010)
+- Re-add a rediffed Tux http accelerator.
+- 2.6.15-rc3-git1
+
+* Tue Nov 29 2005 David Woodhouse <dwmw2 at redhat.com>
+- Fix EHCI panic on initialisation
+- Fix is_valid_ether_addr() not to claim broadcast is valid
 
-* Tue Nov 29 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1647_FC4]
-- Fix feature consolidation in bonding & bridging code.
+* Tue Nov 29 2005 Dave Jones <davej at redhat.com>
+- 2.6.15rc3
 
-* Tue Nov 29 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1646_FC4]
-- Fix SATA locking.
+* Mon Nov 28 2005 Dave Jones <davej at redhat.com>
+- Additional ID for Conexant AccessRunner USB driver (#174339)
 
-* Mon Nov 28 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1645_FC4]
-- Unbreak the cciss cli tools. (#170351)
+* Mon Nov 28 2005 David Woodhouse <dwmw2 at redhat.com>
+- Fix RX packet alignment and multicast on MV643xx Ethernet
 
-* Sun Nov 27 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1644_FC4]
-- Port a change_page_attr() fix from x86-64 to i386.
+* Sun Nov 27 2005 Dave Jones <davej at redhat.com>
+- Port change_page_attr fixes from x86-64.
+  (Fixes rodata-readonly causes instant reboot)
 
-* Sat Nov 26 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1643_FC4]
-- Fix infinite loop in rtnetlink.
+* Sat Nov 26 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc2-git6
 
 * Fri Nov 25 2005 Dave Jones <davej at redhat.com>
-- 2.6.14.3
+- 2.6.15-rc2-git5
 
-* Wed Nov 23 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1642_FC4]
-- Fix 32bit integer overflow in invalidate_inode_pages2() (local DoS)
+* Fri Nov 25 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc2-git4
+
+* Thu Nov 24 2005 David Woodhouse <dwmw2 at redhat.com>
+- Fix non-volatile register saving in ppc32 signal delivery
+- Compile mambonet (IBM Cell sim network) as a module
 
-* Wed Nov 23 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1641_FC4]
-- Merge patches likely to end up in 2.6.14.3
+* Wed Nov 23 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc2-git3
 
 * Tue Nov 22 2005 Dave Jones <davej at redhat.com>
-- Fix another NFSD badness warning.
-- Fix some thinko's in the signed modules code.
+- 2.6.15-rc2-git2
+- Add a 'nowprodata' to disable rodata protection during debug.
+- Fix NFSD badness warning.
+- Enable SATA ATAPI by default.
+- Fix some silly thinko's in the signed modules code.
+
+* Mon Nov 21 2005 David Woodhouse <dwmw2 at redhat.com>
+- No pcskpr on ppc64
+- Fix IBM Cell sim console output
 
 * Mon Nov 21 2005 Dave Jones <davej at redhat.com>
-- Remove broken hostname changes in revision field of kernel spec. (#173366)
-- Fix some broken locking in NFSD.
+- 2.6.15-rc2-git1
+- Shrink the 586 kernel by removing some unnecessary modules.
+
+* Sun Nov 20 2005 Dave Jones <davej at redhat.com>
+- Fix bad locking in NFS (#173364)
+
+* Sat Nov 19 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc2
 
-* Mon Nov 14 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1640_FC4]
-- Fix memory leak with file leases. (#172691)
+* Sat Nov 19 2005 David Woodhouse <dwmw2 at redhat.com>
+- Make kernel-devel packages work again for ppc/ppc64
+- Fix oops with MGA on root PCI bus
 
-* Sat Nov 12 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1639_FC4]
+* Fri Nov 18 2005 David Woodhouse <dwmw2 at redhat.com>
+- Fix ppc64 sparsemem with memory holes.
+
+* Fri Nov 18 2005 Dave Jones <davej at redhat.com>
+- Write protect kernel space rodata on x86-32 too.
+- Fix up the placement of Obsolete: on x86-64
+
+* Thu Nov 17 2005 Dave Jones <davej at redhat.com>
+- Disable 3c501 driver. Sorry, Alan.
+
+* Thu Nov 17 2005 David Woodhouse <dwmw2 at redhat.com>
+- Disable HFC USB again since it's not fixed in -git3
+
+* Thu Nov 17 2005 Stephen Tweedie <sct at redhat.com>
+- 2.6.15-rc1-git3
+
+* Thu Nov 17 2005 David Woodhouse <dwmw2 at redhat.com>
+- Disable CONFIG_RTC on ppc64. It's CONFIG_GEN_RTC now
+- Use anticipatory I/O scheduler by default. CFQ appears broken.
+
+* Wed Nov 16 2005 David Woodhouse <dwmw2 at redhat.com>
+- 2.6.15-rc1-git4
+- Re-enable hfc_usb since it appears to be fixed
+- Re-enable iSeries too on the same basis
+- Fix EEH use of uninitialised spinlock again
+
+* Wed Nov 16 2005 David Woodhouse <dwmw2 at redhat.com>
+- Support PPC64 kernel running in IBM Cell Broadband Engine simulator
+  (http://www.alphaworks.ibm.com/tech/cellsystemsim)
+- Update serial-of patch
+
+* Wed Nov 16 2005 Dave Jones <davej at redhat.com>
+- Unbreak config generation. HIGHMEM64G works again.
+
+* Tue Nov 15 2005 Dave Jones <davej at redhat.com>
+- More UB fixing.
+
+* Tue Nov 15 2005 David Woodhouse <dwmw2 at redhat.com>
+- Revamp ppc32 and ppc64 system call entry/exit paths
+- Fix up PCI initialisation on ppc64 to prevent parport_pc killing G5s
+
+* Tue Nov 15 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc1-git3
+- Make lrmi using apps (ddcprobe et al) work again.
+
+* Tue Nov 15 2005 David Woodhouse <dwmw2 at redhat.com>
+- More PPC vDSO fixes
+
+* Mon Nov 14 2005 Dave Jones <davej at redhat.com>
+- Enable USB storage,UB & libusual magick.
+- Disable busted HFC-S USB based HiSAX ISDN driver.
+
+* Mon Nov 14 2005 David Woodhouse <dwmw2 at redhat.com>
+- Clean up ppc64 config a little; enable thermal support
+
+* Mon Nov 14 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc1-git2
 - Ignore result from acpi_bus_find_driver(device);
   Should fix boot hangs on several HP systems (and maybe others).
+- Terminate the device id list in hfc driver.
+
+* Mon Nov 14 2005 David Woodhouse <dwmw2 at redhat.com>
+- PPC vDSO fixes from BenH
+
+* Sun Nov 13 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc1-git1
 
-* Fri Nov 11 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1638_FC4]
-- 2.6.14.2
-- Hopefully fix the i8k bug for real this time.
-- nf_queue: Fix Oops when no queue handler registered
+* Fri Nov 11 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc1
+  - iseries broken, so disabled for now.
+- 2.6.14-git14
+
+* Fri Nov 11 2005 Bill Nottingham <notting at redhat.com>
+- ipw2200 requires a new firmware version, tweak conflict
 
 * Thu Nov 10 2005 Dave Jones <davej at redhat.com>
-- Write protect kernel rodata
+- 2.6.14-git13
+
+* Wed Nov 09 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-git12
+
+* Tue Nov 08 2005 Dave Jones <davej at redhat.com>
+- Update patch to write protect read-only kernel data.
+
+* Tue Nov 08 2005 David Woodhouse <dwmw2 at redhat.com>
+- 2.6.14-git11
+
+* Mon Nov 07 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-git10
 
-* Wed Nov  9 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1637_FC4]
-- 2.6.14.1
-- 2.6.14.2pre
+* Mon Nov 07 2005 Dave Jones <davej at redhat.com>
+- silence some selinux messages.
 
-* Wed Nov  9 2005 David Woodhouse <dwmw2 at redhat.com>
-- Fix kernel-devel headers on PPC
-- Include DVB headers
+* Sun Nov 06 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-git9
 
-* Sat Nov  5 2005 Dave Jones <davej at redhat.com>
-- Fix FPU corruption on return from S3. (#140257)
-- Fix up DMI usage in i8k driver.
+* Sat Nov 05 2005 David Woodhouse <dwmw2 at redhat.com>
+- Attempt ppc smp build again
 
-* Sat Nov  5 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1636_FC4]
-- Increase firmware loader timeout.
+* Sat Nov 05 2005 Dave Jones <davej at redhat.com>
+- Add another IBM Thinkpad to the Radeon whitelist.
 
-* Fri Nov  4 2005 Dave Jones <davej at redhat.com>
-- Stop kauditd from preventing suspend.
+* Sat Nov 05 2005 David Woodhouse <dwmw2 at redhat.com>
+- 2.6.14-git8
+- Fix i8259 cascade initialisation in arch/powerpc
+- disable ppc smp build for now
 
-* Thu Nov  3 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1634_FC4]
-- Fix zero-length packet reception, which broke bind.
+* Fri Nov 04 2005 Dave Jones <davej at redhat.com>
+- Own /lib/modules/<version>/{extra,updates} (#172075)
+- 2.6.14-git7
 
-* Sat Oct 29 2005 Dave Jones <davej at redhat.com>
-- Disable deprecation warning in PCMCIA ioctl.
+* Thu Nov 03 2005 Dave Jones <davej at redhat.com>
+- prereq new kudzu. (Should fix upgrades for mptfusion users)
+- 2.6.14-git6
+- Copy all Makefiles to -devel packages.
+
+* Wed Nov 02 2005 David Woodhouse <dwmw2 at redhat.com>
+- Switch ppc64 and ppc kernels to arch/powerpc
+- Add nvram driver back again
+- Fix ppc32 initrd with arch/powerpc
+
+* Wed Nov 02 2005 David Woodhouse <dwmw2 at redhat.com>
+- 2.6.14-git5
+- Fix up PPC configs in preparation for using arch/powerpc
+- Prevent kauditd from aborting suspend
+
+* Sun Oct 30 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-git2
 
 * Thu Oct 27 2005 Dave Jones <davej at redhat.com>
-- Rebase to 2.6.14
+- 2.6.14
+
+* Thu Oct 27 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc5-git7 
+
+* Wed Oct 26 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc5-git6
+- Disable CONFIG_OPTIMIZE_FOR_SIZE again
+  It seems to break booting randomly on x86-64 among other things.
+
+* Tue Oct 25 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc5-git5
+
+* Mon Oct 24 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc5-git4
+- Fix up maestro driver hang at init. (#134507)
+
+* Mon Oct 24 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc5-git3
+
+* Sat Oct 22 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc5-git2
+
+* Sat Oct 22 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc5-git1
+
+* Thu Oct 20 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc5
+- Aparently the ipw2200 drivers need 2.2 of the firmware right now.
+- Fix autofs4 looking up wrong path element when ghosting is enabled.
 
-* Wed Oct 19 2005 Dave Jones <davej at redhat.com> [2.6.13-1.1532_FC4]
-- Fix CAN-2005-2973 (ipv6 infinite loop)
-- Disable ACPI burst again, it's still problematic.
-- Update to the final upstream variant of the IDE/SATA fix.
+* Thu Oct 20 2005 David Woodhouse <dwmw2 at redhat.com>
+- Bring forward 8250 OpenFirmware probe patch from FC4.
 
-* Sun Oct 16 2005 Dave Jones <davej at redhat.com> [2.6.13-1.1531_FC4]
+* Tue Oct 18 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc4-git6
+
+* Mon Oct 17 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc4-git5
+
+* Sun Oct 16 2005 Dave Jones <davej at redhat.com>
+- Enable ACPI EC Burst.
+- Change printk level of an ACPI message.
 - Stop IDE claiming legacy ports before libata in combined mode.
 
-* Sun Oct 16 2005 Dave Jones <davej at redhat.com> [2.6.13-1.1530_FC4]
-- Enable ACPI EC burst.
-- Reenable change of timesource default.
+* Sat Oct 15 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc4-git4
+
+* Fri Oct 14 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc4-git3
+
+* Thu Oct 13 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc4-git2
+
+* Wed Oct 12 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc4-git1
 
-* Tue Oct 11 2005 Dave Jones <davej at redhat.com> [2.6.13-1.1529_FC4]
-- 2.6.13.4
+* Tue Oct 11 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc4
+
+* Fri Oct 07 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc3-git7
+
+* Thu Oct 06 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc3-git6
 
 * Thu Oct 06 2005 Dave Jones <davej at redhat.com>
-- Fix information leak in orinoco driver.
+- fix suspend to sbp devices. (#166452)
 
 * Wed Oct 05 2005 Dave Jones <davej at redhat.com>
-- Further fixing to the 8139too suspend/resume problem.
+- 2.6.14-rc3-git5
 
-* Mon Oct 03 2005 Dave Jones <davej at redhat.com> [2.6.13-1.1528_FC4]
-- 2.6.13.3
+* Tue Oct 04 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc3-git4
+- canonicalise getxattr results.
+
+* Mon Oct 03 2005 Dave Jones <davej at redhat.com>
+- silence silly debug message in cx88. (#168931)
+- bring back ac97 sliders on emu10k1
+- 2.6.14-rc3-git3
 
-* Sun Oct 02 2005 Dave Jones <davej at redhat.com> [2.6.13-1.1527_FC4]
-- Disable debug messages in w83781d sensor driver. (#169695)
-- Re-add a bunch of patches that got accidentally dropped in last update.
-  - Fix suspend/resume with 8139too
-  - Fix usbhid/wireless security lock clash (#147479)
-  - Missing check condition in ide scsi (#160868)
-  - Fix nosense error with transcend usb keys (#162559)
-  - Fix sk98lin vpd problem. (#136158)
-- Fix IDE floppy eject. (#158548)
+* Sun Oct 02 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc3-git1
 
 * Fri Sep 30 2005 Dave Jones <davej at redhat.com>
-- irda-driver smsc-ircc2 needs pnp-functionality. (#153970)
-- Reenable /proc/acpi/sleep (#169650)
-- Silence some selinux messages. (#167852)
-
-* Wed Sep 28 2005 Dave Jones <davej at redhat.com> [2.6.13-1.1526_FC4]
-- Fix boot-hang with serverworks AGP. (#154673)
-- Fix off by one in pcmcia port reservation.
-- Power up pwc cams by default. (#140258)
-- Silence silly debug msg in w1 driver. (#167403)
-- Don't abort module loading if passed unknown params.
+- 2.6.14-rc3
+- fix eject on ide-floppy. (#158548)
+- 2.6.14-rc2-git8
+
+* Thu Sep 29 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc2-git7
+- Fix up module aliases for firedire. (#134047)
+- rebuild.
+
+* Wed Sep 28 2005 Dave Jones <davej at redhat.com>
+- Package ppc32 includes in ppc64 headers too. (#147724)
+- Add another Thinkpad to the radeon backlight dmi list. (#168156)
+
+* Tue Sep 27 2005 Dave Jones <davej at redhat.com>
+- Fix typo in previous knfsd patch.
 
 * Mon Sep 26 2005 Dave Jones <davej at redhat.com>
-- Fix asm-x86_64 dependancy on asm-i386. (#150266)
+- 2.6.14-rc2-git6
+
+* Mon Sep 26 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc2-git5
+
+* Sat Sep 24 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc2-git4
+- kNFSD: fixed '-p port' arg to rpc.nfsd and enables the
+  defining proto versions and transports
 
 * Fri Sep 23 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc2-git3
 - Add another Radeon to the power saving backlight patch. (#165297)
+- Enable UP APIC support, but disable by default.
+
+* Thu Sep 22 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc2-git2
+
+* Thu Sep 22 2005 Dave Jones <davej at redhat.com>
+- Reset some conflicts: to earlier revisions.
+
+* Thu Sep 22 2005 David Woodhouse <dwmw2 at redhat.com>
+- Fix G5 boot by avoiding EEH checks
+
+* Wed Sep 21 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc2-git1
+
+* Wed Sep 21 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc2
+
+* Wed Sep 21 2005 David Woodhouse <dwmw2 at redhat.com>
+- Fix zImage.stub build, but then disable it anyway since we don't need 
+  it any more -- the stub is built as part of ppc64-utils instead.
+
+* Mon Sep 19 2005 David Woodhouse <dwmw2 at redhat.com>
+- Add asm-powerpc directory, DVB include files from drivers/media/dvb/
+
+* Sun Sep 18 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc1-git4
+
+* Fri Sep 16 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc1-git3
+
+* Fri Sep 16 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc1-git2
+
+* Wed Sep 14 2005 Dave Jones <davej at redhat.com>
+- Fix bug in mm/slab.c (#168258)
+
+* Tue Sep 13 2005 Dave Jones <davej at redhat.com>
+- 2.6.14-rc1
+- Reenable fixed version of the execshield vdso patch.
+
+* Mon Sep 12 2005 Dave Jones <davej at redhat.com>
+- 2.6.13-git12
+
+* Sat Sep 10 2005 Dave Jones <davej at redhat.com>
+- 2.6.13-git10
+
+* Fri Sep 09 2005 Dave Jones <davej at redhat.com>
+- 2.6.13-git9
+
+* Thu Sep 08 2005 Dave Jones <davej at redhat.com>
+- 2.6.13-git8
+
+* Wed Sep 07 2005 Dave Jones <davej at redhat.com>
+- 2.6.13-git7
+
+* Tue Sep 06 2005 Dave Jones <davej at redhat.com>
+- 2.6.13-git6
+
+* Mon Sep 05 2005 Dave Jones <davej at redhat.com>
+- 2.6.13-git5
+
+* Sun Sep 04 2005 Dave Jones <davej at redhat.com>
+- 2.6.13-git4
+
+* Fri Sep 02 2005 Dave Jones <davej at redhat.com>
+- 2.6.13-git3.
+  (For real this time, the last two builds didn't really rebase).
+  - Tux & Xen currently disabled.
+  - ipw2100/ipw2200 drivers are now upstream.
+- "The yellow dart" strikes again. Kexec based kdump support.
 
-* Fri Sep 23 2005 Dave Jones <davej at redhat.com> [2.6.13-1.1525_FC4]
-- Fix some emu10k1/ac97 bugs. (#169152)
-- Fix aic7xxx issue with >4GB. (#167049)
+* Wed Aug 31 2005 Dave Jones <davej at redhat.com>
+- 2.6.13-git2
 
-* Tue Sep 20 2005 Dave Jones <davej at redhat.com>
-- 2.6.13.2
+* Tue Aug 30 2005 Dave Jones <davej at redhat.com>
+- 2.6.13-git1
 
 * Sun Aug 28 2005 Dave Jones <davej at redhat.com>
 - 2.6.13 final.

linux-2.6-NFSD-ctlbits.patch:
 fs/nfsd/nfs4state.c          |    3 ++
 fs/nfsd/nfsctl.c             |   59 +++++++++++++++++++++++++++++++++++++++++++
 fs/nfsd/nfssvc.c             |   10 +++++--
 include/linux/nfsd/syscall.h |   14 ++++++++--
 4 files changed, 82 insertions(+), 4 deletions(-)

Index: linux-2.6-NFSD-ctlbits.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-NFSD-ctlbits.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-NFSD-ctlbits.patch	28 Oct 2005 05:23:06 -0000	1.1
+++ linux-2.6-NFSD-ctlbits.patch	6 Jan 2006 05:42:17 -0000	1.2
@@ -1,88 +1,41 @@
---- linux-2.6.13/fs/nfsd/nfs4state.c.ctlbits	2005-09-23 11:47:27.817646000 -0400
-+++ linux-2.6.13/fs/nfsd/nfs4state.c	2005-09-23 11:47:40.413006000 -0400
-@@ -3319,6 +3319,9 @@ __nfs4_state_shutdown(void)
- void
- nfs4_state_shutdown(void)
- {
-+	if (!nfs4_init)
-+		return;
-+
- 	nfs4_lock_state();
- 	nfs4_release_reclaim();
- 	__nfs4_state_shutdown();
---- linux-2.6.13/fs/nfsd/nfsctl.c.ctlbits	2005-08-28 19:41:01.000000000 -0400
-+++ linux-2.6.13/fs/nfsd/nfsctl.c	2005-09-23 11:47:40.419006000 -0400
-@@ -23,6 +23,7 @@
- #include <linux/seq_file.h>
- #include <linux/pagemap.h>
- #include <linux/init.h>
-+#include <linux/string.h>
- 
- #include <linux/nfs.h>
- #include <linux/nfsd_idmap.h>
-@@ -35,6 +36,10 @@
+--- linux-2.6.14/fs/nfsd/nfsctl.c.aa1	2005-11-08 09:31:44.000000000 +0000
++++ linux-2.6.14/fs/nfsd/nfsctl.c	2005-11-08 09:32:14.000000000 +0000
+@@ -36,7 +36,9 @@
  
  #include <asm/uaccess.h>
  
 +int nfsd_port = 2049;
 +unsigned int nfsd_portbits = 0;
-+unsigned int nfsd_versbits = 0;
-+
+ unsigned int nfsd_versbits = ~0;
+ 
  /*
   *	We have a single directory with 9 nodes in it.
-  */
-@@ -51,6 +56,8 @@ enum {
+@@ -53,6 +55,7 @@ enum {
  	NFSD_Fh,
  	NFSD_Threads,
- 	NFSD_Leasetime,
+ 	NFSD_Versions,
 +	NFSD_Ports,
-+	NFSD_Versions,
- 	NFSD_RecoveryDir,
- };
- 
-@@ -67,6 +74,8 @@ static ssize_t write_getfs(struct file *
+ 	/*
+ 	 * The below MUST come last.  Otherwise we leave a hole in nfsd_files[]
+ 	 * with !CONFIG_NFSD_V4 and simple_fill_super() goes oops
+@@ -76,6 +73,7 @@ static ssize_t write_getfd(struct file *
  static ssize_t write_filehandle(struct file *file, char *buf, size_t size);
  static ssize_t write_threads(struct file *file, char *buf, size_t size);
- static ssize_t write_leasetime(struct file *file, char *buf, size_t size);
+ static ssize_t write_versions(struct file *file, char *buf, size_t size);
 +static ssize_t write_ports(struct file *file, char *buf, size_t size);
-+static ssize_t write_versions(struct file *file, char *buf, size_t size);
+ #ifdef CONFIG_NFSD_V4
+ static ssize_t write_leasetime(struct file *file, char *buf, size_t size);
  static ssize_t write_recoverydir(struct file *file, char *buf, size_t size);
- 
- static ssize_t (*write_op[])(struct file *, char *, size_t) = {
-@@ -80,6 +89,8 @@ static ssize_t (*write_op[])(struct file
+@@ -92,7 +88,8 @@ static ssize_t (*write_op[])(struct file
+ 	[NFSD_Getfs] = write_getfs,
  	[NFSD_Fh] = write_filehandle,
  	[NFSD_Threads] = write_threads,
- 	[NFSD_Leasetime] = write_leasetime,
+ 	[NFSD_Versions] = write_versions,
 +	[NFSD_Ports] = write_ports,
-+	[NFSD_Versions] = write_versions,
+ #ifdef CONFIG_NFSD_V4
+ 	[NFSD_Leasetime] = write_leasetime,
  	[NFSD_RecoveryDir] = write_recoverydir,
- };
- 
-@@ -88,14 +99,12 @@ static ssize_t nfsctl_transaction_write(
- 	ino_t ino =  file->f_dentry->d_inode->i_ino;
- 	char *data;
- 	ssize_t rv;
--
- 	if (ino >= sizeof(write_op)/sizeof(write_op[0]) || !write_op[ino])
- 		return -EINVAL;
- 
- 	data = simple_transaction_get(file, buf, size);
- 	if (IS_ERR(data))
- 		return PTR_ERR(data);
--
- 	rv =  write_op[ino](file, data, size);
- 	if (rv>0) {
- 		simple_transaction_set(file, rv);
-@@ -259,7 +268,7 @@ static ssize_t write_filehandle(struct f
- 	 * qword quoting is used, so filehandle will be \x....
- 	 */
- 	char *dname, *path;
--	int maxsize;
-+	int maxsize = 0;
- 	char *mesg = buf;
- 	int len;
- 	struct auth_domain *dom;
-@@ -328,6 +337,102 @@ static ssize_t write_threads(struct file
+@@ -358,7 +351,60 @@ static ssize_t write_threads(struct file
  	sprintf(buf, "%d\n", nfsd_nrthreads());
  	return strlen(buf);
  }
@@ -100,7 +53,7 @@
 +	if (buf[size-1] != '\n')
 +		return -EINVAL;
 +	buf[size-1] = 0;
-+
+ 
 +	family = mesg;
 +	len = qword_get(&mesg, family, size);
 +	if (len <= 0) return -EINVAL;
@@ -140,145 +93,52 @@
 +
 +	return tlen;
 +}
-+static ssize_t write_versions(struct file *file, char *buf, size_t size)
-+{
-+	/*
-+	 * Format:
-+	 *   [-/+]vers [-/+]vers ...
-+	 */
-+	char *mesg = buf;
-+	char *vers, sign;
-+	int len, num;
-+	ssize_t tlen = 0;
-+
-+	if (buf[size-1] != '\n')
-+		return -EINVAL;
-+	buf[size-1] = 0;
-+
-+	vers = mesg;
-+	len = qword_get(&mesg, vers, size);
-+	if (len <= 0) return -EINVAL;
-+	do {
-+		sign = *vers;
-+		if (sign == '+' || sign == '-')
-+			num = simple_strtol((vers+1), NULL, 0);
-+		else
-+			num = simple_strtol(vers, NULL, 0);
-+		switch(num) {
-+		case 2:
-+		case 3:
-+		case 4:
-+			if (sign != '-')
-+				NFSCTL_VERSET(nfsd_versbits, num);
-+			else
-+				NFSCTL_VERUNSET(nfsd_versbits, num);
-+			break;
-+		default:
-+			return -EINVAL;
-+		}
-+		vers += len + 1;
-+		tlen += len;
-+	} while ((len = qword_get(&mesg, vers, size)) > 0);
-+
-+	return tlen;
-+}
- 
- extern time_t nfs4_leasetime(void);
- 
-@@ -393,6 +498,8 @@ static int nfsd_fill_super(struct super_
+ static ssize_t write_versions(struct file *file, char *buf, size_t size)
+ {
+ 	/*
+@@ -484,6 +508,7 @@ static int nfsd_fill_super(struct super_
+ 		[NFSD_Fh] = {"filehandle", &transaction_ops, S_IWUSR|S_IRUSR},
+ 		[NFSD_Threads] = {"threads", &transaction_ops, S_IWUSR|S_IRUSR},
+ 		[NFSD_Versions] = {"versions", &transaction_ops, S_IWUSR|S_IRUSR},
++		[NFSD_Ports] = {"ports", &transaction_ops, S_IWUSR|S_IRUSR},
+ #ifdef CONFIG_NFSD_V4
  		[NFSD_Leasetime] = {"nfsv4leasetime", &transaction_ops, S_IWUSR|S_IRUSR},
  		[NFSD_RecoveryDir] = {"nfsv4recoverydir", &transaction_ops, S_IWUSR|S_IRUSR},
- #endif
-+		[NFSD_Ports] = {"ports", &transaction_ops, S_IWUSR|S_IRUSR},
-+		[NFSD_Versions] = {"versions", &transaction_ops, S_IWUSR|S_IRUSR},
- 		/* last one */ {""}
- 	};
- 	return simple_fill_super(sb, 0x6e667364, nfsd_files);
---- linux-2.6.13/fs/nfsd/nfssvc.c.ctlbits	2005-08-28 19:41:01.000000000 -0400
-+++ linux-2.6.13/fs/nfsd/nfssvc.c	2005-09-27 09:04:40.273630000 -0400
-@@ -30,6 +30,7 @@
- #include <linux/nfsd/nfsd.h>
- #include <linux/nfsd/stats.h>
- #include <linux/nfsd/cache.h>
-+#include <linux/nfsd/syscall.h>
- #include <linux/lockd/bind.h>
- #include <linux/nfsacl.h>
- 
-@@ -63,6 +64,33 @@ struct nfsd_list {
+--- linux-2.6.14/fs/nfsd/nfs4state.c.aa1	2005-11-08 09:31:51.000000000 +0000
++++ linux-2.6.14/fs/nfsd/nfs4state.c	2005-11-08 09:32:14.000000000 +0000
+@@ -3319,6 +3319,9 @@ __nfs4_state_shutdown(void)
+ void
+ nfs4_state_shutdown(void)
+ {
++	if (!nfs4_init)
++		return;
++
+ 	nfs4_lock_state();
+ 	nfs4_release_reclaim();
+ 	__nfs4_state_shutdown();
+--- linux-2.6.14/fs/nfsd/nfssvc.c.aa1	2005-11-08 09:31:44.000000000 +0000
++++ linux-2.6.14/fs/nfsd/nfssvc.c	2005-11-08 09:32:14.000000000 +0000
+@@ -64,6 +64,8 @@ struct nfsd_list {
  };
  static struct list_head nfsd_list = LIST_HEAD_INIT(nfsd_list);
  
 +extern struct svc_version nfsd_version2, nfsd_version3, nfsd_version4;
 +
-+static struct svc_version *	nfsd_version[] = {
-+	[2] = &nfsd_version2,
-+#if defined(CONFIG_NFSD_V3)
-+	[3] = &nfsd_version3,
-+#endif
-+#if defined(CONFIG_NFSD_V4)
-+	[4] = &nfsd_version4,
-+#endif
-+};
-+
-+#define NFSD_MINVERS    	2
-+#define NFSD_NRVERS		(sizeof(nfsd_version)/sizeof(nfsd_version[0]))
-+static struct svc_version *nfsd_versions[NFSD_NRVERS];
-+
-+struct svc_program		nfsd_program = {
-+	.pg_prog		= NFS_PROGRAM,		/* program number */
-+	.pg_nvers		= NFSD_NRVERS,		/* nr of entries in nfsd_version */
-+	.pg_vers		= nfsd_versions,	/* version table */
-+	.pg_name		= "nfsd",		/* program name */
-+	.pg_class		= "nfsd",		/* authentication class */
-+	.pg_stats		= &nfsd_svcstats,	/* version table */
-+	.pg_authenticate	= &svc_set_client,	/* export authentication */
-+
-+};
-+
- /*
-  * Maximum number of nfsd processes
-  */
-@@ -80,17 +108,37 @@ int
- nfsd_svc(unsigned short port, int nrservs)
- {
- 	int	error;
--	int	none_left;	
-+	int	none_left, found_one, i;
+ static struct svc_version *	nfsd_version[] = {
+ 	[2] = &nfsd_version2,
+ #if defined(CONFIG_NFSD_V3)
+@@ -110,8 +112,8 @@ nfsd_svc(unsigned short port, int nrserv
  	struct list_head *victim;
  	
  	lock_kernel();
--	dprintk("nfsd: creating service\n");
+-	dprintk("nfsd: creating service: vers 0x%x\n",
+-		nfsd_versbits);
 +	dprintk("nfsd: creating service: port %d vers 0x%x proto 0x%x\n",
 +		nfsd_port, nfsd_versbits, nfsd_portbits);
  	error = -EINVAL;
  	if (nrservs <= 0)
  		nrservs = 0;
- 	if (nrservs > NFSD_MAXSERVS)
- 		nrservs = NFSD_MAXSERVS;
- 	
-+	/*
-+	 * If set, use the nfsd_ctlbits to define which
-+	 * versions that will be advertised
-+	 */
-+	found_one = 0;
-+	if (nfsd_versbits) {
-+		for (i = NFSD_MINVERS; i < NFSD_NRVERS; i++) {
-+			if (NFSCTL_VERISSET(nfsd_versbits, i)) {
-+				nfsd_program.pg_vers[i] = nfsd_version[i];
-+				found_one = 1;
-+			} else
-+				nfsd_program.pg_vers[i] = NULL;	
-+		}
-+	}
-+	if (!found_one) {
-+		for (i = NFSD_MINVERS; i < NFSD_NRVERS; i++)
-+			nfsd_program.pg_vers[i] = nfsd_version[i];
-+	}
-+
- 	/* Readahead param cache - will no-op if it already exists */
- 	error =	nfsd_racache_init(2*nrservs);
- 	if (error<0)
-@@ -104,11 +152,14 @@ nfsd_svc(unsigned short port, int nrserv
+@@ -126,11 +147,15 @@ nfsd_svc(unsigned short port, int nrserv
  		nfsd_serv = svc_create(&nfsd_program, NFSD_BUFSIZE);
  		if (nfsd_serv == NULL)
  			goto out;
@@ -287,54 +147,33 @@
  		error = svc_makesock(nfsd_serv, IPPROTO_UDP, port);
  		if (error < 0)
  			goto failure;
--
+ 
  #ifdef CONFIG_NFSD_TCP
 +		if (NFSCTL_TCPISSET(nfsd_portbits))
 +			port = nfsd_port;
  		error = svc_makesock(nfsd_serv, IPPROTO_TCP, port);
  		if (error < 0)
  			goto failure;
-@@ -389,28 +440,3 @@ static struct svc_stat	nfsd_acl_svcstats
- #else
- #define nfsd_acl_program_p	NULL
- #endif /* defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) */
--
--extern struct svc_version nfsd_version2, nfsd_version3, nfsd_version4;
--
--static struct svc_version *	nfsd_version[] = {
--	[2] = &nfsd_version2,
--#if defined(CONFIG_NFSD_V3)
--	[3] = &nfsd_version3,
--#endif
--#if defined(CONFIG_NFSD_V4)
--	[4] = &nfsd_version4,
--#endif
--};
--
--#define NFSD_NRVERS		(sizeof(nfsd_version)/sizeof(nfsd_version[0]))
--struct svc_program		nfsd_program = {
--	.pg_next		= nfsd_acl_program_p,
--	.pg_prog		= NFS_PROGRAM,		/* program number */
--	.pg_nvers		= NFSD_NRVERS,		/* nr of entries in nfsd_version */
--	.pg_vers		= nfsd_version,		/* version table */
--	.pg_name		= "nfsd",		/* program name */
--	.pg_class		= "nfsd",		/* authentication class */
--	.pg_stats		= &nfsd_svcstats,	/* version table */
--	.pg_authenticate	= &svc_set_client,	/* export authentication */
--
--};
---- linux-2.6.13/include/linux/nfsd/syscall.h.ctlbits	2005-08-28 19:41:01.000000000 -0400
-+++ linux-2.6.13/include/linux/nfsd/syscall.h	2005-09-23 11:47:40.430008000 -0400
-@@ -39,6 +39,22 @@
- #define NFSCTL_GETFD		7	/* get an fh by path (used by mountd) */
+--- linux-2.6.14/include/linux/nfsd/syscall.h.aa1	2005-11-08 09:31:44.000000000 +0000
++++ linux-2.6.14/include/linux/nfsd/syscall.h	2005-11-08 09:32:14.000000000 +0000
+@@ -40,19 +40,28 @@
  #define	NFSCTL_GETFS		8	/* get an fh by path with max FH len */
  
-+/*
+ /*
+- * Macros used to set version
 + * Macros used to set version and protocol
-+ */
-+#define NFSCTL_VERSET(_cltbits, _v)   ((_cltbits) |=  (1 << ((_v) - 1)))
-+#define NFSCTL_VERUNSET(_cltbits, _v) ((_cltbits) &= ~(1 << ((_v) - 1)))
-+#define NFSCTL_VERISSET(_cltbits, _v) ((_cltbits) & (1 << ((_v) - 1)))
+  */
+ #define NFSCTL_VERSET(_cltbits, _v)   ((_cltbits) |=  (1 << (_v)))
+ #define NFSCTL_VERUNSET(_cltbits, _v) ((_cltbits) &= ~(1 << (_v)))
+ #define NFSCTL_VERISSET(_cltbits, _v) ((_cltbits) & (1 << (_v)))
+ 
+ #if defined(CONFIG_NFSD_V4)
+ #define	NFSCTL_VERALL	(0x1c /* 0b011100 */)
+ #elif defined(CONFIG_NFSD_V3)
+ #define	NFSCTL_VERALL	(0x0c /* 0b001100 */)
+ #else
+ #define	NFSCTL_VERALL	(0x04 /* 0b000100 */)
+ #endif
 +
 +#define NFSCTL_UDPSET(_cltbits)       ((_cltbits) |=  (1 << (17 - 1)))
 +#define NFSCTL_UDPUNSET(_cltbits)     ((_cltbits) &= ~(1 << (17 - 1)))
@@ -344,17 +183,16 @@
 +#define NFSCTL_TCPUNSET(_cltbits)     ((_cltbits) &= ~(1 << (18 - 1)))
 +#define NFSCTL_TCPISSET(_cltbits)     ((_cltbits) & (1 << (18 - 1)))
 +
-+
+ 
  /* SVC */
  struct nfsctl_svc {
- 	unsigned short		svc_port;
-@@ -120,6 +136,9 @@ extern int		exp_delclient(struct nfsctl_
+@@ -135,7 +136,8 @@ extern int		exp_delclient(struct nfsctl_
  extern int		exp_export(struct nfsctl_export *nxp);
  extern int		exp_unexport(struct nfsctl_export *nxp);
  
+-extern unsigned int nfsd_versbits;
 +extern int nfsd_port;
 +extern unsigned int nfsd_versbits, nfsd_portbits;
-+
+ 
  #endif /* __KERNEL__ */
  
- #endif /* NFSD_SYSCALL_H */

linux-2.6-build-nonintconfig.patch:
 linux-2.6.14/scripts/kconfig/confdata.c |    8 +++-----
 linux-800/scripts/kconfig/Makefile      |    4 ++++
 linux-800/scripts/kconfig/conf.c        |   26 +++++++++++++++++++++++---
 3 files changed, 30 insertions(+), 8 deletions(-)

Index: linux-2.6-build-nonintconfig.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-build-nonintconfig.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-build-nonintconfig.patch	28 Oct 2005 05:23:06 -0000	1.3
+++ linux-2.6-build-nonintconfig.patch	6 Jan 2006 05:42:17 -0000	1.4
@@ -99,23 +99,52 @@
  .PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig
  
  randconfig: $(obj)/conf
---- linux-2.6.12/scripts/kconfig/confdata.c~	2005-06-22 13:17:13.000000000 -0400
-+++ linux-2.6.12/scripts/kconfig/confdata.c	2005-06-22 13:17:23.000000000 -0400
-@@ -129,7 +129,7 @@ int conf_read(const char *name)
+--- linux-2.6.14/scripts/kconfig/confdata.c~	2005-11-10 14:55:46.000000000 -0500
++++ linux-2.6.14/scripts/kconfig/confdata.c	2005-11-10 14:56:01.000000000 -0500
+@@ -149,7 +149,7 @@ int conf_read_simple(const char *name)
  				continue;
  			sym = sym_find(line + 9);
  			if (!sym) {
--				fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 9);
-+				//fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 9);
+-				conf_warning("trying to assign nonexistent symbol %s", line + 9);
++				//conf_warning("trying to assign nonexistent symbol %s", line + 9);
  				break;
- 			}
- 			switch (sym->type) {
-@@ -154,7 +154,7 @@ int conf_read(const char *name)
+ 			} else if (!(sym->flags & SYMBOL_NEW)) {
+ 				conf_warning("trying to reassign symbol %s", sym->name);
+@@ -179,7 +179,7 @@ int conf_read_simple(const char *name)
  				*p2 = 0;
  			sym = sym_find(line + 7);
  			if (!sym) {
--				fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 7);
-+				//fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 7);
+-				conf_warning("trying to assign nonexistent symbol %s", line + 7);
++				//conf_warning("trying to assign nonexistent symbol %s", line + 7);
  				break;
+ 			} else if (!(sym->flags & SYMBOL_NEW)) {
+ 				conf_warning("trying to reassign symbol %s", sym->name);
+--- linux-2.6.14/scripts/kconfig/confdata.c~	2005-11-15 23:51:37.000000000 -0500
++++ linux-2.6.14/scripts/kconfig/confdata.c	2005-11-15 23:52:50.000000000 -0500
+@@ -153,7 +153,6 @@ int conf_read_simple(const char *name)
+ 				break;
+ 			} else if (!(sym->flags & SYMBOL_NEW)) {
+ 				conf_warning("trying to reassign symbol %s", sym->name);
+-				break;
  			}
  			switch (sym->type) {
+ 			case S_BOOLEAN:
+@@ -183,7 +182,6 @@ int conf_read_simple(const char *name)
+ 				break;
+ 			} else if (!(sym->flags & SYMBOL_NEW)) {
+ 				conf_warning("trying to reassign symbol %s", sym->name);
+-				break;
+ 			}
+ 			switch (sym->type) {
+ 			case S_TRISTATE:
+--- linux-2.6.14/scripts/kconfig/confdata.c~	2005-11-16 00:06:16.000000000 -0500
++++ linux-2.6.14/scripts/kconfig/confdata.c	2005-11-16 00:06:40.000000000 -0500
+@@ -254,7 +254,7 @@ int conf_read_simple(const char *name)
+ 					cs->flags |= SYMBOL_NEW;
+ 				} else
+ 					cs->user.val = sym;
+-				break;
++				//break;
+ 			}
+ 			cs->user.tri = E_OR(cs->user.tri, sym->user.tri);
+ 		}

linux-2.6-build-userspace-headers-warning.patch:
 linux-10000/include/linux/config.h    |    4 +++-
 linux-10001/include/linux/config.h    |    2 +-
 linux-2.6.13/arch/powerpc/boot/main.c |    3 +++
 3 files changed, 7 insertions(+), 2 deletions(-)

Index: linux-2.6-build-userspace-headers-warning.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-build-userspace-headers-warning.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-build-userspace-headers-warning.patch	28 Oct 2005 05:23:06 -0000	1.3
+++ linux-2.6-build-userspace-headers-warning.patch	6 Jan 2006 05:42:17 -0000	1.4
@@ -22,8 +22,8 @@
 make[1]: *** [arch/ppc64/boot/main.o] Error 1
 make[1]: *** Waiting for unfinished jobs....
 
---- linux-2.6.13/arch/ppc64/boot/main.c~	2005-09-04 16:45:23.000000000 -0400
-+++ linux-2.6.13/arch/ppc64/boot/main.c	2005-09-04 16:45:28.000000000 -0400
+--- linux-2.6.13/arch/powerpc/boot/main.c~	2005-09-04 16:45:23.000000000 -0400
++++ linux-2.6.13/arch/powerpc/boot/main.c	2005-09-04 16:45:28.000000000 -0400
 @@ -8,6 +8,9 @@
   * as published by the Free Software Foundation; either version
   * 2 of the License, or (at your option) any later version.

linux-2.6-bzimage.patch:
 linux-400/arch/ia64/Makefile    |    4 ++++
 linux-500/arch/s390/Makefile    |    5 +++++
 linux-600/arch/sparc/Makefile   |    3 +++
 linux-600/arch/sparc64/Makefile |    3 +++
 4 files changed, 15 insertions(+)

Index: linux-2.6-bzimage.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-bzimage.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-bzimage.patch	28 Oct 2005 05:23:06 -0000	1.3
+++ linux-2.6-bzimage.patch	6 Jan 2006 05:42:17 -0000	1.4
@@ -2,40 +2,6 @@
 so that every arch understands bzImage
 
 
---- linux-2.6.13/arch/ppc64/boot/Makefile~	2005-09-10 18:01:04.000000000 -0400
-+++ linux-2.6.13/arch/ppc64/boot/Makefile	2005-09-10 18:01:21.000000000 -0400
-@@ -114,6 +114,9 @@ $(obj)/zImage: $(obj)/zImage.vmode $(obj
- 	@cp -f $< $@
- 	$(call if_changed,addnote)
- 
-+$(obj)/zImage.stub: $(obj-boot) FORCE
-+	$(call cmd,bootld,$(obj-boot))
-+
- $(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote FORCE
- 	@cp -f $< $@
- 	$(call if_changed,addnote)
---- linux-2.6.13/arch/ppc64/Makefile~	2005-09-10 18:01:31.000000000 -0400
-+++ linux-2.6.13/arch/ppc64/Makefile	2005-09-10 18:01:45.000000000 -0400
-@@ -89,7 +89,7 @@ drivers-$(CONFIG_OPROFILE)	+= arch/ppc64
- 
- boot := arch/ppc64/boot
- 
--boottargets-$(CONFIG_PPC_PSERIES) += zImage zImage.initrd
-+boottargets-$(CONFIG_PPC_PSERIES) += zImage zImage.initrd zImage.stub
- boottargets-$(CONFIG_PPC_PMAC) += zImage.vmode zImage.initrd.vmode
- boottargets-$(CONFIG_PPC_MAPLE) += zImage zImage.initrd
- boottargets-$(CONFIG_PPC_ISERIES) += vmlinux.sminitrd vmlinux.initrd vmlinux.sm
-diff -urNp --exclude-from=/home/davej/.exclude linux-10000/arch/ppc/Makefile linux-10001/arch/ppc/Makefile
---- linux-10000/arch/ppc/Makefile
-+++ linux-10001/arch/ppc/Makefile
-@@ -78,6 +78,7 @@ CPPFLAGS_vmlinux.lds	:= -Upowerpc
- 
- # All the instructions talk about "make bzImage".
- bzImage: zImage
-+	cp vmlinux arch/ppc/boot/bzImage
- 
- boot := arch/$(ARCH)/boot
- 
 diff -urNp --exclude-from=/home/davej/.exclude linux-400/arch/s390/Makefile linux-500/arch/s390/Makefile
 --- linux-400/arch/s390/Makefile
 +++ linux-500/arch/s390/Makefile

linux-2.6-compile-fixes.patch:
 0 files changed

Index: linux-2.6-compile-fixes.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-compile-fixes.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- linux-2.6-compile-fixes.patch	10 Dec 2005 05:42:03 -0000	1.6
+++ linux-2.6-compile-fixes.patch	6 Jan 2006 05:42:17 -0000	1.7
@@ -1,11 +0,0 @@
---- linux-2.6.14/include/linux/parport_pc.h~	2005-12-10 00:26:42.000000000 -0500
-+++ linux-2.6.14/include/linux/parport_pc.h	2005-12-10 00:38:57.000000000 -0500
-@@ -86,7 +86,7 @@ extern __inline__ void dump_parport_stat
- 	unsigned char dcr = inb (CONTROL (p));
- 	unsigned char dsr = inb (STATUS (p));
- 	static char *ecr_modes[] = {"SPP", "PS2", "PPFIFO", "ECP", "xXx", "yYy", "TST", "CFG"};
--	const struct parport_pc_private *priv = (parport_pc_private *)p->physport->private_data;
-+	const struct parport_pc_private *priv = p->physport->private_data;
- 	int i;
- 
- 	printk (KERN_DEBUG "*** parport state (%s): ecr=[%s", str, ecr_modes[(ecr & 0xe0) >> 5]);

linux-2.6-crashdump-common.patch:
 linux-2.6.12/Documentation/sysrq.txt         |    8 
 linux-2.6.12/arch/i386/kernel/nmi.c          |    1 
 linux-2.6.12/arch/i386/kernel/traps.c        |    3 
 linux-2.6.12/arch/i386/mm/init.c             |   47 +++++
 linux-2.6.12/arch/i386/mm/pgtable.c          |    3 
 linux-2.6.12/arch/ia64/kernel/process.c      |   30 ++-
 linux-2.6.12/arch/ia64/kernel/traps.c        |    6 
 linux-2.6.12/arch/ia64/mm/contig.c           |    3 
 linux-2.6.12/arch/ia64/mm/discontig.c        |    3 
 linux-2.6.12/arch/ia64/mm/init.c             |   90 +++++++++
 linux-2.6.12/arch/powerpc/kernel/process.c   |    1 
 linux-2.6.12/arch/powerpc/kernel/traps.c     |    3 
 linux-2.6.12/arch/powerpc/mm/mem.c           |   29 +++
 linux-2.6.12/arch/s390/kernel/traps.c        |    6 
 linux-2.6.12/arch/x86_64/kernel/process.c    |    2 
 linux-2.6.12/arch/x86_64/kernel/traps.c      |    6 
 linux-2.6.12/arch/x86_64/mm/init.c           |   32 +++
 linux-2.6.12/drivers/char/sysrq.c            |   13 +
 linux-2.6.12/include/asm-generic/crashdump.h |   47 +++++
 linux-2.6.12/include/asm-i386/crashdump.h    |  123 +++++++++++++
 linux-2.6.12/include/asm-i386/kmap_types.h   |    4 
 linux-2.6.12/include/asm-ia64/crashdump.h    |   72 +++++++
 linux-2.6.12/include/asm-powerpc/crashdump.h |   61 ++++++
 linux-2.6.12/include/asm-x86_64/crashdump.h  |   86 +++++++++
 linux-2.6.12/include/linux/kernel.h          |   18 +
 linux-2.6.12/kernel/Makefile                 |    2 
 linux-2.6.12/kernel/dump.c                   |  246 +++++++++++++++++++++++++++
 linux-2.6.12/kernel/panic.c                  |    4 
 linux-2.6.12/kernel/printk.c                 |   20 ++
 linux-2.6.12/kernel/sched.c                  |    2 
 linux-2.6.13/arch/x86_64/mm/fault.c          |    1 
 linux-2.6.13/drivers/char/sysrq.c            |    5 
 32 files changed, 963 insertions(+), 14 deletions(-)

Index: linux-2.6-crashdump-common.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-crashdump-common.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- linux-2.6-crashdump-common.patch	28 Oct 2005 05:23:06 -0000	1.5
+++ linux-2.6-crashdump-common.patch	6 Jan 2006 05:42:17 -0000	1.6
@@ -103,13 +103,13 @@
 +
 +#endif /* _ASM_IA64_CRASHDUMP_H */
 --- /dev/null	2005-08-18 08:15:49.820487896 -0400
-+++ linux-2.6.12/include/asm-ppc64/crashdump.h	2005-08-18 14:23:59.000000000 -0400
++++ linux-2.6.12/include/asm-powerpc/crashdump.h	2005-08-18 14:23:59.000000000 -0400
 @@ -0,0 +1,61 @@
-+#ifndef _ASM_PPC64_CRASHDUMP_H
-+#define _ASM_PPC64_CRASHDUMP_H
++#ifndef _ASM_POWERPC_CRASHDUMP_H
++#define _ASM_POWERPC_CRASHDUMP_H
 +
 +/*
-+ * linux/include/asm-ppc64/crashdump.h
++ * linux/include/asm-powerpc/crashdump.h
 + *
 + * Copyright (c) 2003, 2004 Red Hat, Inc. All rights reserved.
 + * Copyright (C) 2004 IBM Corp.
@@ -165,7 +165,7 @@
 +
 +#endif /* __KERNEL__ */
 +
-+#endif /* _ASM_PPC64_CRASHDUMP_H */
++#endif /* _ASM_POWERPC_CRASHDUMP_H */
 --- /dev/null	2005-08-18 08:15:49.820487896 -0400
 +++ linux-2.6.12/include/asm-x86_64/crashdump.h	2005-08-18 14:23:59.000000000 -0400
 @@ -0,0 +1,86 @@
@@ -962,14 +962,6 @@
  
 --- linux-2.6.12/arch/x86_64/mm/init.c.orig	2005-08-18 12:41:25.000000000 -0400
 +++ linux-2.6.12/arch/x86_64/mm/init.c	2005-08-18 14:23:59.000000000 -0400
-@@ -23,6 +23,7 @@
- #include <linux/pagemap.h>
- #include <linux/bootmem.h>
- #include <linux/proc_fs.h>
-+#include <linux/module.h>
- 
- #include <asm/processor.h>
- #include <asm/system.h>
 @@ -85,6 +86,8 @@
  	printk("%d pages swap cached\n",cached);
  }
@@ -1286,17 +1278,9 @@
  	bust_spinlocks(0);
  	die.lock_owner = -1;
  	spin_unlock_irq(&die.lock);
---- linux-2.6.12/arch/ppc64/mm/init.c.orig	2005-08-18 12:41:13.000000000 -0400
-+++ linux-2.6.12/arch/ppc64/mm/init.c	2005-08-18 14:23:59.000000000 -0400
-@@ -113,6 +113,7 @@
- 	printk("%ld pages shared\n", shared);
- 	printk("%ld pages swap cached\n", cached);
- }
-+EXPORT_SYMBOL_GPL(show_mem);
- 
- #ifdef CONFIG_PPC_ISERIES
- 
-@@ -528,6 +529,34 @@
+--- linux-2.6.12/arch/powerpc/mm/mem.c.orig	2005-08-18 12:41:13.000000000 -0400
++++ linux-2.6.12/arch/powerpc/mm/mem.c	2005-08-18 14:23:59.000000000 -0400
+@@ -89,6 +89,34 @@
  }
  EXPORT_SYMBOL(page_is_ram);
  
@@ -1328,21 +1312,29 @@
 +}
 +EXPORT_SYMBOL_GPL(next_ram_page);
 +
+ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
+ 			      unsigned long size, pgprot_t vma_prot)
+ {
+@@ -216,6 +216,7 @@
+ 	printk("%ld pages shared\n", shared);
+ 	printk("%ld pages swap cached\n", cached);
+ }
++EXPORT_SYMBOL_GPL(show_mem);
+ 
  /*
   * Initialize the bootmem system and give it all the memory we
-  * have available.
---- linux-2.6.12/arch/ppc64/kernel/process.c.orig	2005-08-18 12:40:01.000000000 -0400
-+++ linux-2.6.12/arch/ppc64/kernel/process.c	2005-08-18 14:23:59.000000000 -0400
-@@ -257,6 +257,7 @@
- 
- 	printk("\n");
+--- linux-2.6.12/arch/powerpc/kernel/process.c.orig	2005-08-18 12:40:01.000000000 -0400
++++ linux-2.6.12/arch/powerpc/kernel/process.c	2005-08-18 14:23:59.000000000 -0400
+@@ -444,6 +444,7 @@
+ 	if (!user_mode(regs))
+ 		show_instructions(regs);
  }
 +EXPORT_SYMBOL_GPL(show_regs);
  
- void show_regs(struct pt_regs * regs)
+ void exit_thread(void)
  {
---- linux-2.6.12/arch/ppc64/kernel/traps.c.orig	2005-08-18 12:40:01.000000000 -0400
-+++ linux-2.6.12/arch/ppc64/kernel/traps.c	2005-08-18 14:23:59.000000000 -0400
+--- linux-2.6.12/arch/powerpc/kernel/traps.c.orig	2005-08-18 12:40:01.000000000 -0400
++++ linux-2.6.12/arch/powerpc/kernel/traps.c	2005-08-18 14:23:59.000000000 -0400
 @@ -135,6 +135,7 @@
  		printk("\n");
  	print_modules();
@@ -1352,11 +1344,39 @@
  	spin_unlock_irq(&die_lock);
  
 @@ -142,6 +143,8 @@
- 		panic("Fatal exception in interrupt");
  
  	if (panic_on_oops) {
+ #ifdef CONFIG_PPC64
 +		if (netdump_func)
 +			netdump_func = NULL;
  		printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
  		ssleep(5);
- 		panic("Fatal exception");
+ #endif
+
+--- linux-2.6.13/drivers/char/sysrq.c.orig
++++ linux-2.6.13/drivers/char/sysrq.c
+@@ -95,12 +95,14 @@ static struct sysrq_key_op sysrq_unraw_o
+ };
+ #endif /* CONFIG_VT */
+ 
+-#ifdef CONFIG_KEXEC
+ /* crashdump sysrq handler */
+ static void sysrq_handle_crashdump(int key, struct pt_regs *pt_regs,
+ 				struct tty_struct *tty)
+ {
++#ifdef CONFIG_KEXEC
+ 	crash_kexec(pt_regs);
++#endif
++ 	*( (char *) 0) = 0;
+ }
+ static struct sysrq_key_op sysrq_crashdump_op = {
+ 	.handler	= sysrq_handle_crashdump,
+@@ -108,7 +110,6 @@ static struct sysrq_key_op sysrq_crashdu
+ 	.action_msg	= "Trigger a crashdump",
+ 	.enable_mask	= SYSRQ_ENABLE_DUMP,
+ };
+-#endif
+ 
+ /* reboot sysrq handler */
+ static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs,
+

linux-2.6-crashdump-reboot-exports.patch:
 linux-2.6.12/arch/i386/kernel/process.c         |    2 ++
 linux-2.6.12/arch/i386/kernel/reboot.c          |    4 ++++
 linux-2.6.12/arch/powerpc/kernel/setup-common.c |    2 ++
 linux-2.6.12/arch/powerpc/kernel/setup_64.c     |    2 ++
 linux-2.6.12/arch/s390/kernel/process.c         |    2 ++
 linux-2.6.12/arch/s390/kernel/setup.c           |    4 ++++
 linux-2.6.12/arch/x86_64/kernel/reboot.c        |    4 ++++
 linux-2.6.14/arch/ia64/kernel/process.c         |    2 ++
 8 files changed, 22 insertions(+)

Index: linux-2.6-crashdump-reboot-exports.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-crashdump-reboot-exports.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- linux-2.6-crashdump-reboot-exports.patch	28 Oct 2005 05:23:06 -0000	1.5
+++ linux-2.6-crashdump-reboot-exports.patch	6 Jan 2006 05:42:17 -0000	1.6
@@ -28,27 +28,26 @@
  void machine_power_off(void)
  {
  	console_unblank();
---- linux-2.6.12/arch/ia64/kernel/process.c.orig	2005-08-22 14:07:34.782386720 -0400
-+++ linux-2.6.12/arch/ia64/kernel/process.c	2005-08-22 14:07:36.013178773 -0400
-@@ -812,12 +812,16 @@ machine_restart (char *restart_cmd)
+--- linux-2.6.14/arch/ia64/kernel/process.c~	2005-11-11 12:58:33.000000000 -0500
++++ linux-2.6.14/arch/ia64/kernel/process.c	2005-11-11 12:58:48.000000000 -0500
+@@ -820,6 +820,7 @@ machine_restart (char *restart_cmd)
+ 	(void) notify_die(DIE_MACHINE_RESTART, restart_cmd, NULL, 0, 0, 0);
  	(*efi.reset_system)(EFI_RESET_WARM, 0, 0, NULL);
  }
- 
 +EXPORT_SYMBOL(machine_restart);
-+
+ 
  void
  machine_halt (void)
- {
+@@ -827,6 +828,7 @@ machine_halt (void)
+ 	(void) notify_die(DIE_MACHINE_HALT, "", NULL, 0, 0, 0);
  	cpu_halt();
  }
- 
 +EXPORT_SYMBOL(machine_halt);
-+
+ 
  void
  machine_power_off (void)
- {
---- linux-2.6.12/arch/ppc64/kernel/setup.c.orig	2005-08-22 14:09:24.318964809 -0400
-+++ linux-2.6.12/arch/ppc64/kernel/setup.c	2005-08-22 14:09:43.133825875 -0400
+--- linux-2.6.12/arch/powerpc/kernel/setup-common.c.orig	2005-08-22 14:09:24.318964809 -0400
++++ linux-2.6.12/arch/powerpc/kernel/setup-common.c	2005-08-22 14:09:43.133825875 -0400
 @@ -695,6 +695,8 @@ void machine_restart(char *cmd)
  	while (1) ;
  }
@@ -58,6 +57,8 @@
  void machine_power_off(void)
  {
  	machine_shutdown();
+--- linux-2.6.12/arch/powerpc/kernel/setup_64.c.orig	2005-08-22 14:09:24.318964809 -0400
++++ linux-2.6.12/arch/powerpc/kernel/setup_64.c	2005-08-22 14:09:43.133825875 -0400
 @@ -720,6 +722,8 @@ void machine_halt(void)
  	while (1) ;
  }

linux-2.6-debug-spinlock-panic.patch:
 spinlock_debug.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletion(-)

Index: linux-2.6-debug-spinlock-panic.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-debug-spinlock-panic.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-debug-spinlock-panic.patch	28 Oct 2005 05:23:06 -0000	1.3
+++ linux-2.6-debug-spinlock-panic.patch	6 Jan 2006 05:42:17 -0000	1.4
@@ -6,9 +6,10 @@
 
 --- linux-2.6.13/lib/spinlock_debug.c~	2005-09-12 20:14:31.000000000 -0400
 +++ linux-2.6.13/lib/spinlock_debug.c	2005-09-12 20:15:56.000000000 -0400
-@@ -11,6 +11,16 @@
+@@ -11,6 +11,17 @@
  #include <linux/interrupt.h>
  #include <linux/delay.h>
++#include <linux/module.h>
  
 +int nopanic;
 +static int __init nopanic_setup(char *str)
@@ -29,7 +30,7 @@
  		 */
 -//		panic("bad locking");
 +		if (nopanic)
-+			printk("Bad locking\n");
++			printk("bad locking\n");
 +		else
 +			panic("bad locking");
  #endif

linux-2.6-debug-spinlock-taint.patch:
 spinlock_debug.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

Index: linux-2.6-debug-spinlock-taint.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-debug-spinlock-taint.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-debug-spinlock-taint.patch	28 Oct 2005 05:23:06 -0000	1.3
+++ linux-2.6-debug-spinlock-taint.patch	6 Jan 2006 05:42:17 -0000	1.4
@@ -1,62 +1,64 @@
 Print info about tainting in the spinlock debug printks.
 
---- linux-2.6.13/lib/spinlock_debug.c~	2005-09-12 20:10:31.000000000 -0400
-+++ linux-2.6.13/lib/spinlock_debug.c	2005-09-12 20:13:57.000000000 -0400
-@@ -19,8 +19,8 @@ static void spin_bug(spinlock_t *lock, c
+--- linux-2.6.14/lib/spinlock_debug.c~	2005-12-21 11:42:59.000000000 -0500
++++ linux-2.6.14/lib/spinlock_debug.c	2005-12-21 11:44:12.000000000 -0500
+@@ -19,9 +19,9 @@ static void spin_bug(spinlock_t *lock, c
  	if (xchg(&print_once, 0)) {
  		if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT)
  			owner = lock->owner;
 -		printk("BUG: spinlock %s on CPU#%d, %s/%d\n",
--			msg, smp_processor_id(), current->comm, current->pid);
 +		printk("BUG: spinlock %s on CPU#%d, %s/%d (%s)\n",
-+			msg, smp_processor_id(), current->comm, current->pid, print_tainted());
+ 			msg, raw_smp_processor_id(),
+-			current->comm, current->pid);
++			current->comm, current->pid, print_tainted());
  		printk(" lock: %p, .magic: %08x, .owner: %s/%d, .owner_cpu: %d\n",
  			lock, lock->magic,
  			owner ? owner->comm : "<none>",
-@@ -77,9 +77,9 @@ static void __spin_lock_debug(spinlock_t
+@@ -78,9 +78,9 @@ static void __spin_lock_debug(spinlock_t
  		/* lockup suspected: */
  		if (print_once) {
  			print_once = 0;
 -			printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p\n",
 +			printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p (%s)\n",
- 				smp_processor_id(), current->comm, current->pid,
--					lock);
-+					lock, print_tainted());
+ 				raw_smp_processor_id(), current->comm,
+-				current->pid, lock);
++				current->pid, lock, print_tainted());
  			dump_stack();
  		}
  	}
-@@ -119,8 +119,8 @@ static void rwlock_bug(rwlock_t *lock, c
+@@ -120,9 +120,9 @@ static void rwlock_bug(rwlock_t *lock, c
  	static long print_once = 1;
  
  	if (xchg(&print_once, 0)) {
 -		printk("BUG: rwlock %s on CPU#%d, %s/%d, %p\n", msg,
--			smp_processor_id(), current->comm, current->pid, lock);
 +		printk("BUG: rwlock %s on CPU#%d, %s/%d, %p (%s)\n", msg,
-+			smp_processor_id(), current->comm, current->pid, lock, print_tainted());
+ 			raw_smp_processor_id(), current->comm,
+-			current->pid, lock);
++			current->pid, lock, print_tainted());
  		dump_stack();
  #ifdef CONFIG_SMP
  		/*
-@@ -147,9 +147,9 @@ static void __read_lock_debug(rwlock_t *
+@@ -149,9 +149,9 @@ static void __read_lock_debug(rwlock_t *
  		/* lockup suspected: */
  		if (print_once) {
  			print_once = 0;
 -			printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p\n",
 +			printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p (%s)\n",
- 				smp_processor_id(), current->comm, current->pid,
--					lock);
-+					lock, print_tainted());
+ 				raw_smp_processor_id(), current->comm,
+-				current->pid, lock);
++				current->pid, lock, print_tainted());
  			dump_stack();
  		}
  	}
-@@ -219,9 +219,9 @@ static void __write_lock_debug(rwlock_t 
+@@ -221,9 +221,9 @@ static void __write_lock_debug(rwlock_t 
  		/* lockup suspected: */
  		if (print_once) {
  			print_once = 0;
 -			printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p\n",
 +			printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p (%s)\n",
- 				smp_processor_id(), current->comm, current->pid,
--					lock);
-+					lock, print_tainted());
+ 				raw_smp_processor_id(), current->comm,
+-				current->pid, lock);
++				current->pid, lock, print_tainted());
  			dump_stack();
  		}
  	}

linux-2.6-debug-taint-vm.patch:
 linux-2.6.11/include/asm-generic/bug.h |    8 ++++++--
 linux-2.6.14/mm/page_alloc.c           |    4 ++--
 linux-2000/kernel/panic.c              |    1 +
 linux-2000/mm/slab.c                   |    4 ++--
 4 files changed, 11 insertions(+), 6 deletions(-)

Index: linux-2.6-debug-taint-vm.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-debug-taint-vm.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-debug-taint-vm.patch	28 Oct 2005 05:23:06 -0000	1.3
+++ linux-2.6-debug-taint-vm.patch	6 Jan 2006 05:42:17 -0000	1.4
@@ -36,16 +36,15 @@
  
  void add_taint(unsigned flag)
  {
-diff -urNp --exclude-from=/home/davej/.exclude linux-1740/mm/page_alloc.c linux-2000/mm/page_alloc.c
---- linux-1740/mm/page_alloc.c
-+++ linux-2000/mm/page_alloc.c
-@@ -97,9 +97,9 @@ static void bad_page(const char *functio
+--- linux-2.6.14/mm/page_alloc.c~	2005-11-15 12:09:41.000000000 -0500
++++ linux-2.6.14/mm/page_alloc.c	2005-11-15 12:10:01.000000000 -0500
+@@ -126,9 +126,9 @@ static void bad_page(const char *functio
  {
  	printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n",
  		function, current->comm, page);
 -	printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n",
 +	printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d (%s)\n",
- 		(int)(2*sizeof(page_flags_t)), (unsigned long)page->flags,
+ 		(int)(2*sizeof(unsigned long)), (unsigned long)page->flags,
 -		page->mapping, page_mapcount(page), page_count(page));
 +		page->mapping, page_mapcount(page), page_count(page), print_tainted());
  	printk(KERN_EMERG "Backtrace:\n");

linux-2.6-devmem.patch:
 arch/powerpc/mm/mem.c                   |   14 +++
 linux-1050/arch/i386/mm/init.c          |   19 ++++
 linux-1050/arch/ia64/mm/init.c          |    7 +
 linux-1050/arch/s390/mm/init.c          |    5 +
 linux-1050/arch/x86_64/mm/init.c        |   20 ++++
 linux-1050/drivers/char/mem.c           |  146 ++++----------------------------
 linux-1050/fs/proc/kcore.c              |    2 
 linux-1050/include/asm-alpha/page.h     |    1 
 linux-1050/include/asm-arm/page.h       |    2 
 linux-1050/include/asm-arm26/page.h     |    2 
 linux-1050/include/asm-cris/page.h      |    2 
 linux-1050/include/asm-h8300/page.h     |    2 
 linux-1050/include/asm-i386/page.h      |    4 
 linux-1050/include/asm-ia64/page.h      |    2 
 linux-1050/include/asm-m68k/page.h      |    2 
 linux-1050/include/asm-m68knommu/page.h |    2 
 linux-1050/include/asm-mips/page.h      |    2 
 linux-1050/include/asm-parisc/page.h    |    2 
 linux-1050/include/asm-ppc/page.h       |    2 
 linux-1050/include/asm-s390/page.h      |    2 
 linux-1050/include/asm-sh/page.h        |    2 
 linux-1050/include/asm-sh64/page.h      |    2 
 linux-1050/include/asm-sparc/page.h     |    2 
 linux-1050/include/asm-sparc64/page.h   |    2 
 linux-1050/include/asm-um/page.h        |    1 
 linux-1050/include/asm-v850/page.h      |    2 
 linux-1050/include/asm-x86_64/page.h    |    4 
 linux-2.6.13/arch/x86_64/mm/init.c      |   22 ++++
 linux-2.6.14/include/asm-powerpc/page.h |    2 
 29 files changed, 154 insertions(+), 125 deletions(-)

Index: linux-2.6-devmem.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-devmem.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-devmem.patch	28 Oct 2005 05:23:06 -0000	1.1
+++ linux-2.6-devmem.patch	6 Jan 2006 05:42:17 -0000	1.2
@@ -45,12 +45,21 @@
   * This installs a clean page in the kernel's page table.
   */
 diff -urNp --exclude-from=/home/davej/.exclude linux-1020/arch/ppc64/mm/init.c linux-1050/arch/ppc64/mm/init.c
---- linux-1020/arch/ppc64/mm/init.c
-+++ linux-1050/arch/ppc64/mm/init.c
-@@ -722,6 +722,18 @@ void __init mem_init(void)
+--- linux-1020/arch/powerpc/mm/mem.c
++++ linux-1050/arch/powerpc/mm/mem.c
+@@ -46,6 +46,7 @@
+ #include <asm/prom.h>
+ #include <asm/lmb.h>
+ #include <asm/sections.h>
++#include <asm/rtas.h>
+ #include <asm/vdso.h>
+ 
+ #include "mmu_decl.h"
+@@ -722,6 +722,19 @@ void __init mem_init(void)
+ 	max_mapnr = num_physpages;
  	totalram_pages += free_all_bootmem();
  #endif
- 
++
 +#ifdef CONFIG_PPC_PSERIES
 +	/* Mark the RTAS pages as PG_reserved so userspace can mmap them */
 +	if (rtas_rmo_buf) {
@@ -468,17 +477,17 @@
 +
  #endif /* __KERNEL__ */
  #endif /* _PPC_PAGE_H */
-diff -urNp --exclude-from=/home/davej/.exclude linux-1020/include/asm-ppc64/page.h linux-1050/include/asm-ppc64/page.h
---- linux-1020/include/asm-ppc64/page.h
-+++ linux-1050/include/asm-ppc64/page.h
-@@ -257,5 +257,7 @@ extern u64 ppc64_pft_size;		/* Log 2 of 
- #define VM_STACK_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
- 				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+--- linux-2.6.14/include/asm-powerpc/page.h~	2005-11-15 12:12:43.000000000 -0500
++++ linux-2.6.14/include/asm-powerpc/page.h	2005-11-15 12:13:21.000000000 -0500
+@@ -174,6 +174,8 @@ extern int page_is_ram(unsigned long pfn
+ 
+ #endif /* __ASSEMBLY__ */
  
 +#define devmem_is_allowed(x) 1
 +
  #endif /* __KERNEL__ */
- #endif /* _PPC64_PAGE_H */
+ 
+ #endif /* _ASM_POWERPC_PAGE_H */
 diff -urNp --exclude-from=/home/davej/.exclude linux-1020/include/asm-s390/page.h linux-1050/include/asm-s390/page.h
 --- linux-1020/include/asm-s390/page.h
 +++ linux-1050/include/asm-s390/page.h

linux-2.6-diskdump.patch:
 drivers/block/Kconfig          |    5 
 drivers/block/Makefile         |    1 
 drivers/block/diskdump.c       | 1121 +++++++++++++++++++++++++++++++++++++++++
 include/asm-generic/diskdump.h |   13 
 include/asm-i386/diskdump.h    |   55 ++
 include/asm-ia64/diskdump.h    |   63 ++
 include/asm-powerpc/diskdump.h |   55 ++
 include/asm-ppc/diskdump.h     |    6 
 include/asm-s390/diskdump.h    |    6 
 include/asm-x86_64/diskdump.h  |   44 +
 include/linux/diskdump.h       |  186 ++++++
 include/linux/interrupt.h      |    4 
 include/linux/timer.h          |    3 
 include/linux/workqueue.h      |    3 
 kernel/softirq.c               |   32 +
 kernel/timer.c                 |   44 +
 kernel/workqueue.c             |   34 +
 17 files changed, 1671 insertions(+), 4 deletions(-)

Index: linux-2.6-diskdump.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-diskdump.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- linux-2.6-diskdump.patch	28 Oct 2005 05:23:06 -0000	1.4
+++ linux-2.6-diskdump.patch	6 Jan 2006 05:42:17 -0000	1.5
@@ -125,7 +125,7 @@
 +static asmlinkage void disk_dump(struct pt_regs *, void *);
 +
 +
-+#if CONFIG_SMP
++#ifdef CONFIG_SMP
 +static void freeze_cpu(void *dummy)
 +{
 +	unsigned int cpu = smp_processor_id();
@@ -477,7 +477,7 @@
 +
 +static void freeze_other_cpus(void)
 +{
-+#if CONFIG_SMP
++#ifdef CONFIG_SMP
 +	int	i;
 +
 +	smp_call_function(freeze_cpu, NULL, 1, -1);
@@ -1693,7 +1693,7 @@
 +
 +#endif /* _ASM_GENERIC_DISKDUMP_H */
 --- /dev/null	2005-07-20 12:00:41.186496416 -0400
-+++ linux-2.6.12/include/asm-ppc64/diskdump.h	2005-08-19 16:47:34.233260834 -0400
++++ linux-2.6.12/include/asm-powerpc/diskdump.h	2005-08-19 16:47:34.233260834 -0400
 @@ -0,0 +1,55 @@
 +#ifndef _ASM_PPC64_DISKDUMP_H_
 +#define _ASM_PPC64_DISKDUMP_H_

linux-2.6-dump_smp_call_function.patch:
 arch/i386/kernel/smp.c    |   44 ++++++++++++++++++++++++++++++++++++++++++++
 arch/ia64/kernel/smp.c    |   44 ++++++++++++++++++++++++++++++++++++++++++++
 arch/powerpc/kernel/smp.c |   45 ++++++++++++++++++++++++++++++++++++++++++++-
 arch/x86_64/kernel/smp.c  |   45 +++++++++++++++++++++++++++++++++++++++++++++
 drivers/block/diskdump.c  |    2 +-
 drivers/net/netdump.c     |    2 +-
 include/linux/smp.h       |    2 ++
 7 files changed, 181 insertions(+), 3 deletions(-)

Index: linux-2.6-dump_smp_call_function.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-dump_smp_call_function.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- linux-2.6-dump_smp_call_function.patch	28 Oct 2005 05:23:06 -0000	1.7
+++ linux-2.6-dump_smp_call_function.patch	6 Jan 2006 05:42:17 -0000	1.8
@@ -65,8 +65,8 @@
   * this function sends a 'generic call function' IPI to all other CPUs
   * in the system.
   */
---- linux-2.6.12/arch/ppc64/kernel/smp.c.orig	2005-08-23 10:49:53.005279633 -0400
-+++ linux-2.6.12/arch/ppc64/kernel/smp.c	2005-08-23 10:51:04.770473481 -0400
+--- linux-2.6.12/arch/powerpc/kernel/smp.c.orig	2005-08-23 10:49:53.005279633 -0400
++++ linux-2.6.12/arch/powerpc/kernel/smp.c	2005-08-23 10:51:04.770473481 -0400
 @@ -200,6 +200,7 @@ void smp_send_stop(void)
   * Stolen from the i386 version.
   */
@@ -82,8 +82,8 @@
 -} *call_data;
 +} *call_data, *saved_call_data;
  
- /* delay of at least 8 seconds on 1GHz cpu */
- #define SMP_CALL_TIMEOUT (1UL << (30 + 3))
+ /* delay of at least 8 seconds */
+ #define SMP_CALL_TIMEOUT	8
  
  /*
 + * dump version of smp_call_function to avoid deadlock in call_lock

linux-2.6-execshield.patch:
 linux-2.6.13-a/arch/x86_64/ia32/ia32_binfmt.c  |    4 
 linux-2.6.13-a/arch/x86_64/kernel/process.c    |    6 -
 linux-2.6.13-a/arch/x86_64/kernel/setup64.c    |   25 -----
 linux-2.6.13-a/include/asm-x86_64/pgtable.h    |    2 
 linux-2.6.13/mm/fremap.c                       |   16 +--
 linux-2.6.14/fs/proc/base.c                    |    2 
 linux-810/arch/i386/kernel/asm-offsets.c       |    1 
 linux-810/arch/i386/kernel/entry.S             |    8 +
 linux-810/arch/i386/kernel/process.c           |   59 ++++++++++++
 linux-810/arch/i386/kernel/signal.c            |    4 
 linux-810/arch/i386/kernel/smp.c               |    3 
 linux-810/arch/i386/kernel/sysenter.c          |   55 +++++++++++
 linux-810/arch/i386/kernel/traps.c             |   93 ++++++++++++++++++-
 linux-810/arch/i386/kernel/vsyscall-sysenter.S |    6 -
 linux-810/arch/i386/kernel/vsyscall.lds.S      |    4 
 linux-810/arch/i386/mm/init.c                  |    6 +
 linux-810/arch/i386/mm/mmap.c                  |    6 -
 linux-810/arch/ia64/ia32/binfmt_elf32.c        |    2 
 linux-810/arch/x86_64/ia32/ia32_binfmt.c       |    2 
 linux-810/arch/x86_64/kernel/process.c         |    7 -
 linux-810/arch/x86_64/mm/Makefile              |    2 
 linux-810/arch/x86_64/mm/fault.c               |    2 
 linux-810/arch/x86_64/mm/mmap.c                |   95 +++++++++++++++++++
 linux-810/drivers/char/random.c                |    7 +
 linux-810/fs/binfmt_elf.c                      |  120 ++++++++++++++++++++-----
 linux-810/fs/proc/array.c                      |    8 +
 linux-810/fs/proc/base.c                       |    4 
 linux-810/fs/proc/task_mmu.c                   |   25 ++++-
 linux-810/include/asm-i386/desc.h              |   14 ++
 linux-810/include/asm-i386/elf.h               |   42 +++++---
 linux-810/include/asm-i386/mmu.h               |    6 +
 linux-810/include/asm-i386/pgalloc.h           |    1 
 linux-810/include/asm-i386/processor.h         |    8 +
 linux-810/include/asm-i386/thread_info.h       |    1 
 linux-810/include/asm-ia64/pgalloc.h           |    4 
 linux-810/include/asm-powerpc/pgalloc.h        |    5 +
 linux-810/include/asm-ppc/pgalloc.h            |    5 +
 linux-810/include/asm-s390/pgalloc.h           |    4 
 linux-810/include/asm-sparc/pgalloc.h          |    4 
 linux-810/include/asm-sparc64/pgalloc.h        |    4 
 linux-810/include/asm-x86_64/pgalloc.h         |    7 +
 linux-810/include/asm-x86_64/processor.h       |    5 +
 linux-810/include/linux/mm.h                   |    9 +
 linux-810/include/linux/resource.h             |    5 -
 linux-810/include/linux/sched.h                |    9 +
 linux-810/include/linux/sysctl.h               |    3 
 linux-810/kernel/signal.c                      |   38 +++++++
 linux-810/kernel/sysctl.c                      |   39 ++++++++
 linux-810/mm/mmap.c                            |  105 ++++++++++++++++++++-
 linux-810/mm/mprotect.c                        |    5 -
 linux-810/mm/mremap.c                          |    4 
 linux-813/arch/i386/kernel/cpu/common.c        |    7 +
 52 files changed, 781 insertions(+), 127 deletions(-)

Index: linux-2.6-execshield.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-execshield.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-execshield.patch	30 Dec 2005 00:28:22 -0000	1.2
+++ linux-2.6-execshield.patch	6 Jan 2006 05:42:17 -0000	1.3
@@ -923,7 +923,7 @@
 diff -urNp --exclude-from=/home/davej/.exclude linux-804/fs/proc/task_mmu.c linux-810/fs/proc/task_mmu.c
 --- linux-804/fs/proc/task_mmu.c
 +++ linux-810/fs/proc/task_mmu.c
-@@ -26,13 +26,23 @@ char *task_mem(struct mm_struct *mm, cha
+@@ -43,7 +43,11 @@ char *task_mem(struct mm_struct *mm, cha
  		"VmStk:\t%8lu kB\n"
  		"VmExe:\t%8lu kB\n"
  		"VmLib:\t%8lu kB\n"
@@ -933,9 +933,11 @@
 +		"Brk:\t%08lx kB\n"
 +		"StaStk:\t%08lx kB\n"
 +		,
- 		(mm->total_vm - mm->reserved_vm) << (PAGE_SHIFT-10),
+ 		hiwater_vm << (PAGE_SHIFT-10),
+ 		(total_vm - mm->reserved_vm) << (PAGE_SHIFT-10),
  		mm->locked_vm << (PAGE_SHIFT-10),
- 		get_mm_counter(mm, rss) << (PAGE_SHIFT-10),
+@@ -51,7 +55,13 @@ char *task_mem(struct mm_struct *mm, cha
+ 		total_rss << (PAGE_SHIFT-10),
  		data << (PAGE_SHIFT-10),
  		mm->stack_vm << (PAGE_SHIFT-10), text, lib,
 -		(PTRS_PER_PTE*sizeof(pte_t)*mm->nr_ptes) >> 10);
@@ -944,7 +946,7 @@
 +#ifdef __i386__
 +	if (!nx_enabled)
 +		buffer += sprintf(buffer,
-+				"ExecLim:\t%08lx\n", mm->context.exec_limit);
++			"ExecLim:\t%08lx\n", mm->context.exec_limit);
 +#endif
  	return buffer;
  }
@@ -1180,9 +1182,9 @@
 +
  #endif /* _PPC_PGALLOC_H */
  #endif /* __KERNEL__ */
-diff -urNp --exclude-from=/home/davej/.exclude linux-804/include/asm-ppc64/pgalloc.h linux-810/include/asm-ppc64/pgalloc.h
---- linux-804/include/asm-ppc64/pgalloc.h
-+++ linux-810/include/asm-ppc64/pgalloc.h
+diff -urNp --exclude-from=/home/davej/.exclude linux-804/include/asm-powerpc/pgalloc.h linux-810/include/asm-powerpc/pgalloc.h
+--- linux-804/include/asm-powerpc/pgalloc.h
++++ linux-810/include/asm-powerpc/pgalloc.h
 @@ -13,6 +13,11 @@ extern kmem_cache_t *pgtable_cache[];
  #define PUD_CACHE_NUM	1
  #define PGD_CACHE_NUM	0
@@ -1466,29 +1468,29 @@
  		.data		= &core_uses_pid,
 --- linux-2.6.13/mm/fremap.c~	2005-10-13 17:34:08.000000000 -0400
 +++ linux-2.6.13/mm/fremap.c	2005-10-13 17:34:58.000000000 -0400
-@@ -85,13 +85,15 @@ int install_page(struct mm_struct *mm, s
+@@ -83,13 +83,15 @@ int install_page(struct mm_struct *mm, s
  	 * caller about it.
  	 */
  	err = -EINVAL;
 -	inode = vma->vm_file->f_mapping->host;
 -	size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
 -	if (!page->mapping || page->index >= size)
--		goto err_unlock;
+-		goto unlock;
 -	err = -ENOMEM;
 -	if (page_mapcount(page) > INT_MAX/2)
--		goto err_unlock;
+-		goto unlock;
 +	if (vma->vm_file) {
 +		inode = vma->vm_file->f_mapping->host;
 +		size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
 +		if (!page->mapping || page->index >= size)
-+			goto err_unlock;
++			goto unlock;
 +		err = -ENOMEM;
 +		if (page_mapcount(page) > INT_MAX/2)
-+			goto err_unlock;
++			goto unlock;
 +	}
  
- 	zap_pte(mm, vma, addr, pte);
- 
+ 	if (pte_none(*pte) || !zap_pte(mm, vma, addr, pte))
+ 		inc_mm_counter(mm, file_rss);
 diff -urNp --exclude-from=/home/davej/.exclude linux-804/mm/mmap.c linux-810/mm/mmap.c
 --- linux-804/mm/mmap.c
 +++ linux-810/mm/mmap.c
@@ -1612,7 +1614,7 @@
 +			 * as much as possible:
 +			 */
 +			if (addr >= 0x01000000) {
-+				tmp = randomize_range(0x01000000, PAGE_ALIGN(max(mm->start_brk, 0x08000000)), len);
++				tmp = randomize_range(0x01000000, PAGE_ALIGN(max(mm->start_brk, (unsigned long)0x08000000)), len);
 +				vma = find_vma(mm, tmp);
 +				if (TASK_SIZE - len >= tmp &&
 +				    (!vma || tmp + len <= vma->vm_start))
@@ -1675,14 +1677,14 @@
  		vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
  
  	return 0;
-@@ -1960,6 +2048,7 @@ void exit_mmap(struct mm_struct *mm)
- 	set_mm_counter(mm, rss, 0);
- 	mm->total_vm = 0;
- 	mm->locked_vm = 0;
+@@ -2048,6 +2048,7 @@ void exit_mmap(struct mm_struct *mm)
+ 	vm_unacct_memory(nr_accounted);
+ 	free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, 0);
+ 	tlb_finish_mmu(tlb, 0, end);
 +	arch_flush_exec_range(mm);
  
- 	spin_unlock(&mm->page_table_lock);
- 
+ 	/*
+ 	 * Walk the list again, actually closing and freeing it,
 diff -urNp --exclude-from=/home/davej/.exclude linux-804/mm/mprotect.c linux-810/mm/mprotect.c
 --- linux-804/mm/mprotect.c
 +++ linux-810/mm/mprotect.c

linux-2.6-modsign-include.patch:
 linux-2.6.13/include/asm-powerpc/module.h |   10 ++++++++++
 linux-2.6.14/include/asm-mips/module.h    |   12 ++++++++++--
 linux-905/include/asm-alpha/module.h      |    3 +++
 linux-905/include/asm-arm/module.h        |    5 +++++
 linux-905/include/asm-cris/module.h       |    5 +++++
 linux-905/include/asm-h8300/module.h      |    5 +++++
 linux-905/include/asm-i386/module.h       |    5 +++++
 linux-905/include/asm-ia64/module.h       |    5 +++++
 linux-905/include/asm-m32r/module.h       |    5 +++++
 linux-905/include/asm-m68k/module.h       |    5 +++++
 linux-905/include/asm-parisc/module.h     |    8 ++++++++
 linux-905/include/asm-s390/module.h       |    3 +++
 linux-905/include/asm-sh/module.h         |    5 +++++
 linux-905/include/asm-sparc/module.h      |    5 +++++
 linux-905/include/asm-sparc64/module.h    |    5 +++++
 linux-905/include/asm-um/module-i386.h    |    4 ++++
 linux-905/include/asm-v850/module.h       |    5 +++++
 linux-905/include/asm-x86_64/module.h     |    5 +++++
 18 files changed, 98 insertions(+), 2 deletions(-)

Index: linux-2.6-modsign-include.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-modsign-include.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-modsign-include.patch	28 Oct 2005 05:23:06 -0000	1.1
+++ linux-2.6-modsign-include.patch	6 Jan 2006 05:42:17 -0000	1.2
@@ -141,9 +141,9 @@
 +#define ELF_R_SYM(X)	ELF32_R_SYM(X)
  #endif /* _ASM_M68K_MODULE_H */
 
---- linux-2.6.13/include/asm-mips/module.h~	2005-09-05 17:18:22.000000000 -0400
-+++ linux-2.6.13/include/asm-mips/module.h	2005-09-05 17:20:33.000000000 -0400
-@@ -26,19 +26,26 @@ typedef struct
+--- linux-2.6.14/include/asm-mips/module.h~	2005-10-30 21:31:42.000000000 -0500
++++ linux-2.6.14/include/asm-mips/module.h	2005-10-30 21:33:30.000000000 -0500
+@@ -34,11 +34,15 @@ typedef struct {
  } Elf64_Mips_Rela;
  
  #ifdef CONFIG_32BIT
@@ -152,11 +152,15 @@
  #define Elf_Shdr	Elf32_Shdr
  #define Elf_Sym		Elf32_Sym
  #define Elf_Ehdr	Elf32_Ehdr
+ #define Elf_Addr	Elf32_Addr
 +#define Elf_Rel		Elf32_Rel
 +#define Elf_Rela	Elf32_Rela
 +#define ELF_R_TYPE(X)	ELF32_R_TYPE(X)
 +#define ELF_R_SYM(X)	ELF32_R_SYM(X)
  
+ #define Elf_Mips_Rel	Elf32_Rel
+ #define Elf_Mips_Rela	Elf32_Rela
+@@ -49,11 +53,15 @@ typedef struct {
  #endif
  
  #ifdef CONFIG_64BIT
@@ -165,14 +169,14 @@
  #define Elf_Shdr	Elf64_Shdr
  #define Elf_Sym		Elf64_Sym
  #define Elf_Ehdr	Elf64_Ehdr
--
+ #define Elf_Addr	Elf64_Addr
 +#define Elf_Rel		Elf64_Rel
 +#define Elf_Rela	Elf64_Rela
 +#define ELF_R_TYPE(X)	ELF64_R_TYPE(X)
 +#define ELF_R_SYM(X)	ELF64_R_SYM(X)
- #endif
  
- #ifdef CONFIG_MODULES
+ #define Elf_Mips_Rel	Elf64_Mips_Rel
+ #define Elf_Mips_Rela	Elf64_Mips_Rela
 diff -urNp --exclude-from=/home/davej/.exclude linux-904/include/asm-parisc/module.h linux-905/include/asm-parisc/module.h
 --- linux-904/include/asm-parisc/module.h
 +++ linux-905/include/asm-parisc/module.h

linux-2.6-netdump.patch:
 linux-2.6.12/drivers/net/Kconfig           |    7 
 linux-2.6.12/drivers/net/netdump.c         |  550 +++++++++++++++++++++++++++++
 linux-2.6.12/drivers/net/netdump.h         |   90 ++++
 linux-2.6.12/include/asm-generic/netdump.h |   48 ++
 linux-2.6.12/include/asm-i386/netdump.h    |   79 ++++
 linux-2.6.12/include/asm-ia64/netdump.h    |   82 ++++
 linux-2.6.12/include/asm-powerpc/netdump.h |   79 ++++
 linux-2.6.12/include/asm-s390/netdump.h    |    6 
 linux-2.6.12/include/asm-x86_64/netdump.h  |   79 ++++
 linux-2.6.12/include/linux/netdevice.h     |    8 
 linux-2.6.12/include/linux/netpoll.h       |    4 
 linux-2.6.12/net/core/netpoll.c            |   17 
 linux-2.6.14/drivers/net/Makefile          |    1 
 13 files changed, 1039 insertions(+), 11 deletions(-)

Index: linux-2.6-netdump.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-netdump.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- linux-2.6-netdump.patch	28 Oct 2005 05:23:06 -0000	1.4
+++ linux-2.6-netdump.patch	6 Jan 2006 05:42:17 -0000	1.5
@@ -660,13 +660,16 @@
  endif #NETDEVICES
  
  config NETPOLL
---- linux-2.6.12/drivers/net/Makefile.netdump.orig	2005-08-19 17:45:43.053483367 -0400
-+++ linux-2.6.12/drivers/net/Makefile	2005-08-19 17:47:33.025203810 -0400
-@@ -195,3 +195,4 @@ obj-$(CONFIG_IRDA) += irda/
+--- linux-2.6.14/drivers/net/Makefile~	2005-10-30 21:44:17.000000000 -0500
++++ linux-2.6.14/drivers/net/Makefile	2005-10-30 21:44:33.000000000 -0500
+@@ -203,6 +203,7 @@ obj-$(CONFIG_IRDA) += irda/
  obj-$(CONFIG_ETRAX_ETHERNET) += cris/
  
  obj-$(CONFIG_NETCONSOLE) += netconsole.o
 +obj-$(CONFIG_NETDUMP) += netdump.o
+ 
+ obj-$(CONFIG_FS_ENET) += fs_enet/
+ 
 --- linux-2.6.12/net/core/netpoll.c.netdump.orig	2005-08-19 17:46:01.104483015 -0400
 +++ linux-2.6.12/net/core/netpoll.c	2005-08-19 17:47:33.034202314 -0400
 @@ -20,10 +20,12 @@
@@ -998,13 +1001,13 @@
 +
 +#endif /* _ASM_GENERIC_NETDUMP_H */
 --- /dev/null	2005-07-20 12:00:41.186496416 -0400
-+++ linux-2.6.12/include/asm-ppc64/netdump.h	2005-08-19 17:47:33.036201981 -0400
++++ linux-2.6.12/include/asm-powerpc/netdump.h	2005-08-19 17:47:33.036201981 -0400
 @@ -0,0 +1,79 @@
 +#ifndef _ASM_PPC64_NETDUMP_H_
 +#define _ASM_PPC64_NETDUMP_H_
 +
 +/*
-+ * linux/include/asm-ppc64/netdump.h
++ * linux/include/asm-powerpc/netdump.h
 + *
 + * Copyright (c) 2003, 2004 Red Hat, Inc. All rights reserved.
 + * Copyright (C) 2004 IBM Corp.

linux-2.6-radeon-backlight.patch:
 radeon_base.c |   11 +
 radeon_pm.c   |  557 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 567 insertions(+), 1 deletion(-)

Index: linux-2.6-radeon-backlight.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-radeon-backlight.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-radeon-backlight.patch	28 Oct 2005 05:23:06 -0000	1.3
+++ linux-2.6-radeon-backlight.patch	6 Jan 2006 05:42:17 -0000	1.4
@@ -1,6 +1,9 @@
---- linux-2.6.11-rc4-tank/drivers/video/aty/radeon_pm.c.tppm	2005-02-20 20:09:02.000000000 +0200
-+++ linux-2.6.11-rc4-tank/drivers/video/aty/radeon_pm.c	2005-02-20 21:35:27.000000000 +0200
-@@ -25,8 +25,274 @@
+
+http://bugme.osdl.org/show_bug.cgi?id=3022
+
+--- vanilla/drivers/video/aty/radeon_pm.c	2005-10-27 20:02:08.000000000 -0400
++++ linux-2.6.14/drivers/video/aty/radeon_pm.c	2005-11-30 02:20:01.000000000 -0500
+@@ -25,8 +25,532 @@
  #include <asm/pmac_feature.h>
  #endif
  
@@ -18,44 +21,70 @@
 + * vendor and product codes for Your laptop.
 + */
 +static struct dmi_system_id __devinitdata radeonfb_dmi_table[] = {
++
 +	{
-+		/* Reported by George Avrunin <avrunin at math.umass.edu> */
-+		.ident = "IBM ThinkPad T40 (2372-9CU)",
++		/* Reported by Stephan Groß <st.gross at inf.tu-dresden.de> */
++		.ident = "IBM ThinkPad T30 (2366-97G)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "23729CU"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "236697G"),
 +		},
 +	},
 +	{
-+		/* Reported by Pete Toscano <pete at verisignlabs.com> */
-+		.ident = "IBM ThinkPad R40 (2722-B3G)",
++		/* Reported by Phillip Jones <philljones at us.ibm.com> */
++		.ident = "IBM ThinkPad T30 (2366-MU9)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2722B3G"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2366MU9"),
 +		},
 +	},
 +	{
-+		/* Reported by Phillip Jones <philljones at us.ibm.com> */
-+		.ident = "IBM ThinkPad T30 (2366-MU9)",
++		/* Reported by Jakob Schiotz <schiotz at fysik.dtu.dk> */
++		.ident = "IBM ThinkPad T30 (2366-96G)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2366MU9"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "236696G"),
 +		},
 +	},
 +	{
-+		/* Reported by Klaus Kurzmann <mok at fluxnetz.de> */
-+		.ident = "IBM ThinkPad T40 (2373-25G)",
++		/* Reported by Thomas M Steenholdt <tmus at tmus.dk> */
++		.ident = "IBM ThinkPad T30 (2366-JBG)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "237325G"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2366JBG"),
 +		},
 +	},
 +	{
-+		/* Reported by Antti Andreimann <Antti.Andreimann at mail.ee> */
-+		.ident = "IBM ThinkPad T41 (2373-2FG)",
++		/* Reported by ChazeFroy <chazefroy at gmail.com> */
++		.ident = "IBM ThinkPad T30 (2366-QU5)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "23732FG"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2366QU5"),
++		},
++	},
++
++	{
++		/* Reported by George Avrunin <avrunin at math.umass.edu> */
++		.ident = "IBM ThinkPad T40 (2372-9CU)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "23729CU"),
++		},
++	},
++	{
++		/* Reported by Dmitriy Zavin <dzavin at yahoo.com> */
++		.ident = "IBM ThinkPad T40 (2373-14U)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "237314U"),
++		},
++	},
++	{
++		/* Reported by Klaus Kurzmann <mok at fluxnetz.de> */
++		.ident = "IBM ThinkPad T40 (2373-25G)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "237325G"),
 +		},
 +	},
 +	{
@@ -100,34 +129,34 @@
 +	},
 +	{
 +		/* Reported by Peter Jones <pjones at redhat.com> */
-+		.ident = "IBM ThinkPad T41 (2373-9FU)",
++		.ident = "IBM ThinkPad T40 (2373-BU7)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "23739FU"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2373BU7"),
 +		},
 +	},
 +	{
-+		/* Reported by Ajay Ramaswamy <ajay at ramaswamy.net> */
-+		.ident = "IBM ThinkPad T41 (2373-9HU)",
++		/* Reported by Vernon Mauery <vernux at us.ibm.com> */
++		.ident = "IBM ThinkPad T40 (2373-MU4)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "23739HU"),
-+	      },
++			DMI_MATCH(DMI_PRODUCT_NAME, "2373MU4"),
++		},
 +	},
 +	{
-+		/* Reported by Peter Jones <pjones at redhat.com> */
-+		.ident = "IBM ThinkPad T40 (2373-BU7)",
++		/* Reported by Michele Lamarca <lammic at gmail.com> */
++		.ident = "IBM ThinkPad T40 (2373-22G)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373BU7"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "237322G"),
 +		},
 +	},
 +	{
-+		/* Reported by Jerome Poggi <Jerome.Poggi at hsc.fr> */
-+		.ident = "IBM ThinkPad T42 (2373-FWG)",
++		/* Reported by Adam Glasgall <adam at simons-rock.edu> */
++		.ident = "IBM ThinkPad T40 (2373-RU1)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373FWG"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2373RU1"),
 +		},
 +	},
 +	{
@@ -154,29 +183,30 @@
 +			DMI_MATCH(DMI_PRODUCT_NAME, "2373G3G"),
 +		},
 +	},
++
 +	{
-+		/* Reported by Eric Benson <eric_a_benson at yahoo.com> */
-+		.ident = "IBM ThinkPad T41p (2373-GEU)",
++		/* Reported by Antti Andreimann <Antti.Andreimann at mail.ee> */
++		.ident = "IBM ThinkPad T41 (2373-2FG)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373GEU"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "23732FG"),
 +		},
 +	},
 +	{
-+		/* Reported by Dwight Barkley <barkley at maths.warwick.ac.uk> */
-+		.ident = "IBM ThinkPad T42 (2373-JTU)",
++		/* Reported by Peter Jones <pjones at redhat.com> */
++		.ident = "IBM ThinkPad T41 (2373-9FU)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373JTU"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "23739FU"),
 +		},
 +	},
 +	{
-+		/* Reported by Vernon Mauery <vernux at us.ibm.com> */
-+		.ident = "IBM ThinkPad T40 (2373-MU4)",
++		/* Reported by Ajay Ramaswamy <ajay at ramaswamy.net> */
++		.ident = "IBM ThinkPad T41 (2373-9HU)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373MU4"),
-+		},
++			DMI_MATCH(DMI_PRODUCT_NAME, "23739HU"),
++	      },
 +	},
 +	{
 +		/* Reported by Ajay Ramaswamy <ajay at ramaswamy.net> */
@@ -203,7 +233,97 @@
 +		},
 +	},
 +	{
-+		/* Reported by Pete Toscano <pete at verisignlabs.com> */
++		/* Reported by Paul Ionescu <i_p_a_u_l at yahoo.com> */
++		.ident = "IBM ThinkPad T41 (2373-TG5)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2373TG5"),
++		},
++	},
++	{
++		/* Reported by Matthew Saltzman <mjs at clemson.edu> */
++		.ident = "IBM ThinkPad T41 (2373-7JU)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "23737JU"),
++		},
++	},
++	{
++		/* Reported by David Zeuthen <davidz at redhat.com> */
++		.ident = "IBM ThinkPad T41 (2373-HU6)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2373HU6"),
++		},
++	},
++	{
++		/* Reported by Grahame Bowland <grahame at angrygoats.net> */
++		.ident = "IBM ThinkPad T41 (2373-3HM)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "23733HM"),
++		},
++	},
++	{
++		/* Reported by Aivo Prykk <aivo.prykk at mail.ee> */
++		.ident = "IBM ThinkPad T41 (2373-1FG)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "23731FG"),
++		},
++	},
++	{
++		/* Reported by Chris Vanden Berghe <Chris at VandenBerghe.org> */
++		.ident = "IBM ThinkPad T41 (2373-9HG)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "23739HG"),
++		},
++	},
++	{
++		/* Reported by Paul Stanisci <paul at stanisci.ca> */
++		.ident = "IBM ThinkPad T41 (2378-DLU)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2378DLU"),
++		},
++	},
++	{
++		.ident = "IBM ThinkPad T41 (2379-D6U)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2379D6U"),
++		},
++	},
++
++	{
++		/* Reported by Eric Benson <eric_a_benson at yahoo.com> */
++		.ident = "IBM ThinkPad T41p (2373-GEU)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2373GEU"),
++		},
++	},
++
++	{
++		/* Reported by Tim Hull <thully at cyberspace.org> */
++		.ident = "IBM ThinkPad T42 (2374-6VU)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "23746VU"),
++		},
++	},
++	{
++		/* Reported by Dwight Barkley <barkley at maths.warwick.ac.uk> */
++		.ident = "IBM ThinkPad T42 (2373-JTU)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2373JTU"),
++		},
++	},
++	{
++		/* Reported by Jerome Poggi <Jerome.Poggi at hsc.fr>
++		  and Pete Toscano <pete at verisignlabs.com> */
 +		.ident = "IBM ThinkPad T42 (2373-FWG)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
@@ -211,6 +331,80 @@
 +		},
 +	},
 +	{
++		/* Reported by Ulrich Drepper <drepper at redhat.com> */
++		.ident = "IBM ThinkPad T42 (2378-R2U)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2378R2U"),
++		},
++	},
++	{
++		/* Reported by Nicolas Dufresne <nicolas.dufresne at usherbrooke.ca> */
++		.ident = "IBM ThinkPad T42 (2378-RBF)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2378RBF"),
++		},
++	},
++	{
++		/* Reported by Nicolas Dufresne <nicolas.dufresne at usherbrooke.ca> */
++		.ident = "IBM ThinkPad T42 (2378-RBU)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2378RBU"),
++		},
++	},
++	{
++		/* Reported by Johannes Hansen */
++		.ident = "IBM ThinkPad T42 (2374-CTO)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2374CTO"),
++		},
++	},
++	{
++		/* Reported by Johannes Hansen */
++		.ident = "IBM ThinkPad T42 (2374-ZEP)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2374ZEP"),
++		},
++	},
++	{
++		/* Reported by Tom Marshall */
++		.ident = "IBM ThinkPad T42 (2378-XXE)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2378XXE"),
++		},
++	},
++	{
++		/* Reported by Isaac Wilcox */
++		.ident = "IBM ThinkPad T42 (2373-F2G)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2373F2G"),
++		},
++	},
++	{
++		/* Reported by Austin Clements <amdragon+osdlbugzilla at mit.edu> */
++		.ident = "IBM ThinkPad T42 (2378-DUU)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2378DUU"),
++		},
++	},
++
++	{
++		/* Reported by Frank Otto <Frank.Otto at tc.pci.uni-heidelberg.de> */
++		.ident = "IBM ThinkPad R32 (2658-BQG)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2658BQG"),
++		},
++	},
++
++	{
 +		/* Reported by Frank Schmitt <tonne2004 at gehheimdienst.de> */
 +		.ident = "IBM ThinkPad R40 (2722-3GG)",
 +		.matches = {
@@ -219,6 +413,14 @@
 +		},
 +	},
 +	{
++		/* Reported by Rushi Bhatt */
++		.ident = "IBM ThinkPad R40 (2722-6YU)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "27226YU"),
++		},
++	},
++	{
 +		/* Reported by Nils Trebing <nils.trebing at uni-konstanz.de> */
 +		.ident = "IBM ThinkPad R40 (2722-5MG)",
 +		.matches = {
@@ -227,21 +429,66 @@
 +		},
 +	},
 +	{
-+		/* Reported by Paul Ionescu <i_p_a_u_l at yahoo.com> */
-+		.ident = "IBM ThinkPad T41 (2373-TG5)",
++		/* Reported by Meik Hellmund <hellmund at math.uni-leipzig.de> */
++		.ident = "IBM ThinkPad R40 (2722-CDG)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373TG5"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2722CDG"),
 +		},
 +	},
 +	{
-+		/* Reported by Michele Lamarca <lammic at gmail.com> */
-+		.ident = "IBM ThinkPad T40 (2373-22G)",
++		/* Reported by Pete Toscano <pete at verisignlabs.com> */
++		.ident = "IBM ThinkPad R40 (2722-B3G)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "237322G"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2722B3G"),
++		},
++	},
++
++
++	{
++		/* Reported by Borschuk Oleg <merlinse at yandex.ru> */
++		.ident = "IBM ThinkPad R50 (1829-7RG)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "18297RG"),
++		},
++	},
++
++	{
++		/* Reported by Georges Herber <gherber at gmail.com> */
++		.ident = "IBM ThinkPad R51 (1829-9MG)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "18299MG"),
++		},
++	},
++	{
++		/* Reported by Eugene Pavlovsky */
++		.ident = "IBM ThinkPad R51 (1836-Q6U)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "1836Q6U"),
++		},
++	},
++	{
++		/* Reported by Sten Heinze */
++		.ident = "IBM ThinkPad R51 (1829-R6G)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "1829R6G"),
++		},
++	},
++	{
++		/* Reported by Wouter Cloetens <wouter at mind.be> */
++		.ident = "IBM ThinkPad R51 (1829-EHG)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "1829EHG"),
 +		},
 +	},
++
++
 +	{
 +		/* Reported by Henrik Brix Andersen <brix at gentoo.org> */
 +		.ident = "IBM ThinkPad X31 (2672-XXH)",
@@ -251,17 +498,31 @@
 +		},
 +	},
 +	{
-+		/* Reported by Matthew Saltzman <mjs at clemson.edu> */
-+		.ident = "IBM ThinkPad T41 (2373-7JU)",
++		/* Reported by Jeremy Katz <katzj at redhat.com> */
++		.ident = "IBM ThinkPad X31 (2672-A9U)",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "23737JU"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2672A9U"),
++		},
++	},
++	{
++		/* Reported by Chris Lee <clee at redhat.com> */
++		.ident = "IBM ThinkPad X31 (2672-5KU)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "26725KU"),
++		},
++	},
++	{
++		/* Reported by Chris Blizzard <blizzard at redhat.com> */
++		.ident = "IBM ThinkPad X31 (2672-RU3)",
++		.matches = {
++			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
++			DMI_MATCH(DMI_PRODUCT_NAME, "2672RU3"),
 +		},
 +	},
 +	{ },
 +	/* Negative reports: */
-+	/* IBM thinkpad T30 2366 -> machine hangs 
-+	   Reported by: Jakob Schiotz <schiotz at fysik.dtu.dk> */
 +	/* IBM thinkpad T42p 2373-KUU -> machine hangs as X starts
 +	   Reported by: Dax Kelson <dax at gurulabs.com> */
 +	/* IBM ThinkPad X31 2672-XXH -> works, but doesn't fix the LCD 
@@ -275,7 +536,7 @@
  static void radeon_pm_disable_dynamic_mode(struct radeonfb_info *rinfo)
  {
  	u32 tmp;
-@@ -852,7 +1109,14 @@
+@@ -852,7 +1376,14 @@ static void radeon_pm_setup_for_suspend(
  	/* because both INPLL and OUTPLL take the same lock, that's why. */
  	tmp = INPLL( pllMCLK_MISC) | MCLK_MISC__EN_MCLK_TRISTATE_IN_SUSPEND;
  	OUTPLL( pllMCLK_MISC, tmp);
@@ -291,7 +552,7 @@
  	/* AGP PLL control */
  	if (rinfo->family <= CHIP_FAMILY_RV280) {
  		OUTREG(BUS_CNTL1, INREG(BUS_CNTL1) |  BUS_CNTL1__AGPCLK_VALID);
-@@ -864,6 +1128,7 @@
+@@ -864,6 +1395,7 @@ static void radeon_pm_setup_for_suspend(
  		OUTREG(BUS_CNTL1, INREG(BUS_CNTL1));
  		OUTREG(BUS_CNTL1, (INREG(BUS_CNTL1) & ~0x4000) | 0x8000);
  	}
@@ -299,7 +560,7 @@
  
  	OUTREG(CRTC_OFFSET_CNTL, (INREG(CRTC_OFFSET_CNTL)
  				  & ~CRTC_OFFSET_CNTL__CRTC_STEREO_SYNC_OUT_EN));
-@@ -2790,6 +3055,29 @@
+@@ -2779,6 +3311,29 @@ void radeonfb_pm_init(struct radeonfb_in
  #endif
  	}
  #endif /* defined(CONFIG_PM) && defined(CONFIG_PPC_OF) */
@@ -329,8 +590,8 @@
  }
  
  void radeonfb_pm_exit(struct radeonfb_info *rinfo)
---- linux-2.6.11-rc4-tank/drivers/video/aty/radeon_base.c.tppm	2005-02-20 20:08:15.000000000 +0200
-+++ linux-2.6.11-rc4-tank/drivers/video/aty/radeon_base.c	2005-02-20 20:18:20.000000000 +0200
+--- vanilla/drivers/video/aty/radeon_base.c	2005-02-20 20:08:15.000000000 +0200
++++ linux-2.6.14/drivers/video/aty/radeon_base.c	2005-02-20 20:18:20.000000000 +0200
 @@ -272,6 +272,9 @@
  #ifdef CONFIG_MTRR
  static int nomtrr = 0;
@@ -360,88 +621,3 @@
 +module_param(radeon_force_sleep, int, 0);
 +MODULE_PARM_DESC(radeon_force_sleep, "bool: force ACPI sleep mode on untested machines");
 +#endif
---- linux-2.6.12/drivers/video/aty/radeon_pm.c~	2005-07-05 16:07:58.000000000 -0400
-+++ linux-2.6.12/drivers/video/aty/radeon_pm.c	2005-07-05 16:08:43.000000000 -0400
-@@ -271,6 +271,14 @@ static struct dmi_system_id __devinitdat
- 			DMI_MATCH(DMI_PRODUCT_NAME, "23737JU"),
- 		},
- 	},
-+	{
-+		/* Reported by David Zeuthen <davidz at redhat.com> */
-+		.ident = "IBM ThinkPad T41 (2373-HU6)",
-+		.matches = {
-+		DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+		DMI_MATCH(DMI_PRODUCT_NAME, "2373HU6"),
-+		},
-+	},
- 	{ },
- 	/* Negative reports: */
- 	/* IBM thinkpad T30 2366 -> machine hangs 
---- linux-2.6.12/drivers/video/aty/radeon_pm.c~	2005-08-26 00:57:10.000000000 -0400
-+++ linux-2.6.12/drivers/video/aty/radeon_pm.c	2005-08-26 00:58:17.000000000 -0400
-@@ -232,6 +232,14 @@ static struct dmi_system_id __devinitdat
- 		},
- 	},
- 	{
-+		/* Reported by Ulrich Drepper <drepper at redhat.com> */
-+		.ident = "IBM ThinkPad T42 (2378-R2U)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2378R2U"),
-+		},
-+	},
-+	{
- 		/* Reported by Frank Schmitt <tonne2004 at gehheimdienst.de> */
- 		.ident = "IBM ThinkPad R40 (2722-3GG)",
- 		.matches = {
---- linux-2.6.13/drivers/video/aty/radeon_pm.c~	2005-09-23 20:11:34.000000000 -0400
-+++ linux-2.6.13/drivers/video/aty/radeon_pm.c	2005-09-23 20:12:23.000000000 -0400
-@@ -56,6 +56,14 @@ static struct dmi_system_id __devinitdat
- 		},
- 	},
- 	{
-+		/* Reported by Stephan Groß <st.gross at inf.tu-dresden.de> */
-+		.ident = "IBM ThinkPad T30 (2366-97G)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "236697G"),
-+		},
-+	},
-+	{
- 		/* Reported by Phillip Jones <philljones at us.ibm.com> */
- 		.ident = "IBM ThinkPad T30 (2366-MU9)",
- 		.matches = {
---- linux-2.6.13/drivers/video/aty/radeon_pm.c~	2005-09-28 05:10:02.000000000 -0400
-+++ linux-2.6.13/drivers/video/aty/radeon_pm.c	2005-09-28 05:11:02.000000000 -0400
-@@ -288,6 +288,14 @@ static struct dmi_system_id __devinitdat
- 		},
- 	},
- 	{
-+		/* Reported by Jeremy Katz <katzj at redhat.com> */
-+		.ident = "IBM ThinkPad X31 (2672-A9U)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2672A9U"),
-+		},
-+	},
-+	{
- 		/* Reported by Matthew Saltzman <mjs at clemson.edu> */
- 		.ident = "IBM ThinkPad T41 (2373-7JU)",
- 		.matches = {
---- linux-2.6.13/drivers/video/aty/radeon_pm.c~	2005-10-24 15:12:33.000000000 -0400
-+++ linux-2.6.13/drivers/video/aty/radeon_pm.c	2005-10-24 15:13:52.000000000 -0400
-@@ -311,6 +311,14 @@ static struct dmi_system_id __devinitdat
- 		DMI_MATCH(DMI_PRODUCT_NAME, "2373HU6"),
- 		},
- 	},
-+	{
-+		/* Reported by Chris Lee <clee at redhat.com> */
-+		.ident = "IBM ThinkPad X31 (2672-5KU)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "26725KU"),
-+		},
-+	},
- 	{ },
- 	/* Negative reports: */
- 	/* IBM thinkpad T30 2366 -> machine hangs 

linux-2.6-scsi-advansys-pcitable.patch:
 drivers/scsi/advansys.c              |   82 +++++++++++++++++------------------
 linux-2.6.14/include/linux/pci_ids.h |    7 ++
 2 files changed, 48 insertions(+), 41 deletions(-)

Index: linux-2.6-scsi-advansys-pcitable.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-scsi-advansys-pcitable.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-scsi-advansys-pcitable.patch	28 Oct 2005 05:23:06 -0000	1.1
+++ linux-2.6-scsi-advansys-pcitable.patch	6 Jan 2006 05:42:17 -0000	1.2
@@ -1,21 +1,21 @@
 Remove a lot of duplicate #defines from the advansys driver.
 
---- linux-2.6.12/include/linux/pci_ids.h~	2005-07-05 23:18:13.000000000 -0400
-+++ linux-2.6.12/include/linux/pci_ids.h	2005-07-05 23:30:02.000000000 -0400
-@@ -1101,9 +1101,12 @@
- #define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZVPLUS   0x0083
+--- linux-2.6.14/include/linux/pci_ids.h~	2005-10-30 21:36:21.000000000 -0500
++++ linux-2.6.14/include/linux/pci_ids.h	2005-10-30 21:37:16.000000000 -0500
+@@ -949,6 +949,13 @@
+ #define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006
+ #define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016
  
- #define PCI_VENDOR_ID_ASP		0x10cd
++#define PCI_VENDOR_ID_ASP		0x10cd
 +#define PCI_DEVICE_ID_ASP_1200A		0x1100
- #define PCI_DEVICE_ID_ASP_ABP940	0x1200
- #define PCI_DEVICE_ID_ASP_ABP940U	0x1300
- #define PCI_DEVICE_ID_ASP_ABP940UW	0x2300
++#define PCI_DEVICE_ID_ASP_ABP940	0x1200
++#define PCI_DEVICE_ID_ASP_ABP940U	0x1300
++#define PCI_DEVICE_ID_ASP_ABP940UW	0x2300
 +#define PCI_DEVICE_ID_38C0800_REV1	0x2500
 +#define PCI_DEVICE_ID_38C1600_REV1	0x2700
  
- #define PCI_VENDOR_ID_MACRONIX		0x10d9
- #define PCI_DEVICE_ID_MACRONIX_MX98713	0x0512
-
+ #define PCI_VENDOR_ID_TCONRAD		0x10da
+ #define PCI_DEVICE_ID_TCONRAD_TOKENRING	0x0508
 --- vanilla/drivers/scsi/advansys.c	2005-06-17 15:48:29.000000000 -0400
 +++ linux-2.6.12/drivers/scsi/advansys.c	2005-07-05 23:27:48.000000000 -0400
 @@ -889,10 +889,6 @@ typedef unsigned char uchar;

linux-2.6-serial-of.patch:
 linux-2.6.13/arch/powerpc/kernel/setup_64.c |  184 -------------------------
 linux-2.6.13/drivers/serial/8250_of.c       |  206 ++++++++++++++++++++++++++++
 linux-2.6.13/drivers/serial/Kconfig         |    5 
 linux-2.6.14/drivers/serial/Makefile        |    1 
 4 files changed, 212 insertions(+), 184 deletions(-)

Index: linux-2.6-serial-of.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-serial-of.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-serial-of.patch	28 Oct 2005 05:23:06 -0000	1.1
+++ linux-2.6-serial-of.patch	6 Jan 2006 05:42:17 -0000	1.2
@@ -1,16 +1,31 @@
---- linux-2.6.13/drivers/serial/Makefile.sof	2005-08-29 00:41:01.000000000 +0100
-+++ linux-2.6.13/drivers/serial/Makefile	2005-10-20 13:05:39.000000000 +0100
+--- linux-2.6.14/drivers/serial/Makefile~	2005-11-07 22:17:27.000000000 -0500
++++ linux-2.6.14/drivers/serial/Makefile	2005-11-07 22:17:35.000000000 -0500
 @@ -22,6 +22,7 @@ obj-$(CONFIG_SERIAL_8250_ACCENT) += 8250
  obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o
  obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
  obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o
 +obj-$(CONFIG_SERIAL_8250_OF) += 8250_of.o
+ obj-$(CONFIG_SERIAL_8250_AU1X00) += 8250_au1x00.o
  obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o
  obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o
- obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
 --- linux-2.6.13/drivers/serial/8250_of.c.sof	2005-10-20 13:19:07.000000000 +0100
 +++ linux-2.6.13/drivers/serial/8250_of.c	2005-10-20 13:19:26.000000000 +0100
-@@ -0,0 +1,197 @@
+@@ -0,0 +1,206 @@
++/* 
++ * Search OpenFirmware device tree for 8250-compatible serial ports 
++ * 
++ * Moved from arch/powerpc/kernel/setup_64.c:
++ *
++ *	Copyright (C) 2001 PPC64, IBM Corp
++ *
++ *	This program is free software; you can redistribute it and/or
++ *	modify it under the terms of the GNU General Public License
++ *	as published by the Free Software Foundation; either version
++ *	2 of the License, or (at your option) any later version.
++ */
++
++#undef DEBUG
++
 +#include <linux/kernel.h>
 +#include <linux/serial.h>
 +#include <linux/serial_8250.h>
@@ -21,12 +36,6 @@
 +#include <asm/serial.h>
 +#include <asm/prom.h>
 +
-+#if 0
-+#define DBG(fmt...) printk(KERN_DEBUG fmt)
-+#else
-+#define DBG(fmt...) do { } while (0)
-+#endif
-+
 +/*
 + * This function can be used by platforms to "find" legacy serial ports.
 + * It works for "serial" nodes under an "isa" node, and will try to
@@ -52,7 +61,7 @@
 +		u32 size;
 +	};
 +
-+	DBG(" -> generic_find_legacy_serial_port()\n");
++	pr_debug(" -> generic_find_legacy_serial_port()\n");
 +	ports_probed = 1;
 +
 +	*physport = 0;
@@ -77,7 +86,7 @@
 +		/* Ok, first check if it's under an "isa" parent */
 +		isa = of_get_parent(np);
 +		if (!isa || strcmp(isa->name, "isa")) {
-+			DBG("%s: no isa parent found\n", np->full_name);
++			pr_debug("%s: no isa parent found\n", np->full_name);
 +			continue;
 +		}
 +
@@ -117,12 +126,12 @@
 +			if (serial_ports[index].iobase != 0) {
 +				/* if we still have some room, move it, else override */
 +				if (old_serial_count < MAX_LEGACY_SERIAL_PORTS) {
-+					DBG("Moved legacy port %d -> %d\n", index,
++					pr_debug("Moved legacy port %d -> %d\n", index,
 +					    old_serial_count);
 +					serial_ports[old_serial_count++] =
 +						serial_ports[index];
 +				} else {
-+					DBG("Replacing legacy port %d\n", index);
++					pr_debug("Replacing legacy port %d\n", index);
 +				}
 +			}
 +		}
@@ -138,7 +147,7 @@
 +		serial_ports[index].irq = interrupts ? interrupts[0] : 0;
 +		serial_ports[index].flags = ASYNC_BOOT_AUTOCONF;
 +
-+		DBG("Added legacy port, index: %d, port: %x, irq: %d, clk: %d\n",
++		pr_debug("Added legacy port, index: %d, port: %x, irq: %d, clk: %d\n",
 +		    index,
 +		    serial_ports[index].iobase,
 +		    serial_ports[index].irq,
@@ -150,7 +159,7 @@
 +
 +		pci = of_get_parent(isa);
 +		if (!pci) {
-+			DBG("%s: no pci parent found\n", np->full_name);
++			pr_debug("%s: no pci parent found\n", np->full_name);
 +			goto next_port;
 +		}
 +
@@ -187,7 +196,7 @@
 +		of_node_put(isa);
 +	}
 +
-+	DBG(" <- generic_find_legacy_serial_port()\n");
++	pr_debug(" <- generic_find_legacy_serial_port()\n");
 +}
 +
 +static struct platform_device serial_device = {
@@ -217,13 +226,13 @@
 +config SERIAL_8250_OF
 +       bool
 +       default y
-+       depends on PPC_OF && SERIAL_8250
++       depends on PPC_OF && SERIAL_8250 && PPC_MERGE
 +
  config SERIAL_8250_ACPI
  	bool "8250/16550 device discovery via ACPI namespace"
  	default y if IA64
---- linux-2.6.13/arch/ppc64/kernel/setup.c.sof	2005-10-20 13:13:08.000000000 +0100
-+++ linux-2.6.13/arch/ppc64/kernel/setup.c	2005-10-20 13:16:28.000000000 +0100
+--- linux-2.6.13/arch/powerpc/kernel/setup_64.c.sof	2005-10-20 13:13:08.000000000 +0100
++++ linux-2.6.13/arch/powerpc/kernel/setup_64.c	2005-10-20 13:16:28.000000000 +0100
 @@ -31,8 +31,6 @@
  #include <linux/notifier.h>
  #include <linux/cpu.h>
@@ -429,25 +438,3 @@
  int check_legacy_ioport(unsigned long base_port)
  {
  	if (ppc_md.check_legacy_ioport == NULL)
---- linux-2.6.13/include/asm-ppc/pc_serial.h.sof	2005-08-29 00:41:01.000000000 +0100
-+++ linux-2.6.13/include/asm-ppc/pc_serial.h	2005-10-20 13:05:42.000000000 +0100
-@@ -26,18 +26,4 @@
- #define RS_TABLE_SIZE  4
- #endif
- 
--/* Standard COM flags (except for COM4, because of the 8514 problem) */
--#ifdef CONFIG_SERIAL_DETECT_IRQ
--#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
--#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
--#else
--#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
--#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
--#endif
--
--#define SERIAL_PORT_DFNS			\
--	/* UART CLK   PORT IRQ     FLAGS        */			\
--	{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },	/* ttyS0 */	\
--	{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },	/* ttyS1 */	\
--	{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },	/* ttyS2 */	\
--	{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },	/* ttyS3 */
-+#define SERIAL_PORT_DFNS /* */

linux-2.6-serial-tickle-nmi.patch:
 8250.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

Index: linux-2.6-serial-tickle-nmi.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-serial-tickle-nmi.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-serial-tickle-nmi.patch	28 Oct 2005 05:23:06 -0000	1.1
+++ linux-2.6-serial-tickle-nmi.patch	6 Jan 2006 05:42:17 -0000	1.2
@@ -28,14 +28,6 @@
 
 --- linux-2.6.11/drivers/serial/8250.c~	2005-05-14 02:49:02.000000000 -0400
 +++ linux-2.6.11/drivers/serial/8250.c	2005-05-14 02:54:30.000000000 -0400
-@@ -40,6 +40,7 @@
- #include <linux/serial_core.h>
- #include <linux/serial.h>
- #include <linux/serial_8250.h>
-+#include <linux/nmi.h>
- 
- #include <asm/io.h>
- #include <asm/irq.h>
 @@ -2098,9 +2098,11 @@ static inline void wait_for_xmitr(struct
  	/* Wait up to 1s for flow control if necessary */
  	if (up->port.flags & UPF_CONS_FLOW) {

linux-2.6-tux.patch:
 linux-2.6.14/net/ipv4/tcp_output.c     |    1 
 linux/arch/alpha/kernel/systbls.S      |    8 
 linux/arch/i386/kernel/syscall_table.S |   10 
 linux/arch/ia64/kernel/entry.S         |    8 
 linux/arch/ia64/kernel/ia64_ksyms.c    |    5 
 linux/arch/x86_64/ia32/ia32entry.S     |   10 
 linux/fs/dcache.c                      |   36 
 linux/fs/exec.c                        |    2 
 linux/fs/fcntl.c                       |    4 
 linux/fs/namei.c                       |   18 
 linux/fs/namespace.c                   |    2 
 linux/fs/open.c                        |    4 
 linux/fs/pipe.c                        |    2 
 linux/fs/read_write.c                  |    2 
 linux/include/asm-alpha/fcntl.h        |    1 
 linux/include/asm-generic/fcntl.h      |    4 
 linux/include/asm-i386/unistd.h        |    5 
 linux/include/asm-ia64/unistd.h        |    2 
 linux/include/asm-sparc/fcntl.h        |    1 
 linux/include/asm-sparc64/fcntl.h      |    1 
 linux/include/asm-x86_64/unistd.h      |   10 
 linux/include/linux/buffer_head.h      |    1 
 linux/include/linux/dcache.h           |    8 
 linux/include/linux/errno.h            |    3 
 linux/include/linux/file.h             |    2 
 linux/include/linux/fs.h               |    7 
 linux/include/linux/kmod.h             |    2 
 linux/include/linux/namei.h            |    2 
 linux/include/linux/net.h              |    1 
 linux/include/linux/sched.h            |    5 
 linux/include/linux/skbuff.h           |    2 
 linux/include/linux/socket.h           |    5 
 linux/include/linux/sysctl.h           |   50 
 linux/include/net/sock.h               |    8 
 linux/include/net/tcp.h                |    3 
 linux/include/net/tux.h                |  804 ++++++++++++
 linux/include/net/tux_u.h              |  163 ++
 linux/kernel/exit.c                    |    7 
 linux/kernel/fork.c                    |    1 
 linux/kernel/kmod.c                    |   28 
 linux/kernel/signal.c                  |    1 
 linux/mm/filemap.c                     |   19 
 linux/mm/truncate.c                    |    2 
 linux/net/Kconfig                      |    1 
 linux/net/Makefile                     |    1 
 linux/net/core/sock.c                  |    5 
 linux/net/ipv4/tcp.c                   |    3 
 linux/net/ipv4/tcp_input.c             |    1 
 linux/net/ipv4/tcp_output.c            |    1 
 linux/net/socket.c                     |  197 +-
 linux/net/tux/Kconfig                  |   25 
 linux/net/tux/Makefile                 |   12 
 linux/net/tux/abuf.c                   |  190 ++
 linux/net/tux/accept.c                 |  863 ++++++++++++
 linux/net/tux/cachemiss.c              |  265 +++
 linux/net/tux/cgi.c                    |  171 ++
 linux/net/tux/directory.c              |  302 ++++
 linux/net/tux/extcgi.c                 |  329 ++++
 linux/net/tux/gzip.c                   |   40 
 linux/net/tux/input.c                  |  641 +++++++++
 linux/net/tux/logger.c                 |  837 ++++++++++++
 linux/net/tux/main.c                   | 1417 +++++++++++++++++++++
 linux/net/tux/mod.c                    |  262 +++
 linux/net/tux/output.c                 |  352 +++++
 linux/net/tux/parser.h                 |  102 +
 linux/net/tux/postpone.c               |   77 +
 linux/net/tux/proc.c                   | 1149 +++++++++++++++++
 linux/net/tux/proto_ftp.c              | 1555 +++++++++++++++++++++++
 linux/net/tux/proto_http.c             | 2197 +++++++++++++++++++++++++++++++++
 linux/net/tux/redirect.c               |  172 ++
 linux/net/tux/times.c                  |  392 +++++
 linux/net/tux/times.h                  |   26 
 linux/net/tux/userspace.c              |   27 
 73 files changed, 12774 insertions(+), 98 deletions(-)

Index: linux-2.6-tux.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-tux.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- linux-2.6-tux.patch	12 Dec 2005 05:31:05 -0000	1.4
+++ linux-2.6-tux.patch	6 Jan 2006 05:42:17 -0000	1.5
@@ -715,11 +715,11 @@
 ===================================================================
 --- linux.orig/include/linux/sysctl.h
 +++ linux/include/linux/sysctl.h
-@@ -208,6 +208,7 @@ enum
- 	NET_ECONET=16,
+@@ -205,6 +205,7 @@ enum
  	NET_SCTP=17,
  	NET_LLC=18,
-+	NET_TUX=19,
+ 	NET_NETFILTER=19,
++	NET_TUX=20,
  };
  
  /* /proc/sys/kernel/random */
@@ -1858,7 +1858,7 @@
 ===================================================================
 --- linux.orig/kernel/kmod.c
 +++ linux/kernel/kmod.c
-@@ -128,7 +128,8 @@ struct subprocess_info {
+@@ -128,14 +128,14 @@ struct subprocess_info {
  /*
   * This is the task which runs the usermode application
   */
@@ -1866,8 +1866,16 @@
 +int
 +__exec_usermodehelper(char *path, char **argv, char **envp, struct key *ring)
  {
- 	struct subprocess_info *sub_info = data;
- 	struct key *old_session;
+-	struct subprocess_info *sub_info = data;
+ 	struct key *new_session, *old_session;
+ 	int retval;
+ 
+ 	/* Unblock all signals and set the session keyring. */
+-	new_session = key_get(sub_info->ring);
++	new_session = key_get(ring);
+ 	flush_signals(current);
+ 	spin_lock_irq(&current->sighand->siglock);
+ 	old_session = __install_session_keyring(current, new_session);
 @@ -146,12 +146,28 @@ static int ____call_usermodehelper(void 
  
  	key_put(old_session);
@@ -13844,3 +13852,13 @@
 + *
 + ****************************************************************/
 +
+--- linux-2.6.14/net/ipv4/tcp_output.c~	2005-12-12 00:42:02.000000000 -0500
++++ linux-2.6.14/net/ipv4/tcp_output.c	2005-12-12 00:42:17.000000000 -0500
+@@ -703,6 +703,7 @@ unsigned int tcp_current_mss(struct sock
+ 
+ 	return mss_now;
+ }
++EXPORT_SYMBOL_GPL(tcp_current_mss);
+ 
+ /* Congestion window validation. (RFC2861) */
+ 

linux-2.6-vm-debug.patch:
 drivers/scsi/st.c  |    1 +
 include/linux/mm.h |    1 +
 mm/rmap.c          |    7 +++++++
 3 files changed, 9 insertions(+)

Index: linux-2.6-vm-debug.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-vm-debug.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-vm-debug.patch	3 Jan 2006 14:22:00 -0000	1.2
+++ linux-2.6-vm-debug.patch	6 Jan 2006 05:42:17 -0000	1.3
@@ -1,16 +1,36 @@
---- linux-2.6.14/mm/rmap.c~	2006-01-03 08:53:32.000000000 -0500
-+++ linux-2.6.14/mm/rmap.c	2006-01-03 08:58:19.000000000 -0500
+--- linux-2.6.15/mm/rmap.c~	2006-01-03 08:53:32.000000000 -0500
++++ linux-2.6.15/mm/rmap.c	2006-01-03 08:58:19.000000000 -0500
 @@ -484,6 +484,13 @@ void page_remove_rmap(struct page *page)
  	BUG_ON(PageReserved(page));
  
  	if (atomic_add_negative(-1, &page->_mapcount)) {
 +		if (page_mapcount(page) < 0) {
-+			printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page->_mapcount);
-+			printk (KERN_EMERG "  page->flags = %x\n", page->flags);
-+			printk (KERN_EMERG "  page->count = %x\n", page->_count);
++			printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page_mapcount(page));
++			printk (KERN_EMERG "  page->flags = %lx\n", page->flags);
++			printk (KERN_EMERG "  page->count = %x\n", page_count(page));
 +			printk (KERN_EMERG "  page->mapping = %p\n", page->mapping);
 +		}
 +		
  		BUG_ON(page_mapcount(page) < 0);
  		/*
  		 * It would be tidy to reset the PageAnon mapping here,
+--- linux-2.6.15/drivers/scsi/st.c~	2006-01-05 21:58:31.000000000 -0500
++++ linux-2.6.15/drivers/scsi/st.c	2006-01-05 21:59:31.000000000 -0500
+@@ -4508,6 +4508,7 @@ static int sgl_unmap_user_pages(struct s
+ 	for (i=0; i < nr_pages; i++) {
+ 		struct page *page = sgl[i].page;
+ 
++		sgl[i].page = NULL;
+ 		if (dirtied)
+ 			SetPageDirty(page);
+ 		/* FIXME: cache flush missing for rw==READ
+--- linux-2.6.15/include/linux/mm.h~	2006-01-05 22:02:20.000000000 -0500
++++ linux-2.6.15/include/linux/mm.h	2006-01-05 22:02:48.000000000 -0500
+@@ -299,6 +299,7 @@ struct page {
+ #define put_page_testzero(p)				\
+ 	({						\
+ 		BUG_ON(page_count(p) == 0);		\
++		BUG_ON(page_count(p) <= page_mapcount(p));	\
+ 		atomic_add_negative(-1, &(p)->_count);	\
+ 	})
+ 

linux-2.6-write-protect-rodata.patch:
 linux-2.6.14-fordiff/arch/i386/Kconfig.debug           |   10 +++++++
 linux-2.6.14-fordiff/arch/i386/kernel/entry.S          |    1 
 linux-2.6.14-fordiff/arch/i386/kernel/syscall_table.S  |    1 
 linux-2.6.14-fordiff/arch/i386/mm/init.c               |   24 +++++++++++++++++
 linux-2.6.14-fordiff/arch/x86_64/Kconfig.debug         |   10 +++++++
 linux-2.6.14-fordiff/arch/x86_64/kernel/syscall.c      |    2 -
 linux-2.6.14-fordiff/arch/x86_64/mm/init.c             |   23 ++++++++++++++++
 linux-2.6.14-fordiff/arch/x86_64/mm/pageattr.c         |    9 ++++--
 linux-2.6.14-fordiff/include/asm-generic/vmlinux.lds.h |    4 ++
 linux-2.6.14-fordiff/include/asm-x86_64/pgtable.h      |    2 +
 linux-2.6.14-fordiff/init/main.c                       |    6 ++++
 linux-2.6.14/arch/i386/mm/init.c                       |   12 ++++++++
 linux-2.6.14/arch/x86_64/ia32/ia32entry.S              |    2 -
 linux-2.6.14/arch/x86_64/mm/init.c                     |   12 ++++++++
 linux-2.6.9-22.EL/arch/i386/mm/pageattr.c              |   23 ++++++++++++----
 15 files changed, 131 insertions(+), 10 deletions(-)

Index: linux-2.6-write-protect-rodata.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-write-protect-rodata.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-write-protect-rodata.patch	27 Nov 2005 08:19:29 -0000	1.3
+++ linux-2.6-write-protect-rodata.patch	6 Jan 2006 05:42:17 -0000	1.4
@@ -378,3 +378,14 @@
  			kpte_page = split;
  		}	
  		get_page(kpte_page);
+--- linux-2.6.14/arch/x86_64/ia32/ia32entry.S~	2005-12-01 12:25:15.000000000 -0500
++++ linux-2.6.14/arch/x86_64/ia32/ia32entry.S	2005-12-01 12:25:30.000000000 -0500
+@@ -341,7 +341,7 @@ ENTRY(ia32_ptregs_common)
+ 	jmp  ia32_sysret	/* misbalances the return cache */
+ 	CFI_ENDPROC
+ 
+-	.data
++	.section .rodata,"a"
+ 	.align 8
+ 	.globl ia32_sys_call_table
+ ia32_sys_call_table:

linux-2.6-x86-apic-off-by-default.patch:
 arch/i386/Kconfig            |   12 ++++++++++++
 arch/i386/kernel/acpi/boot.c |   13 +++++++++++++
 arch/i386/kernel/apic.c      |   13 ++++++++++---
 arch/i386/kernel/io_apic.c   |    2 +-
 arch/i386/kernel/setup.c     |   18 ++++++++++++++++--
 include/asm-i386/acpi.h      |    4 ++++
 include/asm-i386/apic.h      |    6 ++++++
 7 files changed, 62 insertions(+), 6 deletions(-)

Index: linux-2.6-x86-apic-off-by-default.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-x86-apic-off-by-default.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-x86-apic-off-by-default.patch	23 Nov 2005 06:42:03 -0000	1.3
+++ linux-2.6-x86-apic-off-by-default.patch	6 Jan 2006 05:42:17 -0000	1.4
@@ -1,10 +1,7 @@
-From darrick at us.ibm.com
-https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=167333
-
-diff -Naur orig/arch/i386/Kconfig linux-2.6.13/arch/i386/Kconfig
---- orig/arch/i386/Kconfig	2005-10-24 17:54:05.000000000 -0700
-+++ linux-2.6.13/arch/i386/Kconfig	2005-10-24 15:39:37.000000000 -0700
-@@ -546,6 +546,18 @@
+diff -Naur orig/arch/i386/Kconfig new/arch/i386/Kconfig
+--- orig/arch/i386/Kconfig	2005-11-22 13:32:50.000000000 -0800
++++ new/arch/i386/Kconfig	2005-11-22 13:34:28.000000000 -0800
+@@ -253,6 +253,18 @@
  	  to use it. If you say Y here even though your machine doesn't have
  	  an IO-APIC, then the kernel will still run with no slowdown at all.
  
@@ -23,21 +20,51 @@
  config X86_LOCAL_APIC
  	bool
  	depends on X86_UP_APIC || ((X86_VISWS || SMP) && !X86_VOYAGER)
-diff -Naur orig/arch/i386/kernel/apic.c linux-2.6.13/arch/i386/kernel/apic.c
---- orig/arch/i386/kernel/apic.c	2005-10-24 17:54:05.000000000 -0700
-+++ linux-2.6.13/arch/i386/kernel/apic.c	2005-10-24 23:02:33.000000000 -0700
+diff -Naur orig/arch/i386/kernel/acpi/boot.c new/arch/i386/kernel/acpi/boot.c
+--- orig/arch/i386/kernel/acpi/boot.c	2005-11-22 13:32:50.000000000 -0800
++++ new/arch/i386/kernel/acpi/boot.c	2005-11-23 12:53:56.000000000 -0800
+@@ -37,6 +37,10 @@
+ #include <asm/io.h>
+ #include <asm/mpspec.h>
+ 
++#ifdef CONFIG_X86_32
++extern int enable_local_apic __initdata;
++#endif
++
+ #ifdef	CONFIG_X86_64
+ 
+ extern void __init clustered_apic_check(void);
+@@ -800,6 +804,15 @@
+ #ifdef CONFIG_X86_LOCAL_APIC
+ 	int count, error;
+ 
++#ifdef CONFIG_X86_32
++	if (enable_local_apic < 0) {
++		printk(KERN_INFO PREFIX "Local APIC disabled (%d); pass 'lapic' to re-enable.\n", enable_local_apic);
++		return;
++	}
++
++	printk(KERN_INFO PREFIX "Local APIC enabled (%d).\n", enable_local_apic);
++#endif
++
+ 	count = acpi_table_parse(ACPI_APIC, acpi_parse_madt);
+ 	if (count >= 1) {
+ 
+diff -Naur orig/arch/i386/kernel/apic.c new/arch/i386/kernel/apic.c
+--- orig/arch/i386/kernel/apic.c	2005-11-22 13:32:46.000000000 -0800
++++ new/arch/i386/kernel/apic.c	2005-11-22 18:06:18.000000000 -0800
 @@ -42,8 +42,9 @@
  
  /*
   * Knob to control our willingness to enable the local APIC.
-+ * -2=default-disable, -1=force-disable, 1=force-disable, 0=automatic
++ * -2=default-disable, -1=force-disable, 1=force-enable, 0=automatic
   */
 -int enable_local_apic __initdata = 0; /* -1=force-disable, +1=force-enable */
 +int enable_local_apic __initdata = (X86_APIC_DEFAULT_OFF ? -2 : 0);
  
  /*
   * Debug level
-@@ -751,7 +752,7 @@
+@@ -757,7 +758,7 @@
  		 * APIC only if "lapic" specified.
  		 */
  		if (enable_local_apic <= 0) {
@@ -46,7 +73,16 @@
  			       "you can enable it with \"lapic\"\n");
  			return -1;
  		}
-@@ -1265,6 +1266,12 @@
+@@ -839,7 +840,7 @@
+ 		int i;
+ 
+ 		for (i = 0; i < nr_ioapics; i++) {
+-			if (smp_found_config) {
++			if (smp_found_config && !skip_ioapic_setup) {
+ 				ioapic_phys = mp_ioapics[i].mpc_apicaddr;
+ 				if (!ioapic_phys) {
+ 					printk(KERN_ERR
+@@ -1272,6 +1273,12 @@
  	if (!smp_found_config && !cpu_has_apic)
  		return -1;
  
@@ -59,10 +95,10 @@
  	/*
  	 * Complain if the BIOS pretends there is one.
  	 */
-diff -Naur orig/arch/i386/kernel/io_apic.c linux-2.6.13/arch/i386/kernel/io_apic.c
---- orig/arch/i386/kernel/io_apic.c	2005-10-24 17:54:05.000000000 -0700
-+++ linux-2.6.13/arch/i386/kernel/io_apic.c	2005-10-24 15:39:36.000000000 -0700
-@@ -678,7 +678,7 @@
+diff -Naur orig/arch/i386/kernel/io_apic.c new/arch/i386/kernel/io_apic.c
+--- orig/arch/i386/kernel/io_apic.c	2005-11-22 13:32:46.000000000 -0800
++++ new/arch/i386/kernel/io_apic.c	2005-11-22 13:34:27.000000000 -0800
+@@ -681,7 +681,7 @@
  #define MAX_PIRQS 8
  static int pirq_entries [MAX_PIRQS];
  static int pirqs_enabled;
@@ -71,10 +107,21 @@
  
  static int __init ioapic_setup(char *str)
  {
-diff -Naur orig/arch/i386/kernel/setup.c linux-2.6.13/arch/i386/kernel/setup.c
---- orig/arch/i386/kernel/setup.c	2005-10-24 17:54:05.000000000 -0700
-+++ linux-2.6.13/arch/i386/kernel/setup.c	2005-10-24 15:39:36.000000000 -0700
-@@ -857,6 +857,10 @@
+diff -Naur orig/arch/i386/kernel/setup.c new/arch/i386/kernel/setup.c
+--- orig/arch/i386/kernel/setup.c	2005-11-22 13:32:46.000000000 -0800
++++ new/arch/i386/kernel/setup.c	2005-11-23 01:29:18.000000000 -0800
+@@ -60,6 +60,10 @@
+ #include "setup_arch_pre.h"
+ #include <bios_ebda.h>
+ 
++#ifdef CONFIG_X86_LOCAL_APIC
++extern int enable_local_apic __initdata;
++#endif
++
+ /* Forward Declaration. */
+ void __init find_max_pfn(void);
+ 
+@@ -865,6 +869,10 @@
  		/* disable IO-APIC */
  		else if (!memcmp(from, "noapic", 6))
  			disable_ioapic_setup();
@@ -85,9 +132,26 @@
  #endif /* CONFIG_X86_IO_APIC */
  #endif /* CONFIG_ACPI */
  
-diff -Naur orig/include/asm-i386/acpi.h linux-2.6.13/include/asm-i386/acpi.h
---- orig/include/asm-i386/acpi.h	2005-10-24 17:54:05.000000000 -0700
-+++ linux-2.6.13/include/asm-i386/acpi.h	2005-10-24 15:39:36.000000000 -0700
+@@ -1606,8 +1614,14 @@
+ #endif
+ #endif
+ #ifdef CONFIG_X86_LOCAL_APIC
+-	if (smp_found_config)
+-		get_smp_config();
++	if (smp_found_config) {
++		if (enable_local_apic >= 0) {
++			printk(KERN_INFO "LAPIC enabled (%d), calling get_smp_config\n", enable_local_apic);
++			get_smp_config();
++		} else {
++			printk(KERN_INFO "LAPIC disabled (%d)\n", enable_local_apic);
++		}
++	}
+ #endif
+ 
+ 	register_memory();
+diff -Naur orig/include/asm-i386/acpi.h new/include/asm-i386/acpi.h
+--- orig/include/asm-i386/acpi.h	2005-10-27 17:02:08.000000000 -0700
++++ new/include/asm-i386/acpi.h	2005-11-22 13:34:27.000000000 -0800
 @@ -134,6 +134,10 @@
  {
  	skip_ioapic_setup = 1;
@@ -99,9 +163,9 @@
  
  static inline int ioapic_setup_disabled(void)
  {
-diff -Naur orig/include/asm-i386/apic.h linux-2.6.13/include/asm-i386/apic.h
---- orig/include/asm-i386/apic.h	2005-10-24 17:54:05.000000000 -0700
-+++ linux-2.6.13/include/asm-i386/apic.h	2005-10-24 15:39:36.000000000 -0700
+diff -Naur orig/include/asm-i386/apic.h new/include/asm-i386/apic.h
+--- orig/include/asm-i386/apic.h	2005-10-27 17:02:08.000000000 -0700
++++ new/include/asm-i386/apic.h	2005-11-22 13:34:27.000000000 -0800
 @@ -82,6 +82,12 @@
  # define apic_write_around(x,y) apic_write_atomic((x),(y))
  #endif

linux-2.6-x86-tune-p4.patch:
 linux-2.6.10/arch/i386/Makefile.cpu |    2 +-
 linux-2.6.12/arch/x86_64/Makefile   |    4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

Index: linux-2.6-x86-tune-p4.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-x86-tune-p4.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-x86-tune-p4.patch	28 Oct 2005 05:23:07 -0000	1.1
+++ linux-2.6-x86-tune-p4.patch	6 Jan 2006 05:42:17 -0000	1.2
@@ -1,15 +1,15 @@
 diff -urNp --exclude-from=/home/davej/.exclude linux-1/arch/i386/Makefile linux-212/arch/i386/Makefile
---- linux-2.6.10/arch/i386/Makefile
-+++ linux-2.6.10/arch/i386/Makefile
+--- linux-2.6.10/arch/i386/Makefile.cpu
++++ linux-2.6.10/arch/i386/Makefile.cpu
 @@ -33,7 +33,7 @@ cflags-$(CONFIG_M486)		+= -march=i486
  cflags-$(CONFIG_M586)		+= -march=i586
  cflags-$(CONFIG_M586TSC)	+= -march=i586
  cflags-$(CONFIG_M586MMX)	+= $(call cc-option,-march=pentium-mmx,-march=i586)
 -cflags-$(CONFIG_M686)		+= -march=i686
-+cflags-$(CONFIG_M686)		+= -march=i686 $(call cc-option,-mtune=pentium4)
- cflags-$(CONFIG_MPENTIUMII)	+= -march=i686 $(call cc-option,-mtune=pentium2)
- cflags-$(CONFIG_MPENTIUMIII)	+= -march=i686 $(call cc-option,-mtune=pentium3)
- cflags-$(CONFIG_MPENTIUMM)	+= -march=i686 $(call cc-option,-mtune=pentium3)
++cflags-$(CONFIG_M686)		+= -march=i686 $(call tune,pentium4)
+ cflags-$(CONFIG_MPENTIUMII)	+= -march=i686 $(call tune,pentium2)
+ cflags-$(CONFIG_MPENTIUMIII)	+= -march=i686 $(call tune,pentium3)
+ cflags-$(CONFIG_MPENTIUMM)	+= -march=i686 $(call tune,pentium3)
 --- linux-2.6.12/arch/x86_64/Makefile~	2005-07-05 19:48:18.000000000 -0400
 +++ linux-2.6.12/arch/x86_64/Makefile	2005-07-05 19:49:06.000000000 -0400
 @@ -39,9 +39,7 @@ LDFLAGS_vmlinux :=


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/sources,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -r1.153 -r1.154
--- sources	27 Dec 2005 23:35:22 -0000	1.153
+++ sources	6 Jan 2006 05:42:18 -0000	1.154
@@ -1,2 +1 @@
-66d02cbd723876c6d69846a067875a22  linux-2.6.14.tar.bz2
-925557d87e27485a92b45e3e5ac172f8  patch-2.6.14.5.bz2
+cdf95e00f5111e31f78e1d97304d9522  linux-2.6.15.tar.bz2


Index: upstream
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/upstream,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- upstream	27 Dec 2005 23:35:22 -0000	1.94
+++ upstream	6 Jan 2006 05:42:18 -0000	1.95
@@ -1,2 +1 @@
-linux-2.6.14.tar.bz2
-patch-2.6.14.5.bz2
+linux-2.6.15.tar.bz2


--- linux-2.6-8139too-suspend.patch DELETED ---


--- linux-2.6-NFSD-locking-fix.patch DELETED ---


--- linux-2.6-acpi-20050902.patch DELETED ---


--- linux-2.6-acpi-enable-ecburst.patch DELETED ---


--- linux-2.6-acpi-ht.patch DELETED ---


--- linux-2.6-acpi-owner_id-limit.patch DELETED ---


--- linux-2.6-acpi-silence-cutoff.patch DELETED ---


--- linux-2.6-alsa-maestro-hang.patch DELETED ---


--- linux-2.6-build-qconfig-qt-lib64.patch DELETED ---


--- linux-2.6-cx88-silence-debug.patch DELETED ---


--- linux-2.6-debug-spinlock-emerg.patch DELETED ---


--- linux-2.6-default-clocksource-tsc.patch DELETED ---


--- linux-2.6-default-elevator.patch DELETED ---


--- linux-2.6-fs-locks-leak.patch DELETED ---


--- linux-2.6-ide-scsi-check_condition.patch DELETED ---


--- linux-2.6-kauditd-suspend.patch DELETED ---


--- linux-2.6-libata-intel-combined-quirk.patch DELETED ---


--- linux-2.6-mcs-canonicalise-getxattr.patch DELETED ---


--- linux-2.6-net-atm-lanai-nodev-rmmod.patch DELETED ---


--- linux-2.6-net-bridge-feature-consolidation.patch DELETED ---


--- linux-2.6-net-nf_queue-oops.patch DELETED ---


--- linux-2.6-net-rtnetlink-infinite-loop.patch DELETED ---


--- linux-2.6-net-sk98lin-vpd.patch DELETED ---


--- linux-2.6-optimise-for-size.patch DELETED ---


--- linux-2.6-ppc64-build.patch DELETED ---


--- linux-2.6-ppc64-eeh-panic.patch DELETED ---


--- linux-2.6-scsi-runqueue-oops.patch DELETED ---


--- linux-2.6-suspend-mxcsr.patch DELETED ---


--- linux-2.6-usbhid-wacom.patch DELETED ---


--- linux-2.6-usbhid-wireless-security-lock.patch DELETED ---


--- linux-2.6.14.4pre.patch DELETED ---


--- linux-2.6.15-various-fixes.patch DELETED ---


--- patch-2.6.14.5.bz2.sign DELETED ---




More information about the fedora-cvs-commits mailing list