rpms/kernel/FC-4 linux-2.6-ac97_unregister_controls_ad18xx.patch, NONE, 1.1 linux-2.6-autofs-invalidate.patch, NONE, 1.1 linux-2.6-cell-mambo-drivers.patch, NONE, 1.1 linux-2.6-console-suspend.patch, NONE, 1.1 linux-2.6-defaults-phys-start.patch, NONE, 1.1 linux-2.6-defaults-unicode-vt.patch, NONE, 1.1 linux-2.6-hvc-console.patch, 1.2, 1.3 linux-2.6-iscsi-update-to-2-6-18-upstream.patch, NONE, 1.1 linux-2.6-offb-find-fb.patch, NONE, 1.1 linux-2.6-powernow-k7-smp.patch, NONE, 1.1 linux-2.6-ppc-iseries-input-layer.patch, NONE, 1.1 linux-2.6-proc-self-maps-fix.patch, NONE, 1.1 linux-2.6-random-patches.patch, NONE, 1.1 linux-2.6-sata-ahci-suspend.patch, NONE, 1.1 linux-2.6-serial-resume.patch, NONE, 1.1 linux-2.6-warn-c-p-a.patch, NONE, 1.1 linux-2.6-x86-alternatives-smp-only.patch, NONE, 1.1 linux-2.6-x86-tune-generic.patch, NONE, 1.1 linux-2.6-x86_64-noisy-syscalls.patch, NONE, 1.1 linux-2.6.17.tar.bz2.sign, NONE, 1.1 patch-2.6.17.1.bz2.sign, NONE, 1.1 .cvsignore, 1.192, 1.193 kernel-2.6.spec, 1.1643, 1.1644 linu! x-2.6-build-nonintconfig.patch, 1.4, 1.5 linux-2.6-crash-driver.patch, 1.1, 1.2 linux-2.6-debug-Wundef.patch, 1.3, 1.4 linux-2.6-debug-disable-builtins.patch, 1.3, 1.4 linux-2.6-debug-list_head.patch, 1.4, 1.5 linux-2.6-debug-oops-pause.patch, 1.2, 1.3 linux-2.6-debug-periodic-slab-check.patch, 1.3, 1.4 linux-2.6-debug-singlebiterror.patch, 1.4, 1.5 linux-2.6-debug-sysfs-crash-debugging.patch, 1.2, 1.3 linux-2.6-debug-taint-vm.patch, 1.5, 1.6 linux-2.6-devmem.patch, 1.3, 1.4 linux-2.6-execshield.patch, 1.6, 1.7 linux-2.6-ide-tune-locking.patch, 1.3, 1.4 linux-2.6-module_version.patch, 1.1, 1.2 linux-2.6-optimise-spinlock-debug.patch, 1.1, 1.2 linux-2.6-radeon-backlight.patch, 1.5, 1.6 linux-2.6-sata-promise-pata-ports.patch, 1.6, 1.7 linux-2.6-sched-up-migration-cost.patch, 1.1, 1.2 linux-2.6-tux.patch, 1.6, 1.7 sources, 1.176, 1.177 upstream, 1.117, 1.118 linux-2.6-8250-16c950-faster.patch, 1.3, NONE linux-2.6-NFSD-writes-shouldnt-clobber-utimes.patch, 1.1, NONE linux-2.6-audit-new-msg-types.patch, 1.1, NONE linux-2.6-a! utofs-pathlookup.patch,1.1,NONE linux-2.6-bzimage.patch,1.4,NO! NE linux

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Jun 20 18:25:43 UTC 2006


Author: davej

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

Modified Files:
	.cvsignore kernel-2.6.spec linux-2.6-build-nonintconfig.patch 
	linux-2.6-crash-driver.patch linux-2.6-debug-Wundef.patch 
	linux-2.6-debug-disable-builtins.patch 
	linux-2.6-debug-list_head.patch 
	linux-2.6-debug-oops-pause.patch 
	linux-2.6-debug-periodic-slab-check.patch 
	linux-2.6-debug-singlebiterror.patch 
	linux-2.6-debug-sysfs-crash-debugging.patch 
	linux-2.6-debug-taint-vm.patch linux-2.6-devmem.patch 
	linux-2.6-execshield.patch linux-2.6-ide-tune-locking.patch 
	linux-2.6-module_version.patch 
	linux-2.6-optimise-spinlock-debug.patch 
	linux-2.6-radeon-backlight.patch 
	linux-2.6-sata-promise-pata-ports.patch 
	linux-2.6-sched-up-migration-cost.patch linux-2.6-tux.patch 
	sources upstream 
Added Files:
	linux-2.6-ac97_unregister_controls_ad18xx.patch 
	linux-2.6-autofs-invalidate.patch 
	linux-2.6-cell-mambo-drivers.patch 
	linux-2.6-console-suspend.patch 
	linux-2.6-defaults-phys-start.patch 
	linux-2.6-defaults-unicode-vt.patch 
	linux-2.6-hvc-console.patch 
	linux-2.6-iscsi-update-to-2-6-18-upstream.patch 
	linux-2.6-offb-find-fb.patch linux-2.6-powernow-k7-smp.patch 
	linux-2.6-ppc-iseries-input-layer.patch 
	linux-2.6-proc-self-maps-fix.patch 
	linux-2.6-random-patches.patch 
	linux-2.6-sata-ahci-suspend.patch 
	linux-2.6-serial-resume.patch linux-2.6-warn-c-p-a.patch 
	linux-2.6-x86-alternatives-smp-only.patch 
	linux-2.6-x86-tune-generic.patch 
	linux-2.6-x86_64-noisy-syscalls.patch 
	linux-2.6.17.tar.bz2.sign patch-2.6.17.1.bz2.sign 
Removed Files:
	linux-2.6-8250-16c950-faster.patch 
	linux-2.6-NFSD-writes-shouldnt-clobber-utimes.patch 
	linux-2.6-audit-new-msg-types.patch 
	linux-2.6-autofs-pathlookup.patch linux-2.6-bzimage.patch 
	linux-2.6-crashdump-common.patch 
	linux-2.6-crashdump-reboot-exports.patch 
	linux-2.6-debug-dual-line-backtrace.patch 
	linux-2.6-debug-pm-pci.patch 
	linux-2.6-debug-reference-discarded-return-result.patch 
	linux-2.6-debug-slab-leaks.patch 
	linux-2.6-defaults-enable-sata-atapi.patch 
	linux-2.6-diskdump.patch linux-2.6-drm-cripple-r300.patch 
	linux-2.6-dump_smp_call_function.patch 
	linux-2.6-ide-cd-shutup.patch 
	linux-2.6-mv643xx-compile-fix.patch 
	linux-2.6-net-ipw2200-hwcrypto.patch 
	linux-2.6-net-wireless-features.patch 
	linux-2.6-netconsole.patch linux-2.6-netdump.patch 
	linux-2.6-obsolete-idescsi-warning.patch 
	linux-2.6-pcmcia-disable-warning.patch 
	linux-2.6-pwc-powerup-by-default.patch 
	linux-2.6-scsi-advansys-enabler.patch 
	linux-2.6-selinux-disable-attributes-no-policy.patch 
	linux-2.6-selinux-selinuxfs-hard-link-count.patch 
	linux-2.6-signal-trampolines-unwind-info.patch 
	linux-2.6-smsc-ircc2-pnp.patch linux-2.6-x86-tune-p4.patch 
	linux-2.6.16.tar.bz2.sign patch-2.6.16.20.bz2.sign 
Log Message:
Rebase to 2.6.17.1


linux-2.6-ac97_unregister_controls_ad18xx.patch:
 ac97_codec.c |   42 ++++++++++++++++++++++++++++++++++--------
 1 files changed, 34 insertions(+), 8 deletions(-)

--- NEW FILE linux-2.6-ac97_unregister_controls_ad18xx.patch ---
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index d052007..fcb00c2 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -1204,6 +1204,20 @@ #define snd_ac97_cmute_new(card, name, r
 
 static unsigned int snd_ac97_determine_spdif_rates(struct snd_ac97 *ac97);
 
+static void snd_ctl_elem_remove(struct snd_card *card,
+				struct snd_kcontrol *kcontrol)
+{
+	struct snd_kcontrol *kct;
+	struct snd_ctl_elem_id id = kcontrol->id;
+
+	down_write(&card->controls_rwsem);
+
+	if ((kct = snd_ctl_find_id(card, &id)))
+		snd_ctl_remove(card, kct);
+
+	up_write(&card->controls_rwsem);
+}
+
 static int snd_ac97_mixer_build(struct snd_ac97 * ac97)
 {
 	struct snd_card *card = ac97->bus->card;
@@ -1347,23 +1361,35 @@ static int snd_ac97_mixer_build(struct s
 			init_val = 0x9f9f;
 		else
 			init_val = 0x9f1f;
-		for (idx = 0; idx < 2; idx++)
-			if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_ad18xx_pcm[idx], ac97))) < 0)
+		for (idx = 0; idx < 2; idx++) {
+			struct snd_kcontrol *kctrl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_pcm[idx], ac97);
+			snd_ctl_elem_remove(card, kctrl);
+			if ((err = snd_ctl_add(card, kctrl)) < 0)
 				return err;
+			}
 		ac97->spec.ad18xx.pcmreg[0] = init_val;
 		if (ac97->scaps & AC97_SCAP_SURROUND_DAC) {
-			for (idx = 0; idx < 2; idx++)
-				if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_ad18xx_surround[idx], ac97))) < 0)
+			for (idx = 0; idx < 2; idx++) {
+				struct snd_kcontrol *kctrl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_surround[idx], ac97);
+				snd_ctl_elem_remove(card, kctrl);
+				if ((err = snd_ctl_add(card, kctrl)) < 0)
 					return err;
+			}
 			ac97->spec.ad18xx.pcmreg[1] = init_val;
 		}
 		if (ac97->scaps & AC97_SCAP_CENTER_LFE_DAC) {
-			for (idx = 0; idx < 2; idx++)
-				if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_ad18xx_center[idx], ac97))) < 0)
+			for (idx = 0; idx < 2; idx++) {
+				struct snd_kcontrol *kctrl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_center[idx], ac97);
+				snd_ctl_elem_remove(card, kctrl);
+				if ((err = snd_ctl_add(card, kctrl)) < 0)
 					return err;
-			for (idx = 0; idx < 2; idx++)
-				if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_ad18xx_lfe[idx], ac97))) < 0)
+			}
+			for (idx = 0; idx < 2; idx++) {
+				struct snd_kcontrol *kctrl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_lfe[idx], ac97);
+				snd_ctl_elem_remove(card, kctrl);
+				if ((err = snd_ctl_add(card, kctrl)) < 0)
 					return err;
+			}
 			ac97->spec.ad18xx.pcmreg[2] = init_val;
 		}
 		snd_ac97_write_cache(ac97, AC97_PCM, init_val);

linux-2.6-autofs-invalidate.patch:
 expire.c |    6 ++++++
 1 files changed, 6 insertions(+)

--- NEW FILE linux-2.6-autofs-invalidate.patch ---

From: Ian Kent <raven at themaw.net>
To: Andrew Morton <akpm at osdl.org>
Cc: autofs mailing list <autofs at linux.kernel.org>, Kernel Mailing List
<linux-kernel at vger.kernel.org>, linux-fsdevel
<linux-fsdevel at vger.kernel.org>
Subject: [PATCH] autofs4 - need to invalidate children on tree mount expire
Date: Mon, 12 Jun 2006 14:52:45 +0800 (WST)

Hi Andrew,

I've found a case where invalid dentrys in a mount tree, waiting to be 
cleaned up by d_invalidate, prevent the expected expire.

In this case dentrys created during a lookup for which a mount fails or 
has no entry in the mount map contribute to the d_count of the parent 
dentry. These dentrys may not be invalidated prior to comparing the 
interanl usage count of valid autofs dentrys against the dentry d_count 
which makes a mount tree appear busy so it doesn't expire.

Signed-off-by: Ian Kent <raven at themaw.net>

--

--- linux-2.6.17-rc6-mm2/fs/autofs4/expire.c.need-invalidate-on-tree-expire	2006-06-12 14:24:21.000000000 +0800
+++ linux-2.6.17-rc6-mm2/fs/autofs4/expire.c	2006-06-12 14:24:36.000000000 +0800
@@ -174,6 +174,12 @@ static int autofs4_tree_busy(struct vfsm
 			struct autofs_info *ino = autofs4_dentry_ino(p);
 			unsigned int ino_count = atomic_read(&ino->count);
 
+			/*
+			 * Clean stale dentries below that have not been
+			 * invalidated after a mount fail during lookup
+			 */
+			d_invalidate(p);
+
 			/* allow for dget above and top is already dgot */
 			if (p == top)
 				ino_count += 2;


linux-2.6-cell-mambo-drivers.patch:
 arch/powerpc/Kconfig              |   21 ++
 b/drivers/block/mambo_bd.c        |  291 ++++++++++++++++++++++++++++
 b/drivers/net/mambonet.c          |  392 ++++++++++++++++++++++++++++++++++++++
 b/include/asm-powerpc/systemsim.h |  130 ++++++++++++
 drivers/block/Makefile            |    1 
 drivers/net/Makefile              |    1 
 include/asm-powerpc/processor.h   |   17 +
 include/linux/root_dev.h          |    3 
 8 files changed, 856 insertions(+)

--- NEW FILE linux-2.6-cell-mambo-drivers.patch ---
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -332,6 +332,27 @@ config PPC_OF
 	depends on PPC_MULTIPLATFORM	# for now
 	default y
 
+# Systemsim configuration
+config MAMBO
+        bool "  IBM Full System Simulator (systemsim) support"
+        default n
+        ---help---
+           Support booting resulting image under IBMs Full System Simulator.
+config MAMBO_DISK
+        depends on MAMBO
+        tristate "    IBM Full System Simulator Bogus Disk Support"
+        default y
+        ---help---
+           Provides quick access to disk images in the simulator without
+           simulating a full IDE or SCSI device.
+config MAMBO_NET
+        depends on MAMBO
+        tristate "    IBM Full System Simulator Bogus Network Support"
+        default y
+        ---help---
+           Provides quick access to a raw ethernet device in the simulator
+           without simulating any specific network device hardware.
+
 config XICS
 	depends on PPC_PSERIES
 	bool
--- a/drivers/block/Makefile
+++ b/drivers/block/Makefile
@@ -27,6 +27,7 @@ obj-$(CONFIG_BLK_DEV_UMEM)	+= umem.o
 obj-$(CONFIG_BLK_DEV_NBD)	+= nbd.o
 obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryptoloop.o
 
+obj-$(CONFIG_MAMBO_DISK)	+= mambo_bd.o
 obj-$(CONFIG_VIODASD)		+= viodasd.o
 obj-$(CONFIG_BLK_DEV_SX8)	+= sx8.o
 obj-$(CONFIG_BLK_DEV_UB)	+= ub.o
--- /dev/null
+++ b/drivers/block/mambo_bd.c
@@ -0,0 +1,291 @@
+/*
+ *  Bogus Block Driver for PowerPC Full System Simulator
+ *
+ *  (C) Copyright IBM Corporation 2003-2005
+ *
+ *  Bogus Disk Driver
+ *
+ *  Author: Eric Van Hensbegren <ericvh at gmail.com>
+ *
+ *    inspired by drivers/block/nbd.c
+ *    written by Pavel Machek and Steven Whitehouse
+ *
+ *  Some code is from the IBM Full System Simulator Group in ARL
+ *  Author: PAtrick Bohrer <IBM Austin Research Lab>
+ *
+ * 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, 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:
+ * Free Software Foundation
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02111-1301  USA
+ *
+ */
+
+#include <linux/major.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/fs.h>
+#include <linux/stat.h>
+#include <linux/errno.h>
+#include <linux/file.h>
+#include <linux/ioctl.h>
+#include <linux/blkdev.h>
+#include <net/sock.h>
+
+#include <asm/systemsim.h>
+
+#include <linux/devfs_fs_kernel.h>
+
+#include <asm/uaccess.h>
+#include <asm/types.h>
+
+#define MAJOR_NR 112
+#define MAX_MBD 128
+
+#define MBD_SET_BLKSIZE _IO( 0xab, 1 )
+#define MBD_SET_SIZE    _IO( 0xab, 2 )
+#define MBD_SET_SIZE_BLOCKS     _IO( 0xab, 7 )
+#define MBD_DISCONNECT  _IO( 0xab, 8 )
+
+struct mbd_device {
+	int initialized;
+	int refcnt;
+	int flags;
+	struct gendisk *disk;
+};
+
+static struct mbd_device mbd_dev[MAX_MBD];
+
+#define BD_INFO_SYNC   0
+#define BD_INFO_STATUS 1
+#define BD_INFO_BLKSZ  2
+#define BD_INFO_DEVSZ  3
+#define BD_INFO_CHANGE 4
+
+#define BOGUS_DISK_READ  116
+#define BOGUS_DISK_WRITE 117
+#define BOGUS_DISK_INFO  118
+
+static inline int
+MamboBogusDiskRead(int devno, void *buf, ulong sect, ulong nrsect)
+{
+	return callthru3(BOGUS_DISK_READ, (unsigned long)buf,
+			 (unsigned long)sect,
+			 (unsigned long)((nrsect << 16) | devno));
+}
+
+static inline int
+MamboBogusDiskWrite(int devno, void *buf, ulong sect, ulong nrsect)
+{
+	return callthru3(BOGUS_DISK_WRITE, (unsigned long)buf,
+			 (unsigned long)sect,
+			 (unsigned long)((nrsect << 16) | devno));
+}
+
+static inline int MamboBogusDiskInfo(int op, int devno)
+{
+	return callthru2(BOGUS_DISK_INFO, (unsigned long)op,
+			 (unsigned long)devno);
+}
+
+static int mbd_init_disk(int devno)
+{
+	struct gendisk *disk = mbd_dev[devno].disk;
+	unsigned int sz;
+
+	if (!__onsim())
+		return -1;
+
+	/* check disk configured */
+	if (!MamboBogusDiskInfo(BD_INFO_STATUS, devno)) {
+		printk(KERN_ERR
+		       "Attempting to open bogus disk before initializaiton\n");
+		return 0;
+	}
+
+	mbd_dev[devno].initialized++;
+
+	sz = MamboBogusDiskInfo(BD_INFO_DEVSZ, devno);
+
+	if (sz == -1)
+		return 0;
+
+	printk("Initializing disk %d with devsz %u\n", devno, sz);
+
+	set_capacity(disk, sz << 1);
+
+	return 1;
+}
+
+static void do_mbd_request(request_queue_t * q)
+{
+	int result = 0;
+	struct request *req;
+
+	while ((req = elv_next_request(q)) != NULL) {
+		int minor = req->rq_disk->first_minor;
+
+		switch (rq_data_dir(req)) {
+		case READ:
+			result = MamboBogusDiskRead(minor,
+						    req->buffer, req->sector,
+						    req->current_nr_sectors);
+			break;
+		case WRITE:
+			result = MamboBogusDiskWrite(minor,
+						     req->buffer, req->sector,
+						     req->current_nr_sectors);
+		};
+
+		if (result)
+			end_request(req, 0);	/* failure */
+		else
+			end_request(req, 1);	/* success */
+	}
+}
+
+static int mbd_release(struct inode *inode, struct file *file)
+{
+	struct mbd_device *lo;
+	int dev;
+
+	if (!inode)
+		return -ENODEV;
+	dev = inode->i_bdev->bd_disk->first_minor;
+	if (dev >= MAX_MBD)
+		return -ENODEV;
+	if (MamboBogusDiskInfo(BD_INFO_SYNC, dev) < 0) {
+		printk(KERN_ALERT "mbd_release: unable to sync\n");
+	}
+	lo = &mbd_dev[dev];
+	if (lo->refcnt <= 0)
+		printk(KERN_ALERT "mbd_release: refcount(%d) <= 0\n",
+		       lo->refcnt);
+	lo->refcnt--;
+	return 0;
+}
+
+static int mbd_revalidate(struct gendisk *disk)
+{
+	int devno = disk->first_minor;
+
+	mbd_init_disk(devno);
+
+	return 0;
+}
+
+static int mbd_open(struct inode *inode, struct file *file)
+{
+	int dev;
+
+	if (!inode)
+		return -EINVAL;
+	dev = inode->i_bdev->bd_disk->first_minor;
+	if (dev >= MAX_MBD)
+		return -ENODEV;
+
+	check_disk_change(inode->i_bdev);
+
+	if (!mbd_dev[dev].initialized)
+		if (!mbd_init_disk(dev))
+			return -ENODEV;
+
+	mbd_dev[dev].refcnt++;
+	return 0;
+}
+
+static struct block_device_operations mbd_fops = {
+      owner:THIS_MODULE,
+      open:mbd_open,
+      release:mbd_release,
+	/* media_changed:      mbd_check_change, */
+      revalidate_disk:mbd_revalidate,
+};
+
+static spinlock_t mbd_lock = SPIN_LOCK_UNLOCKED;
+
+static int __init mbd_init(void)
+{
+	int err = -ENOMEM;
+	int i;
+
+	for (i = 0; i < MAX_MBD; i++) {
+		struct gendisk *disk = alloc_disk(1);
+		if (!disk)
+			goto out;
+		mbd_dev[i].disk = disk;
+		/*
+		 * The new linux 2.5 block layer implementation requires
+		 * every gendisk to have its very own request_queue struct.
+		 * These structs are big so we dynamically allocate them.
+		 */
+		disk->queue = blk_init_queue(do_mbd_request, &mbd_lock);
+		if (!disk->queue) {
+			put_disk(disk);
+			goto out;
+		}
+	}
+
+	if (register_blkdev(MAJOR_NR, "mbd")) {
+		err = -EIO;
+		goto out;
+	}
+#ifdef MODULE
+	printk("mambo bogus disk: registered device at major %d\n", MAJOR_NR);
+#else
+	printk("mambo bogus disk: compiled in with kernel\n");
+#endif
+
+	devfs_mk_dir("mambobd");
+	for (i = 0; i < MAX_MBD; i++) {	/* load defaults */
+		struct gendisk *disk = mbd_dev[i].disk;
+		mbd_dev[i].initialized = 0;
+		mbd_dev[i].refcnt = 0;
+		mbd_dev[i].flags = 0;
+		disk->major = MAJOR_NR;
+		disk->first_minor = i;
+		disk->fops = &mbd_fops;
+		disk->private_data = &mbd_dev[i];
+		sprintf(disk->disk_name, "mambobd%d", i);
+		sprintf(disk->devfs_name, "mambobd%d", i);
+		set_capacity(disk, 0x7ffffc00ULL << 1);	/* 2 TB */
+		add_disk(disk);
+	}
+
+	return 0;
+      out:
+	while (i--) {
+		if (mbd_dev[i].disk->queue)
+			blk_cleanup_queue(mbd_dev[i].disk->queue);
+		put_disk(mbd_dev[i].disk);
+	}
+	return -EIO;
+}
+
+static void __exit mbd_cleanup(void)
+{
+	devfs_remove("mambobd");
+
+	if (unregister_blkdev(MAJOR_NR, "mbd") != 0)
+		printk("mbd: cleanup_module failed\n");
+	else
+		printk("mbd: module cleaned up.\n");
+}
+
+module_init(mbd_init);
+module_exit(mbd_cleanup);
+
+MODULE_DESCRIPTION("Mambo Block Device");
+MODULE_LICENSE("GPL");
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -140,6 +140,7 @@ obj-$(CONFIG_EL3) += 3c509.o
 obj-$(CONFIG_3C515) += 3c515.o
 obj-$(CONFIG_EEXPRESS) += eexpress.o
 obj-$(CONFIG_EEXPRESS_PRO) += eepro.o
+obj-$(CONFIG_MAMBO_NET) += mambonet.o
 obj-$(CONFIG_8139CP) += 8139cp.o
 obj-$(CONFIG_8139TOO) += 8139too.o
 obj-$(CONFIG_ZNET) += znet.o
--- /dev/null
+++ b/drivers/net/mambonet.c
@@ -0,0 +1,392 @@
+/*
+ *  Bogus Network Driver for PowerPC Full System Simulator
+ *
+ *  (C) Copyright IBM Corporation 2003-2005
+ *
+ *  Bogus Network Driver
+ * 
+ *  Author: JimiX <jimix at watson.ibm.com>
+ *  Maintained By: Eric Van Hensbergen <ericvh at gmail.com>
+ *
+ * 	inspired by drivers/net/ibmveth.c
+ *	written by Dave Larson 
+ *
+ *  Some code is from the IBM Full System Simulator Group in ARL
+ *  Author: Patrick Bohrer <IBM Austin Research Lab>
+ *
+ *  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, 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:
+ *  Free Software Foundation
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02111-1301  USA
+ *  
+ */
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/interrupt.h>
+#include <linux/fs.h>
+#include <linux/types.h>
+#include <linux/string.h>
+#include <linux/socket.h>
+#include <linux/errno.h>
+#include <linux/fcntl.h>
+#include <linux/in.h>
+#include <linux/init.h>
+
+#include <asm/system.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
+
+#include <linux/inet.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+#include <net/sock.h>
+#include <linux/if_ether.h>	/* For the statistics structure. */
+#include <linux/if_arp.h>	/* For ARPHRD_ETHER */
+#include <linux/workqueue.h>
+#include <asm/prom.h>
+#include <linux/version.h>
+#include <asm/systemsim.h>
+
+#define MAMBO_BOGUS_NET_PROBE   119
+#define MAMBO_BOGUS_NET_SEND    120
+#define MAMBO_BOGUS_NET_RECV    121
+
+static inline int MamboBogusNetProbe(int devno, void *buf)
+{
+	return callthru2(MAMBO_BOGUS_NET_PROBE,
+			 (unsigned long)devno, (unsigned long)buf);
+}
+
+static inline int MamboBogusNetSend(int devno, void *buf, ulong size)
+{
+	return callthru3(MAMBO_BOGUS_NET_SEND,
+			 (unsigned long)devno,
+			 (unsigned long)buf, (unsigned long)size);
+}
+
+static inline int MamboBogusNetRecv(int devno, void *buf, ulong size)
+{
+	return callthru3(MAMBO_BOGUS_NET_RECV,
+			 (unsigned long)devno,
+			 (unsigned long)buf, (unsigned long)size);
+}
+
+static irqreturn_t
+mambonet_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
+
+#define INIT_BOTTOM_HALF(x,y,z) INIT_WORK(x, y, (void*)z)
+#define SCHEDULE_BOTTOM_HALF(x) schedule_delayed_work(x, 1)
+#define KILL_BOTTOM_HALF(x) cancel_delayed_work(x); flush_scheduled_work()
+
+#define MAMBO_MTU 1500
+
+struct netdev_private {
+	int devno;
+	int closing;
+	struct work_struct poll_task;
+	struct net_device_stats stats;
+};
+
+static int mambonet_probedev(int devno, void *buf)
+{
+	struct device_node *mambo;
+	struct device_node *net;
+	unsigned int *reg;
+
+	mambo = find_path_device("/mambo");
+
+	if (mambo == NULL) {
+		return -1;
+	}
+	net = find_path_device("/mambo/bogus-net at 0");
+	if (net == NULL) {
+		return -1;
+	}
+	reg = (unsigned int *)get_property(net, "reg", 0);
+
+	if (*reg != devno) {
+		return -1;
+	}
+
+	return MamboBogusNetProbe(devno, buf);
+}
+
+static int mambonet_send(int devno, void *buf, ulong size)
+{
+	return MamboBogusNetSend(devno, buf, size);
+}
+
+static int mambonet_recv(int devno, void *buf, ulong size)
+{
+	return MamboBogusNetRecv(devno, buf, size);
+}
+
+static int mambonet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+	struct netdev_private *priv = (struct netdev_private *)dev->priv;
+	int devno = priv->devno;
+
+	skb->dev = dev;
+
+	/* we might need to checksum or something */
+	mambonet_send(devno, skb->data, skb->len);
+
+	dev->last_rx = jiffies;
+	priv->stats.rx_bytes += skb->len;
+	priv->stats.tx_bytes += skb->len;
+	priv->stats.rx_packets++;
+	priv->stats.tx_packets++;
+
+	dev_kfree_skb(skb);
+
+	return (0);
+}
+
+static int mambonet_poll(struct net_device *dev, int *budget)
+{
+	struct netdev_private *np = dev->priv;
+	int devno = np->devno;
+	char buffer[1600];
+	int ns;
+	struct sk_buff *skb;
+	int frames = 0;
+	int max_frames = min(*budget, dev->quota);
+	int ret = 0;
+
+	while ((ns = mambonet_recv(devno, buffer, 1600)) > 0) {
+		if ((skb = dev_alloc_skb(ns + 2)) != NULL) {
+			skb->dev = dev;
+			skb_reserve(skb, 2);	/* 16 byte align the IP
+						 * header */
+#ifdef HAS_IP_COPYSUM
+			eth_copy_and_sum(skb, buffer, ns, 0);
+			skb_put(skb, ns);
+#else
+			memcpy(skb_put(skb, ns), buffer, ns);
+#endif
+			skb->protocol = eth_type_trans(skb, dev);
+
+			if (dev->irq)
+				netif_receive_skb(skb);
+			else
+				netif_rx(skb);
+
+			dev->last_rx = jiffies;
+			np->stats.rx_packets++;
+			np->stats.rx_bytes += ns;
+		} else {
+			printk("Failed to allocated skbuff, "
+			       "dropping packet\n");
+			np->stats.rx_dropped++;
+			/* wait for another cycle */
+			return 1;
+		}
+		++frames;
+		if (frames > max_frames) {
+			ret = 1;
+			break;
+		}
+	}
+	*budget -= frames;
+	dev->quota -= frames;
+
+	if ((!ret) && (dev->irq))
+		netif_rx_complete(dev);
+
+	return ret;
+}
+
+static void mambonet_timer(struct net_device *dev)
+{
+	int budget = 16;
+	struct netdev_private *priv = (struct netdev_private *)dev->priv;
+
+	mambonet_poll(dev, &budget);
+
+	if (!priv->closing) {
+		SCHEDULE_BOTTOM_HALF(&priv->poll_task);
+	}
+}
+
+static struct net_device_stats *get_stats(struct net_device *dev)
+{
+	struct netdev_private *priv = (struct netdev_private *)dev->priv;
+	return (struct net_device_stats *)&(priv->stats);
+}
+
+static irqreturn_t
+mambonet_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
+{
+	struct net_device *dev = dev_instance;
+	if (netif_rx_schedule_prep(dev)) {
+		__netif_rx_schedule(dev);
+	}
+	return IRQ_HANDLED;
+}
+
+static int mambonet_open(struct net_device *dev)
+{
+	struct netdev_private *priv;
+	int ret = 0;
+
+	priv = dev->priv;
+
+	/*
+	 * we can't start polling in mambonet_init, because I don't think
+	 * workqueues are usable that early. so start polling now.
+	 */
+
+	if (dev->irq) {
+		ret = request_irq(dev->irq, &mambonet_interrupt, 0,
+				  dev->name, dev);
+
+		if (ret == 0) {
+			netif_start_queue(dev);
+		} else {
+			printk(KERN_ERR "mambonet: request irq failed\n");
+		}
+
+		MamboBogusNetProbe(priv->devno, NULL);	/* probe with NULL to activate interrupts */
+	} else {
+		mambonet_timer(dev);
+	}
+
+	return ret;
+}
+
+static int mambonet_close(struct net_device *dev)
+{
+	struct netdev_private *priv;
+
+	netif_stop_queue(dev);
+
+	if (dev->irq)
+		free_irq(dev->irq, dev);
+
+	priv = dev->priv;
+	priv->closing = 1;
+	if (dev->irq == 0) {
+		KILL_BOTTOM_HALF(&priv->poll_task);
+	}
+
+	kfree(priv);
+
+	return 0;
+}
+
+static struct net_device_stats mambonet_stats;
+
+static struct net_device_stats *mambonet_get_stats(struct net_device *dev)
+{
+	return &mambonet_stats;
+}
+
+static int mambonet_set_mac_address(struct net_device *dev, void *p)
+{
+	return -EOPNOTSUPP;
+}
+static int mambonet_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+{
+	return -EOPNOTSUPP;
+}
+static int nextdevno = 0;	/* running count of device numbers */
+
+/* Initialize the rest of the device. */
+int __init do_mambonet_probe(struct net_device *dev)
+{
+	struct netdev_private *priv;
+	int devno = nextdevno++;
+	int irq;
+
+	printk("eth%d: bogus network driver initialization\n", devno);
+
+	irq = mambonet_probedev(devno, dev->dev_addr);
+
+	if (irq < 0) {
+		printk("No IRQ retreived\n");
+		return (-ENODEV);
+	}
+
+	printk("%s: %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", dev->name,
+	       dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
+	       dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
+
+	SET_MODULE_OWNER(dev);
+
+	dev->irq = irq;
+	dev->mtu = MAMBO_MTU;
+	dev->open = mambonet_open;
+	dev->poll = mambonet_poll;
+	dev->weight = 16;
+	dev->stop = mambonet_close;
+	dev->hard_start_xmit = mambonet_start_xmit;
+	dev->get_stats = mambonet_get_stats;
+	dev->set_mac_address = mambonet_set_mac_address;
+	dev->do_ioctl = mambonet_ioctl;
+
+	dev->priv = kmalloc(sizeof(struct netdev_private), GFP_KERNEL);
+	if (dev->priv == NULL)
+		return -ENOMEM;
+	memset(dev->priv, 0, sizeof(struct netdev_private));
+
+	priv = dev->priv;
+	priv->devno = devno;
+	priv->closing = 0;
+	dev->get_stats = get_stats;
+
+	if (dev->irq == 0) {
+		INIT_BOTTOM_HALF(&priv->poll_task, (void *)mambonet_timer,
+				 (void *)dev);
+	}
+
+	return (0);
+};
+
+struct net_device *__init mambonet_probe(int unit)
+{
+	struct net_device *dev = alloc_etherdev(0);
+	int err;
+
+	if (!dev)
+		return ERR_PTR(-ENODEV);
+
+	sprintf(dev->name, "eth%d", unit);
+	netdev_boot_setup_check(dev);
+
+	err = do_mambonet_probe(dev);
+
+	if (err)
+		goto out;
+
+	err = register_netdev(dev);
+	if (err)
+		goto out;
+
+	return dev;
+
+      out:
+	free_netdev(dev);
+	return ERR_PTR(err);
+}
+
+int __init init_mambonet(void)
+{
+	mambonet_probe(0);
+	return 0;
+}
+
+module_init(init_mambonet);
+MODULE_LICENSE("GPL");
--- /dev/null
+++ b/include/asm-powerpc/systemsim.h
@@ -0,0 +1,130 @@
+/*********************************************************
+ *
+ * Copyright (C) 2001, 2005 IBM
+ * 
+ * Filename	: systemsim.h
+ *
+ * Originator	: Patrick Bohrer and Charles Lefurgy
+ * Modified By	: Eric Van Hensbegren <ericvh at gmail.com>
+ *
+ * Purpose	: 
+ *
+ *   This file is compiled with programs that are run under the 
+ *   PowerPC Full System simulator.  For example, stand-alone programs 
+ *   or operating systems.  The programs call the callthru wrapper 
+ *   functions which use an illegal PowerPC instruction to signal the 
+ *   simulator to emulate special support.
+ *
+ *********************************************************/
+
+#ifndef _SYSTEMSIM_CONFIG_H_
+#define _SYSTEMSIM_CONFIG_H_
+
+/* The functions callthru0 to callthru5 setup up the arguments for the
+ * simulator callthru and then use the callthru instruction.  Note that
+ * 0-5 specify the number of arguments after the command */
+
+/* Note: Arguments are cast as void* to prevent casting by the
+   compiler.  This way, you can pass pointers, integers, etc. in
+   machine register and have the simulator interpret what the
+   register is supposed to be.  To help with typing errors when using
+   callthrus, we provide wrapper functions for each callthru.  The
+   wrappers cast all arguments to void*.  Unfortunately, this results
+   in a lot of compiler warnings that I do not know how to remove.  If
+   you modify this code, be aware that we are trying to pick a type
+   that is the size of the registers (32-bit or 64-bit) and that is
+   why are choosing to cast to a void* (it should be the size of a
+   machine register) */
+
+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 callthru1(int command, unsigned long arg1)
+{
+	register int c asm("r3") = command;
+	register unsigned long a1 asm("r4") = arg1;
+	asm volatile (".long 0x000eaeb0":"=r" (c):"r"(c), "r"(a1));
+	return (c);
+}
+static inline int callthru2(int command, unsigned long arg1, unsigned long arg2)
+{
+	register int c asm("r3") = command;
+	register unsigned long a1 asm("r4") = arg1;
+	register unsigned long a2 asm("r5") = arg2;
+	asm volatile (".long 0x000eaeb0":"=r" (c):"r"(c), "r"(a1), "r"(a2));
+	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 callthru4(int command, unsigned long arg1, unsigned long arg2,
+			    unsigned long arg3, unsigned long arg4)
+{
+	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;
+	register unsigned long a4 asm("r7") = arg4;
+	asm volatile (".long 0x000eaeb0":"=r" (c):"r"(c), "r"(a1), "r"(a2),
+		      "r"(a3), "r"(a4));
+	return (c);
+}
+static inline int callthru5(int command, unsigned long arg1, unsigned long arg2,
+			    unsigned long arg3, unsigned long arg4,
+			    unsigned long arg5)
+{
+	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;
+	register unsigned long a4 asm("r7") = arg4;
+	register unsigned long a5 asm("r8") = arg5;
+	asm volatile (".long 0x000eaeb0":"=r" (c):"r"(c), "r"(a1), "r"(a2),
+		      "r"(a3), "r"(a4), "r"(a5));
+	return (c);
+}
+static inline int callthru6(int command, unsigned long arg1, unsigned long arg2,
+			    unsigned long arg3, unsigned long arg4,
+			    unsigned long arg5, unsigned long arg6)
+{
+	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;
+	register unsigned long a4 asm("r7") = arg4;
+	register unsigned long a5 asm("r8") = arg5;
+	register unsigned long a6 asm("r9") = arg6;
+	asm volatile (".long 0x000eaeb0":"=r" (c):"r"(c), "r"(a1), "r"(a2),
+		      "r"(a3), "r"(a4), "r"(a5), "r"(a6));
+	return (c);
+}
+static inline int callthru7(int command, unsigned long arg1, unsigned long arg2,
+			    unsigned long arg3, unsigned long arg4,
+			    unsigned long arg5, unsigned long arg6,
+			    unsigned long arg7)
+{
+	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;
+	register unsigned long a4 asm("r7") = arg4;
+	register unsigned long a5 asm("r8") = arg5;
+	register unsigned long a6 asm("r9") = arg6;
+	register unsigned long a7 asm("r10") = arg7;
+	asm volatile (".long 0x000eaeb0":"=r" (c):"r"(c), "r"(a1), "r"(a2),
+		      "r"(a3), "r"(a4), "r"(a5), "r"(a6), "r"(a7));
+	return (c);
+}
+
+#endif/* _SYSTEMSIM_CONFIG_H_ */
--- a/include/linux/root_dev.h
+++ b/include/linux/root_dev.h
@@ -14,6 +14,9 @@ enum {
 	Root_SDA2 = MKDEV(SCSI_DISK0_MAJOR, 2),
 	Root_HDC1 = MKDEV(IDE1_MAJOR, 1),
 	Root_SR0 = MKDEV(SCSI_CDROM_MAJOR, 0),
+#ifdef CONFIG_MAMBO_DISK
+	Root_Mambo = MKDEV(112, 0),
+#endif
 };
 
 extern dev_t ROOT_DEV;
--- linux-2.6.15-rc.orig/include/asm-powerpc/processor.h
+++ linux-2.6.15-rc/include/asm-powerpc/processor.h
@@ -284,6 +284,23 @@ static inline void pause_zero(void)
 }
 #endif
 
+#ifdef CONFIG_PPC_CELL /* MAMBO SIMULATION code */
+#define MSR_SIM_LG      29
+#define MSR_SIM         __MASK(MSR_SIM_LG)
+
+static __inline__ int __onsim(void)
+{
+        unsigned long msr;
+        __asm__ __volatile__ ("mfmsr    %0" : "=&r" (msr));
+        return ((msr & MSR_SIM) ? 1 : 0);
+}
+#endif /* CONFIG_PPC_CELL */
+
 #endif /* __KERNEL__ */
+#else
+/* must be given a register to perform the compare, set cr0 = 1
+ * Usage: __onsim(r0); bne _if_onsim
+ */
+#define __onsim(r) mfmsr        r; rldicl. r,r,35,63
 #endif /* __ASSEMBLY__ */
 #endif /* _ASM_POWERPC_PROCESSOR_H */

linux-2.6-console-suspend.patch:
 power/console.c |   32 +++++---------------------------
 printk.c        |   12 ++++++++++++
 2 files changed, 17 insertions(+), 27 deletions(-)

--- NEW FILE linux-2.6-console-suspend.patch ---
Return-Path: <torvalds at osdl.org>
X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on 
	nwo.kernelslacker.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,
	FORGED_RCVD_HELO,UNPARSEABLE_RELAY autolearn=ham version=3.1.3
Received: from pobox.devel.redhat.com [10.11.255.8]
	by nwo.kernelslacker.org with IMAP (fetchmail-6.3.4)
	for <davej at localhost> (single-drop); Wed, 14 Jun 2006 15:03:49 -0400 (EDT)
Received: from pobox.devel.redhat.com ([unix socket])
	 by pobox.devel.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-3.RHEL4.1) with LMTPA;
	 Wed, 14 Jun 2006 15:03:37 -0400
X-Sieve: CMU Sieve 2.2
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])
	by pobox.devel.redhat.com (8.13.1/8.13.1) with ESMTP id k5EJ3bh3020398
	for <davej at pobox.devel.redhat.com>; Wed, 14 Jun 2006 15:03:37 -0400
Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32])
	by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5EJ3bGj030972
	for <davej at redhat.com>; Wed, 14 Jun 2006 15:03:37 -0400
Received: from smtp.osdl.org (smtp.osdl.org [65.172.181.4])
	by mx3.redhat.com (8.13.1/8.13.1) with ESMTP id k5EJ3U96030450
	for <davej at redhat.com>; Wed, 14 Jun 2006 15:03:31 -0400
Received: from shell0.pdx.osdl.net (fw.osdl.org [65.172.181.6])
	by smtp.osdl.org (8.12.8/8.12.8) with ESMTP id k5EJ3Ogt004764
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO)
	for <davej at redhat.com>; Wed, 14 Jun 2006 12:03:25 -0700
Received: from localhost (shell0.pdx.osdl.net [10.9.0.31])
	by shell0.pdx.osdl.net (8.13.1/8.11.6) with ESMTP id k5EJ3Nag015488
	for <davej at redhat.com>; Wed, 14 Jun 2006 12:03:23 -0700
Date: Wed, 14 Jun 2006 12:03:23 -0700 (PDT)
From: Linus Torvalds <torvalds at osdl.org>
To: Dave Jones <davej at redhat.com>
Subject: Re: [linux-pm] [PATCH 2/2] Fix console handling during suspend/resume
In-Reply-To: <20060614185928.GA23238 at redhat.com>
Message-ID: <Pine.LNX.4.64.0606141200311.5498 at g5.osdl.org>
References: <Pine.LNX.4.64.0606131418580.5498 at g5.osdl.org>
 <Pine.LNX.4.64.0606131435400.5498 at g5.osdl.org> <20060614185928.GA23238 at redhat.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-MIMEDefang-Filter: osdl$Revision: 1.135 $
X-Scanned-By: MIMEDefang 2.36
X-RedHat-Spam-Score: 0.05 
Status: RO
Content-Length: 3717
Lines: 138



diff-tree b7140c89071f39e98b154a17463796d4fe3f0aea (from 8325a64d97b5c8489dc1694a77c3e25918049998)
Author: Linus Torvalds <torvalds at macmini.osdl.org>
Date:   Thu Jun 8 15:29:09 2006 -0700

    Fix console handling during suspend/resume
    
    The old code was terminally broken, and would do extremely bad
    things if you used netconsole, for example. Like sending out packets
    when the device had already been suspended etc.
    
    The new version may not be perfect either, but it seems fundamentally
    like a better design.
    
    Signed-off-by: Linus Torvalds <torvalds at osdl.org>

diff --git a/kernel/power/console.c b/kernel/power/console.c
index 623786d..6e039ca 100644
--- a/kernel/power/console.c
+++ b/kernel/power/console.c
@@ -9,42 +9,20 @@ #include <linux/kbd_kern.h>
 #include <linux/console.h>
 #include "power.h"
 
-#if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE)
-#define SUSPEND_CONSOLE	(MAX_NR_CONSOLES-1)
-
-static int orig_fgconsole, orig_kmsg;
+extern int console_suspended;
 
 int pm_prepare_console(void)
 {
 	acquire_console_sem();
-
-	orig_fgconsole = fg_console;
-
-	if (vc_allocate(SUSPEND_CONSOLE)) {
-	  /* we can't have a free VC for now. Too bad,
-	   * we don't want to mess the screen for now. */
-		release_console_sem();
-		return 1;
-	}
-
-	set_console(SUSPEND_CONSOLE);
-	release_console_sem();
-
-	if (vt_waitactive(SUSPEND_CONSOLE)) {
-		pr_debug("Suspend: Can't switch VCs.");
-		return 1;
-	}
-	orig_kmsg = kmsg_redirect;
-	kmsg_redirect = SUSPEND_CONSOLE;
+	console_suspended = 1;
+	system_state = SYSTEM_BOOTING;
 	return 0;
 }
 
 void pm_restore_console(void)
 {
-	acquire_console_sem();
-	set_console(orig_fgconsole);
+	console_suspended = 0;
+	system_state = SYSTEM_RUNNING;
 	release_console_sem();
-	kmsg_redirect = orig_kmsg;
 	return;
 }
-#endif
diff --git a/kernel/printk.c b/kernel/printk.c
index c056f33..8adb9ed 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -67,6 +67,7 @@ EXPORT_SYMBOL(oops_in_progress);
  * driver system.
  */
 static DECLARE_MUTEX(console_sem);
+static DECLARE_MUTEX(secondary_console_sem);
 struct console *console_drivers;
 /*
  * This is used for debugging the mess that is the VT code by
@@ -77,6 +78,7 @@ struct console *console_drivers;
  * locked without the console sempahore held
  */
 static int console_locked;
+int console_suspended;
 
 /*
  * logbuf_lock protects log_buf, log_start, log_end, con_start and logged_chars
@@ -707,6 +709,11 @@ int __init add_preferred_console(char *n
  */
 void acquire_console_sem(void)
 {
+	if (console_suspended) {
+		down(&secondary_console_sem);
+		return;
+	}
+
 	BUG_ON(in_interrupt());
 	down(&console_sem);
 	console_locked = 1;
@@ -750,6 +757,11 @@ void release_console_sem(void)
 	unsigned long _con_start, _log_end;
 	unsigned long wake_klogd = 0;
 
+	if (console_suspended) {
+		up(&secondary_console_sem);
+		return;
+	}
+
 	for ( ; ; ) {
 		spin_lock_irqsave(&logbuf_lock, flags);
 		wake_klogd |= log_start - log_end;


linux-2.6-defaults-phys-start.patch:
 Kconfig |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-defaults-phys-start.patch ---

http://www.lkml.org/lkml/2006/2/23/189

--- linux-2.6.16.noarch/arch/i386/Kconfig~	2006-04-04 15:30:43.000000000 -0500
+++ linux-2.6.16.noarch/arch/i386/Kconfig	2006-04-04 15:30:55.000000000 -0500
@@ -729,7 +729,7 @@ config CRASH_DUMP
 	  Generate crash dump after being started by kexec.
 
 config PHYSICAL_START
-	hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
+	hex "Physical address where the kernel is loaded"
 
 	default "0x1000000" if CRASH_DUMP
 	default "0x100000"

linux-2.6-defaults-unicode-vt.patch:
 keyboard.c |    2 +-
 vt.c       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE linux-2.6-defaults-unicode-vt.patch ---

Unicode by default. Join the 20th century.

--- linux-2.6.11/drivers/char/vt.c.foo	2005-06-06 22:53:13.000000000 -0400
+++ linux-2.6.11/drivers/char/vt.c	2005-06-06 22:53:42.000000000 -0400
@@ -1443,7 +1443,7 @@
 	vc->vc_charset		= 0;
 	vc->vc_need_wrap	= 0;
 	vc->vc_report_mouse	= 0;
-	vc->vc_utf		= 0;
+	vc->vc_utf		= 1;
 	vc->vc_utf_count	= 0;
 
 	vc->vc_disp_ctrl	= 0;
--- linux-2.6.11/drivers/char/keyboard.c.foo	2005-06-06 23:35:07.000000000 -0400
+++ linux-2.6.11/drivers/char/keyboard.c	2005-06-06 23:36:28.000000000 -0400
@@ -1241,7 +1241,7 @@
         kbd0.lockstate = KBD_DEFLOCK;
         kbd0.slockstate = 0;
         kbd0.modeflags = KBD_DEFMODE;
-        kbd0.kbdmode = VC_XLATE;
+        kbd0.kbdmode = VC_UNICODE;
 
         for (i = 0 ; i < MAX_NR_CONSOLES ; i++)
                 kbd_table[i] = kbd0;

linux-2.6-hvc-console.patch:
 linux-2.6.14/drivers/char/hvc_fss.c    |  150 +++++++++++++++++++++++++++++++++
 linux-2.6.16.ppc/drivers/char/Kconfig  |    9 +
 linux-2.6.16.ppc/drivers/char/Makefile |    1 
 3 files changed, 160 insertions(+)

Index: linux-2.6-hvc-console.patch
===================================================================
RCS file: linux-2.6-hvc-console.patch
diff -N linux-2.6-hvc-console.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-hvc-console.patch	20 Jun 2006 18:25:40 -0000	1.3
@@ -0,0 +1,182 @@
+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,150 @@
++/*
++ * 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 <asm/processor.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);
+--- linux-2.6.16.ppc/drivers/char/Makefile~	2006-03-31 20:44:59.000000000 +0100
++++ linux-2.6.16.ppc/drivers/char/Makefile	2006-03-31 21:28:29.000000000 +0100
+@@ -44,6 +44,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_RTAS)		+= hvc_rtas.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
+--- linux-2.6.16.ppc/drivers/char/Kconfig~	2006-03-31 20:44:59.000000000 +0100
++++ linux-2.6.16.ppc/drivers/char/Kconfig	2006-03-31 21:29:05.000000000 +0100
+@@ -588,6 +588,15 @@ config HVC_RTAS
+ 	help
+ 	  IBM Console device driver which makes use of RTAS
+ 
++
++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

linux-2.6-iscsi-update-to-2-6-18-upstream.patch:
 drivers/scsi/Makefile               |    2 
 drivers/scsi/iscsi_tcp.c            | 3012 +++++++++++-------------------------
 drivers/scsi/iscsi_tcp.h            |  190 --
 drivers/scsi/libiscsi.c             | 1702 ++++++++++++++++++++
 drivers/scsi/scsi_transport_iscsi.c |  703 +++++---
 include/scsi/iscsi_if.h             |  128 +
 include/scsi/iscsi_proto.h          |    2 
 include/scsi/libiscsi.h             |  282 +++
 include/scsi/scsi_transport_iscsi.h |  119 +
 9 files changed, 3655 insertions(+), 2485 deletions(-)

--- NEW FILE linux-2.6-iscsi-update-to-2-6-18-upstream.patch ---
diff -Naurp linux-2.6.16.x86_64/drivers/scsi/iscsi_tcp.c linux-2.6.16.x86_64.work/drivers/scsi/iscsi_tcp.c
--- linux-2.6.16.x86_64/drivers/scsi/iscsi_tcp.c	2006-05-30 04:38:18.000000000 -0500
+++ linux-2.6.16.x86_64.work/drivers/scsi/iscsi_tcp.c	2006-05-30 04:39:36.000000000 -0500
@@ -3,7 +3,8 @@
  *
  * Copyright (C) 2004 Dmitry Yusupov
  * Copyright (C) 2004 Alex Aizman
- * Copyright (C) 2005 Mike Christie
+ * Copyright (C) 2005 - 2006 Mike Christie
+ * Copyright (C) 2006 Red Hat, Inc.  All rights reserved.
  * maintained by open-iscsi at googlegroups.com
  *
  * This program is free software; you can redistribute it and/or modify
@@ -36,37 +37,28 @@
 #include <linux/mutex.h>
 #include <net/tcp.h>
 #include <scsi/scsi_cmnd.h>
-#include <scsi/scsi_device.h>
-#include <scsi/scsi_eh.h>
-#include <scsi/scsi_request.h>
-#include <scsi/scsi_tcq.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_transport_iscsi.h>
 
 #include "iscsi_tcp.h"
 
+#define ISCSI_TCP_VERSION "1.0-595"
+
 MODULE_AUTHOR("Dmitry Yusupov <dmitry_yus at yahoo.com>, "
 	      "Alex Aizman <itn780 at yahoo.com>");
 MODULE_DESCRIPTION("iSCSI/TCP data-path");
 MODULE_LICENSE("GPL");
-MODULE_VERSION("0:4.445");
+MODULE_VERSION(ISCSI_TCP_VERSION);
 /* #define DEBUG_TCP */
-/* #define DEBUG_SCSI */
 #define DEBUG_ASSERT
 
 #ifdef DEBUG_TCP
-#define debug_tcp(fmt...) printk(KERN_DEBUG "tcp: " fmt)
+#define debug_tcp(fmt...) printk(KERN_INFO "tcp: " fmt)
 #else
 #define debug_tcp(fmt...)
 #endif
 
-#ifdef DEBUG_SCSI
-#define debug_scsi(fmt...) printk(KERN_DEBUG "scsi: " fmt)
-#else
-#define debug_scsi(fmt...)
-#endif
-
 #ifndef DEBUG_ASSERT
 #ifdef BUG_ON
 #undef BUG_ON
@@ -74,22 +66,9 @@ MODULE_VERSION("0:4.445");
 #define BUG_ON(expr)
 #endif
 
-#define INVALID_SN_DELTA	0xffff
-
 static unsigned int iscsi_max_lun = 512;
 module_param_named(max_lun, iscsi_max_lun, uint, S_IRUGO);
 
-/* global data */
-static kmem_cache_t *taskcache;
-
-static inline void
-iscsi_buf_init_virt(struct iscsi_buf *ibuf, char *vbuf, int size)
-{
-	sg_init_one(&ibuf->sg, (u8 *)vbuf, size);
-	ibuf->sent = 0;
-	ibuf->use_sendmsg = 0;
-}
-
 static inline void
 iscsi_buf_init_iov(struct iscsi_buf *ibuf, char *vbuf, int size)
 {
@@ -130,68 +109,39 @@ static inline void
 iscsi_hdr_digest(struct iscsi_conn *conn, struct iscsi_buf *buf,
 		 u8* crc)
 {
-	crypto_digest_digest(conn->tx_tfm, &buf->sg, 1, crc);
-	buf->sg.length += sizeof(uint32_t);
-}
-
-static void
-iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err)
-{
-	struct iscsi_session *session = conn->session;
-	unsigned long flags;
+	struct iscsi_tcp_conn *tcp_conn = conn->dd_data;
 
-	spin_lock_irqsave(&session->lock, flags);
-	if (session->conn_cnt == 1 || session->leadconn == conn)
-		session->state = ISCSI_STATE_FAILED;
-	spin_unlock_irqrestore(&session->lock, flags);
-	set_bit(SUSPEND_BIT, &conn->suspend_tx);
-	set_bit(SUSPEND_BIT, &conn->suspend_rx);
-	iscsi_conn_error(conn->cls_conn, err);
+	crypto_digest_digest(tcp_conn->tx_tfm, &buf->sg, 1, crc);
+	buf->sg.length += sizeof(uint32_t);
 }
 
 static inline int
-iscsi_check_assign_cmdsn(struct iscsi_session *session, struct iscsi_nopin *hdr)
+iscsi_hdr_extract(struct iscsi_tcp_conn *tcp_conn)
 {
-	uint32_t max_cmdsn = be32_to_cpu(hdr->max_cmdsn);
-	uint32_t exp_cmdsn = be32_to_cpu(hdr->exp_cmdsn);
-
-	if (max_cmdsn < exp_cmdsn -1 &&
-	    max_cmdsn > exp_cmdsn - INVALID_SN_DELTA)
-		return ISCSI_ERR_MAX_CMDSN;
-	if (max_cmdsn > session->max_cmdsn ||
-	    max_cmdsn < session->max_cmdsn - INVALID_SN_DELTA)
-		session->max_cmdsn = max_cmdsn;
-	if (exp_cmdsn > session->exp_cmdsn ||
-	    exp_cmdsn < session->exp_cmdsn - INVALID_SN_DELTA)
-		session->exp_cmdsn = exp_cmdsn;
-
-	return 0;
-}
+	struct sk_buff *skb = tcp_conn->in.skb;
 
-static inline int
-iscsi_hdr_extract(struct iscsi_conn *conn)
-{
-	struct sk_buff *skb = conn->in.skb;
+	tcp_conn->in.zero_copy_hdr = 0;
 
-	if (conn->in.copy >= conn->hdr_size &&
-	    conn->in_progress == IN_PROGRESS_WAIT_HEADER) {
+	if (tcp_conn->in.copy >= tcp_conn->hdr_size &&
+	    tcp_conn->in_progress == IN_PROGRESS_WAIT_HEADER) {
 		/*
 		 * Zero-copy PDU Header: using connection context
 		 * to store header pointer.
 		 */
 		if (skb_shinfo(skb)->frag_list == NULL &&
-		    !skb_shinfo(skb)->nr_frags)
-			conn->in.hdr = (struct iscsi_hdr *)
-				((char*)skb->data + conn->in.offset);
-		else {
+		    !skb_shinfo(skb)->nr_frags) {
+			tcp_conn->in.hdr = (struct iscsi_hdr *)
+				((char*)skb->data + tcp_conn->in.offset);
+			tcp_conn->in.zero_copy_hdr = 1;
+		} else {
 			/* ignoring return code since we checked
 			 * in.copy before */
-			skb_copy_bits(skb, conn->in.offset,
-				&conn->hdr, conn->hdr_size);
-			conn->in.hdr = &conn->hdr;
+			skb_copy_bits(skb, tcp_conn->in.offset,
+				&tcp_conn->hdr, tcp_conn->hdr_size);
+			tcp_conn->in.hdr = &tcp_conn->hdr;
 		}
-		conn->in.offset += conn->hdr_size;
-		conn->in.copy -= conn->hdr_size;
+		tcp_conn->in.offset += tcp_conn->hdr_size;
+		tcp_conn->in.copy -= tcp_conn->hdr_size;
 	} else {
 		int hdr_remains;
 		int copylen;
@@ -201,118 +151,51 @@ iscsi_hdr_extract(struct iscsi_conn *con
 		 * copying it... This'll happen quite rarely.
 		 */
 
-		if (conn->in_progress == IN_PROGRESS_WAIT_HEADER)
-			conn->in.hdr_offset = 0;
+		if (tcp_conn->in_progress == IN_PROGRESS_WAIT_HEADER)
+			tcp_conn->in.hdr_offset = 0;
 
-		hdr_remains = conn->hdr_size - conn->in.hdr_offset;
+		hdr_remains = tcp_conn->hdr_size - tcp_conn->in.hdr_offset;
 		BUG_ON(hdr_remains <= 0);
 
-		copylen = min(conn->in.copy, hdr_remains);
-		skb_copy_bits(skb, conn->in.offset,
-			(char*)&conn->hdr + conn->in.hdr_offset, copylen);
+		copylen = min(tcp_conn->in.copy, hdr_remains);
+		skb_copy_bits(skb, tcp_conn->in.offset,
+			(char*)&tcp_conn->hdr + tcp_conn->in.hdr_offset,
+			copylen);
 
 		debug_tcp("PDU gather offset %d bytes %d in.offset %d "
-		       "in.copy %d\n", conn->in.hdr_offset, copylen,
-		       conn->in.offset, conn->in.copy);
+		       "in.copy %d\n", tcp_conn->in.hdr_offset, copylen,
+		       tcp_conn->in.offset, tcp_conn->in.copy);
 
-		conn->in.offset += copylen;
-		conn->in.copy -= copylen;
+		tcp_conn->in.offset += copylen;
+		tcp_conn->in.copy -= copylen;
 		if (copylen < hdr_remains)  {
-			conn->in_progress = IN_PROGRESS_HEADER_GATHER;
-			conn->in.hdr_offset += copylen;
[...7706 lines suppressed...]
  *
@@ -27,9 +27,13 @@
 #include <scsi/iscsi_if.h>
 
 struct scsi_transport_template;
+struct iscsi_transport;
 struct Scsi_Host;
 struct mempool_zone;
 struct iscsi_cls_conn;
+struct iscsi_conn;
+struct iscsi_cmd_task;
+struct iscsi_mgmt_task;
 
 /**
  * struct iscsi_transport - iSCSI Transport template
@@ -46,6 +50,24 @@ struct iscsi_cls_conn;
  * @start_conn:		set connection to be operational
  * @stop_conn:		suspend/recover/terminate connection
  * @send_pdu:		send iSCSI PDU, Login, Logout, NOP-Out, Reject, Text.
+ * @session_recovery_timedout: notify LLD a block during recovery timed out
+ * @suspend_conn_recv:	susepend the recv side of the connection
+ * @termincate_conn:	destroy socket connection. Called with mutex lock.
+ * @init_cmd_task:	Initialize a iscsi_cmd_task and any internal structs.
+ *			Called from queuecommand with session lock held.
+ * @init_mgmt_task:	Initialize a iscsi_mgmt_task and any internal structs.
+ *			Called from iscsi_conn_send_generic with xmitmutex.
+ * @xmit_cmd_task:	Requests LLD to transfer cmd task. Returns 0 or the
+ *			the number of bytes transferred on success, and -Exyz
+ *			value on error.
+ * @xmit_mgmt_task:	Requests LLD to transfer mgmt task. Returns 0 or the
+ *			the number of bytes transferred on success, and -Exyz
+ *			value on error.
+ * @cleanup_cmd_task:	requests LLD to fail cmd task. Called with xmitmutex
+ *			and session->lock after the connection has been
+ *			suspended and terminated during recovery. If called
+ *			from abort task then connection is not suspended
+ *			or terminated but sk_callback_lock is held
  *
  * Template API provided by iSCSI Transport
  */
@@ -53,38 +75,58 @@ struct iscsi_transport {
 	struct module *owner;
 	char *name;
 	unsigned int caps;
+	/* LLD sets this to indicate what values it can export to sysfs */
+	unsigned int param_mask;
 	struct scsi_host_template *host_template;
-	/* LLD session/scsi_host data size */
-	int hostdata_size;
-	/* LLD iscsi_host data size */
-	int ihostdata_size;
 	/* LLD connection data size */
 	int conndata_size;
+	/* LLD session data size */
+	int sessiondata_size;
 	int max_lun;
 	unsigned int max_conn;
 	unsigned int max_cmd_len;
-	struct iscsi_cls_session *(*create_session)
-		(struct scsi_transport_template *t, uint32_t sn, uint32_t *sid);
+	struct iscsi_cls_session *(*create_session) (struct iscsi_transport *it,
+		struct scsi_transport_template *t, uint32_t sn, uint32_t *hn);
 	void (*destroy_session) (struct iscsi_cls_session *session);
 	struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess,
 				uint32_t cid);
 	int (*bind_conn) (struct iscsi_cls_session *session,
 			  struct iscsi_cls_conn *cls_conn,
-			  uint32_t transport_fd, int is_leading);
+			  uint64_t transport_eph, int is_leading);
 	int (*start_conn) (struct iscsi_cls_conn *conn);
 	void (*stop_conn) (struct iscsi_cls_conn *conn, int flag);
 	void (*destroy_conn) (struct iscsi_cls_conn *conn);
 	int (*set_param) (struct iscsi_cls_conn *conn, enum iscsi_param param,
 			  uint32_t value);
 	int (*get_conn_param) (struct iscsi_cls_conn *conn,
-			       enum iscsi_param param,
-			       uint32_t *value);
+			       enum iscsi_param param, uint32_t *value);
 	int (*get_session_param) (struct iscsi_cls_session *session,
 				  enum iscsi_param param, uint32_t *value);
+	int (*get_conn_str_param) (struct iscsi_cls_conn *conn,
+				   enum iscsi_param param, char *buf);
+	int (*get_session_str_param) (struct iscsi_cls_session *session,
+				      enum iscsi_param param, char *buf);
 	int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr,
 			 char *data, uint32_t data_size);
 	void (*get_stats) (struct iscsi_cls_conn *conn,
 			   struct iscsi_stats *stats);
+	void (*suspend_conn_recv) (struct iscsi_conn *conn);
+	void (*terminate_conn) (struct iscsi_conn *conn);
+	void (*init_cmd_task) (struct iscsi_cmd_task *ctask);
+	void (*init_mgmt_task) (struct iscsi_conn *conn,
+				struct iscsi_mgmt_task *mtask,
+				char *data, uint32_t data_size);
+	int (*xmit_cmd_task) (struct iscsi_conn *conn,
+			      struct iscsi_cmd_task *ctask);
+	void (*cleanup_cmd_task) (struct iscsi_conn *conn,
+				  struct iscsi_cmd_task *ctask);
+	int (*xmit_mgmt_task) (struct iscsi_conn *conn,
+			       struct iscsi_mgmt_task *mtask);
+	void (*session_recovery_timedout) (struct iscsi_cls_session *session);
+	int (*ep_connect) (struct sockaddr *dst_addr, int non_blocking,
+			   uint64_t *ep_handle);
+	int (*ep_poll) (uint64_t ep_handle, int timeout_ms);
+	void (*ep_disconnect) (uint64_t ep_handle);
 };
 
 /*
@@ -100,10 +142,26 @@ extern void iscsi_conn_error(struct iscs
 extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr,
 			  char *data, uint32_t data_size);
 
+
+/* Connection's states */
+#define ISCSI_CONN_INITIAL_STAGE	0
+#define ISCSI_CONN_STARTED		1
+#define ISCSI_CONN_STOPPED		2
+#define ISCSI_CONN_CLEANUP_WAIT		3
+
 struct iscsi_cls_conn {
 	struct list_head conn_list;	/* item in connlist */
 	void *dd_data;			/* LLD private data */
 	struct iscsi_transport *transport;
+	uint32_t cid;			/* connection id */
+
+	/* portal/group values we got during discovery */
+	char *persistent_address;
+	int persistent_port;
+	/* portal/group values we are currently using */
+	char *address;
+	int port;
+
 	int active;			/* must be accessed with the connlock */
 	struct device dev;		/* sysfs transport/container device */
 	struct mempool_zone *z_error;
@@ -114,9 +172,32 @@ struct iscsi_cls_conn {
 #define iscsi_dev_to_conn(_dev) \
 	container_of(_dev, struct iscsi_cls_conn, dev)
 
+/* Session's states */
+#define ISCSI_STATE_FREE		1
+#define ISCSI_STATE_LOGGED_IN		2
+#define ISCSI_STATE_FAILED		3
+#define ISCSI_STATE_TERMINATE		4
+#define ISCSI_STATE_IN_RECOVERY		5
+#define ISCSI_STATE_RECOVERY_FAILED	6
+
 struct iscsi_cls_session {
 	struct list_head sess_list;		/* item in session_list */
+	struct list_head host_list;
 	struct iscsi_transport *transport;
+
+	/* iSCSI values used as unique id by userspace. */
+	char *targetname;
+	int tpgt;
+
+	/* recovery fields */
+	int recovery_tmo;
+	struct work_struct recovery_work;
+
+	int target_id;
+	int channel;
+
+	int sid;				/* session id */
+	void *dd_data;				/* LLD private data */
 	struct device dev;	/* sysfs transport/container device */
 };
 
@@ -126,22 +207,22 @@ struct iscsi_cls_session {
 #define iscsi_session_to_shost(_session) \
 	dev_to_shost(_session->dev.parent)
 
+struct iscsi_host {
+	int next_target_id;
+	struct list_head sessions;
+	struct mutex mutex;
+};
+
 /*
  * session and connection functions that can be used by HW iSCSI LLDs
  */
 extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost,
-				struct iscsi_transport *t);
+				struct iscsi_transport *t, int channel);
 extern int iscsi_destroy_session(struct iscsi_cls_session *session);
 extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess,
 					    uint32_t cid);
 extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn);
-
-/*
- * session functions used by software iscsi
- */
-extern struct Scsi_Host *
-iscsi_transport_create_session(struct scsi_transport_template *scsit,
-                               struct iscsi_transport *transport);
-extern int iscsi_transport_destroy_session(struct Scsi_Host *shost);
+extern void iscsi_unblock_session(struct iscsi_cls_session *session);
+extern void iscsi_block_session(struct iscsi_cls_session *session);
 
 #endif

linux-2.6-offb-find-fb.patch:
 offb.c |  105 +++++++++++++++++++++++++++++------------------------------------
 1 files changed, 47 insertions(+), 58 deletions(-)

--- NEW FILE linux-2.6-offb-find-fb.patch ---
>From benh at kernel.crashing.org Fri Mar 31 22:27:35 2006
Return-path: <benh at kernel.crashing.org>
Envelope-to: dwmw2 at baythorne.infradead.org
Delivery-date: Fri, 31 Mar 2006 22:27:35 +0100
Received: from [2002:d592:9a28::1] (helo=pentafluge.infradead.org) by
	baythorne.infradead.org with esmtps (Exim 4.54 #1 (Red Hat Linux)) id
	1FPR9b-00074r-6a for dwmw2 at baythorne.infradead.org; Fri, 31 Mar 2006
	22:27:35 +0100
Received: from [2002:3fe4:139::1] (helo=gate.crashing.org) by
	pentafluge.infradead.org with esmtps (Exim 4.60 #1 (Red Hat Linux)) id
	1FPR9X-0004DG-1Y for dwmw2 at infradead.org; Fri, 31 Mar 2006 22:27:34 +0100
Received: from localhost.localdomain (localhost [127.0.0.1]) by
	gate.crashing.org (8.12.8/8.12.8) with ESMTP id k2VLNnWP031196 for
	<dwmw2 at infradead.org>; Fri, 31 Mar 2006 15:23:50 -0600
Subject: offb crap
From: Benjamin Herrenschmidt <benh at kernel.crashing.org>
To: David Woodhouse <dwmw2 at infradead.org>
Content-Type: text/plain
Date: Sat, 01 Apr 2006 08:24:51 +1100
Message-Id: <1143840291.24876.16.camel at localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.6.0 
X-Spam-Score: -2.8 (--)
X-Spam-Report: SpamAssassin version 3.0.4 on pentafluge.infradead.org
	summary: Content analysis details:   (-2.8 points, 5.0 required) pts rule
	name              description ---- ----------------------
	-------------------------------------------------- -2.8 ALL_TRUSTED        
	   Did not pass through any untrusted hosts
X-Evolution-Source: imap://dwmw2@pentafluge.infradead.org/
Content-Transfer-Encoding: 8bit

Index: linux-work/drivers/video/offb.c
===================================================================
--- linux-work.orig/drivers/video/offb.c	2006-01-11 13:30:27.000000000 +1100
+++ linux-work/drivers/video/offb.c	2006-01-11 14:11:01.000000000 +1100
@@ -321,8 +321,9 @@
 	int *pp, i;
 	unsigned int len;
 	int width = 640, height = 480, depth = 8, pitch;
-	unsigned int flags, rsize, *up;
-	u64 address = OF_BAD_ADDR;
+	unsigned  flags, rsize, *up, addr_prop = 0;
+	unsigned long max_size = 0;
+	u64 rstart, address = OF_BAD_ADDR;
 	u32 *addrp;
 	u64 asize;
 
@@ -343,69 +344,57 @@
 	} else
 		pitch = width;
 
-       rsize = (unsigned long)pitch * (unsigned long)height *
-               (unsigned long)(depth / 8);
+	rsize = (unsigned long)pitch * (unsigned long)height *
+		(unsigned long)(depth / 8);
 
-       /* Try to match device to a PCI device in order to get a properly
-	* translated address rather then trying to decode the open firmware
-	* stuff in various incorrect ways
-	*/
-#ifdef CONFIG_PCI
-       /* First try to locate the PCI device if any */
-       {
-               struct pci_dev *pdev = NULL;
-
-	       for_each_pci_dev(pdev) {
-                       if (dp == pci_device_to_OF_node(pdev))
-                               break;
-	       }
-               if (pdev) {
-                       for (i = 0; i < 6 && address == OF_BAD_ADDR; i++) {
-                               if ((pci_resource_flags(pdev, i) &
-				    IORESOURCE_MEM) &&
-				   (pci_resource_len(pdev, i) >= rsize))
-                                       address = pci_resource_start(pdev, i);
-                       }
-		       pci_dev_put(pdev);
-               }
-        }
-#endif /* CONFIG_PCI */
-
-       /* This one is dodgy, we may drop it ... */
-       if (address == OF_BAD_ADDR &&
-	   (up = (unsigned *) get_property(dp, "address", &len)) != NULL &&
-	   len == sizeof(unsigned int))
-	       address = (u64) * up;
-
-       if (address == OF_BAD_ADDR) {
-	       for (i = 0; (addrp = of_get_address(dp, i, &asize, &flags))
-			    != NULL; i++) {
-		       if (!(flags & IORESOURCE_MEM))
-			       continue;
-		       if (asize >= pitch * height * depth / 8)
-			       break;
-	       }
-		if (addrp == NULL) {
-			printk(KERN_ERR
-			       "no framebuffer address found for %s\n",
-			       dp->full_name);
-			return;
+	/* Ok, now we try to figure out the address of the framebuffer.
+	 *
+	 * Unfortunately, Open Firmware doesn't provide a standard way to do
+	 * so. All we can do is a dodgy heuristic that happens to work in
+	 * practice. On most machines, the "address" property contains what
+	 * we need, though not on Matrox cards found in IBM machines. What I've
+	 * found that appears to give good results is to go through the PCI
+	 * ranges and pick one that is both big enough and if possible encloses
+	 * the "address" property. If none match, we pick the biggest
+	 */
+	up = (unsigned int *) get_property(dp, "address", &len);
+	if (up && len == sizeof(unsigned int))
+		addr_prop = *up;
+
+	for (i = 0; (addrp = of_get_address(dp, i, &asize, &flags))
+		     != NULL; i++) {
+		int match_addrp = 0;
+
+		if (!(flags & IORESOURCE_MEM))
+			continue;
+		if (asize < rsize)
+			continue;
+		rstart = of_translate_address(dp, addrp);
+		if (rstart == OF_BAD_ADDR)
+			continue;
+		if (addr_prop && (rstart <= addr_prop) &&
+		    ((rstart + rsize) > addr_prop))
+			match_addrp = 1;
+		if (match_addrp) {
+			address = addr_prop;
+			break;
 		}
-		address = of_translate_address(dp, addrp);
-		if (address == OF_BAD_ADDR) {
-			printk(KERN_ERR
-			       "can't translate framebuffer address for %s\n",
-			       dp->full_name);
-			return;
+		if (rsize > max_size) {
+			max_size = rsize;
+			address = OF_BAD_ADDR;
 		}
-
+		if (address == OF_BAD_ADDR)
+			address = rstart;
+	}
+	if (address == OF_BAD_ADDR && addr_prop)
+		address = (u_long)addr_prop;
+	if (address != OF_BAD_ADDR) {
 		/* kludge for valkyrie */
 		if (strcmp(dp->name, "valkyrie") == 0)
 			address += 0x1000;
+		offb_init_fb(dp->name, dp->full_name, width, height, depth,
+			     pitch, address, dp);
 	}
-	offb_init_fb(dp->name, dp->full_name, width, height, depth,
-		     pitch, address, dp);
-
 }
 
 static void __init offb_init_fb(const char *name, const char *full_name,



linux-2.6-powernow-k7-smp.patch:
 powernow-k7.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

--- NEW FILE linux-2.6-powernow-k7-smp.patch ---
--- linux-2.6.16.noarch/arch/i386/kernel/cpu/cpufreq/powernow-k7.c~	2006-06-05 13:50:27.000000000 -0400
+++ linux-2.6.16.noarch/arch/i386/kernel/cpu/cpufreq/powernow-k7.c	2006-06-05 13:54:32.000000000 -0400
@@ -582,9 +582,7 @@ static int __init powernow_cpu_init (str
 	rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val);
 
 	/* recalibrate cpu_khz */
-	result = recalibrate_cpu_khz();
-	if (result)
-		return result;
+	recalibrate_cpu_khz();
 
 	fsb = (10 * cpu_khz) / fid_codes[fidvidstatus.bits.CFID];
 	if (!fsb) {

linux-2.6-ppc-iseries-input-layer.patch:
 Kconfig |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-ppc-iseries-input-layer.patch ---
iSeries has no keyboard, so it's valid to build a kernel with no input layer.
It seems a bit absurd to call one of these 'embedded'.

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

--- linux-2.6.15/drivers/input/Kconfig~	2006-01-06 02:27:56.000000000 -0500
+++ linux-2.6.15/drivers/input/Kconfig	2006-01-06 02:28:08.000000000 -0500
@@ -5,7 +5,7 @@
 menu "Input device support"
 
 config INPUT
-	tristate "Generic input layer (needed for keyboard, mouse, ...)" if EMBEDDED
+	tristate "Generic input layer (needed for keyboard, mouse, ...)"
 	default y
 	---help---
 	  Say Y here if you have any input device (mouse, keyboard, tablet,

linux-2.6-proc-self-maps-fix.patch:
 b/fs/proc/base.c                    |   20 ++++++++++++++++++++
 b/fs/proc/internal.h                |    2 ++
 b/fs/proc/task_mmu.c                |    3 +--
 b/include/linux/proc_fs.h           |    0 
 b/include/linux/ptrace.h            |    1 +
 b/kernel/ptrace.c                   |    4 ++--
 linux-2.6.16.noarch/kernel/ptrace.c |    2 +-
 7 files changed, 27 insertions(+), 5 deletions(-)

--- NEW FILE linux-2.6-proc-self-maps-fix.patch ---

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

diff --git a/fs/proc/base.c b/fs/proc/base.c
index a3a3eec..3f262cd 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -408,6 +408,26 @@ static int proc_task_root_link(struct in
 	 (task->state == TASK_STOPPED || task->state == TASK_TRACED) && \
 	 security_ptrace(current,task) == 0))
 
+struct mm_struct *mm_for_maps(struct task_struct *task)
+{
+	struct mm_struct *mm = get_task_mm(task);
+	if (!mm)
+		return NULL;
+	down_read(&mm->mmap_sem);
+	task_lock(task);
+	if (task->mm != mm)
+		goto out;
+	if (task->mm != current->mm && __ptrace_may_attach(task))
+		goto out;
+	task_unlock(task);
+	return mm;
+out:
+	task_unlock(task);
+	up_read(&mm->mmap_sem);
+	mmput(mm);
+	return NULL;
+}
+
 static int proc_pid_environ(struct task_struct *task, char * buffer)
 {
 	int res = 0;
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 0502f17..cd172ce 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -16,6 +16,8 @@ struct vmalloc_info {
 	unsigned long	largest_chunk;
 };
 
+extern struct mm_struct *mm_for_maps(struct task_struct *);
+
 #ifdef CONFIG_MMU
 #define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
 extern void get_vmalloc_info(struct vmalloc_info *vmi);
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 91b7c15..3777557 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -311,12 +311,11 @@ static void *m_start(struct seq_file *m,
 	if (last_addr == -1UL)
 		return NULL;
 
-	mm = get_task_mm(task);
+	mm = mm_for_maps(task);
 	if (!mm)
 		return NULL;
 
 	tail_vma = get_gate_vma(task);
-	down_read(&mm->mmap_sem);
 
 	/* Start with last addr hint */
 	if (last_addr && (vma = find_vma(mm, last_addr))) {
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index 0d36750..578c28e 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -94,6 +94,7 @@ extern void __ptrace_link(struct task_st
 extern void __ptrace_unlink(struct task_struct *child);
 extern void ptrace_untrace(struct task_struct *child);
 extern int ptrace_may_attach(struct task_struct *task);
+extern int __ptrace_may_attach(struct task_struct *task);
 
 static inline void ptrace_link(struct task_struct *child,
 			       struct task_struct *new_parent)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 0eeb7e6..443f77e 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -121,7 +121,7 @@ int ptrace_check_attach(struct task_stru
 	return ret;
 }
 
-static int may_attach(struct task_struct *task)
+int __ptrace_may_attach(struct task_struct *task)
 {
 	if (!task->mm)
 		return -EPERM;
@@ -143,7 +143,7 @@ int ptrace_may_attach(struct task_struct
 {
 	int err;
 	task_lock(task);
-	err = may_attach(task);
+	err = __ptrace_may_attach(task);
 	task_unlock(task);
 	return !err;
 }

--- linux-2.6.16.noarch/kernel/ptrace.c~	2006-04-10 14:36:15.000000000 -0500
+++ linux-2.6.16.noarch/kernel/ptrace.c	2006-04-10 14:36:30.000000000 -0500
@@ -160,7 +160,7 @@ int ptrace_attach(struct task_struct *ta
 	/* the same process cannot be attached many times */
 	if (task->ptrace & PT_PTRACED)
 		goto bad;
-	retval = may_attach(task);
+	retval = __ptrace_may_attach(task);
 	if (retval)
 		goto bad;
 

linux-2.6-random-patches.patch:
 char/watchdog/machzwd.c        |    3 +--
 media/dvb/ttpci/av7110.c       |    2 +-
 media/dvb/ttpci/budget-ci.c    |    2 +-
 media/dvb/ttpci/budget-patch.c |    2 +-
 media/dvb/ttpci/budget.c       |    5 +----
 5 files changed, 5 insertions(+), 9 deletions(-)

--- NEW FILE linux-2.6-random-patches.patch ---

--- linux-2.6.15.noarch/drivers/media/dvb/ttpci/av7110.c~	2006-01-31 20:22:02.000000000 -0500
+++ linux-2.6.15.noarch/drivers/media/dvb/ttpci/av7110.c	2006-01-31 20:24:27.000000000 -0500
@@ -2956,7 +2956,7 @@ MODULE_DEVICE_TABLE(pci, pci_tbl);
 
 
 static struct saa7146_extension av7110_extension = {
-	.name		= "dvb\0",
+	.name		= "dvb",
 	.flags		= SAA7146_I2C_SHORT_DELAY,
 
 	.module		= THIS_MODULE,
--- linux-2.6.15.noarch/drivers/media/dvb/ttpci/budget-ci.c~	2006-01-31 20:25:18.000000000 -0500
+++ linux-2.6.15.noarch/drivers/media/dvb/ttpci/budget-ci.c	2006-01-31 20:25:31.000000000 -0500
@@ -1165,7 +1165,7 @@ static struct pci_device_id pci_tbl[] = 
 MODULE_DEVICE_TABLE(pci, pci_tbl);
 
 static struct saa7146_extension budget_extension = {
-	.name = "budget_ci dvb\0",
+	.name = "budget_ci dvb",
 	.flags = SAA7146_I2C_SHORT_DELAY,
 
 	.module = THIS_MODULE,
--- linux-2.6.15.noarch/drivers/media/dvb/ttpci/budget-patch.c~	2006-01-31 20:25:42.000000000 -0500
+++ linux-2.6.15.noarch/drivers/media/dvb/ttpci/budget-patch.c	2006-01-31 20:25:50.000000000 -0500
@@ -731,7 +731,7 @@ static void __exit budget_patch_exit(voi
 }
 
 static struct saa7146_extension budget_extension = {
-	.name           = "budget_patch dvb\0",
+	.name           = "budget_patch dvb",
 	.flags          = 0,
 
 	.module         = THIS_MODULE,
--- linux-2.6.15.noarch/drivers/media/dvb/ttpci/budget.c~	2006-01-31 20:25:54.000000000 -0500
+++ linux-2.6.15.noarch/drivers/media/dvb/ttpci/budget.c	2006-01-31 20:26:00.000000000 -0500
@@ -744,7 +744,7 @@ static struct pci_device_id pci_tbl[] = 
 MODULE_DEVICE_TABLE(pci, pci_tbl);
 
 static struct saa7146_extension budget_extension = {
-	.name		= "budget dvb\0",
+	.name		= "budget dvb",
 	.flags		= SAA7146_I2C_SHORT_DELAY,
 
 	.module		= THIS_MODULE,

On a machine with no machzwd, loading the module prints out..

machzwd: MachZ ZF-Logic Watchdog driver initializing.
0xffff
machzwd: Watchdog using action = RESET

- the 0xffff printk is unnecessary
- 0xffff seems to be 'hardware not present'
- fix CodingStyle. (This driver could use some more work here)

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

--- linux-2.6.15.noarch/drivers/char/watchdog/machzwd.c~	2006-02-01 22:20:16.000000000 -0500
+++ linux-2.6.15.noarch/drivers/char/watchdog/machzwd.c	2006-02-01 22:22:23.000000000 -0500
@@ -427,8 +427,7 @@ static int __init zf_init(void)
 	printk(KERN_INFO PFX ": MachZ ZF-Logic Watchdog driver initializing.\n");
 
 	ret = zf_get_ZFL_version();
-	printk("%#x\n", ret);
-	if((!ret) || (ret != 0xffff)){
+	if ((!ret) || (ret == 0xffff)) {
 		printk(KERN_WARNING PFX ": no ZF-Logic found\n");
 		return -ENODEV;
 	}


#--- linux-2.6.16.noarch/drivers/scsi/libata-core.c~	2006-04-22 18:43:24.000000000 -0500
#+++ linux-2.6.16.noarch/drivers/scsi/libata-core.c	2006-04-22 18:43:39.000000000 -0500
#@@ -4288,6 +4288,7 @@ int ata_device_resume(struct ata_port *a
# {
# 	if (ap->flags & ATA_FLAG_SUSPENDED) {
# 		ap->flags &= ~ATA_FLAG_SUSPENDED;
#+		ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT);
# 		ata_set_mode(ap);
# 	}
# 	if (!ata_dev_present(dev))


linux-2.6-sata-ahci-suspend.patch:
 ahci.c |  529 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 472 insertions(+), 57 deletions(-)

--- NEW FILE linux-2.6-sata-ahci-suspend.patch ---
I ported the AHCI suspend/resume patch at
http://www.spinnaker.de/linux/c1320/sata-resume-2.6.16.5.patch to
libata-dev #upstream.
This patch provides the support for AHCI suspend/resume. The patch
works very well on Napa SDV in our lab.

Your comments and bug report are welcome.

Thanks,
Forrest


Signed-off-by: Zhao, Forrest <forrest.zhao at intel.com>

--

--- linux-2.6.16.i686/drivers/scsi/ahci.c.orig	2006-05-04 14:58:34.000000000 -0400
+++ linux-2.6.16.i686/drivers/scsi/ahci.c	2006-05-04 15:02:37.000000000 -0400
@@ -44,6 +44,7 @@
 #include <linux/device.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
 #include <linux/libata.h>
 #include <asm/io.h>
 
@@ -88,7 +89,9 @@
 
 	/* HOST_CAP bits */
 	HOST_CAP_64		= (1 << 31), /* PCI DAC (64-bit DMA) support */
+	HOST_CAP_SSS		= (1 << 27), /* Staggered Spin-up */
 	HOST_CAP_CLO		= (1 << 24), /* Command List Override support */
+	HOST_CAP_SSC		= (1 << 14), /* Slumber capable */
 
 	/* registers for each SATA port */
 	PORT_LST_ADDR		= 0x00, /* command list DMA addr */
@@ -139,6 +142,7 @@
 
 	/* PORT_CMD bits */
 	PORT_CMD_ATAPI		= (1 << 24), /* Device is ATAPI */
+	PORT_CMD_CPD		= (1 << 20), /* Cold presence detection */
 	PORT_CMD_LIST_ON	= (1 << 15), /* cmd list DMA engine running */
 	PORT_CMD_FIS_ON		= (1 << 14), /* FIS DMA engine running */
 	PORT_CMD_FIS_RX		= (1 << 4), /* Enable FIS receive DMA engine */
@@ -147,6 +151,7 @@
 	PORT_CMD_SPIN_UP	= (1 << 1), /* Spin up device */
 	PORT_CMD_START		= (1 << 0), /* Enable port DMA engine */
 
+	PORT_CMD_ICC_MASK	= (0xf << 28), /* i/f ICC state mask */
 	PORT_CMD_ICC_ACTIVE	= (0x1 << 28), /* Put i/f in active state */
 	PORT_CMD_ICC_PARTIAL	= (0x2 << 28), /* Put i/f in partial state */
 	PORT_CMD_ICC_SLUMBER	= (0x6 << 28), /* Put i/f in slumber state */
@@ -174,6 +179,7 @@
 	unsigned long		flags;
 	u32			cap;	/* cache of HOST_CAP register */
 	u32			port_map; /* cache of HOST_PORTS_IMPL reg */
+	u32			dev_map; /* connected devices */
 };
 
 struct ahci_port_priv {
@@ -191,15 +197,30 @@
 static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
 static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc);
 static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
+static int ahci_start_engine(void __iomem *port_mmio);
+static int ahci_stop_engine(void __iomem *port_mmio);
+static int ahci_stop_fis_rx(void __iomem *port_mmio);
+static void ahci_start_fis_rx(void __iomem *port_mmio,
+			     struct ahci_port_priv *pp,
+			     struct ahci_host_priv *hpriv);
 static int ahci_probe_reset(struct ata_port *ap, unsigned int *classes);
 static void ahci_irq_clear(struct ata_port *ap);
 static void ahci_eng_timeout(struct ata_port *ap);
 static int ahci_port_start(struct ata_port *ap);
 static void ahci_port_stop(struct ata_port *ap);
+static int ahci_port_suspend(struct ata_port *ap, pm_message_t state);
+static int ahci_port_resume(struct ata_port *ap);
+static int ahci_port_standby(void __iomem *port_mmio, u32 cap);
+static int ahci_port_spinup(void __iomem *port_mmio, u32 cap);
+static void ahci_port_disable(struct ata_port *ap);
 static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
 static void ahci_qc_prep(struct ata_queued_cmd *qc);
 static u8 ahci_check_status(struct ata_port *ap);
 static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc);
+static int ahci_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state);
+static int ahci_scsi_device_resume(struct scsi_device *sdev);
+static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t state);
+static int ahci_pci_device_resume(struct pci_dev *pdev);
 static void ahci_remove_one (struct pci_dev *pdev);
 
 static struct scsi_host_template ahci_sht = {
@@ -217,10 +238,12 @@
 	.dma_boundary		= AHCI_DMA_BOUNDARY,
 	.slave_configure	= ata_scsi_slave_config,
 	.bios_param		= ata_std_bios_param,
+	.resume			= ahci_scsi_device_resume,
+	.suspend		= ahci_scsi_device_suspend,
 };
 
 static const struct ata_port_operations ahci_ops = {
-	.port_disable		= ata_port_disable,
+	.port_disable		= ahci_port_disable,
 
 	.check_status		= ahci_check_status,
 	.check_altstatus	= ahci_check_status,
@@ -305,6 +328,8 @@
 	.id_table		= ahci_pci_tbl,
 	.probe			= ahci_init_one,
 	.remove			= ahci_remove_one,
+	.suspend		= ahci_pci_device_suspend,
+	.resume			= ahci_pci_device_resume,
 };
 
 
@@ -378,21 +403,23 @@
 
 	ap->private_data = pp;
 
-	if (hpriv->cap & HOST_CAP_64)
-		writel((pp->cmd_slot_dma >> 16) >> 16, port_mmio + PORT_LST_ADDR_HI);
-	writel(pp->cmd_slot_dma & 0xffffffff, port_mmio + PORT_LST_ADDR);
-	readl(port_mmio + PORT_LST_ADDR); /* flush */
-
-	if (hpriv->cap & HOST_CAP_64)
-		writel((pp->rx_fis_dma >> 16) >> 16, port_mmio + PORT_FIS_ADDR_HI);
-	writel(pp->rx_fis_dma & 0xffffffff, port_mmio + PORT_FIS_ADDR);
-	readl(port_mmio + PORT_FIS_ADDR); /* flush */
-
-	writel(PORT_CMD_ICC_ACTIVE | PORT_CMD_FIS_RX |
-	       PORT_CMD_POWER_ON | PORT_CMD_SPIN_UP |
-	       PORT_CMD_START, port_mmio + PORT_CMD);
-	readl(port_mmio + PORT_CMD); /* flush */
-
+	/*
+	 * Driver is setup; initialize the HBA
+	 */
+	ahci_start_fis_rx(port_mmio, pp, hpriv);
+	rc = ahci_port_spinup(port_mmio, hpriv->cap);
+	if (rc)
+		printk(KERN_WARNING "ata%d: could not spinup device (%d)\n",
+		       ap->id, rc);
+ 
+	/*
+	 * Do not enable DMA here; according to the spec
+	 * (section 10.1.1) we should first enable FIS reception,
+	 * then check if the port is enabled before we try to 
+	 * switch on DMA.
+	 * And as the port check is done during probe
+	 * we really shouldn't be doing it here.
+	 */
 	return 0;
 }
 
@@ -401,19 +428,8 @@
 {
 	struct device *dev = ap->host_set->dev;
 	struct ahci_port_priv *pp = ap->private_data;
-	void __iomem *mmio = ap->host_set->mmio_base;
-	void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
-	u32 tmp;
-
-	tmp = readl(port_mmio + PORT_CMD);
-	tmp &= ~(PORT_CMD_START | PORT_CMD_FIS_RX);
-	writel(tmp, port_mmio + PORT_CMD);
-	readl(port_mmio + PORT_CMD); /* flush */
 
-	/* spec says 500 msecs for each PORT_CMD_{START,FIS_RX} bit, so
-	 * this is slightly incorrect.
-	 */
-	msleep(500);
+	ahci_port_suspend(ap, PMSG_SUSPEND);
 
 	ap->private_data = NULL;
 	dma_free_coherent(dev, AHCI_PORT_PRIV_DMA_SZ,
@@ -422,6 +438,106 @@
 	kfree(pp);
 }
 
+static int ahci_port_suspend(struct ata_port *ap, pm_message_t state)
+{
+	void __iomem *mmio = ap->host_set->mmio_base;
+	void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
+	struct ahci_host_priv *hpriv = ap->host_set->private_data;
+	int rc;
+
+	/*
+	 * Disable DMA
+	 */
+	rc = ahci_stop_engine(port_mmio);
+	if (rc) {
+		printk(KERN_WARNING "ata%u: DMA engine busy\n", ap->id);
+		return rc;
+	}
+
+	/*
+	 * Disable FIS reception
+	 */
+	rc = ahci_stop_fis_rx(port_mmio);
+	if (rc)
+		printk(KERN_WARNING "ata%d: FIS RX still running (rc %d)\n",
+		       ap->id, rc);
+
+	/*
+	 * Put device into slumber mode
+	 */
+	if (!rc && state.event != PM_EVENT_FREEZE)
+		ahci_port_standby(port_mmio, hpriv->cap);
+
+	return rc;
+}
+
+static int ahci_port_resume(struct ata_port *ap)
+{
+	void __iomem *mmio = ap->host_set->mmio_base;
+	void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
+	struct ahci_host_priv *hpriv = ap->host_set->private_data;
+	struct ahci_port_priv *pp = ap->private_data;
+	int rc;
+	u32 tmp;
+
+	/*
+	 * Enable FIS reception
+	 */
+	ahci_start_fis_rx(port_mmio, pp, hpriv);
+
+	rc = ahci_port_spinup(port_mmio, hpriv->cap);
+	if (rc)
+		printk(KERN_WARNING "ata%d: could not spinup device (%d)\n",
+		       ap->id, rc);
+
+	/*
+	 * Clear error status
+	 */
+	tmp = readl(port_mmio + PORT_SCR_ERR);
+	writel(tmp, port_mmio + PORT_SCR_ERR);
+	/*
+	 * Clear interrupt status
+	 */
+	tmp = readl(mmio + HOST_CTL);
+	if (!(tmp & HOST_IRQ_EN)) {
+		u32 irq_stat;
+
+		/* ack any pending irq events for this port */
+		irq_stat = readl(port_mmio + PORT_IRQ_STAT);
+		if (irq_stat)
+			writel(irq_stat, port_mmio + PORT_IRQ_STAT);
+
+		/* set irq mask (enables interrupts) */
+		writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK);
+
+		if ((hpriv->dev_map >> (ap->port_no + 1)) == 0) {
+			/*
+			 * Enable interrupts if this was the last port
+			 */
+			printk(KERN_WARNING "ata%d: enabling interrupts\n",
+			       ap->id);
+
+			irq_stat = readl(mmio + HOST_IRQ_STAT);
+			if (irq_stat)
+				writel(irq_stat, mmio + HOST_IRQ_STAT);
+
+			tmp |= HOST_IRQ_EN;
+			writel(tmp, mmio + HOST_CTL);
+			(void) readl(mmio + HOST_CTL);
+		}
+	}
+
+	/*
+	 * Enable DMA
+	 */
+	rc = ahci_start_engine(port_mmio);
+	if (rc)
+		printk(KERN_WARNING "ata%d: cannot start DMA engine (rc %d)\n",
+		       ap->id, rc);
+
+	return rc;
+}
+
 static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg_in)
 {
 	unsigned int sc_reg;
@@ -456,19 +572,22 @@
 	writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4));
 }
 
-static int ahci_stop_engine(struct ata_port *ap)
+static int ahci_stop_engine(void __iomem *port_mmio)
 {
-	void __iomem *mmio = ap->host_set->mmio_base;
-	void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
 	int work;
 	u32 tmp;
 
 	tmp = readl(port_mmio + PORT_CMD);
+	/* Check if the HBA is idle */
+	if ((tmp & (PORT_CMD_START | PORT_CMD_LIST_ON)) == 0)
+		return 0;
+
+	/* Setting HBA to idle */
 	tmp &= ~PORT_CMD_START;
 	writel(tmp, port_mmio + PORT_CMD);
 
-	/* wait for engine to stop.  TODO: this could be
-	 * as long as 500 msec
+	/*
+	 * wait for engine to become idle
 	 */
 	work = 1000;
 	while (work-- > 0) {
@@ -481,16 +600,233 @@
 	return -EIO;
 }
 
-static void ahci_start_engine(struct ata_port *ap)
+static int ahci_start_engine(void __iomem *port_mmio)
 {
-	void __iomem *mmio = ap->host_set->mmio_base;
-	void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
 	u32 tmp;
+	int work = 1000;
 
+	/*
+	 * Get current status
+	 */
 	tmp = readl(port_mmio + PORT_CMD);
+
+	/*
+	 * AHCI rev 1.1 section 10.3.1:
+	 * Software shall not set PxCMD.ST to '1' until it verifies
+	 * that PxCMD.CR is '0' and has set PxCMD.FRE to '1'
+	 */
+	if ((tmp & PORT_CMD_FIS_RX) == 0)
+		return -EPERM;
+
+	/*
+	 * wait for engine to become idle.
+	 */
+	while (work-- > 0) {
+		tmp = readl(port_mmio + PORT_CMD);
+		if ((tmp & PORT_CMD_LIST_ON) == 0)
+			break;
+		udelay(10);
+	}
+
+	if (!work) {
+		/*
+		 * We need to do a port reset / HBA reset here
+		 */
+		return -EBUSY;
+	}
+
+	/*
+	 * Start DMA
+	 */
 	tmp |= PORT_CMD_START;
 	writel(tmp, port_mmio + PORT_CMD);
 	readl(port_mmio + PORT_CMD); /* flush */
+
+	return 0;
+}
+
+static int ahci_stop_fis_rx(void __iomem *port_mmio)
+{
+	u32 tmp;
+	int work = 1000;
+
+	/*
+	 * Get current status
+	 */
+	tmp = readl(port_mmio + PORT_CMD);
+
+	/* Check if FIS RX is already disabled */
+	if ((tmp & PORT_CMD_FIS_RX) == 0)
+		return 0;
+
+	/*
+	 * AHCI Rev 1.1 section 10.3.2
+	 * Software shall not clear PxCMD.FRE while
+	 * PxCMD.ST or PxCMD.CR is set to '1'
+	 */
+	if (tmp & (PORT_CMD_LIST_ON | PORT_CMD_START)) {
+		return -EPERM;
+	}
+
+	/*
+	 * Disable FIS reception
+	 *
+	 * AHCI Rev 1.1 Section 10.1.2:
+	 * If PxCMD.FRE is set to '1', software should clear it
+	 * to '0' and wait at least 500 milliseconds for PxCMD.FR
+	 * to return '0' when read. If PxCMD.FR does not clear
+	 * '0' correctly, then software may attempt a port reset
+	 * of a full HBA reset to recover.
+	 */
+	tmp &= ~(PORT_CMD_FIS_RX);
+	writel(tmp, port_mmio + PORT_CMD);
+
+	mdelay(500);
+	work = 1000;
+	while (work-- > 0) {
+		tmp = readl(port_mmio + PORT_CMD);
+		if ((tmp & PORT_CMD_FIS_ON) == 0)
+			return 0;
+		udelay(10);
+	}
+
+	return -EBUSY;
+}
+
+static void ahci_start_fis_rx(void __iomem *port_mmio,
+                             struct ahci_port_priv *pp,
+                             struct ahci_host_priv *hpriv)
+{
+	u32 tmp;
+
+	/*
+	 * Set FIS registers
+	 */
+	if (hpriv->cap & HOST_CAP_64)
+		writel((pp->cmd_slot_dma >> 16) >> 16, port_mmio + PORT_LST_ADDR_HI);
+	writel(pp->cmd_slot_dma & 0xffffffff, port_mmio + PORT_LST_ADDR);
+	readl(port_mmio + PORT_LST_ADDR); /* flush */
+
+	if (hpriv->cap & HOST_CAP_64)
+		writel((pp->rx_fis_dma >> 16) >> 16, port_mmio + PORT_FIS_ADDR_HI);
+	writel(pp->rx_fis_dma & 0xffffffff, port_mmio + PORT_FIS_ADDR);
+	readl(port_mmio + PORT_FIS_ADDR); /* flush */
+
+	/*
+	 * Enable FIS reception
+	 */
+	tmp = readl(port_mmio + PORT_CMD);
+	tmp |= PORT_CMD_FIS_RX;
+	writel(tmp, port_mmio + PORT_CMD);
+	readl(port_mmio + PORT_CMD); /* flush */
+}
+
+static int ahci_port_standby(void __iomem *port_mmio, u32 cap)
+{
+	u32 tmp, scontrol, sstatus;
+
+	tmp = readl(port_mmio + PORT_CMD);
+	/*
+	 * AHCI Rev1.1 Section 5.3.2.3:
+	 * Software is only allowed to program the PxCMD.FRE,
+	 * PxCMD.POD, PxSCTL.DET, and PxCMD.SUD register bits
+	 * when PxCMD.ST is set to '0'
+	 */
+	if (tmp & PORT_CMD_START)
+		return -EBUSY;
+
+	if (cap & HOST_CAP_SSC) {
+		/*
+		 * Enable transitions to slumber mode
+		 */
+		scontrol = readl(port_mmio + PORT_SCR_CTL);
+		if ((scontrol & 0x0f00) > 0x100) {
+			scontrol &= ~0xf00;
+			writel(scontrol, port_mmio + PORT_SCR_CTL);
+		}
+		/*
+		 * Put device into slumber mode
+		 */
+		tmp |= PORT_CMD_ICC_SLUMBER;
+		writel(tmp, port_mmio + PORT_CMD);
+		tmp = readl(port_mmio + PORT_CMD);
+
+		/*
+		 * Actually, we should wait for the device to
+		 * enter slumber mode by checking
+		 * sstatus & 0xf00 == 6
+		 */
+		sstatus = readl(port_mmio + PORT_SCR_STAT);
+	}
+
+	/*
+	 * Put device into listen mode
+	 */
+	scontrol = readl(port_mmio + PORT_SCR_CTL);
+	scontrol &= ~0xf;
+	writel(scontrol, port_mmio + PORT_SCR_CTL);
+
+	tmp = readl(port_mmio + PORT_CMD);
+	if (cap & HOST_CAP_SSS) {
+		/*
+		 * Spin down the device for staggered spin-up support
+		 */
+		tmp &= ~PORT_CMD_SPIN_UP;
+		writel(tmp, port_mmio + PORT_CMD);
+		readl(port_mmio + PORT_CMD); /* flush */
+	}
+
+	return 0;
+}
+
+static int ahci_port_spinup(void __iomem *port_mmio, u32 cap)
+{
+	u32 tmp;
+
+	tmp = readl(port_mmio + PORT_CMD);
+	/*
+	 * AHCI Rev1.1 Section 5.3.2.3:
+	 * Software is only allowed to program the PxCMD.FRE,
+	 * PxCMD.POD, PxSCTL.DET, and PxCMD.SUD register bits
+	 * when PxCMD.ST is set to '0'
+	 */
+	if (tmp & PORT_CMD_START)
+		return -EBUSY;
+
+	/*
+	 * Power on device if supported
+	 */
+	if (tmp & PORT_CMD_CPD) {
+		tmp |= PORT_CMD_POWER_ON;
+		writel(tmp, port_mmio + PORT_CMD);
+		tmp = readl(port_mmio + PORT_CMD);
+	}
+
+	/*
+	 * Spin up device
+	 */
+	if (cap & HOST_CAP_SSS) {
+		tmp |= PORT_CMD_SPIN_UP;
+		writel(tmp, port_mmio + PORT_CMD);
+		tmp = readl(port_mmio + PORT_CMD);
+	}
+
+	if ((tmp & PORT_CMD_ICC_MASK) != PORT_CMD_ICC_ACTIVE) {
+		tmp |= PORT_CMD_ICC_ACTIVE;
+		writel(tmp, port_mmio + PORT_CMD);
+		tmp = readl(port_mmio + PORT_CMD);
+	}
+
+	return 0;
+}
+
+static void ahci_port_disable(struct ata_port *ap)
+{
+	struct ahci_host_priv *hpriv = ap->host_set->private_data;
+
+	ata_port_disable(ap);
+
+	hpriv->dev_map &= ~(1 << ap->port_no);
 }
 
 static unsigned int ahci_dev_classify(struct ata_port *ap)
@@ -549,7 +885,7 @@
 	DPRINTK("ENTER\n");
 
 	/* prepare for SRST (AHCI-1.1 10.4.1) */
-	rc = ahci_stop_engine(ap);
+	rc = ahci_stop_engine(port_mmio);
 	if (rc) {
 		reason = "failed to stop engine";
 		goto fail_restart;
@@ -580,7 +916,7 @@
 	}
 
 	/* restart engine */
-	ahci_start_engine(ap);
+	ahci_start_engine(port_mmio);
 
 	ata_tf_init(ap, &tf, 0);
 	fis = pp->cmd_tbl;
@@ -638,7 +974,7 @@
 	return 0;
 
  fail_restart:
-	ahci_start_engine(ap);
+	ahci_start_engine(port_mmio);
  fail:
 	if (verbose)
 		printk(KERN_ERR "ata%u: softreset failed (%s)\n",
@@ -651,12 +987,15 @@
 static int ahci_hardreset(struct ata_port *ap, int verbose, unsigned int *class)
 {
 	int rc;
+ 	void __iomem *mmio = ap->host_set->mmio_base;
+ 	void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
+
 
 	DPRINTK("ENTER\n");
 
-	ahci_stop_engine(ap);
+	ahci_stop_engine(port_mmio);
 	rc = sata_std_hardreset(ap, verbose, class);
-	ahci_start_engine(ap);
+	ahci_start_engine(port_mmio);
 
 	if (rc == 0)
 		*class = ahci_dev_classify(ap);
@@ -670,6 +1009,7 @@
 static void ahci_postreset(struct ata_port *ap, unsigned int *class)
 {
 	void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr;
+	struct ahci_host_priv *hpriv = ap->host_set->private_data;
 	u32 new_tmp, tmp;
 
 	ata_std_postreset(ap, class);
@@ -684,6 +1024,9 @@
 		writel(new_tmp, port_mmio + PORT_CMD);
 		readl(port_mmio + PORT_CMD); /* flush */
 	}
+
+	if (*class != ATA_DEV_NONE)
+		hpriv->dev_map |= (1 << ap->port_no);
 }
 
 static int ahci_probe_reset(struct ata_port *ap, unsigned int *classes)
@@ -792,7 +1135,7 @@
 			readl(port_mmio + PORT_SCR_ERR));
 
 	/* stop DMA */
-	ahci_stop_engine(ap);
+	ahci_stop_engine(port_mmio);
 
 	/* clear SATA phy error, if any */
 	tmp = readl(port_mmio + PORT_SCR_ERR);
@@ -811,7 +1154,7 @@
 	}
 
 	/* re-start DMA */
-	ahci_start_engine(ap);
+	ahci_start_engine(port_mmio);
 }
 
 static void ahci_eng_timeout(struct ata_port *ap)
@@ -835,6 +1178,71 @@
 	ata_eh_qc_complete(qc);
 }
 
+int ahci_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state)
+{
+	struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0];
+	struct ata_device *dev = &ap->device[sdev->id];
+	int rc;
+
+	rc = ata_device_suspend(ap, dev, state);
+
+	if (!rc)
+		rc = ahci_port_suspend(ap, state);
+
+	return rc;
+}
+
+int ahci_scsi_device_resume(struct scsi_device *sdev)
+{
+	struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0];
+	struct ata_device *dev = &ap->device[sdev->id];
+
+	ahci_port_resume(ap);
+
+	return ata_device_resume(ap, dev);
+}
+
+int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t state)
+{
+	struct device *dev = pci_dev_to_dev(pdev);
+	struct ata_host_set *host_set = dev_get_drvdata(dev);
+	void __iomem *mmio = host_set->mmio_base;
+	u32 tmp;
+
+	/*
+	 * AHCI spec rev1.1 section 8.3.3:
+	 * Software must disable interrupts prior to
+	 * requesting a transition of the HBA to
+	 * D3 state.
+	 */
+	tmp = readl(mmio + HOST_CTL);
+	tmp &= ~HOST_IRQ_EN;
+	writel(tmp, mmio + HOST_CTL);
+	tmp = readl(mmio + HOST_CTL); /* flush */
+
+	return ata_pci_device_suspend(pdev, state);
+}
+
+int ahci_pci_device_resume(struct pci_dev *pdev)
+{
+	struct device *dev = pci_dev_to_dev(pdev);
+	struct ata_host_set *host_set = dev_get_drvdata(dev);
+	void __iomem *mmio = host_set->mmio_base;
+	u32 tmp;
+
+	/*
+	 * Enabling AHCI mode
+	 */
+	tmp = readl(mmio + HOST_CTL);
+	if (!(tmp & HOST_AHCI_EN)) {
+		tmp |= HOST_AHCI_EN;
+		writel(tmp, mmio + HOST_CTL);
+		tmp = readl(mmio + HOST_CTL);
+	}
+
+	return ata_pci_device_resume(pdev);
+}
+
 static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
 {
 	void __iomem *mmio = ap->host_set->mmio_base;
@@ -1015,6 +1423,7 @@
 
 	hpriv->cap = readl(mmio + HOST_CAP);
 	hpriv->port_map = readl(mmio + HOST_PORTS_IMPL);
+	hpriv->dev_map = 0;
 	probe_ent->n_ports = (hpriv->cap & 0x1f) + 1;
 
 	VPRINTK("cap 0x%x  port_map 0x%x  n_ports %d\n",
@@ -1060,23 +1469,29 @@
 				(unsigned long) mmio, i);
 
 		/* make sure port is not active */
-		tmp = readl(port_mmio + PORT_CMD);
-		VPRINTK("PORT_CMD 0x%x\n", tmp);
-		if (tmp & (PORT_CMD_LIST_ON | PORT_CMD_FIS_ON |
-			   PORT_CMD_FIS_RX | PORT_CMD_START)) {
-			tmp &= ~(PORT_CMD_LIST_ON | PORT_CMD_FIS_ON |
-				 PORT_CMD_FIS_RX | PORT_CMD_START);
-			writel(tmp, port_mmio + PORT_CMD);
-			readl(port_mmio + PORT_CMD); /* flush */
-
-			/* spec says 500 msecs for each bit, so
-			 * this is slightly incorrect.
-			 */
-			msleep(500);
-		}
+		rc = ahci_stop_engine(port_mmio);
+		if (rc)
+			printk(KERN_WARNING "ata%u: DMA engine busy (rc %d)\n",
+			       i, rc);
+
+		rc = ahci_stop_fis_rx(port_mmio);
+		if (rc)
+			printk(KERN_WARNING "ata%u: FIS RX not stopped (rc %d)\n",
+			       i, rc);
+
+		/*
+		 * Actually, this is wrong again.
+		 * AHCI spec says that we first should
+		 * enable FIS reception before sending
+		 * SPIN_UP to the device ...
+		 */
 
 		writel(PORT_CMD_SPIN_UP, port_mmio + PORT_CMD);
 
+		/*
+		 * Wait for the communications link to establish
+		 */
+
 		j = 0;
 		while (j < 100) {
 			msleep(10);

linux-2.6-serial-resume.patch:
 drivers/char/tty_io.c        |   13 +++++++++++++
 drivers/serial/serial_core.c |   12 ++++++------
 include/linux/tty.h          |    2 ++
 3 files changed, 21 insertions(+), 6 deletions(-)

--- NEW FILE linux-2.6-serial-resume.patch ---

On Fri, Jun 09, 2006 at 09:42:34AM +0100, Russell King wrote:
> The only sane solution is for the tty layer to be adjusted to allow
> suspend/resume support for consoles.

And for those who can't work out how to do that, here's something which
_probably_ does it.  Would folk mind testing it out please?

diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1674,6 +1674,19 @@ release_mem_out:
 }
 
 /*
+ * Get a copy of the termios structure for the driver/index
+ */
+void tty_get_termios(struct tty_driver *driver, int idx, struct termios *tio)
+{
+	lock_kernel();
+	if (driver->termios[idx])
+		*tio = *driver->termios[idx];
+	else
+		*tio = driver->init_termios;
+	unlock_kernel();
+}
+
+/*
  * Releases memory associated with a tty structure, and clears out the
  * driver table slots.
  */
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1968,16 +1968,16 @@ int uart_resume_port(struct uart_driver 
 		struct termios termios;
 
 		/*
-		 * First try to use the console cflag setting.
+		 * Get the termios for this line
 		 */
-		memset(&termios, 0, sizeof(struct termios));
-		termios.c_cflag = port->cons->cflag;
+		tty_get_termios(drv->tty_driver, port->line, &termios);
 
 		/*
-		 * If that's unset, use the tty termios setting.
+		 * If the console cflag is still set, subsitute that
+		 * for the termios cflag.
 		 */
-		if (state->info && state->info->tty && termios.c_cflag == 0)
-			termios = *state->info->tty->termios;
+		if (port->cons->cflag)
+			termios.c_cflag = port->cons->cflag;
 
 		port->ops->set_termios(port, &termios, NULL);
 		console_start(port->cons);
diff --git a/include/linux/tty.h b/include/linux/tty.h
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -297,6 +297,8 @@ extern int tty_read_raw_data(struct tty_
 			     int buflen);
 extern void tty_write_message(struct tty_struct *tty, char *msg);
 
+extern void tty_get_termios(struct tty_driver *drv, int idx, struct termios *tio);
+
 extern int is_orphaned_pgrp(int pgrp);
 extern int is_ignored(int sig);
 extern int tty_signal(int sig, struct tty_struct *tty);



linux-2.6-warn-c-p-a.patch:
 pageattr.c |    8 ++++++++
 1 files changed, 8 insertions(+)

--- NEW FILE linux-2.6-warn-c-p-a.patch ---

--- linux-2.6.17-rc3-mm1-davej/arch/i386/mm/pageattr.c.org	2006-05-04 09:23:56.000000000 +0200
+++ linux-2.6.17-rc3-mm1-davej/arch/i386/mm/pageattr.c	2006-05-04 09:27:21.000000000 +0200
@@ -9,6 +9,7 @@
 #include <linux/highmem.h>
 #include <linux/module.h>
 #include <linux/slab.h>
+#include <linux/kernel.h>
 #include <asm/uaccess.h>
 #include <asm/processor.h>
 #include <asm/tlbflush.h>
@@ -18,6 +19,7 @@
 static DEFINE_SPINLOCK(cpa_lock);
 static struct list_head df_list = LIST_HEAD_INIT(df_list);
 
+extern char __start_rodata, __end_rodata;
 
 pte_t *lookup_address(unsigned long address) 
 { 
@@ -127,10 +129,16 @@
 	pte_t *kpte; 
 	unsigned long address;
 	struct page *kpte_page;
+	static int once = 0;
 
 	BUG_ON(PageHighMem(page));
 	address = (unsigned long)page_address(page);
 
+	if (address >= __start_rodata && address <= __end_rodata && prot != __PAGE_KERNEL_RO && once++ == 0) {
+		printk(KERN_ERR "Possible trojan or rootkit detected!\n");
+		add_taint(TAINT_MACHINE_CHECK);
+	}
+
 	kpte = lookup_address(address);
 	if (!kpte)
 		return -EINVAL;


linux-2.6-x86-alternatives-smp-only.patch:
 alternative.c |    6 ++++++
 module.c      |    4 ++++
 2 files changed, 10 insertions(+)

--- NEW FILE linux-2.6-x86-alternatives-smp-only.patch ---
On UP kernels, it's silly to print out info about SMP alternatives..

 SMP alternatives: switching to UP code
 Freeing SMP alternatives: 0k freed

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

--- linux-2.6.17.noarch/arch/i386/kernel/alternative.c~	2006-06-20 13:44:40.000000000 -0400
+++ linux-2.6.17.noarch/arch/i386/kernel/alternative.c	2006-06-20 13:46:33.000000000 -0400
@@ -118,6 +118,7 @@ void apply_alternatives(struct alt_instr
 	}
 }
 
+#ifdef CONFIG_SMP
 static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end)
 {
 	struct alt_instr *a;
@@ -282,6 +283,8 @@ void alternatives_smp_switch(int smp)
 	}
 	spin_unlock_irqrestore(&smp_alt, flags);
 }
+#endif
+
 
 void __init alternative_instructions(void)
 {
@@ -290,6 +290,8 @@ void __init alternative_instructions(voi
 {
 	apply_alternatives(__alt_instructions, __alt_instructions_end);
 
+#ifdef CONFIG_SMP
+
 	/* switch to patch-once-at-boottime-only mode and free the
 	 * tables in case we know the number of CPUs will never ever
 	 * change */
@@ -318,4 +322,5 @@ void __init alternative_instructions(voi
 					    _text, _etext);
 		alternatives_smp_switch(0);
 	}
+#endif
 }
--- linux-2.6.17.noarch/arch/i386/kernel/module.c~	2006-06-20 14:08:15.000000000 -0400
+++ linux-2.6.17.noarch/arch/i386/kernel/module.c	2006-06-20 14:08:56.000000000 -0400
@@ -125,6 +125,7 @@ int module_finalize(const Elf_Ehdr *hdr,
 		void *aseg = (void *)alt->sh_addr;
 		apply_alternatives(aseg, aseg + alt->sh_size);
 	}
+#ifdef CONFIG_SMP
 	if (locks && text) {
 		void *lseg = (void *)locks->sh_addr;
 		void *tseg = (void *)text->sh_addr;
@@ -132,10 +133,13 @@ int module_finalize(const Elf_Ehdr *hdr,
 					    lseg, lseg + locks->sh_size,
 					    tseg, tseg + text->sh_size);
 	}
+#endif
 	return 0;
 }
 
 void module_arch_cleanup(struct module *mod)
 {
+#ifdef CONFIG_SMP
 	alternatives_smp_module_del(mod);
+#endif
 }

linux-2.6-x86-tune-generic.patch:
 Makefile.cpu |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-x86-tune-generic.patch ---
--- linux-2.6.15/arch/i386/Makefile.cpu~	2006-01-09 11:39:04.000000000 -0500
+++ linux-2.6.15/arch/i386/Makefile.cpu	2006-01-09 11:39:36.000000000 -0500
@@ -15,7 +15,7 @@ cflags-$(CONFIG_M486)		+= -march=i486
 cflags-$(CONFIG_M586)		+= -march=i586
 cflags-$(CONFIG_M586TSC)	+= -march=i586
 cflags-$(CONFIG_M586MMX)	+= -march=pentium-mmx
-cflags-$(CONFIG_M686)		+= -march=i686
+cflags-$(CONFIG_M686)		+= -march=i686 $(call tune,generic)
 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-x86_64-noisy-syscalls.patch:
 sys_ia32.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

--- NEW FILE linux-2.6-x86_64-noisy-syscalls.patch ---
--- linux-2.6.16.noarch/arch/x86_64/ia32/sys_ia32.c~	2006-05-21 14:50:57.000000000 -0400
+++ linux-2.6.16.noarch/arch/x86_64/ia32/sys_ia32.c	2006-05-21 14:51:48.000000000 -0400
@@ -522,17 +522,9 @@ sys32_waitpid(compat_pid_t pid, unsigned
 }
 
 int sys32_ni_syscall(int call)
-{ 
-	struct task_struct *me = current;
-	static char lastcomm[sizeof(me->comm)];
-
-	if (strncmp(lastcomm, me->comm, sizeof(lastcomm))) {
-		printk(KERN_INFO "IA32 syscall %d from %s not implemented\n",
-		       call, me->comm);
-		strncpy(lastcomm, me->comm, sizeof(lastcomm));
-	} 
-	return -ENOSYS;	       
-} 
+{
+	return -ENOSYS;
+}
 
 /* 32-bit timeval and related flotsam.  */
 


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

iD8DBQBElLc9yGugalF9Dw4RAsplAJ9Vhjp8IgkMBdGdiYygXtYBcKZ6GwCffyTu
+gY8wsoFmSdAU6UiqakOcyo=
=hcew
-----END PGP SIGNATURE-----


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

iD8DBQBEl8bnyGugalF9Dw4RAltcAJ0ZTYMxtRL+UKM6ISkOjC8j2K4yngCeKbGE
IwThqSk7vrdgHt7HB2Q5/Sk=
=/k0g
-----END PGP SIGNATURE-----


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/.cvsignore,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -r1.192 -r1.193
--- .cvsignore	5 Jun 2006 18:33:49 -0000	1.192
+++ .cvsignore	20 Jun 2006 18:25:39 -0000	1.193
@@ -1,5 +1,5 @@
 kernel-2.6.*.config
 temp-*
-kernel-2.6.16
-linux-2.6.16.tar.bz2
-patch-2.6.16.20.bz2
+kernel-2.6.17
+linux-2.6.17.tar.bz2
+patch-2.6.17.1.bz2


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1643
retrieving revision 1.1644
diff -u -r1.1643 -r1.1644
--- kernel-2.6.spec	5 Jun 2006 18:33:49 -0000	1.1643
+++ kernel-2.6.spec	20 Jun 2006 18:25:39 -0000	1.1644
@@ -4,7 +4,7 @@
 # These are the kernels that are built IF the architecture allows it.
 
 %define buildup 1
-%define buildsmp 1
+%define buildsmp 0
 %define builddoc 0
 
 # Versions of various parts
@@ -15,41 +15,39 @@
 # that the kernel isn't the stock distribution kernel, for example by
 # adding some text to the end of the version number.
 #
-%define sublevel 16
+%define sublevel 17
 %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 release %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})_FC4
 %define signmodules 0
 %define make_target bzImage
-%define kernel_image arch/$Arch/boot/bzImage
+%define kernel_image x86
 
 %define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
 
 # groups of related archs
 %define all_x86 i586 i686
 
-# Override generic defaults with per-arch defaults 
+# Override generic defaults with per-arch defaults
 
 %ifarch noarch
 %define builddoc 1
 %define buildup 0
-%define buildsmp 0
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-*.config
 %endif
 
 # Second, per-architecture exclusions (ifarch)
 
-%ifarch i586
-%define buildsmp 0
-%endif
-
 %ifarch %{all_x86}
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-i?86*.config
 %define image_install_path boot
 %define signmodules 1
 %endif
 
+%ifarch i686
+%define buildsmp 1
+%endif
+
 %ifarch x86_64
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-x86_64*.config
 %define image_install_path boot
@@ -57,7 +55,6 @@
 %endif
 
 %ifarch ppc64
-%define buildsmp 0
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ppc64*.config
 %define image_install_path boot
 %define signmodules 1
@@ -66,7 +63,6 @@
 %endif
 
 %ifarch ppc64iseries
-%define buildsmp 0
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ppc64*.config
 %define image_install_path boot
 %define signmodules 1
@@ -75,24 +71,30 @@
 %endif
 
 %ifarch s390
-%define buildsmp 0
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-s390*.config
 %define image_install_path boot
+%define make_target image
+%define kernel_image arch/s390/boot/image
 %endif
 
 %ifarch s390x
-%define buildsmp 0
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-s390x.config
 %define image_install_path boot
+%define make_target image
+%define kernel_image arch/s390/boot/image
 %endif
 
 %ifarch sparc
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-sparc.config
-%define buildsmp 0
+%define make_target image
+%define kernel_image image
 %endif
 
 %ifarch sparc64
+%define buildsmp 1
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-sparc64*.config
+%define make_target image
+%define kernel_image image
 %endif
 
 %ifarch ppc
@@ -100,13 +102,15 @@
 %define image_install_path boot
 %define make_target vmlinux
 %define kernel_image vmlinux
+%define buildsmp 1
 %endif
 
 %ifarch ia64
 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ia64.config
-%define buildsmp 0
 %define image_install_path boot/efi/EFI/redhat
 %define signmodules 1
+%define make_target compressed
+%define kernel_image vmlinux.gz
 %endif
 
 #
@@ -169,36 +173,42 @@
 
 
 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{kversion}.tar.bz2
+Source2: Config.mk
 
 Source10: COPYING.modules
 Source11: genkey
 
 Source20: kernel-%{kversion}-i586.config
-Source21: kernel-%{kversion}-i686.config
-Source22: kernel-%{kversion}-i686-smp.config
-Source23: kernel-%{kversion}-x86_64.config
-Source24: kernel-%{kversion}-x86_64-smp.config
-Source25: kernel-%{kversion}-ppc64.config
-Source26: kernel-%{kversion}-ppc64iseries.config
-Source27: kernel-%{kversion}-s390.config
-Source28: kernel-%{kversion}-s390x.config
-Source29: kernel-%{kversion}-ppc.config
-Source30: kernel-%{kversion}-ppc-smp.config
-Source31: kernel-%{kversion}-ia64.config
-#Source32: kernel-%{kversion}-sparc.config
-#Source33: kernel-%{kversion}-sparc64.config
-#Source34: kernel-%{kversion}-sparc64-smp.config
+Source21: kernel-%{kversion}-i586-smp.config
+Source22: kernel-%{kversion}-i686.config
+Source23: kernel-%{kversion}-i686-smp.config
+
+Source25: kernel-%{kversion}-x86_64.config
+
+Source27: kernel-%{kversion}-ppc.config
+Source28: kernel-%{kversion}-ppc-smp.config
+Source29: kernel-%{kversion}-ppc64.config
+Source30: kernel-%{kversion}-ppc64iseries.config
+
+Source32: kernel-%{kversion}-s390.config
+Source33: kernel-%{kversion}-s390x.config
+
+Source34: kernel-%{kversion}-ia64.config
+
+#Source66: kernel-%{kversion}-sparc.config
+#Source67: kernel-%{kversion}-sparc64.config
+#Source68: kernel-%{kversion}-sparc64-smp.config
 
 #
 # Patches 0 through 100 are meant for core subsystem upgrades
 #
-Patch1: patch-2.6.16.20.bz2
+Patch1: patch-2.6.17.1.bz2
 
 # Patches 100 through 500 are meant for architecture patches
-Patch100: linux-2.6-bzimage.patch
 
 # 200 - 299   x86(-64)
-Patch200: linux-2.6-x86-tune-p4.patch
+
+Patch200: linux-2.6-x86-tune-generic.patch
 Patch201: linux-2.6-x86-vga-vidfail.patch
 Patch202: linux-2.6-intel-cache-build.patch
 Patch203: linux-2.6-x86_64-silence-up-apic-errors.patch
@@ -206,10 +216,15 @@
 Patch205: linux-2.6-x86_64-smp-on-uphw-cpucount.patch
 Patch206: linux-2.6-x86-hp-reboot.patch
 Patch207: linux-2.6-x86-cpu_index-false.patch
+Patch208: linux-2.6-x86_64-noisy-syscalls.patch
+Patch210: linux-2.6-x86-alternatives-smp-only.patch
 
 # 300 - 399   ppc(64)
-Patch304: linux-2.6-ppc-rtas-check.patch
-Patch305: linux-2.6-mv643xx-compile-fix.patch
+Patch302: linux-2.6-offb-find-fb.patch
+Patch305: linux-2.6-cell-mambo-drivers.patch
+Patch306: linux-2.6-hvc-console.patch
+Patch314: linux-2.6-ppc-rtas-check.patch
+Patch317: linux-2.6-ppc-iseries-input-layer.patch
 
 # 400 - 499   ia64
 # 500 - 599   s390(x)
@@ -224,6 +239,7 @@
 
 # Exec-shield.
 Patch810: linux-2.6-execshield.patch
+Patch813: linux-2.6-warn-c-p-a.patch
 
 # Module signing infrastructure.
 Patch900: linux-2.6-modsign-core.patch
@@ -243,16 +259,13 @@
 Patch1011: linux-2.6-debug-slab-backtrace.patch
 Patch1012: linux-2.6-debug-list_head.patch
 Patch1013: linux-2.6-debug-taint-vm.patch
-Patch1014: linux-2.6-debug-slab-leaks.patch
 Patch1015: linux-2.6-debug-singlebiterror.patch
 Patch1016: linux-2.6-debug-spinlock-taint.patch
 Patch1017: linux-2.6-debug-spinlock-panic.patch
 Patch1018: linux-2.6-debug-Wundef.patch
 Patch1019: linux-2.6-debug-disable-builtins.patch
 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
-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
@@ -262,7 +275,6 @@
 Patch1031: linux-2.6-debug-periodic-slab-check.patch
 Patch1032: linux-2.6-debug-boot-delay.patch
 Patch1033: linux-2.6-debug-must_check.patch
-Patch1034: linux-2.6-debug-pm-pci.patch
 
 # Restrict /dev/mem usage.
 Patch1050: linux-2.6-devmem.patch
@@ -273,66 +285,48 @@
 Patch1070: linux-2.6-sleepon.patch
 
 # SCSI bits.
-Patch1101: linux-2.6-scsi-advansys-enabler.patch
 Patch1102: linux-2.6-scsi-advansys-pcitable.patch
+Patch1103: linux-2.6-iscsi-update-to-2-6-18-upstream.patch
 
 # NFS bits.
 Patch1200: linux-2.6-NFSD-non-null-getxattr.patch
 Patch1201: linux-2.6-NFSD-ctlbits.patch
 Patch1203: linux-2.6-NFSD-badness.patch
-Patch1204: linux-2.6-NFSD-writes-shouldnt-clobber-utimes.patch
 
 # NIC driver updates
 Patch1301: linux-2.6-net-sundance-ip100A.patch
-Patch1302: linux-2.6-net-wireless-features.patch
-Patch1303: linux-2.6-net-ipw2200-hwcrypto.patch
 Patch1304: linux-2.6-net-ipw2200-monitor.patch
 
 # Squashfs
 Patch1400: linux-2.6-squashfs.patch
 
-# Netdump and Diskdump bits.
-Patch1500: linux-2.6-crashdump-common.patch
-Patch1501: linux-2.6-netdump.patch
-Patch1502: linux-2.6-netconsole.patch
-Patch1503: linux-2.6-diskdump.patch
-Patch1504: linux-2.6-crashdump-reboot-exports.patch
-Patch1505: linux-2.6-dump_smp_call_function.patch
-
-
 # Misc bits.
 Patch1600: linux-2.6-module_version.patch
-Patch1601: linux-2.6-pcmcia-disable-warning.patch
 Patch1610: linux-2.6-input-kill-stupid-messages.patch
 Patch1620: linux-2.6-serial-tickle-nmi.patch
-Patch1621: linux-2.6-8250-16c950-faster.patch
 Patch1630: linux-2.6-radeon-backlight.patch
 Patch1640: linux-2.6-ide-tune-locking.patch
-Patch1641: linux-2.6-ide-cd-shutup.patch
-Patch1650: linux-2.6-autofs-pathlookup.patch
 Patch1660: linux-2.6-valid-ether-addr.patch
 Patch1670: linux-2.6-softcursor-persistent-alloc.patch
-Patch1680: linux-2.6-pwc-powerup-by-default.patch
-Patch1690: linux-2.6-smsc-ircc2-pnp.patch
+Patch1680: linux-2.6-usb-unusual-devices.patch
+Patch1690: linux-2.6-autofs-invalidate.patch
 Patch1700: linux-2.6-w1-hush-debug.patch
 Patch1710: linux-2.6-sched-up-migration-cost.patch
-Patch1730: linux-2.6-signal-trampolines-unwind-info.patch
+Patch1720: linux-2.6-proc-self-maps-fix.patch
+Patch1730: linux-2.6-ac97_unregister_controls_ad18xx.patch
 Patch1740: linux-2.6-softlockup-disable.patch
-Patch1750: linux-2.6-drm-cripple-r300.patch
+Patch1750: linux-2.6-serial-resume.patch
 Patch1760: linux-2.6-suspend-slab-warnings.patch
 Patch1770: linux-2.6-optimise-spinlock-debug.patch
-Patch1780: linux-2.6-cpufreq-acpi-sticky.patch
+Patch1780: linux-2.6-powernow-k7-smp.patch
+Patch1790: linux-2.6-console-suspend.patch
 
 # SELinux/audit patches.
 Patch1800: linux-2.6-selinux-hush.patch
 Patch1801: linux-2.6-selinux-mprotect-checks.patch
-Patch1802: linux-2.6-selinux-disable-attributes-no-policy.patch
-Patch1803: linux-2.6-selinux-selinuxfs-hard-link-count.patch
-Patch1804: linux-2.6-audit-new-msg-types.patch
 
 # Warn about usage of various obsolete functionality that may go away.
-Patch1900: linux-2.6-obsolete-idescsi-warning.patch
-Patch1901: linux-2.6-obsolete-oss-warning.patch
+Patch1900: linux-2.6-obsolete-oss-warning.patch
 
 # no external module should use these symbols.
 Patch1910: linux-2.6-unexport-symbols.patch
@@ -344,31 +338,38 @@
 # Tweak some defaults.
 Patch2100: linux-2.6-defaults-max-symlinks.patch
 Patch2101: linux-2.6-defaults-fat-utf8.patch
-Patch2102: linux-2.6-defaults-enable-sata-atapi.patch
-Patch2103: linux-2.6-defaults-firmware-loader-timeout.patch
+Patch2102: linux-2.6-defaults-firmware-loader-timeout.patch
+Patch2103: linux-2.6-defaults-phys-start.patch
+Patch2104: linux-2.6-defaults-unicode-vt.patch
 
 # SATA Bits
 Patch2200: linux-2.6-sata-promise-pata-ports.patch
 Patch2201: linux-2.6-sata-silence-dumb-msg.patch
+Patch2202: linux-2.6-sata-ahci-suspend.patch
 
 # ACPI bits
 Patch2300: linux-2.6-acpi_os_acquire_object-gfp_kernel-called-with-irqs.patch
 Patch2301: linux-2.6-acpi-ecdt-uid-hack.patch
-
+Patch2302: linux-2.6-cpufreq-acpi-sticky.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. 
+# 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
 
+# Little obvious 1-2 liners that fix silly bugs.
+# Do not add anything non-trivial here.
+Patch10001: linux-2.6-random-patches.patch
+
+
 # END OF PATCH DEFINITIONS
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
 
-%description 
+%description
 The kernel package contains the Linux kernel (vmlinuz), the core of any
 Linux operating system.  The kernel handles the basic functions
 of the operating system:  memory allocation, process allocation, device
@@ -379,7 +380,7 @@
 Group: System Environment/Kernel
 AutoReqProv: no
 Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}
-Prereq: /usr/sbin/hardlink, /usr/bin/find
+Prereq: /usr/bin/find
 
 %description devel
 This package provides kernel headers and makefiles sufficient to build modules
@@ -393,12 +394,11 @@
 %description doc
 This package contains documentation files from the kernel
 source. Various bits of information about the Linux kernel and the
-device drivers shipped with it are documented in these files. 
+device drivers shipped with it are documented in these files.
 
 You'll want to install this package if you need a reference to the
 options that can be passed to Linux kernel modules at load time.
 
-
 %package smp
 Summary: The Linux kernel compiled for SMP machines.
 
@@ -432,33 +432,43 @@
 Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}smp
 Provides: kernel-devel = %{rpmversion}-%{release}smp
 AutoReqProv: no
-Prereq: /usr/sbin/hardlink, /usr/bin/find
+Prereq: /usr/bin/find
 
 %description smp-devel
 This package provides kernel headers and makefiles sufficient to build modules
 against the SMP kernel package.
 
+
 %prep
+# First we unpack the kernel tarball.
+# If this isn't the first make prep, we use links to the existing clean tarball
+# which speeds things up quite a bit.
 if [ ! -d kernel-%{kversion}/vanilla ]; then
   # Ok, first time we do a make prep.
-%setup -q -n %{name}-%{version} -c
   rm -f pax_global_header
+%setup -q -n %{name}-%{version} -c
   mv linux-%{kversion} vanilla
 else
   # We already have a vanilla dir.
   cd kernel-%{kversion}
-  mv linux-%{kversion} deleteme
-  rm -rf deleteme &
+  if [ -d linux-%{kversion}.%{_target_cpu} ]; then
+     # Just in case we ctrl-c'd a prep already
+     rm -rf deleteme
+     # Move away the stale away, and delete in background.
+     mv linux-%{kversion}.%{_target_cpu} deleteme
+     rm -rf deleteme &
+  fi
 fi
-cp -rl vanilla linux-%{kversion}
-cd linux-%{kversion}
+cp -rl vanilla linux-%{kversion}.%{_target_cpu}
+
+cd linux-%{kversion}.%{_target_cpu}
 
 # Update to latest upstream.
 %patch1 -p1
 
 #
 # Patches 10 through 100 are meant for core subsystem upgrades
-# 
+#
 
 #
 # Patches to back out
@@ -467,7 +477,6 @@
 #
 # Architecture patches
 #
-%patch100 -p1
 
 #
 # x86(-64)
@@ -492,12 +501,24 @@
 %patch206 -p1
 # cpu_index >= NR_CPUS becomming always false.
 %patch207 -p1
+# Hush noisy unimplemented 32bit syscalls
+%patch208 -p1
+# Only print info about SMP alternatives on SMP kernels.
+%patch210 -p1
 
+#
 # ppc64
 #
-
-%patch304 -p1
+# Find OF framebuffer more reliably
+%patch302 -p1
+# Support the IBM Mambo simulator; core as well as disk and network drivers.
 %patch305 -p1
+# Make HVC console generic; support simulator console device using it.
+#%patch306 -p1
+# Check properly for successful RTAS instantiation
+%patch314 -p1
+# No input layer on iseries
+%patch317 -p1
 
 #
 # Patches 500 through 1000 are reserved for bugfixes to the core system
@@ -512,8 +533,9 @@
 # Warn if someone tries to build userspace using kernel headers
 %patch801 -p1
 
-# Exec shield
+# Exec shield 
 %patch810 -p1
+#%patch813 -p1
 
 #
 # GPG signed kernel modules
@@ -538,28 +560,25 @@
 %patch1011 -p1
 %patch1012 -p1
 %patch1013 -p1
-%patch1014 -p1
 %patch1015 -p1
 %patch1016 -p1
 %patch1017 -p1
 %patch1018 -p1
 %patch1019 -p1
 %patch1020 -p1
-%patch1021 -p1
 %patch1022 -p1
-%patch1024 -p1
 %patch1025 -p1
 # Disable the 'quiet' boot switch for better bug reports.
-#%patch1026 -p1
+%patch1026 -p1
 # Slab leak detector.
 #%patch1027 -p1
-%patch1028 -p1
+# Pause on oops.
+#%patch1028 -p1
 #%patch1029 -p1
 #%patch1030 -p1
-%patch1031 -p1
+#%patch1031 -p1
 %patch1032 -p1
 %patch1033 -p1
-%patch1034 -p1
 
 #
 # Make /dev/mem a need-to-know function
@@ -579,10 +598,11 @@
 #
 # SCSI Bits.
 #
-# Enable Advansys driver
-%patch1101 -p1
 # Add a pci table to advansys driver.
 %patch1102 -p1
+# iSCSI driver update that can be dropped when kernel is rebased
+# against a kernel that has the SCSI updates for 2.6.18
+%patch1103 -p1
 
 #
 # Various upstream NFS/NFSD fixes.
@@ -592,30 +612,16 @@
 %patch1201 -p1
 # Fix badness.
 %patch1203 -p1
-# NFSD: writes should not clobber utimes() calls
-%patch1204 -p1
 
 # NIC driver fixes.
 # New PCI ID for sundance driver.
 %patch1301 -p1
-# Goodies for wireless drivers to make NetworkManager work
-%patch1302 -p1
-# ipw2200 hwcrypto=0 by default to avoid firmware restarts
-%patch1303 -p1
 # add IPW2200_MONITOR config option
 %patch1304 -p1
 
 # Squashfs
 %patch1400 -p1
 
-# netdump bits
-%patch1500 -p1
-%patch1501 -p1
-%patch1502 -p1
-%patch1503 -p1
-%patch1504 -p1
-%patch1505 -p1
-
 #
 # Various SELinux fixes from 2.6.10rc
 #
@@ -623,61 +629,50 @@
 # Misc fixes
 # Add missing MODULE_VERSION tags to some modules.
 %patch1600 -p1
-# Disable deprecation warning in old PCMCIA code.
-%patch1601 -p1
 # The input layer spews crap no-one cares about.
 %patch1610 -p1
 # Tickle the NMI whilst doing serial writes.
 %patch1620 -p1
-# make 16C950 UARTs work
-%patch1621 -p1
 # Radeon on thinkpad backlight power-management goodness.
 %patch1630 -p1
 # Fix IDE locking bug.
 %patch1640 -p1
-# Silence noisy CD drive spew
-%patch1641 -p1
-# autofs4 looks up wrong path element when ghosting is enabled
-%patch1650 -p1
 #
 %patch1660 -p1
 # Use persistent allocation in softcursor
 %patch1670 -p1
-# Power up PWC driver by default.
+# Add some USB devices to the unusual quirk list.
 %patch1680 -p1
-# PNP support for smsc-ircc2
+# autofs4 - need to invalidate children on tree mount expire
 %patch1690 -p1
 # Silence debug messages in w1
 %patch1700 -p1
 # Only print migration info on SMP
 %patch1710 -p1
-# Mark unwind info for signal trampolines in vDSOs
+# setuid /proc/self/maps fix.
+%patch1720 -p1
+# OLPC ac97 fix.
 %patch1730 -p1
 # Add a safety net to softlockup so that it doesn't prevent installs.
 %patch1740 -p1
-# Disable R300 and above DRI as it's unstable.
+# serial/tty resume fixing.
 %patch1750 -p1
 # Fix up kmalloc whilst atomic warning during resume.
 %patch1760 -p1
 # Speed up spinlock debug.
 %patch1770 -p1
-# Make acpi-cpufreq sticky
+# Fix up powernow-k7 to work on SMP kernels.
 %patch1780 -p1
+# Console fixes for suspend/resume
+%patch1790 -p1
 
 # Silence some selinux messages.
 %patch1800 -p1
 # Fix the SELinux mprotect checks on executable mappings
 %patch1801 -p1
-# Disable setting of security attributes on new inodes when no policy is loaded
-%patch1802 -p1
-# Fix incorrect hardlink count in selinuxfs
-%patch1803 -p1
-# Add some more audit message types.
-%patch1804 -p1
 
 # Warn about obsolete functionality usage.
 %patch1900 -p1
-%patch1901 -p1
 # Remove kernel-internal functionality that nothing external should use.
 %patch1910 -p1
 
@@ -686,7 +681,7 @@
 #
 # Silence GFP_ATOMIC failures.
 %patch2001 -p1
-# OOM killer tweaks.
+# VM oom killer tweaks.
 %patch2002 -p1
 
 # Changes to upstream defaults.
@@ -694,36 +689,45 @@
 %patch2100 -p1
 # Use UTF-8 by default on VFAT.
 %patch2101 -p1
-# Enable SATA ATAPI by default.
-%patch2102 -p1
 # Increase timeout on firmware loader.
+%patch2102 -p1
+# Change PHYSICAL_START
 %patch2103 -p1
+# Use unicode VT's by default.
+%patch2104 -p1
 
 # Enable PATA ports on Promise SATA.
 %patch2200 -p1
 # Silence silly SATA printk.
 %patch2201 -p1
+# Fix AHCI Suspend.
+%patch2202 -p1
 
+# ACPI patches
 # Silence more ACPI debug spew from suspend.
 %patch2300 -p1
 # acpi-ecdt-uid-hack
 %patch2301 -p1
+# Make acpi-cpufreq sticky.
+%patch2302 -p1
 
 #
 # Patches 5000 to 6000 are reserved for new drivers that are about to
 # be merged upstream
 #
 
-
 #
 # final stuff
 #
 
+
 #
 # misc small stuff to make things compile or otherwise improve performance
 #
 #%patch10000 -p1
 
+# Small 1-2 liners fixing silly bugs that get pushed upstream quickly.
+%patch10001 -p1
 
 # END OF PATCH APPLICATIONS
 
@@ -751,7 +755,9 @@
 perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -prep/" Makefile
 
 # get rid of unwanted files resulting from patch fuzz
-find . -name "*.orig" -o -name "*~" -exec rm -f {} \; >/dev/null &
+cd ..
+find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null
+
 
 ###
 ### build
@@ -761,33 +767,32 @@
 # Create gpg keys for signing the modules
 #
 
-gpg --homedir . --batch --gen-key %{SOURCE11}  
-gpg --homedir . --export --keyring ./kernel.pub Red > extract.pub 
-make linux-%{kversion}/scripts/bin2c
-linux-%{kversion}/scripts/bin2c ksign_def_public_key __initdata < extract.pub > linux-%{kversion}/crypto/signature/key.h
-
-cd linux-%{kversion}
-
-
+gpg --homedir . --batch --gen-key %{SOURCE11}
+gpg --homedir . --export --keyring ./kernel.pub Red > extract.pub
+make linux-%{kversion}.%{_target_cpu}/scripts/bin2c
+linux-%{kversion}.%{_target_cpu}/scripts/bin2c ksign_def_public_key __initdata < extract.pub > linux-%{kversion}.%{_target_cpu}/crypto/signature/key.h
 
 BuildKernel() {
+    MakeTarget=$1
+    KernelImage=$2
+    Flavour=$3
 
     # 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}
+    if [ -n "$Flavour" ] ; then
+      Config=kernel-%{kversion}-%{_target_cpu}-$Flavour.config
+      DevelDir=/usr/src/kernels/%{KVERREL}-$Flavour-%{_target_cpu}
+      DevelLink=/usr/src/kernels/%{KVERREL}$Flavour-%{_target_cpu}
     else
       Config=kernel-%{kversion}-%{_target_cpu}.config
       DevelDir=/usr/src/kernels/%{KVERREL}-%{_target_cpu}
       DevelLink=
     fi
 
-    KernelVer=%{version}-%{release}$1
-    echo BUILDING A KERNEL FOR $1 %{_target_cpu}...
+    KernelVer=%{version}-%{release}$Flavour
+    echo BUILDING A KERNEL FOR $Flavour %{_target_cpu}...
 
     # make sure EXTRAVERSION says what we want it to say
-    perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}$1/" Makefile
+    perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}$Flavour/" Makefile
 
     # and now to start the build process
 
@@ -797,8 +802,12 @@
     Arch=`head -1 .config | cut -b 3-`
     echo USING ARCH=$Arch
 
+    if [ "$KernelImage" == "x86" ]; then
+       KernelImage=arch/$Arch/boot/bzImage
+    fi
+
     make -s ARCH=$Arch nonint_oldconfig > /dev/null
-    make -s ARCH=$Arch %{?_smp_mflags} %{make_target}
+    make -s ARCH=$Arch %{?_smp_mflags} $MakeTarget
     make -s ARCH=$Arch %{?_smp_mflags} modules || exit 1
 
     # Start installing the results
@@ -809,31 +818,31 @@
     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 %{kernel_image} $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
+    cp $KernelImage $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
 
     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
     make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer
- 
+
     # And save the headers/makefiles etc for building modules against
     #
     # This all looks scary, but the end result is supposed to be:
     # * all arch relevant include/ files
     # * all Makefile/Kconfig files
-    # * all script/ files 
+    # * all script/ files
 
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
     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
+    # 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
+	cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
     # then drop all but the needed Makefiles/Kconfig files
     rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Documentation
     rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts
@@ -852,7 +861,7 @@
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*/*.o
     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
     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
+    cp -a acpi config keys linux math-emu media mtd net pcmcia rdma rxrpc scsi sound video asm asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
     cp -a `readlink asm` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
     if [ "$Arch" = "x86_64" ]; then
       cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
@@ -866,11 +875,12 @@
       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
     touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Makefile $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/version.h
     touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/autoconf.h
-    cd .. 
+    cd ..
 
     #
     # save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
@@ -885,10 +895,10 @@
     # 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 
+    KEYFLAGS="--no-default-keyring --homedir .."
+    KEYFLAGS="$KEYFLAGS --secret-keyring ../kernel.sec"
+    KEYFLAGS="$KEYFLAGS --keyring ../kernel.pub"
+    export KEYFLAGS
 
     for i in `cat modnames`
     do
@@ -904,7 +914,7 @@
     # detect missing or incorrect license tags
     for i in `cat modnames`
     do
-      echo -n "$i " 
+      echo -n "$i "
       /sbin/modinfo -l $i >> modinfo
     done
     cat modinfo |\
@@ -912,7 +922,7 @@
       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 v2" && exit 1
     rm -f modinfo
     rm -f modnames
     # remove files that will be auto generated by depmod at rpm -i time
@@ -933,12 +943,14 @@
 rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT/boot
 
+cd linux-%{kversion}.%{_target_cpu}
+
 %if %{buildup}
-BuildKernel
+BuildKernel %make_target %kernel_image
 %endif
 
 %if %{buildsmp}
-BuildKernel smp
+BuildKernel %make_target %kernel_image smp
 %endif
 
 ###
@@ -947,7 +959,7 @@
 
 %install
 
-cd linux-%{kversion}
+cd linux-%{kversion}.%{_target_cpu}
 
 %if %{builddoc}
 mkdir -p $RPM_BUILD_ROOT/usr/share/doc/kernel-doc-%{kversion}/Documentation
@@ -971,7 +983,7 @@
 
 # load the loop module for upgrades...in case the old modules get removed we have
 # loopback in the kernel so that mkinitrd will work.
-%pre 
+%pre
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
 exit 0
 
@@ -979,23 +991,30 @@
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
 exit 0
 
-%post 
-[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install %{KVERREL}
+%post
+if [ `uname -i` == "x86_64" ]; then
+  if [ -f /etc/sysconfig/kernel ]; then
+    /bin/sed -i -e 's/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/' /etc/sysconfig/kernel
+  fi
+fi
+[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}
+/sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install %{KVERREL}
 
 %post devel
-if [ -x /usr/sbin/hardlink ] ; then
+[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
+if [ "$HARDLINK" != "no" -a -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
 fi
 
 %post smp
-[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --package kernel-smp --mkinitrd --depmod --install %{KVERREL}smp
+[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}smp
+/sbin/new-kernel-pkg --package kernel-smp --mkinitrd --depmod --install %{KVERREL}smp
 
 %post smp-devel
-if [ -x /usr/sbin/hardlink ] ; then
+[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
+if [ "$HARDLINK" != "no" -a -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
@@ -1062,6 +1081,9 @@
 %endif
 
 %changelog
+* Tue Jun 20 2006 Dave Jones <davej at redhat.com> [2.6.17-1.2138_FC4]
+- 2.6.17.1
+
 * Mon Jun  5 2006 Dave Jones <davej at redhat.com> [2.6.16-1.2115_FC4]
 - 2.6.16.20
 

linux-2.6-build-nonintconfig.patch:
 linux-2.6.14/scripts/kconfig/confdata.c      |    8 +++-----
 linux-2.6.16.noarch/scripts/kconfig/Makefile |    3 +++
 linux-800/scripts/kconfig/conf.c             |   26 +++++++++++++++++++++++---
 3 files changed, 29 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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- linux-2.6-build-nonintconfig.patch	6 Jan 2006 05:42:17 -0000	1.4
+++ linux-2.6-build-nonintconfig.patch	20 Jun 2006 18:25:40 -0000	1.5
@@ -85,20 +85,18 @@
 -	return 0;
 +	return return_value;
  }
-diff -urNp --exclude-from=/home/davej/.exclude linux-600/scripts/kconfig/Makefile linux-800/scripts/kconfig/Makefile
---- linux-600/scripts/kconfig/Makefile
-+++ linux-800/scripts/kconfig/Makefile
-@@ -23,6 +23,10 @@ oldconfig: $(obj)/conf
+--- linux-2.6.16.noarch/scripts/kconfig/Makefile~	2006-03-25 15:55:18.000000000 -0500
++++ linux-2.6.16.noarch/scripts/kconfig/Makefile	2006-03-25 15:55:47.000000000 -0500
+@@ -23,6 +23,9 @@ oldconfig: $(obj)/conf
  silentoldconfig: $(obj)/conf
  	$< -s arch/$(ARCH)/Kconfig
  
 +nonint_oldconfig: scripts/kconfig/conf
 +	./scripts/kconfig/conf -b arch/$(ARCH)/Kconfig
 +
-+
- .PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig
- 
- randconfig: $(obj)/conf
+ update-po-config: $(obj)/kxgettext
+ 	xgettext --default-domain=linux \
+           --add-comments --keyword=_ --keyword=N_ \
 --- 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)
@@ -106,7 +104,7 @@
  			sym = sym_find(line + 9);
  			if (!sym) {
 -				conf_warning("trying to assign nonexistent symbol %s", line + 9);
-+				//conf_warning("trying to assign nonexistent symbol %s", line + 9);
++				conf_warning("trying to assign nonexistent symbol %s", line + 9);
  				break;
  			} else if (!(sym->flags & SYMBOL_NEW)) {
  				conf_warning("trying to reassign symbol %s", sym->name);
@@ -115,7 +113,7 @@
  			sym = sym_find(line + 7);
  			if (!sym) {
 -				conf_warning("trying to assign nonexistent symbol %s", 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-crash-driver.patch:
 linux-1060/arch/i386/mm/init.c            |    2 
 linux-1060/arch/ia64/kernel/ia64_ksyms.c  |    3 
 linux-1060/arch/x86_64/mm/init.c          |    3 
 linux-1060/drivers/char/Kconfig           |    2 
 linux-1060/drivers/char/crash.c           |  129 ++++++++++++++++++++++++++++++
 linux-1060/include/asm-i386/crash.h       |   75 +++++++++++++++++
 linux-1060/include/asm-ia64/crash.h       |   90 ++++++++++++++++++++
 linux-1060/include/asm-x86_64/crash.h     |   75 +++++++++++++++++
 linux-2.6.16.noarch/drivers/char/Makefile |    1 
 9 files changed, 380 insertions(+)

Index: linux-2.6-crash-driver.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-crash-driver.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-crash-driver.patch	28 Oct 2005 05:23:06 -0000	1.1
+++ linux-2.6-crash-driver.patch	20 Jun 2006 18:25:40 -0000	1.2
@@ -188,15 +188,14 @@
  
  config LEGACY_PTY_COUNT
  	int "Maximum number of legacy PTY in use"
-diff -urNp --exclude-from=/home/davej/.exclude linux-1050/drivers/char/Makefile linux-1060/drivers/char/Makefile
---- linux-1050/drivers/char/Makefile
-+++ linux-1060/drivers/char/Makefile
-@@ -88,6 +88,7 @@ obj-$(CONFIG_PCMCIA) += pcmcia/
- obj-$(CONFIG_IPMI_HANDLER) += ipmi/
+--- linux-2.6.16.noarch/drivers/char/Makefile~	2006-03-25 18:50:42.000000000 -0500
++++ linux-2.6.16.noarch/drivers/char/Makefile	2006-03-25 18:50:59.000000000 -0500
+@@ -95,6 +95,7 @@ obj-$(CONFIG_IPMI_HANDLER)	+= ipmi/
+ 
+ obj-$(CONFIG_HANGCHECK_TIMER)	+= hangcheck-timer.o
+ obj-$(CONFIG_TCG_TPM)		+= tpm/
++obj-$(CONFIG_CRASH)		+= crash.o
  
- obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o
-+obj-$(CONFIG_CRASH) += crash.o
- obj-$(CONFIG_TCG_TPM) += tpm/
  # Files generated that shall be removed upon make clean
  clean-files := consolemap_deftbl.c defkeymap.c qtronixmap.c
 diff -urNp --exclude-from=/home/davej/.exclude linux-1050/include/asm-i386/crash.h linux-1060/include/asm-i386/crash.h

linux-2.6-debug-Wundef.patch:
 Makefile |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-debug-Wundef.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-debug-Wundef.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-debug-Wundef.patch	28 Oct 2005 05:23:06 -0000	1.3
+++ linux-2.6-debug-Wundef.patch	20 Jun 2006 18:25:40 -0000	1.4
@@ -1,13 +1,17 @@
+
 -Wundef
+-Werror-implicit-function-declaration
+
+Signed-off-by: Dave Jones <davej at redhat.com>
 
---- linux-2.6.11/Makefile~	2005-05-28 18:48:02.000000000 -0400
-+++ linux-2.6.11/Makefile	2005-05-28 18:48:27.000000000 -0400
-@@ -203,7 +203,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
+--- linux-2.6/Makefile~	2005-05-28 18:48:02.000000000 -0400
++++ linux-2.6/Makefile	2005-05-28 18:48:27.000000000 -0400
+@@ -306,7 +306,7 @@ LINUXINCLUDE    := -Iinclude \
+ CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
  
- HOSTCC  	= gcc
- HOSTCXX  	= g++
--HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
-+HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -Wundef
- HOSTCXXFLAGS	= -O2
+ CFLAGS 		:= -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
+-	  	   -fno-strict-aliasing -fno-common
++	  	   -fno-strict-aliasing -fno-common -Wstrict-prototypes -Wundef -Werror-implicit-function-declaration
+ AFLAGS		:= -D__ASSEMBLY__
  
- # 	Decide whether to build built-in, modular, or both.
+ # Read KERNELRELEASE from .kernelrelease (if it exists)

linux-2.6-debug-disable-builtins.patch:
 Makefile |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-debug-disable-builtins.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-debug-disable-builtins.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-debug-disable-builtins.patch	28 Oct 2005 05:23:06 -0000	1.3
+++ linux-2.6-debug-disable-builtins.patch	20 Jun 2006 18:25:40 -0000	1.4
@@ -1,4 +1,4 @@
-Disable built-ins and also more m32 work
+Disable built-ins
 
 diff -urNp --exclude-from=/home/davej/.exclude linux-3022/arch/i386/Makefile linux-10000/arch/i386/Makefile
 --- linux-3022/arch/i386/Makefile

linux-2.6-debug-list_head.patch:
 b/fs/select.c                     |    4 +++-
 b/include/linux/wait.h            |    2 +-
 b/kernel/wait.c                   |   26 ++++++++++++++++++++++++--
 linux-2.6.12/include/linux/list.h |   22 ++++++++++++++++++++++
 4 files changed, 50 insertions(+), 4 deletions(-)

Index: linux-2.6-debug-list_head.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-debug-list_head.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- linux-2.6-debug-list_head.patch	29 May 2006 04:06:45 -0000	1.4
+++ linux-2.6-debug-list_head.patch	20 Jun 2006 18:25:40 -0000	1.5
@@ -49,6 +49,13 @@
 
 
 
+It _may_ give more information about exactly which wait-queue (or rather, 
+what the poll function that was related to that wait-queue) seems to be 
+corrupted. 
+
+		Linus
+
+---
 diff --git a/fs/select.c b/fs/select.c
 index a8109ba..8cd6dc3 100644
 --- a/fs/select.c
@@ -61,16 +68,16 @@
  
  #include <asm/uaccess.h>
  
-@@ -78,7 +78,8 @@ void poll_freewait(struct poll_wqueues *
- 		entry = p->entry;
- 		do {
- 			entry--;
--			remove_wait_queue(entry->wait_address,&entry->wait);
-+			if (remove_wait_queue(entry->wait_address,&entry->wait) < 0)
-+				print_symbol("bad poll-entry for %s", (unsigned long) entry->filp->f_op->poll);
- 			fput(entry->filp);
- 		} while (entry > p->entries);
- 		old = p;
+@@ -65,7 +66,8 @@ EXPORT_SYMBOL(poll_initwait);
+ 
+ static void free_poll_entry(struct poll_table_entry *entry)
+ {
+-	remove_wait_queue(entry->wait_address,&entry->wait);
++	if (remove_wait_queue(entry->wait_address,&entry->wait) < 0)
++		print_symbol("bad poll-entry for %s", (unsigned long) entry->filp->f_op->poll);
+ 	fput(entry->filp);
+ }
+ 
 diff --git a/include/linux/wait.h b/include/linux/wait.h
 index d285182..4c1d74e 100644
 --- a/include/linux/wait.h

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

Index: linux-2.6-debug-oops-pause.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-debug-oops-pause.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-debug-oops-pause.patch	4 Feb 2006 01:04:37 -0000	1.2
+++ linux-2.6-debug-oops-pause.patch	20 Jun 2006 18:25:40 -0000	1.3
@@ -6,9 +6,11 @@
 
 (Wow, I'm really getting desperate for better debug data).
 
---- vanilla/arch/i386/kernel/traps.c	2006-01-02 22:21:10.000000000 -0500
-+++ linux-2.6.15/arch/i386/kernel/traps.c	2006-01-04 23:42:46.000000000 -0500
-@@ -28,6 +28,7 @@
+diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
+index 2d22f57..81726fd 100644
+--- a/arch/i386/kernel/traps.c
++++ b/arch/i386/kernel/traps.c
+@@ -28,6 +28,7 @@ #include <linux/ptrace.h>
  #include <linux/utsname.h>
  #include <linux/kprobes.h>
  #include <linux/kexec.h>
@@ -16,19 +18,49 @@
  
  #ifdef CONFIG_EISA
  #include <linux/ioport.h>
-@@ -256,6 +271,15 @@ void show_registers(struct pt_regs *regs
+@@ -165,6 +166,27 @@ #endif
+ 	return ebp;
+ }
+ 
++static int oopsdelay = 120;
++
++void pause_for_two_minutes(void)
++{
++	int i, j;
++	for (i=oopsdelay; i>0; i--) {
++		for (j=0; j<1000; j++)
++			udelay(1000);
++		touch_nmi_watchdog();
++		printk("Continuing in %d seconds. \r", i);
++	}
++	printk("\n");
++}	
++
++static int __init oopsdelay_setup(char *s)
++{
++	oopsdelay = simple_strtoul(s, NULL, 0);
++	return 1;
++}
++__setup("oopsdelay=", oopsdelay_setup);
++
+ static void show_trace_log_lvl(struct task_struct *task,
+ 			       unsigned long *stack, char *log_lvl)
+ {
+@@ -190,6 +212,7 @@ static void show_trace_log_lvl(struct ta
+ 		if (!stack)
+ 			break;
+ 		printk("%s =======================\n", log_lvl);
++		//pause_for_two_minutes();
+ 	}
+ }
+ 
+@@ -299,7 +322,8 @@ 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");
-+	}
- }	
+-}	
++	pause_for_two_minutes();
++}
  
  static void handle_BUG(struct pt_regs *regs)
+ {

linux-2.6-debug-periodic-slab-check.patch:
 slab.c |  132 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 129 insertions(+), 3 deletions(-)

Index: linux-2.6-debug-periodic-slab-check.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-debug-periodic-slab-check.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-debug-periodic-slab-check.patch	28 Mar 2006 16:14:09 -0000	1.3
+++ linux-2.6-debug-periodic-slab-check.patch	20 Jun 2006 18:25:40 -0000	1.4
@@ -65,7 +65,7 @@
  		printk(KERN_ERR "slab: double free detected in cache "
  		       "'%s', objp %p\n", cachep->name, objp);
  		BUG();
-@@ -3266,6 +3277,116 @@ static int alloc_kmemlist(struct kmem_ca
+@@ -3266,6 +3277,114 @@ static int alloc_kmemlist(struct kmem_ca
  	return err;
  }
  
@@ -166,8 +166,6 @@
 +{
 +	int node;
 +
-+	check_spinlock_acquired(cache);
-+
 +	for_each_online_node(node) {
 +		struct kmem_list3 *lists = cache->nodelists[node];
 +
@@ -182,9 +180,9 @@
  struct ccupdate_struct {
  	struct kmem_cache *cachep;
  	struct array_cache *new[NR_CPUS];
-@@ -3446,6 +3567,13 @@ static void cache_reap(void *unused)
- 		drain_array_locked(searchp, cpu_cache_get(searchp), 0,
- 				   numa_node_id());
+@@ -3739,6 +3739,13 @@ static void cache_reap(void *unused)
+ 
+ 		drain_array(searchp, l3, cpu_cache_get(searchp), 0, node);
  
 +#if DEBUG
 +		if (time_before(searchp->next_verify, jiffies)) {
@@ -193,7 +191,6 @@
 +		}
 +#endif
 +
- 		if (time_after(l3->next_reap, jiffies))
- 			goto next_unlock;
- 
-
+ 		/*
+ 		 * These are racy checks but it does not matter
+ 		 * if we skip one check or scan twice.

linux-2.6-debug-singlebiterror.patch:
 slab.c |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletion(-)

Index: linux-2.6-debug-singlebiterror.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-debug-singlebiterror.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- linux-2.6-debug-singlebiterror.patch	28 Mar 2006 16:14:09 -0000	1.4
+++ linux-2.6-debug-singlebiterror.patch	20 Jun 2006 18:25:40 -0000	1.5
@@ -1,32 +1,51 @@
---- linux-2.6.15/mm/slab.c~	2006-01-09 13:25:17.000000000 -0500
-+++ linux-2.6.15/mm/slab.c	2006-01-09 13:26:01.000000000 -0500
-@@ -1313,8 +1313,11 @@ static void poison_obj(kmem_cache_t *cac
+
+In case where we detect a single bit has been flipped, we spew
+the usual slab corruption message, which users instantly think
+is a kernel bug.  In a lot of cases, single bit errors are
+down to bad memory, or other hardware failure.
+
+This patch adds an extra line to the slab debug messages
+in those cases, in the hope that users will try memtest before
+they report a bug.
+
+000: 6b 6b 6b 6b 6a 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
+Single bit error detected. Possibly bad RAM. Run memtest86.
+
+Signed-off-by: Dave Jones <davej at redhat.com>
+
+--- linux-2.6.16.noarch/mm/slab.c~	2006-03-22 18:29:27.000000000 -0500
++++ linux-2.6.16.noarch/mm/slab.c	2006-03-22 18:30:58.000000000 -0500
+@@ -1516,10 +1516,33 @@ static void poison_obj(struct kmem_cache
  static void dump_line(char *data, int offset, int limit)
  {
  	int i;
-+	unsigned char total=0;
++	unsigned char total=0, bad_count=0;
  	printk(KERN_ERR "%03x:", offset);
- 	for (i = 0; i < limit; i++) {
-+		if (data[offset+i] != POISON_FREE)
+-	for (i = 0; i < limit; i++)
++	for (i = 0; i < limit; i++) {
++		if (data[offset+i] != POISON_FREE) {
 +			total += data[offset+i];
++			++bad_count;
++		}
  		printk(" %02x", (unsigned char)data[offset + i]);
- 	}
- 	printk("\n");
-@@ -1019,6 +1023,18 @@ static void dump_line(char *data, int of
- 		}
- 	}
++	}
  	printk("\n");
-+	switch (total) {
-+		case 0x36:
-+		case 0x6a:
-+		case 0x6f:
-+		case 0x81:
-+		case 0xac:
-+		case 0xd3:
-+		case 0xd5:
-+		case 0xea:
-+			printk (KERN_ERR "Single bit error detected. Possibly bad RAM. Run memtest86.\n");
++	if (bad_count == 1) {
++		switch (total) {
++		case POISON_FREE ^ 0x01:
++		case POISON_FREE ^ 0x02:
++		case POISON_FREE ^ 0x04:
++		case POISON_FREE ^ 0x08:
++		case POISON_FREE ^ 0x10:
++		case POISON_FREE ^ 0x20:
++		case POISON_FREE ^ 0x40:
++		case POISON_FREE ^ 0x80:
++			printk (KERN_ERR "Single bit error detected. Possibly bad RAM.\n");
++#ifdef CONFIG_X86
++			printk (KERN_ERR "Run memtest86 or other memory test tool.\n");
++#endif
 +			return;
++		}
 +	}
  }
  #endif

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

Index: linux-2.6-debug-sysfs-crash-debugging.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-debug-sysfs-crash-debugging.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-debug-sysfs-crash-debugging.patch	28 Mar 2006 16:14:09 -0000	1.2
+++ linux-2.6-debug-sysfs-crash-debugging.patch	20 Jun 2006 18:25:40 -0000	1.3
@@ -18,12 +18,11 @@
 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>
+@@ -7,6 +7,7 @@
  #include <linux/kobject.h>
  #include <linux/namei.h>
+ #include <linux/poll.h>
 +#include <linux/limits.h>
-+
  #include <asm/uaccess.h>
  #include <asm/semaphore.h>
  
@@ -54,16 +53,16 @@
  int register_die_notifier(struct notifier_block *nb)
  {
  	int err = 0;
-@@ -346,6 +346,9 @@ void die(const char * str, struct pt_reg
+@@ -388,6 +388,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);
+ 		if (notify_die(DIE_OOPS, str, regs, err,
+ 					current->thread.trap_no, SIGSEGV) !=
+ 				NOTIFY_STOP)
 --- 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);

linux-2.6-debug-taint-vm.patch:
 linux-2.6.15/mm/page_alloc.c                  |    4 ++--
 linux-2.6.16.noarch/include/asm-generic/bug.h |    8 ++++++--
 linux-2.6.16.noarch/mm/slab.c                 |    4 ++--
 linux-2000/kernel/panic.c                     |    1 +
 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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- linux-2.6-debug-taint-vm.patch	28 Mar 2006 16:14:09 -0000	1.5
+++ linux-2.6-debug-taint-vm.patch	20 Jun 2006 18:25:40 -0000	1.6
@@ -1,5 +1,5 @@
---- linux-2.6.11/include/asm-generic/bug.h~	2005-05-09 18:00:44.000000000 -0400
-+++ linux-2.6.11/include/asm-generic/bug.h	2005-05-09 18:01:23.000000000 -0400
+--- linux-2.6.16.noarch/include/asm-generic/bug.h~	2006-03-24 15:32:04.000000000 -0500
++++ linux-2.6.16.noarch/include/asm-generic/bug.h	2006-03-24 15:33:29.000000000 -0500
 @@ -4,10 +4,14 @@
  #include <linux/compiler.h>
  #include <linux/config.h>
@@ -11,17 +11,17 @@
  #ifdef CONFIG_BUG
  #ifndef HAVE_ARCH_BUG
  #define BUG() do { \
--	printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
-+	printk("kernel BUG at %s:%d! (%s)\n", __FILE__, __LINE__, print_tainted()); \
+-	printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
++	printk("BUG: failure at %s:%d/%s()! (%s)\n", __FILE__, __LINE__, __FUNCTION__, print_tainted()); \
  	panic("BUG!"); \
  } while (0)
  #endif
-@@ -25,7 +29,7 @@
+@@ -19,7 +23,7 @@
  #ifndef HAVE_ARCH_WARN_ON
  #define WARN_ON(condition) do { \
  	if (unlikely((condition)!=0)) { \
--		printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
-+		printk("Badness in %s at %s:%d (%s)\n", __FUNCTION__, __FILE__, __LINE__, print_tainted()); \
+-		printk("BUG: warning at %s:%d/%s()\n", __FILE__, __LINE__, __FUNCTION__); \
++		printk("BUG: warning at %s:%d/%s() (%s)\n", __FILE__, __LINE__, __FUNCTION__, print_tainted()); \
  		dump_stack(); \
  	} \
  } while (0)
@@ -53,16 +53,16 @@
  	dump_stack();
  	page->flags &= ~(1 << PG_lru	|
  			1 << PG_private |
---- linux-2.6.15/mm/slab.c~	2006-01-09 13:19:33.000000000 -0500
-+++ linux-2.6.15/mm/slab.c	2006-01-09 13:19:55.000000000 -0500
-@@ -1371,8 +1371,8 @@ static void check_poison_obj(kmem_cache_
+--- linux-2.6.16.noarch/mm/slab.c~	2006-03-22 18:25:29.000000000 -0500
++++ linux-2.6.16.noarch/mm/slab.c	2006-03-22 18:25:53.000000000 -0500
+@@ -1573,8 +1573,8 @@ static void check_poison_obj(struct kmem
  			/* Print header */
  			if (lines == 0) {
  				printk(KERN_ERR
--				       "Slab corruption: start=%p, len=%d\n",
--				       realobj, size);
-+				       "Slab corruption: (%s) start=%p, len=%d\n",
-+				       print_tainted(), realobj, size);
+-					"Slab corruption: start=%p, len=%d\n",
+-					realobj, size);
++					"Slab corruption: (%s) start=%p, len=%d\n",
++					print_tainted(), realobj, size);
  				print_objinfo(cachep, objp, 0);
  				dump_stack();
  			}

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                |  143 ++++-----------------------
 linux-1050/fs/proc/kcore.c                   |    2 
 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-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 
 linux-2.6.16.noarch/include/asm-alpha/page.h |    1 
 linux-2.6.16.noarch/include/asm-ppc/page.h   |    2 
 29 files changed, 154 insertions(+), 122 deletions(-)

Index: linux-2.6-devmem.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-devmem.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-devmem.patch	28 Mar 2006 16:14:09 -0000	1.3
+++ linux-2.6-devmem.patch	20 Jun 2006 18:25:40 -0000	1.4
@@ -55,8 +55,8 @@
  #include <asm/vdso.h>
  
  #include "mmu_decl.h"
-@@ -722,6 +722,19 @@ void __init mem_init(void)
- 	max_mapnr = num_physpages;
+@@ -352,6 +352,19 @@ void __init mem_init(void)
+ 	max_mapnr = max_pfn;
  	totalram_pages += free_all_bootmem();
  #endif
 +
@@ -72,9 +72,9 @@
 +	}
 +#endif
 +
- 	for_each_pgdat(pgdat) {
+ 	for_each_online_pgdat(pgdat) {
  		for (i = 0; i < pgdat->node_spanned_pages; i++) {
- 			page = pgdat->node_mem_map + i;
+ 			if (!pfn_valid(pgdat->node_start_pfn + i))
 diff -urNp --exclude-from=/home/davej/.exclude linux-1020/arch/s390/mm/init.c linux-1050/arch/s390/mm/init.c
 --- linux-1020/arch/s390/mm/init.c
 +++ linux-1050/arch/s390/mm/init.c
@@ -173,7 +173,7 @@
  	read = 0;
  	virtr = 0;
  	if (p < (unsigned long) high_memory) {
-@@ -345,128 +367,6 @@ static ssize_t read_kmem(struct file *fi
+@@ -432,67 +432,6 @@ static ssize_t read_kmem(struct file *fi
  }
  
  
@@ -221,11 +221,9 @@
 -
 -		copied = copy_from_user(ptr, buf, sz);
 -		if (copied) {
--			ssize_t ret;
--
--			ret = written + (sz - copied);
--			if (ret)
--				return ret;
+-			written += sz - copied;
+-			if (written)
+-				break;
 -			return -EFAULT;
 -		}
 -		buf += sz;
@@ -240,6 +238,13 @@
 -}
 -
 -
+ /*
+  * This function writes to the *virtual* memory as seen by the kernel.
+  */
+@@ -432,64 +432,6 @@ static ssize_t read_kmem(struct file *fi
+ }
+ 
+ 
 -/*
 - * This function writes to the *virtual* memory as seen by the kernel.
 - */
@@ -279,11 +284,10 @@
 -			if (len) {
 -				written = copy_from_user(kbuf, buf, len);
 -				if (written) {
--					ssize_t ret;
--
+-					if (wrote + virtr)
+-						break;
 -					free_page((unsigned long)kbuf);
--					ret = wrote + virtr + (len - written);
--					return ret ? ret : -EFAULT;
+-					return -EFAULT;
 -				}
 -			}
 -			len = vwrite(kbuf, (char *)p, len);
@@ -330,17 +334,16 @@
  }
  
  static ssize_t read_kcore(struct file *, char __user *, size_t, loff_t *);
-diff -urNp --exclude-from=/home/davej/.exclude linux-1020/include/asm-alpha/page.h linux-1050/include/asm-alpha/page.h
---- linux-1020/include/asm-alpha/page.h
-+++ linux-1050/include/asm-alpha/page.h
-@@ -110,6 +110,7 @@ extern __inline__ int get_order(unsigned
+--- linux-2.6.16.noarch/include/asm-alpha/page.h~	2006-03-28 10:15:44.000000000 -0500
++++ linux-2.6.16.noarch/include/asm-alpha/page.h	2006-03-28 10:15:55.000000000 -0500
+@@ -93,6 +93,7 @@ typedef unsigned long pgprot_t;
+ 
  #define VM_DATA_DEFAULT_FLAGS		(VM_READ | VM_WRITE | VM_EXEC | \
  					 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
- 
 +#define devmem_is_allowed(x) 1
  #endif /* __KERNEL__ */
  
- #endif /* _ALPHA_PAGE_H */
+ #include <asm-generic/memory_model.h>
 diff -urNp --exclude-from=/home/davej/.exclude linux-1020/include/asm-arm/page.h linux-1050/include/asm-arm/page.h
 --- linux-1020/include/asm-arm/page.h
 +++ linux-1050/include/asm-arm/page.h
@@ -466,15 +469,15 @@
  #endif /* __KERNEL__ */
  
  #endif /* _PARISC_PAGE_H */
-diff -urNp --exclude-from=/home/davej/.exclude linux-1020/include/asm-ppc/page.h linux-1050/include/asm-ppc/page.h
---- linux-1020/include/asm-ppc/page.h
-+++ linux-1050/include/asm-ppc/page.h
-@@ -163,5 +163,7 @@ extern __inline__ int get_order(unsigned
- #define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
- 				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+--- linux-2.6.16.noarch/include/asm-ppc/page.h~	2006-03-28 10:16:25.000000000 -0500
++++ linux-2.6.16.noarch/include/asm-ppc/page.h	2006-03-28 10:16:35.000000000 -0500
+@@ -174,6 +174,8 @@ extern __inline__ int get_order(unsigned
+ /* We do define AT_SYSINFO_EHDR but don't use the gate mecanism */
+ #define __HAVE_ARCH_GATE_AREA		1
  
 +#define devmem_is_allowed(x) 1
 +
+ #include <asm-generic/memory_model.h>
  #endif /* __KERNEL__ */
  #endif /* _PPC_PAGE_H */
 --- linux-2.6.14/include/asm-powerpc/page.h~	2005-11-15 12:12:43.000000000 -0500

linux-2.6-execshield.patch:
 linux-2.6.16.noarch/include/asm-powerpc/elf.h |    3 
 linux/arch/i386/kernel/asm-offsets.c          |    1 
 linux/arch/i386/kernel/cpu/common.c           |    7 
 linux/arch/i386/kernel/entry.S                |    8 -
 linux/arch/i386/kernel/process.c              |   59 ++++++++
 linux/arch/i386/kernel/signal.c               |    4 
 linux/arch/i386/kernel/smp.c                  |    3 
 linux/arch/i386/kernel/sysenter.c             |   81 +++++++++++
 linux/arch/i386/kernel/traps.c                |   93 ++++++++++++-
 linux/arch/i386/kernel/vsyscall-sysenter.S    |    6 
 linux/arch/i386/kernel/vsyscall.lds.S         |    4 
 linux/arch/i386/mm/init.c                     |    6 
 linux/arch/i386/mm/mmap.c                     |    6 
 linux/arch/ia64/ia32/binfmt_elf32.c           |    2 
 linux/arch/powerpc/kernel/vdso.c              |    3 
 linux/arch/x86_64/ia32/ia32_binfmt.c          |    6 
 linux/arch/x86_64/ia32/syscall32.c            |    4 
 linux/arch/x86_64/kernel/process.c            |    6 
 linux/arch/x86_64/mm/fault.c                  |    2 
 linux/arch/x86_64/mm/mmap.c                   |   99 +++++++++++---
 linux/drivers/char/random.c                   |    7 
 linux/fs/binfmt_elf.c                         |  151 ++++++++++++++++-----
 linux/fs/proc/array.c                         |    8 -
 linux/fs/proc/base.c                          |    8 -
 linux/fs/proc/task_mmu.c                      |   34 +++-
 linux/include/asm-i386/a.out.h                |    2 
 linux/include/asm-i386/desc.h                 |   14 +
 linux/include/asm-i386/elf.h                  |   50 +++++--
 linux/include/asm-i386/mmu.h                  |    6 
 linux/include/asm-i386/page.h                 |    5 
 linux/include/asm-i386/pgalloc.h              |    1 
 linux/include/asm-i386/processor.h            |    8 -
 linux/include/asm-i386/thread_info.h          |    1 
 linux/include/asm-ia64/pgalloc.h              |    4 
 linux/include/asm-powerpc/pgalloc.h           |    5 
 linux/include/asm-ppc/pgalloc.h               |    5 
 linux/include/asm-s390/pgalloc.h              |    4 
 linux/include/asm-sparc/pgalloc.h             |    4 
 linux/include/asm-sparc64/pgalloc.h           |    4 
 linux/include/asm-x86_64/pgalloc.h            |    7 
 linux/include/asm-x86_64/pgtable.h            |    2 
 linux/include/linux/mm.h                      |   16 +-
 linux/include/linux/resource.h                |    5 
 linux/include/linux/sched.h                   |    9 +
 linux/include/linux/sysctl.h                  |    3 
 linux/kernel/signal.c                         |   38 +++++
 linux/kernel/sysctl.c                         |   57 ++++++++
 linux/mm/fremap.c                             |   16 +-
 linux/mm/mmap.c                               |  183 ++++++++++++++++++++++++--
 linux/mm/mprotect.c                           |    5 
 linux/mm/mremap.c                             |    4 
 51 files changed, 930 insertions(+), 139 deletions(-)

Index: linux-2.6-execshield.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-execshield.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- linux-2.6-execshield.patch	10 May 2006 00:04:25 -0000	1.6
+++ linux-2.6-execshield.patch	20 Jun 2006 18:25:40 -0000	1.7
@@ -595,48 +595,6 @@
  }
  
  asmlinkage long sys_fork(struct pt_regs *regs)
-Index: linux/arch/x86_64/kernel/setup64.c
-===================================================================
---- linux.orig/arch/x86_64/kernel/setup64.c
-+++ linux/arch/x86_64/kernel/setup64.c
-@@ -46,7 +46,7 @@ Control non executable mappings for 64bi
- on	Enable(default)
- off	Disable
- */ 
--int __init nonx_setup(char *str)
-+void __init nonx_setup(const char *str)
- {
- 	if (!strncmp(str, "on", 2)) {
-                 __supported_pte_mask |= _PAGE_NX; 
-@@ -55,28 +55,7 @@ int __init nonx_setup(char *str)
- 		do_not_nx = 1;
- 		__supported_pte_mask &= ~_PAGE_NX;
-         }
--	return 0;
--} 
--__setup("noexec=", nonx_setup);	/* parsed early actually */
--
--int force_personality32 = READ_IMPLIES_EXEC;
--
--/* noexec32=on|off
--Control non executable heap for 32bit processes.
--To control the stack too use noexec=off
--
--on	PROT_READ does not imply PROT_EXEC for 32bit processes
--off	PROT_READ implies PROT_EXEC (default)
--*/
--static int __init nonx32_setup(char *str)
--{
--	if (!strcmp(str, "on"))
--		force_personality32 &= ~READ_IMPLIES_EXEC;
--	else if (!strcmp(str, "off"))
--		force_personality32 |= READ_IMPLIES_EXEC;
--	return 0;
- }
--__setup("noexec32=", nonx32_setup);
- 
- /*
-  * Great future plan:
 Index: linux/arch/x86_64/mm/fault.c
 ===================================================================
 --- linux.orig/arch/x86_64/mm/fault.c
@@ -2144,15 +2102,15 @@
  	pgprot_t newprot;
  	pgoff_t pgoff;
  	int error;
-@@ -166,6 +167,8 @@ success:
+@@ -167,6 +167,8 @@ success:
  	 */
  	vma->vm_flags = newflags;
  	vma->vm_page_prot = newprot;
 +	if (oldflags & VM_EXEC)
 +		arch_remove_exec_range(current->mm, old_end);
- 	change_protection(vma, start, end, newprot);
- 	vm_stat_account(mm, oldflags, vma->vm_file, -nrpages);
- 	vm_stat_account(mm, newflags, vma->vm_file, nrpages);
+ 	if (is_vm_hugetlb_page(vma))
+ 		hugetlb_change_protection(vma, start, end, newprot);
+ 	else
 Index: linux/mm/mremap.c
 ===================================================================
 --- linux.orig/mm/mremap.c

linux-2.6-ide-tune-locking.patch:
 piix.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

Index: linux-2.6-ide-tune-locking.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-ide-tune-locking.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-ide-tune-locking.patch	28 Oct 2005 05:23:06 -0000	1.3
+++ linux-2.6-ide-tune-locking.patch	20 Jun 2006 18:25:40 -0000	1.4
@@ -1,3 +1,11 @@
+
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=144743
+Kernel panic - not syncing: drivers/ide/pci/piix.c:231:
+spin_lock(drivers/ide/ide.c:c03cef28) already locked by driver/ide/ide-iops.c/1153.
+
+From: Alan Cox <alan at redhat.com>
+Signed-off-by: Dave Jones <davej at redhat.com>
+
 --- linux-2.6.12/drivers/ide/pci/piix.c~	2005-07-11 10:23:24.637181320 +0100
 +++ linux-2.6.12/drivers/ide/pci/piix.c	2005-07-11 10:23:24.637181320 +0100
 @@ -203,6 +203,8 @@

linux-2.6-module_version.patch:
 linux-1720/drivers/block/DAC960.c           |    1 +
 linux-1720/drivers/block/cpqarray.c         |    1 +
 linux-1720/drivers/message/fusion/mptbase.c |    1 +
 linux-1720/drivers/net/b44.c                |    1 +
 linux-1720/drivers/net/ns83820.c            |    1 +
 linux-1720/drivers/scsi/gdth.c              |    1 +
 linux-2.6.13/drivers/block/cciss.c          |    1 +
 7 files changed, 7 insertions(+)

Index: linux-2.6-module_version.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-module_version.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-module_version.patch	28 Oct 2005 05:23:06 -0000	1.1
+++ linux-2.6-module_version.patch	20 Jun 2006 18:25:40 -0000	1.2
@@ -60,17 +60,6 @@
  
  MODULE_DEVICE_TABLE(pci, ns83820_pci_tbl);
  
-diff -urNp --exclude-from=/home/davej/.exclude linux-1700/drivers/net/tg3.c linux-1720/drivers/net/tg3.c
---- linux-1700/drivers/net/tg3.c
-+++ linux-1720/drivers/net/tg3.c
-@@ -146,6 +146,7 @@ MODULE_VERSION(DRV_MODULE_VERSION);
- static int tg3_debug = -1;	/* -1 == use TG3_DEF_MSG_ENABLE as value */
- module_param(tg3_debug, int, 0);
- MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value");
-+MODULE_VERSION(DRV_MODULE_VERSION);
- 
- static struct pci_device_id tg3_pci_tbl[] = {
- 	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5700,
 diff -urNp --exclude-from=/home/davej/.exclude linux-1700/drivers/scsi/gdth.c linux-1720/drivers/scsi/gdth.c
 --- linux-1700/drivers/scsi/gdth.c
 +++ linux-1720/drivers/scsi/gdth.c

linux-2.6-optimise-spinlock-debug.patch:
 spinlock_debug.c |    3 ---
 1 files changed, 3 deletions(-)

Index: linux-2.6-optimise-spinlock-debug.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-optimise-spinlock-debug.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-optimise-spinlock-debug.patch	28 Mar 2006 16:14:09 -0000	1.1
+++ linux-2.6-optimise-spinlock-debug.patch	20 Jun 2006 18:25:40 -0000	1.2
@@ -1,42 +1,27 @@
 
 --- linux-2.6.16/lib/spinlock_debug.c~	2006-03-20 16:31:13.000000000 -0500
 +++ linux-2.6.16/lib/spinlock_debug.c	2006-03-20 16:31:24.000000000 -0500
-@@ -9,8 +9,9 @@
- #include <linux/config.h>
- #include <linux/spinlock.h>
- #include <linux/interrupt.h>
- #include <linux/delay.h>
- #include <linux/module.h>
-+#include <asm/processor.h>
- 
- int nopanic;
- static int __init nopanic_setup(char *str)
---- linux-2.6.16/lib/spinlock_debug.c~	2006-03-20 16:29:56.000000000 -0500
-+++ linux-2.6.16/lib/spinlock_debug.c	2006-03-20 16:30:52.000000000 -0500
-@@ -88,7 +88,7 @@ static void __spin_lock_debug(spinlock_t
+@@ -88,7 +88,6 @@ static void __spin_lock_debug(spinlock_t
  		for (i = 0; i < loops_per_jiffy * HZ; i++) {
  			if (__raw_spin_trylock(&lock->raw_lock))
  				return;
 -			__delay(1);
-+			cpu_relax();
  		}
  		/* lockup suspected: */
  		if (print_once) {
-@@ -160,7 +160,7 @@ static void __read_lock_debug(rwlock_t *
+@@ -160,7 +160,6 @@ static void __read_lock_debug(rwlock_t *
  		for (i = 0; i < loops_per_jiffy * HZ; i++) {
  			if (__raw_read_trylock(&lock->raw_lock))
  				return;
 -			__delay(1);
-+			cpu_relax();
  		}
  		/* lockup suspected: */
  		if (print_once) {
-@@ -233,7 +233,7 @@ static void __write_lock_debug(rwlock_t 
+@@ -233,7 +233,6 @@ static void __write_lock_debug(rwlock_t 
  		for (i = 0; i < loops_per_jiffy * HZ; i++) {
  			if (__raw_write_trylock(&lock->raw_lock))
  				return;
 -			__delay(1);
-+			cpu_relax();
  		}
  		/* lockup suspected: */
  		if (print_once) {

linux-2.6-radeon-backlight.patch:
 radeon_base.c         |   11 +++++++
 radeon_pm.c           |   51 ++++++++++++++++++++++++++++++++
 radeon_pm_whitelist.h |   78 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 139 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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- linux-2.6-radeon-backlight.patch	28 Mar 2006 16:14:09 -0000	1.5
+++ linux-2.6-radeon-backlight.patch	20 Jun 2006 18:25:40 -0000	1.6
@@ -1,9 +1,87 @@
-
-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 @@
+--- linux-2.6.15.i686/drivers/video/aty/radeon_pm_whitelist.h.backlight	2006-03-01 13:22:58.000000000 -0500
++++ linux-2.6.15.i686/drivers/video/aty/radeon_pm_whitelist.h	2006-03-01 13:56:54.000000000 -0500
+@@ -0,0 +1,78 @@
++#define E(_vendor, _product, _ident, _reporter)				\
++{	/* _reporter */							\
++	.ident = _ident,						\
++	.matches = {							\
++		DMI_MATCH(DMI_SYS_VENDOR, _vendor),			\
++		DMI_MATCH(DMI_PRODUCT_NAME, _product),			\
++	},								\
++}
++E("IBM", "18297RG", "IBM ThinkPad R50", "Borschuk Oleg <merlinse at yandex.ru>"),
++E("IBM", "18299MG", "IBM ThinkPad R51", "Georges Herber <gherber at gmail.com>"),
++E("IBM", "1829EHG", "IBM ThinkPad R51", "Wouter Cloetens <wouter at mind.be>"),
++E("IBM", "1829R6G", "IBM ThinkPad R51", "Sten Heinze"),
++E("IBM", "1836Q6U", "IBM ThinkPad R51", "Eugene Pavlovsky"),
++E("IBM", "236696G", "IBM ThinkPad T30", "Jakob Schiotz <schiotz at fysik.dtu.dk>"),
++E("IBM", "236697G", "IBM ThinkPad T30", "Stephan Groß <st.gross at inf.tu-dresden.de>"),
++E("IBM", "2366JBG", "IBM ThinkPad T30", "Thomas M Steenholdt <tmus at tmus.dk>"),
++E("IBM", "2366MU9", "IBM ThinkPad T30", "Phillip Jones <philljones at us.ibm.com>"),
++E("IBM", "2366QU5", "IBM ThinkPad T30", "ChazeFroy <chazefroy at gmail.com>"),
++/* brads's 2366QU8 works, but dmidecode shows bogus data */
++E("IBM", "2366QU8", "IBM ThinkPad T30", "Brad Smith <brads at redhat.com>"),
++E("IBM", "23729CU", "IBM ThinkPad T40", "George Avrunin <avrunin at math.umass.edu>"),
++E("IBM", "237314U", "IBM ThinkPad T40", "Dmitriy Zavin <dzavin at yahoo.com>"),
++E("IBM", "23731FG", "IBM ThinkPad T41", "Aivo Prykk <aivo.prykk at mail.ee>"),
++E("IBM", "237322G", "IBM ThinkPad T40", "Michele Lamarca <lammic at gmail.com>"),
++E("IBM", "237325G", "IBM ThinkPad T40", "Klaus Kurzmann <mok at fluxnetz.de>"),
++E("IBM", "23732FG", "IBM ThinkPad T41", "Antti Andreimann <Antti.Andreimann at mail.ee>"),
++E("IBM", "23733HM", "IBM ThinkPad T41", "Grahame Bowland <grahame at angrygoats.net>"),
++E("IBM", "23734G2", "IBM ThinkPad T40", "Antti P Miettinen <apm at brigitte.dna.fi>"),
++E("IBM", "23737JU", "IBM ThinkPad T41", "Matthew Saltzman <mjs at clemson.edu>"),
++E("IBM", "23738CG", "IBM ThinkPad T40", "Pete Toscano <pete at verisignlabs.com>"),
++E("IBM", "237392G", "IBM ThinkPad T40", "Pete Toscano <pete at verisignlabs.com>"),
++E("IBM", "237394G", "IBM ThinkPad T40", "Manuel Carro <mcarro at fi.upm.es>"),
++E("IBM", "237394U", "IBM ThinkPad T40", "Pete Toscano <pete at verisignlabs.com>"),
++E("IBM", "23739FU", "IBM ThinkPad T41", "Peter Jones <pjones at redhat.com>"),
++E("IBM", "23739HG", "IBM ThinkPad T41", "Chris Vanden Berghe <Chris at VandenBerghe.org>"),
++E("IBM", "23739HU", "IBM ThinkPad T41", "Ajay Ramaswamy <ajay at ramaswamy.net>"),
++E("IBM", "2373BU7", "IBM ThinkPad T40", "Peter Jones <pjones at redhat.com>"),
++E("IBM", "2373F2G", "IBM ThinkPad T42", "Isaac Wilcox"),
++E("IBM", "2373FWG", "IBM ThinkPad T42", "Jerome Poggi <Jerome.Poggi at hsc.fr> and Pete Toscano <pete at verisignlabs.com>"),
++E("IBM", "2373G1G", "IBM ThinkPad T40p", "Juerg Billeter <j at bitron.ch>"),
++E("IBM", "2373G1U", "IBM ThinkPad T40p", "Bill Nottingham <notting at redhat.com>"),
++E("IBM", "2373G3G", "IBM ThinkPad T40p", "Hartwig, Thomas <t.hartwig at itth.com>"),
++E("IBM", "2373GEU", "IBM ThinkPad T41p", "Eric Benson <eric_a_benson at yahoo.com>"),
++E("IBM", "2373HU6", "IBM ThinkPad T41", "David Zeuthen <davidz at redhat.com>"),
++E("IBM", "2373JTU", "IBM ThinkPad T42", "Dwight Barkley <barkley at maths.warwick.ac.uk>"),
++E("IBM", "2373MU4", "IBM ThinkPad T40", "Vernon Mauery <vernux at us.ibm.com>"),
++E("IBM", "2373RU1", "IBM ThinkPad T40", "Adam Glasgall <adam at simons-rock.edu>"),
++E("IBM", "2373TG5", "IBM ThinkPad T41", "Paul Ionescu <i_p_a_u_l at yahoo.com>"),
++E("IBM", "2373XNX", "IBM ThinkPad T41", "Ajay Ramaswamy <ajay at ramaswamy.net>"),
++E("IBM", "23746VU", "IBM ThinkPad T42", "Tim Hull <thully at cyberspace.org>"),
++E("IBM", "2374CTO", "IBM ThinkPad T42", "Johannes Hansen"),
++E("IBM", "2374ZEP", "IBM ThinkPad T42", "Johannes Hansen"),
++E("IBM", "2378DEU", "IBM ThinkPad T41", "obi <graziano at cs.ucsb.edu>"),
++E("IBM", "2378DLU", "IBM ThinkPad T41", "Paul Stanisci <paul at stanisci.ca>"),
++E("IBM", "2378DUU", "IBM ThinkPad T42", "Austin Clements <amdragon+osdlbugzilla at mit.edu>"),
++E("IBM", "2378R2U", "IBM ThinkPad T42", "Ulrich Drepper <drepper at redhat.com>"),
++E("IBM", "2378RBF", "IBM ThinkPad T42", "Nicolas Dufresne <nicolas.dufresne at usherbrooke.ca>"),
++E("IBM", "2378RBU", "IBM ThinkPad T42", "Nicolas Dufresne <nicolas.dufresne at usherbrooke.ca>"),
++E("IBM", "2378XXE", "IBM ThinkPad T42", "Tom Marshall"),
++E("IBM", "2379D6U", "IBM ThinkPad T41", "anonymous"),
++E("IBM", "2379DJU", "IBM ThinkPad T41", "Volker Braun <vbraun at physics.upenn.edu>"),
++E("IBM", "2658BQG", "IBM ThinkPad R32", "Frank Otto <Frank.Otto at tc.pci.uni-heidelberg.de>"),
++E("IBM", "26725KU", "IBM ThinkPad X31", "Chris Lee <clee at redhat.com>"),
++E("IBM", "2672A9U", "IBM ThinkPad X31", "Jeremy Katz <katzj at redhat.com>"),
++E("IBM", "2672JHG", "IBM ThinkPad X31", "Daniel P. Berrange <berrange at redhat.com>"),
++E("IBM", "2672RU3", "IBM ThinkPad X31", "Chris Blizzard <blizzard at redhat.com>"),
++		/* IBM ThinkPad X31 2672-XXH -> works, but doesn't fix the LCD 
++		   backlight on during S3 issue. */
++E("IBM", "2672XXH", "IBM ThinkPad X31", "Henrik Brix Andersen <brix at gentoo.org>"),
++E("IBM", "27223GG", "IBM ThinkPad R40", "Frank Schmitt <tonne2004 at gehheimdienst.de>"),
++E("IBM", "27225MG", "IBM ThinkPad R40", "Nils Trebing <nils.trebing at uni-konstanz.de>"),
++E("IBM", "27226YU", "IBM ThinkPad R40", "Rushi Bhatt"),
++E("IBM", "2722B3G", "IBM ThinkPad R40", "Pete Toscano <pete at verisignlabs.com>"),
++E("IBM", "2722CDG", "IBM ThinkPad R40", "Meik Hellmund <hellmund at math.uni-leipzig.de>"),
++{ },
++/* Negative reports: */
++/* E("IBM", "2373KUU", "IBM ThinkPad T42p", "Dax Kelson <dax at gurulabs.com>"), */
++#undef E
+--- linux-2.6.15.i686/drivers/video/aty/radeon_pm.c.backlight	2006-03-01 13:22:06.000000000 -0500
++++ linux-2.6.15.i686/drivers/video/aty/radeon_pm.c	2006-03-01 13:33:47.000000000 -0500
+@@ -25,8 +25,26 @@
  #include <asm/pmac_feature.h>
  #endif
  
@@ -21,513 +99,7 @@
 + * vendor and product codes for Your laptop.
 + */
 +static struct dmi_system_id __devinitdata radeonfb_dmi_table[] = {
-+
-+	{
-+		/* 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 = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2366MU9"),
-+		},
-+	},
-+	{
-+		/* 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, "236696G"),
-+		},
-+	},
-+	{
-+		/* 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, "2366JBG"),
-+		},
-+	},
-+	{
-+		/* 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, "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"),
-+		},
-+	},
-+	{
-+		/* Reported by Antti P Miettinen <apm at brigitte.dna.fi> */
-+		.ident = "IBM ThinkPad T40 (2373-4G2)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "23734G2"),
-+	      },
-+	},
-+	{
-+		/* Reported by Pete Toscano <pete at verisignlabs.com> */
-+		.ident = "IBM ThinkPad T40 (2373-92G)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "237392G"),
-+	      },
-+	},
-+	{
-+		/* Reported by Pete Toscano <pete at verisignlabs.com> */
-+		.ident = "IBM ThinkPad T40 (2373-8CG)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "23738CG"),
-+		},
-+	},
-+	{
-+		/* Reported by Pete Toscano <pete at verisignlabs.com> */
-+		.ident = "IBM ThinkPad T40 (2373-94U)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "237394U"),
-+		},
-+	},
-+	{
-+		/* Reported by Manuel Carro <mcarro at fi.upm.es> */
-+		.ident = "IBM ThinkPad T40 (2373-94G)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "237394G"),
-+		},
-+	},
-+	{
-+		/* Reported by Peter Jones <pjones at redhat.com> */
-+		.ident = "IBM ThinkPad T40 (2373-BU7)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373BU7"),
-+		},
-+	},
-+	{
-+		/* 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, "2373MU4"),
-+		},
-+	},
-+	{
-+		/* 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, "237322G"),
-+		},
-+	},
-+	{
-+		/* 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, "2373RU1"),
-+		},
-+	},
-+	{
-+		/* Reported by Juerg Billeter <j at bitron.ch> */
-+		.ident = "IBM ThinkPad T40p (2373-G1G)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373G1G"),
-+		},
-+	},
-+	{
-+		/* Reported by Bill Nottingham <notting at redhat.com> */
-+		.ident = "IBM ThinkPad T40p (2373-G1U)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373G1U"),
-+		},
-+	},
-+	{
-+		/* Reported by Hartwig, Thomas <t.hartwig at itth.com> */
-+		.ident = "IBM ThinkPad T40p (2373-G3G)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373G3G"),
-+		},
-+	},
-+
-+	{
-+		/* 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, "23732FG"),
-+		},
-+	},
-+	{
-+		/* 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, "23739FU"),
-+		},
-+	},
-+	{
-+		/* 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, "23739HU"),
-+	      },
-+	},
-+	{
-+		/* Reported by Ajay Ramaswamy <ajay at ramaswamy.net> */
-+		.ident = "IBM ThinkPad T41 (2373-XNX)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373XNX"),
-+	      },
-+	},
-+	{
-+		/* Reported by obi <graziano at cs.ucsb.edu> */
-+		.ident = "IBM ThinkPad T41 (2378-DEU)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2378DEU"),
-+		},
-+	},
-+	{
-+		/* Reported by Volker Braun <vbraun at physics.upenn.edu> */
-+		.ident = "IBM ThinkPad T41 (2379-DJU)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2379DJU"),
-+		},
-+	},
-+	{
-+		/* 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"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2373FWG"),
-+		},
-+	},
-+	{
-+		/* 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 = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "27223GG"),
-+		},
-+	},
-+	{
-+		/* 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 = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "27225MG"),
-+		},
-+	},
-+	{
-+		/* 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, "2722CDG"),
-+		},
-+	},
-+	{
-+		/* 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, "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)",
-+		.matches = {
-+			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
-+			DMI_MATCH(DMI_PRODUCT_NAME, "2672XXH"),
-+		},
-+	},
-+	{
-+		/* 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 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 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 
-+	   backlight on during S3 issue.
-+	   Reported by: Henrik Brix Andersen <brix at gentoo.org> */
++#include "radeon_pm_whitelist.h"
 +};
 +
 +extern int radeon_force_sleep;
@@ -536,7 +108,7 @@
  static void radeon_pm_disable_dynamic_mode(struct radeonfb_info *rinfo)
  {
  	u32 tmp;
-@@ -852,7 +1376,14 @@ static void radeon_pm_setup_for_suspend(
+@@ -852,7 +870,14 @@
  	/* 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);
@@ -552,7 +124,7 @@
  	/* AGP PLL control */
  	if (rinfo->family <= CHIP_FAMILY_RV280) {
  		OUTREG(BUS_CNTL1, INREG(BUS_CNTL1) |  BUS_CNTL1__AGPCLK_VALID);
-@@ -864,6 +1395,7 @@ static void radeon_pm_setup_for_suspend(
+@@ -864,6 +889,7 @@
  		OUTREG(BUS_CNTL1, INREG(BUS_CNTL1));
  		OUTREG(BUS_CNTL1, (INREG(BUS_CNTL1) & ~0x4000) | 0x8000);
  	}
@@ -560,7 +132,7 @@
  
  	OUTREG(CRTC_OFFSET_CNTL, (INREG(CRTC_OFFSET_CNTL)
  				  & ~CRTC_OFFSET_CNTL__CRTC_STEREO_SYNC_OUT_EN));
-@@ -3322,6 +3322,29 @@ void radeonfb_pm_init(struct radeonfb_in
+@@ -2790,6 +2816,29 @@
  	}
  #endif /* defined(CONFIG_PPC_PMAC) */
  #endif /* defined(CONFIG_PM) */
@@ -590,8 +162,8 @@
  }
  
  void radeonfb_pm_exit(struct radeonfb_info *rinfo)
---- 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
+--- linux-2.6.15.i686/drivers/video/aty/radeon_base.c.backlight	2006-03-01 13:22:06.000000000 -0500
++++ linux-2.6.15.i686/drivers/video/aty/radeon_base.c	2006-03-01 13:22:27.000000000 -0500
 @@ -272,6 +272,9 @@
  #ifdef CONFIG_MTRR
  static int nomtrr = 0;
@@ -602,7 +174,7 @@
  
  /*
   * prototypes
-@@ -2530,6 +2533,10 @@
+@@ -2615,6 +2618,10 @@
  			force_measure_pll = 1;
  		} else if (!strncmp(this_opt, "ignore_edid", 11)) {
  			ignore_edid = 1;
@@ -613,7 +185,7 @@
  		} else
  			mode_option = this_opt;
  	}
-@@ -2585,3 +2592,7 @@
+@@ -2670,3 +2677,7 @@
  MODULE_PARM_DESC(panel_yres, "int: set panel yres");
  module_param(mode_option, charp, 0);
  MODULE_PARM_DESC(mode_option, "Specify resolution as \"<xres>x<yres>[-<bpp>][@<refresh>]\" ");

linux-2.6-sata-promise-pata-ports.patch:
 drivers/scsi/libata-core.c  |    1 
 drivers/scsi/sata_promise.c |   52 ++++++++++++++++++++++++++++++++++++++------
 include/linux/libata.h      |    1 
 3 files changed, 48 insertions(+), 6 deletions(-)

Index: linux-2.6-sata-promise-pata-ports.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-sata-promise-pata-ports.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- linux-2.6-sata-promise-pata-ports.patch	28 Mar 2006 16:14:09 -0000	1.6
+++ linux-2.6-sata-promise-pata-ports.patch	20 Jun 2006 18:25:40 -0000	1.7
@@ -22,7 +22,7 @@
 diff -Nru a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
 --- a/drivers/scsi/sata_promise.c	2006-02-08 10:08:08.000000000 -0700
 +++ b/drivers/scsi/sata_promise.c	2006-02-08 11:26:47.000000000 -0700
-@@ -165,7 +165,7 @@
+@@ -172,7 +172,7 @@
  	/* board_2037x */
  	{
  		.sht		= &pdc_ata_sht,
@@ -31,7 +31,7 @@
  		.pio_mask	= 0x1f, /* pio0-4 */
  		.mwdma_mask	= 0x07, /* mwdma0-2 */
  		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
-@@ -322,15 +322,34 @@
+@@ -360,15 +360,34 @@
  
  static void pdc_sata_phy_reset(struct ata_port *ap)
  {
@@ -70,7 +70,7 @@
  
  	pdc_reset_port(ap);
  	ata_port_probe(ap);
-@@ -646,6 +665,7 @@
+@@ -673,6 +692,7 @@
  	unsigned int board_idx = (unsigned int) ent->driver_data;
  	int pci_dev_busy = 0;
  	int rc;
@@ -78,7 +78,7 @@
  
  	if (!printed_version++)
  		dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
-@@ -705,6 +725,9 @@
+@@ -741,6 +761,9 @@
  	probe_ent->port[0].scr_addr = base + 0x400;
  	probe_ent->port[1].scr_addr = base + 0x500;
  
@@ -88,7 +88,7 @@
  	/* notice 4-port boards */
  	switch (board_idx) {
  	case board_20319:
-@@ -715,9 +738,23 @@
+@@ -755,13 +778,27 @@
  
  		probe_ent->port[2].scr_addr = base + 0x600;
  		probe_ent->port[3].scr_addr = base + 0x700;
@@ -96,6 +96,10 @@
 +		probe_ent->port_flags[2] = ATA_FLAG_SATA;	/* pata fix */
 +		probe_ent->port_flags[3] = ATA_FLAG_SATA;	/* pata fix */
  		break;
+	case board_2057x:
+		/* Override hotplug offset for SATAII150 */
+		hp->hotplug_offset = PDC2_SATA_PLUG_CSR;
+		/* Fall through */
  	case board_2037x:
 -		probe_ent->n_ports = 2;
 +/*		probe_ent->n_ports = 2; */			/* pata fix */
@@ -113,7 +117,7 @@
  		break;
  	case board_20771:
  		probe_ent->n_ports = 2;
-@@ -730,6 +767,9 @@
+@@ -774,6 +811,9 @@
  
  		probe_ent->port[2].scr_addr = base + 0x600;
  		probe_ent->port[3].scr_addr = base + 0x700;
@@ -126,11 +130,12 @@
 diff -Nru a/include/linux/libata.h b/include/linux/libata.h
 --- a/include/linux/libata.h	2006-02-08 11:40:54.000000000 -0700
 +++ b/include/linux/libata.h	2006-02-08 11:45:02.000000000 -0700
-@@ -237,6 +237,7 @@
+@@ -281,6 +281,7 @@
  	unsigned long		irq;
  	unsigned int		irq_flags;
  	unsigned long		host_flags;
 +	unsigned long		port_flags[ATA_MAX_PORTS];	/* pata fix */
+	unsigned long		host_set_flags;
  	void __iomem		*mmio_base;
  	void			*private_data;
  };

linux-2.6-sched-up-migration-cost.patch:
 sched.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

Index: linux-2.6-sched-up-migration-cost.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-sched-up-migration-cost.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-sched-up-migration-cost.patch	28 Mar 2006 16:14:09 -0000	1.1
+++ linux-2.6-sched-up-migration-cost.patch	20 Jun 2006 18:25:40 -0000	1.2
@@ -1,12 +1,24 @@
---- linux-2.6/kernel/sched.c~	2006-02-10 17:15:29.000000000 -0500
-+++ linux-2.6/kernel/sched.c	2006-02-10 17:18:19.000000000 -0500
-@@ -5459,7 +5459,8 @@ static void calibrate_migration_costs(co
+--- linux-2.6.16.noarch/kernel/sched.c~	2006-04-24 19:30:13.000000000 -0400
++++ linux-2.6.16.noarch/kernel/sched.c	2006-04-24 19:32:49.000000000 -0400
+@@ -5518,13 +5518,15 @@ static void calibrate_migration_costs(co
  #endif
  		);
  	if (system_state == SYSTEM_BOOTING) {
 -		printk("migration_cost=");
-+		if (num_online_cpus() > 1)
+-		for (distance = 0; distance <= max_distance; distance++) {
+-			if (distance)
+-				printk(",");
+-			printk("%ld", (long)migration_cost[distance] / 1000);
++		if (num_online_cpus() > 1) {
 +			printk("migration_cost=");
- 		for (distance = 0; distance <= max_distance; distance++) {
- 			if (distance)
- 				printk(",");
++			for (distance = 0; distance <= max_distance; distance++) {
++				if (distance)
++					printk(",");
++				printk("%ld", (long)migration_cost[distance] / 1000);
++			}
++			printk("\n");
+ 		}
+-		printk("\n");
+ 	}
+ 	j1 = jiffies;
+ 	if (migration_debug)

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

Index: linux-2.6-tux.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6-tux.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- linux-2.6-tux.patch	28 Mar 2006 16:14:09 -0000	1.6
+++ linux-2.6-tux.patch	20 Jun 2006 18:25:40 -0000	1.7
@@ -453,14 +453,12 @@
  
  #define __NR_security			185
  __SYSCALL(__NR_security, sys_ni_syscall)
-Index: linux-tux.q/include/linux/buffer_head.h
-===================================================================
---- linux-tux.q.orig/include/linux/buffer_head.h
-+++ linux-tux.q/include/linux/buffer_head.h
-@@ -201,6 +201,7 @@ int generic_cont_expand(struct inode *in
+--- linux-2.6.16.noarch/include/linux/buffer_head.h~	2006-03-27 13:32:25.000000000 -0500
++++ linux-2.6.16.noarch/include/linux/buffer_head.h	2006-03-27 13:32:30.000000000 -0500
+@@ -204,6 +204,7 @@ int generic_cont_expand(struct inode *in
  int generic_cont_expand_simple(struct inode *inode, loff_t size);
  int block_commit_write(struct page *page, unsigned from, unsigned to);
- int block_sync_page(struct page *);
+ void block_sync_page(struct page *);
 +void flush_inode_pages (struct inode * inode);
  sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *);
  int generic_commit_write(struct file *, struct page *, unsigned, unsigned);
@@ -528,15 +526,15 @@
 ===================================================================
 --- linux-tux.q.orig/include/linux/fs.h
 +++ linux-tux.q/include/linux/fs.h
-@@ -1575,7 +1575,7 @@ ssize_t generic_file_write_nolock(struct
+@@ -1610,7 +1610,7 @@ ssize_t generic_file_write_nolock(struct
  extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *);
  extern void do_generic_mapping_read(struct address_space *mapping,
  				    struct file_ra_state *, struct file *,
 -				    loff_t *, read_descriptor_t *, read_actor_t);
 +				    loff_t *, read_descriptor_t *, read_actor_t, int);
- extern void
- file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
- extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, 
+ 
+ /* fs/splice.c */
+ extern ssize_t generic_file_splice_read(struct file *, loff_t *,
 @@ -1607,14 +1607,15 @@ static inline int xip_truncate_page(stru
  
  static inline void do_generic_file_read(struct file * filp, loff_t *ppos,
@@ -625,27 +623,24 @@
 ===================================================================
 --- linux-tux.q.orig/include/linux/socket.h
 +++ linux-tux.q/include/linux/socket.h
-@@ -301,6 +301,11 @@ extern int move_addr_to_user(void *kaddr
+@@ -301,6 +301,10 @@ extern int move_addr_to_user(void *kaddr
  extern int move_addr_to_kernel(void __user *uaddr, int ulen, void *kaddr);
  extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data);
  
 +struct socket;
-+struct file * sock_map_file(struct socket *sock);
 +extern int sock_map_fd(struct socket *sock);
 +extern struct socket *sockfd_lookup(int fd, int *err);
 +
  #endif
  #endif /* not kernel and not glibc */
  #endif /* _LINUX_SOCKET_H */
-Index: linux-tux.q/include/linux/sysctl.h
-===================================================================
---- linux-tux.q.orig/include/linux/sysctl.h
-+++ linux-tux.q/include/linux/sysctl.h
-@@ -211,6 +211,7 @@ enum
- 	NET_SCTP=17,
+--- linux-2.6.16.noarch/include/linux/sysctl.h~	2006-03-21 15:04:07.000000000 -0500
++++ linux-2.6.16.noarch/include/linux/sysctl.h	2006-03-21 15:04:27.000000000 -0500
+@@ -215,6 +215,7 @@ enum
  	NET_LLC=18,
  	NET_NETFILTER=19,
-+	NET_TUX=20,
+ 	NET_DCCP=20,
++	NET_TUX=21,
  };
  
  /* /proc/sys/kernel/random */
@@ -2012,18 +2007,16 @@
  
  /* Send _single_ skb sitting at the send head. This function requires
   * true push pending frames to setup probe timer etc.
-Index: linux-tux.q/net/socket.c
-===================================================================
---- linux-tux.q.orig/net/socket.c
-+++ linux-tux.q/net/socket.c
+--- linux-2.6.16.noarch/net/socket.c~	2006-03-21 15:05:05.000000000 -0500
++++ linux-2.6.16.noarch/net/socket.c	2006-03-21 15:05:17.000000000 -0500
 @@ -68,6 +68,7 @@
  #include <linux/netdevice.h>
  #include <linux/proc_fs.h>
  #include <linux/seq_file.h>
 +#include <net/tux.h>
+ #include <linux/mutex.h>
  #include <linux/wanrouter.h>
  #include <linux/if_bridge.h>
- #include <linux/if_frad.h>
 @@ -123,7 +124,7 @@ static ssize_t sock_sendpage(struct file
   *	in the operation structures but are done directly via the socketcall() multiplexor.
   */
@@ -2033,163 +2026,6 @@
  	.owner =	THIS_MODULE,
  	.llseek =	no_llseek,
  	.aio_read =	sock_aio_read,
-@@ -348,72 +349,6 @@ static struct dentry_operations sockfs_d
- 	.d_delete =	sockfs_delete_dentry,
- };
- 
--/*
-- *	Obtains the first available file descriptor and sets it up for use.
-- *
-- *	This function creates file structure and maps it to fd space
-- *	of current process. On success it returns file descriptor
-- *	and file struct implicitly stored in sock->file.
-- *	Note that another thread may close file descriptor before we return
-- *	from this function. We use the fact that now we do not refer
-- *	to socket after mapping. If one day we will need it, this
-- *	function will increment ref. count on file by 1.
-- *
-- *	In any case returned fd MAY BE not valid!
-- *	This race condition is unavoidable
-- *	with shared fd spaces, we cannot solve it inside kernel,
-- *	but we take care of internal coherence yet.
-- */
--
--int sock_map_fd(struct socket *sock)
--{
--	int fd;
--	struct qstr this;
--	char name[32];
--
--	/*
--	 *	Find a file descriptor suitable for return to the user. 
--	 */
--
--	fd = get_unused_fd();
--	if (fd >= 0) {
--		struct file *file = get_empty_filp();
--
--		if (!file) {
--			put_unused_fd(fd);
--			fd = -ENFILE;
--			goto out;
--		}
--
--		this.len = sprintf(name, "[%lu]", SOCK_INODE(sock)->i_ino);
--		this.name = name;
--		this.hash = SOCK_INODE(sock)->i_ino;
--
--		file->f_dentry = d_alloc(sock_mnt->mnt_sb->s_root, &this);
--		if (!file->f_dentry) {
--			put_filp(file);
--			put_unused_fd(fd);
--			fd = -ENOMEM;
--			goto out;
--		}
--		file->f_dentry->d_op = &sockfs_dentry_operations;
--		d_add(file->f_dentry, SOCK_INODE(sock));
--		file->f_vfsmnt = mntget(sock_mnt);
--		file->f_mapping = file->f_dentry->d_inode->i_mapping;
--
--		sock->file = file;
--		file->f_op = SOCK_INODE(sock)->i_fop = &socket_file_ops;
--		file->f_mode = FMODE_READ | FMODE_WRITE;
--		file->f_flags = O_RDWR;
--		file->f_pos = 0;
--		file->private_data = sock;
--		fd_install(fd, file);
--	}
--
--out:
--	return fd;
--}
--
- /**
-  *	sockfd_lookup	- 	Go from a file number to its socket slot
-  *	@fd: file handle
-@@ -457,6 +392,83 @@ struct socket *sockfd_lookup(int fd, int
- 	return sock;
- }
- 
-+struct file * sock_map_file(struct socket *sock)
-+{
-+	struct file *file;
-+	struct qstr this;
-+	char name[32];
-+
-+	file = get_empty_filp();
-+
-+	if (!file)
-+		return ERR_PTR(-ENFILE);
-+
-+	this.len = sprintf(name, "[%lu]", SOCK_INODE(sock)->i_ino);
-+	this.name = name;
-+	this.hash = SOCK_INODE(sock)->i_ino;
-+
-+	file->f_dentry = d_alloc(sock_mnt->mnt_sb->s_root, &this);
-+	if (!file->f_dentry) {
-+		put_filp(file);
-+		return ERR_PTR(-ENOMEM);
-+	}
-+	file->f_dentry->d_op = &sockfs_dentry_operations;
-+	d_add(file->f_dentry, SOCK_INODE(sock));
-+	file->f_vfsmnt = mntget(sock_mnt);
-+	file->f_mapping = file->f_dentry->d_inode->i_mapping;
-+
-+	if (sock->file)
-+		BUG();
-+	sock->file = file;
-+	file->f_op = SOCK_INODE(sock)->i_fop = &socket_file_ops;
-+	file->f_mode = FMODE_READ | FMODE_WRITE;
-+	file->f_flags = O_RDWR;
-+	file->f_pos = 0;
-+	file->private_data = sock;
-+
-+	return file;
-+}
-+
-+/*
-+ *	Obtains the first available file descriptor and sets it up for use.
-+ *
-+ *	This function creates file structure and maps it to fd space
-+ *	of current process. On success it returns file descriptor
-+ *	and file struct implicitly stored in sock->file.
-+ *	Note that another thread may close file descriptor before we return
-+ *	from this function. We use the fact that now we do not refer
-+ *	to socket after mapping. If one day we will need it, this
-+ *	function will increment ref. count on file by 1.
-+ *
-+ *	In any case returned fd MAY BE not valid!
-+ *	This race condition is unavoidable
-+ *	with shared fd spaces, we cannot solve it inside kernel,
-+ *	but we take care of internal coherence yet.
-+ */
-+
-+int sock_map_fd(struct socket *sock)
-+{
-+	int fd;
-+	struct file *file;
-+
-+	/*
-+	 *	Find a file descriptor suitable for return to the user.
-+	 */
-+
-+	fd = get_unused_fd();
-+	if (fd < 0)
-+		return fd;
-+
-+	file = sock_map_file(sock);
-+	if (IS_ERR(file)) {
-+		put_unused_fd(fd);
-+		return PTR_ERR(file);
-+	}
-+	fd_install(fd, file);
-+
-+	return fd;
-+}
-+
- /**
-  *	sock_alloc	-	allocate a socket
-  *	
 @@ -465,7 +477,7 @@ struct socket *sockfd_lookup(int fd, int
   *	NULL is returned.
   */
@@ -6862,12 +6698,12 @@
 +		GOTO_ERR_no_unlock;
 +	mimetype[ret] = 0;
 +	Dprintk("got MIME type: %s.\n", mimetype);
-+        ret = strncpy_from_user(expires, u_info->cache_control, MAX_URI_LEN);
-+        if (ret >= 0)
-+        	expires[ret] = 0;
++       ret = strncpy_from_user(expires, u_info->cache_control, MAX_URI_LEN);
++       if (ret >= 0)
++		expires[ret] = 0;
 +	else
 +		expires[0] = 0;
-+        Dprintk("got expires header: %s.\n", expires);
++       Dprintk("got expires header: %s.\n", expires);
 +
 +	add_mimetype(extension, mimetype, expires);
 +	ret = 0;
@@ -7005,8 +6841,8 @@
 +			TUX_BUG();
 +
 +	if (!capable(CAP_SYS_ADMIN)
-+		 	&& (action != TUX_ACTION_CONTINUE_REQ) &&
-+		 		(action != TUX_ACTION_STOPTHREAD))
++			&& (action != TUX_ACTION_CONTINUE_REQ) &&
++				(action != TUX_ACTION_STOPTHREAD))
 +		goto userspace_actions;
 +
 +	switch (action) {
@@ -9470,7 +9306,7 @@
 +		req, bytes, ftp_bytes_sent, ftp_bandwidth);
 +}
 +
-+#define update_bandwidth(req,bytes) 				\
++#define update_bandwidth(req,bytes)				\
 +	do {							\
 +		if (unlikely(tux_ftp_login_message))		\
 +			__update_bandwidth(req, bytes);		\
@@ -10720,7 +10556,7 @@
 +		icsk = inet_csk(data_sock->sk);
 +
 +		tp->nonagle = 2;
-+	       	Dprintk("PASV bind() ret: %d.\n", err);
++		Dprintk("PASV bind() ret: %d.\n", err);
 +		if (err < 0) {
 +			req_err(req);
 +			sock_release(data_sock);
@@ -10798,7 +10634,7 @@
 +				(struct sockaddr*)&addr, sizeof(addr));
 +		current->cap_effective = saved_cap;
 +
-+	       	Dprintk("ACTIVE bind() ret: %d.\n", err);
++		Dprintk("ACTIVE bind() ret: %d.\n", err);
 +		if (err) {
 +			sock_release(data_sock);
 +			req_err(req);
@@ -11346,7 +11182,7 @@
 +				GOTO_REDIR;
 +		}
 +
-+#define PARSE_STR_FIELD(char,field,str,len) 				\
++#define PARSE_STR_FIELD(char,field,str,len)				\
 +	if (PARSE_TOKEN(curr,field,left)) {				\
 +		req->str = curr;					\
 +		SKIP_LINE(curr,left);					\
@@ -13190,7 +13026,7 @@
 +
 +static struct request_sock_ops tux_req =
 +{
-+ 	.destructor = &nop_destructor,
++	.destructor = &nop_destructor,
 +};
 +
 +static int redirect_sock (tux_req_t *req, const int port)
@@ -13495,13 +13331,13 @@
 +	s++;
 +	if ((s[0]!='G')||(s[1]!='M')||(s[2]!='T'))
 +	{
-+  		return 0; /* No GMT */
-+  	}
++		return 0; /* No GMT */
++	}
 +
 +	if (Y<TUX_YEAROFFSET) Y = TUX_YEAROFFSET;
 +	if (Y>TUX_YEAROFFSET+9) Y = TUX_YEAROFFSET+9;
 +
-+	Temp = 	TimeDays[Y-TUX_YEAROFFSET][M];
++	Temp = TimeDays[Y-TUX_YEAROFFSET][M];
 +	Temp += D*86400+H*3600+Min*60+S;
 +
 +	return Temp;
@@ -13686,7 +13522,7 @@
 +			/* Wed Jun  9 01:29:59 1993 */
 +
 +			if (str_len < 24)
-+                        	return -1;
++				return -1;
 +
 +			mon = make_month(str+4);
 +			mday = make_num(str+8);


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/sources,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -r1.176 -r1.177
--- sources	5 Jun 2006 18:33:51 -0000	1.176
+++ sources	20 Jun 2006 18:25:40 -0000	1.177
@@ -1,2 +1,2 @@
-9a91b2719949ff0856b40bc467fd47be  linux-2.6.16.tar.bz2
-391e7410fb03a533d40d1a1620465ad7  patch-2.6.16.20.bz2
+37ddefe96625502161f075b9d907f21e  linux-2.6.17.tar.bz2
+f7197c29beb5bd28b6f566b58260ece8  patch-2.6.17.1.bz2


Index: upstream
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/upstream,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- upstream	5 Jun 2006 18:33:51 -0000	1.117
+++ upstream	20 Jun 2006 18:25:40 -0000	1.118
@@ -1,2 +1,2 @@
-linux-2.6.16.tar.bz2
-patch-2.6.16.20.bz2
+linux-2.6.17.tar.bz2
+patch-2.6.17.1.bz2


--- linux-2.6-8250-16c950-faster.patch DELETED ---


--- linux-2.6-NFSD-writes-shouldnt-clobber-utimes.patch DELETED ---


--- linux-2.6-audit-new-msg-types.patch DELETED ---


--- linux-2.6-autofs-pathlookup.patch DELETED ---


--- linux-2.6-bzimage.patch DELETED ---


--- linux-2.6-crashdump-common.patch DELETED ---


--- linux-2.6-crashdump-reboot-exports.patch DELETED ---


--- linux-2.6-debug-dual-line-backtrace.patch DELETED ---


--- linux-2.6-debug-pm-pci.patch DELETED ---


--- linux-2.6-debug-reference-discarded-return-result.patch DELETED ---


--- linux-2.6-debug-slab-leaks.patch DELETED ---


--- linux-2.6-defaults-enable-sata-atapi.patch DELETED ---


--- linux-2.6-diskdump.patch DELETED ---


--- linux-2.6-drm-cripple-r300.patch DELETED ---


--- linux-2.6-dump_smp_call_function.patch DELETED ---


--- linux-2.6-ide-cd-shutup.patch DELETED ---


--- linux-2.6-mv643xx-compile-fix.patch DELETED ---


--- linux-2.6-net-ipw2200-hwcrypto.patch DELETED ---


--- linux-2.6-net-wireless-features.patch DELETED ---


--- linux-2.6-netconsole.patch DELETED ---


--- linux-2.6-netdump.patch DELETED ---


--- linux-2.6-obsolete-idescsi-warning.patch DELETED ---


--- linux-2.6-pcmcia-disable-warning.patch DELETED ---


--- linux-2.6-pwc-powerup-by-default.patch DELETED ---


--- linux-2.6-scsi-advansys-enabler.patch DELETED ---


--- linux-2.6-selinux-disable-attributes-no-policy.patch DELETED ---


--- linux-2.6-selinux-selinuxfs-hard-link-count.patch DELETED ---


--- linux-2.6-signal-trampolines-unwind-info.patch DELETED ---


--- linux-2.6-smsc-ircc2-pnp.patch DELETED ---


--- linux-2.6-x86-tune-p4.patch DELETED ---


--- linux-2.6.16.tar.bz2.sign DELETED ---


--- patch-2.6.16.20.bz2.sign DELETED ---




More information about the fedora-cvs-commits mailing list