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

diff -urN linux-2.4.22-rc1/Documentation/Configure.help linux-2.4.22-rc2/Documentation/Configure.help
--- linux-2.4.22-rc1/Documentation/Configure.help	2003-08-08 13:50:56.000000000 -0700
+++ linux-2.4.22-rc2/Documentation/Configure.help	2003-08-08 13:51:07.000000000 -0700
@@ -3357,7 +3357,7 @@
   here. If MILO doesn't work on your system (true for Jensen
   motherboards), you can bypass it altogether and boot Linux directly
   from an SRM console; say Y here in order to do that. Note that you
-  won't be able to boot from an IDE disk using SRM.
+  won't be able to boot from an IDE disk using old versions of SRM.
 
   If unsure, say N.
 
diff -urN linux-2.4.22-rc1/Makefile linux-2.4.22-rc2/Makefile
--- linux-2.4.22-rc1/Makefile	2003-08-08 13:50:56.000000000 -0700
+++ linux-2.4.22-rc2/Makefile	2003-08-08 13:51:07.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 22
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc2
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.22-rc1/arch/alpha/kernel/core_cia.c linux-2.4.22-rc2/arch/alpha/kernel/core_cia.c
--- linux-2.4.22-rc1/arch/alpha/kernel/core_cia.c	2003-06-13 07:51:29.000000000 -0700
+++ linux-2.4.22-rc2/arch/alpha/kernel/core_cia.c	2003-08-08 13:51:07.000000000 -0700
@@ -47,15 +47,6 @@
 
 #define vip	volatile int  *
 
-/* Save CIA configuration data as the console had it set up.  */
-
-struct 
-{
-	unsigned int w_base;
-	unsigned int w_mask;
-	unsigned int t_base;
-} saved_config[4] __attribute((common));
-
 /*
  * Given a bus, device, and function number, compute resulting
  * configuration space address.  It is therefore not safe to have
@@ -610,6 +601,74 @@
 	goto exit;
 }
 
+#ifdef ALPHA_RESTORE_SRM_SETUP
+/* Save CIA configuration data as the console had it set up.  */
+struct 
+{
+	unsigned int hae_mem;
+	unsigned int hae_io;
+	unsigned int pci_dac_offset;
+	unsigned int err_mask;
+	unsigned int cia_ctrl;
+	unsigned int cia_cnfg;
+	struct {
+		unsigned int w_base;
+		unsigned int w_mask;
+		unsigned int t_base;
+	} window[4];
+} saved_config __attribute((common));
+
+void
+cia_save_srm_settings(int is_pyxis)
+{
+	int i;
+
+	/* Save some important registers. */
+	saved_config.err_mask       = *(vip)CIA_IOC_ERR_MASK;
+	saved_config.cia_ctrl       = *(vip)CIA_IOC_CIA_CTRL;
+	saved_config.hae_mem        = *(vip)CIA_IOC_HAE_MEM;
+	saved_config.hae_io         = *(vip)CIA_IOC_HAE_IO;
+	saved_config.pci_dac_offset = *(vip)CIA_IOC_PCI_W_DAC;
+
+	saved_config.cia_cnfg = is_pyxis ? *(vip)CIA_IOC_CIA_CNFG : 0;
+
+	/* Save DMA windows configuration. */
+	for (i = 0; i < 4; i++) {
+		saved_config.window[i].w_base = *(vip)CIA_IOC_PCI_Wn_BASE(i);
+		saved_config.window[i].w_mask = *(vip)CIA_IOC_PCI_Wn_MASK(i);
+		saved_config.window[i].t_base = *(vip)CIA_IOC_PCI_Tn_BASE(i);
+	}
+	mb();
+}
+
+void
+cia_restore_srm_settings(void)
+{
+	int i;
+
+	for (i = 0; i < 4; i++) {
+		*(vip)CIA_IOC_PCI_Wn_BASE(i) = saved_config.window[i].w_base;
+		*(vip)CIA_IOC_PCI_Wn_MASK(i) = saved_config.window[i].w_mask;
+		*(vip)CIA_IOC_PCI_Tn_BASE(i) = saved_config.window[i].t_base;
+	}
+
+	*(vip)CIA_IOC_HAE_MEM   = saved_config.hae_mem;
+	*(vip)CIA_IOC_HAE_IO    = saved_config.hae_io;
+	*(vip)CIA_IOC_PCI_W_DAC = saved_config.pci_dac_offset;	
+	*(vip)CIA_IOC_ERR_MASK  = saved_config.err_mask;
+	*(vip)CIA_IOC_CIA_CTRL  = saved_config.cia_ctrl;
+
+	if (saved_config.cia_cnfg) /* Must be pyxis. */
+		*(vip)CIA_IOC_CIA_CNFG  = saved_config.cia_cnfg;
+
+	mb();
+}
+#else /* ALPHA_RESTORE_SRM_SETUP */
+#define cia_save_srm_settings(p)	do {} while (0)
+#define cia_restore_srm_settings()	do {} while (0)
+#endif /* ALPHA_RESTORE_SRM_SETUP */
+
+
 static void __init
 do_init_arch(int is_pyxis)
 {
@@ -620,6 +679,9 @@
 	printk("pci: cia revision %d%s\n",
 	       cia_rev, is_pyxis ? " (pyxis)" : "");
 
+	if (alpha_using_srm)
+		cia_save_srm_settings(is_pyxis);
+
 	/* Set up error reporting.  */
 	temp = *(vip)CIA_IOC_ERR_MASK;
 	temp &= ~(CIA_ERR_CPU_PE | CIA_ERR_MEM_NEM | CIA_ERR_PA_PTE_INV
@@ -689,24 +751,6 @@
 		hose->dense_io_base = CIA_BW_IO - IDENT_ADDR;
 	}
 
-	/* Save CIA configuration data as the console had it set up.  */
-
-	saved_config[0].w_base = *(vip)CIA_IOC_PCI_W0_BASE;
-	saved_config[0].w_mask = *(vip)CIA_IOC_PCI_W0_MASK;
-	saved_config[0].t_base = *(vip)CIA_IOC_PCI_T0_BASE;
-
-	saved_config[1].w_base = *(vip)CIA_IOC_PCI_W1_BASE;
-	saved_config[1].w_mask = *(vip)CIA_IOC_PCI_W1_MASK;
-	saved_config[1].t_base = *(vip)CIA_IOC_PCI_T1_BASE;
-
-	saved_config[2].w_base = *(vip)CIA_IOC_PCI_W2_BASE;
-	saved_config[2].w_mask = *(vip)CIA_IOC_PCI_W2_MASK;
-	saved_config[2].t_base = *(vip)CIA_IOC_PCI_T2_BASE;
-
-	saved_config[3].w_base = *(vip)CIA_IOC_PCI_W3_BASE;
-	saved_config[3].w_mask = *(vip)CIA_IOC_PCI_W3_MASK;
-	saved_config[3].t_base = *(vip)CIA_IOC_PCI_T3_BASE;
-
 	/*
 	 * Set up the PCI to main memory translation windows.
 	 *
@@ -804,21 +848,8 @@
 void
 cia_kill_arch(int mode)
 {
-	*(vip)CIA_IOC_PCI_W0_BASE = saved_config[0].w_base;
-	*(vip)CIA_IOC_PCI_W0_MASK = saved_config[0].w_mask;
-	*(vip)CIA_IOC_PCI_T0_BASE = saved_config[0].t_base;
-
-	*(vip)CIA_IOC_PCI_W1_BASE = saved_config[1].w_base;
-	*(vip)CIA_IOC_PCI_W1_MASK = saved_config[1].w_mask;
-	*(vip)CIA_IOC_PCI_T1_BASE = saved_config[1].t_base;
-
-	*(vip)CIA_IOC_PCI_W2_BASE = saved_config[2].w_base;
-	*(vip)CIA_IOC_PCI_W2_MASK = saved_config[2].w_mask;
-	*(vip)CIA_IOC_PCI_T2_BASE = saved_config[2].t_base;
-
-	*(vip)CIA_IOC_PCI_W3_BASE = saved_config[3].w_base;
-	*(vip)CIA_IOC_PCI_W3_MASK = saved_config[3].w_mask;
-	*(vip)CIA_IOC_PCI_T3_BASE = saved_config[3].t_base;
+	if (alpha_using_srm)
+		cia_restore_srm_settings();
 }
 
 void __init
diff -urN linux-2.4.22-rc1/arch/alpha/kernel/core_lca.c linux-2.4.22-rc2/arch/alpha/kernel/core_lca.c
--- linux-2.4.22-rc1/arch/alpha/kernel/core_lca.c	2001-03-02 11:12:07.000000000 -0800
+++ linux-2.4.22-rc2/arch/alpha/kernel/core_lca.c	2003-08-08 13:51:07.000000000 -0700
@@ -282,7 +282,7 @@
 lca_pci_tbi(struct pci_controller *hose, dma_addr_t start, dma_addr_t end)
 {
 	wmb();
-	*(vip)LCA_IOC_TBIA = 0;
+	*(vulp)LCA_IOC_TBIA = 0;
 	mb();
 }
 
@@ -308,21 +308,25 @@
 	/*
 	 * Set up the PCI to main memory translation windows.
 	 *
-	 * Window 0 is direct access 1GB at 1GB
-	 * Window 1 is scatter-gather 8MB at 8MB (for isa)
+	 * Mimic the SRM settings for the direct-map window.
+	 *   Window 0 is scatter-gather 8MB at 8MB (for isa).
+	 *   Window 1 is direct access 1GB at 1GB.
+	 *
+	 * Note that we do not try to save any of the DMA window CSRs
+	 * before setting them, since we cannot read those CSRs on LCA.
 	 */
 	hose->sg_isa = iommu_arena_new(hose, 0x00800000, 0x00800000, 0);
 	hose->sg_pci = NULL;
 	__direct_map_base = 0x40000000;
 	__direct_map_size = 0x40000000;
 
-	*(vulp)LCA_IOC_W_BASE0 = __direct_map_base | (2UL << 32);
-	*(vulp)LCA_IOC_W_MASK0 = (__direct_map_size - 1) & 0xfff00000;
-	*(vulp)LCA_IOC_T_BASE0 = 0;
-
-	*(vulp)LCA_IOC_W_BASE1 = hose->sg_isa->dma_base | (3UL << 32);
-	*(vulp)LCA_IOC_W_MASK1 = (hose->sg_isa->size - 1) & 0xfff00000;
-	*(vulp)LCA_IOC_T_BASE1 = virt_to_phys(hose->sg_isa->ptes);
+	*(vulp)LCA_IOC_W_BASE0 = hose->sg_isa->dma_base | (3UL << 32);
+	*(vulp)LCA_IOC_W_MASK0 = (hose->sg_isa->size - 1) & 0xfff00000;
+	*(vulp)LCA_IOC_T_BASE0 = virt_to_phys(hose->sg_isa->ptes);
+
+	*(vulp)LCA_IOC_W_BASE1 = __direct_map_base | (2UL << 32);
+	*(vulp)LCA_IOC_W_MASK1 = (__direct_map_size - 1) & 0xfff00000;
+	*(vulp)LCA_IOC_T_BASE1 = 0;
 
 	*(vulp)LCA_IOC_TB_ENA = 0x80;
 
@@ -334,6 +338,15 @@
 	 * data parity errors.
 	 */
 	*(vulp)LCA_IOC_PAR_DIS = 1UL<<5;
+
+	/*
+	 * Finally, set up for restoring the correct HAE if using SRM.
+	 * Again, since we cannot read many of the CSRs on the LCA,
+	 * one of which happens to be the HAE, we save the value that
+	 * the SRM will expect...
+	 */
+	if (alpha_using_srm)
+		srm_hae = 0x80000000UL;
 }
 
 /*
diff -urN linux-2.4.22-rc1/arch/alpha/kernel/core_t2.c linux-2.4.22-rc2/arch/alpha/kernel/core_t2.c
--- linux-2.4.22-rc1/arch/alpha/kernel/core_t2.c	2003-08-08 13:50:56.000000000 -0700
+++ linux-2.4.22-rc2/arch/alpha/kernel/core_t2.c	2003-08-08 13:51:07.000000000 -0700
@@ -600,7 +600,9 @@
 		 struct pt_regs * regs)
 {
 	int cpu = smp_processor_id();
+#if DEBUG_MCHECK > 0
 	struct el_common *mchk_header = (struct el_common *)la_ptr;
+#endif
 
 	/* Clear the error before any reporting.  */
 	mb();
diff -urN linux-2.4.22-rc1/arch/alpha/kernel/pci.c linux-2.4.22-rc2/arch/alpha/kernel/pci.c
--- linux-2.4.22-rc1/arch/alpha/kernel/pci.c	2003-06-13 07:51:29.000000000 -0700
+++ linux-2.4.22-rc2/arch/alpha/kernel/pci.c	2003-08-08 13:51:07.000000000 -0700
@@ -19,6 +19,7 @@
 #include <linux/ioport.h>
 #include <linux/kernel.h>
 #include <linux/bootmem.h>
+#include <linux/slab.h>
 #include <asm/machvec.h>
 
 #include "proto.h"
@@ -42,7 +43,7 @@
 const char pci_hae0_name[] = "HAE0";
 
 /* Indicate whether we respect the PCI setup left by console. */
-int __initdata pci_probe_only;
+int pci_probe_only;
 
 /*
  * The PCI controller list.
@@ -196,6 +197,52 @@
 	return str;
 }
 
+#ifdef ALPHA_RESTORE_SRM_SETUP
+static struct pdev_srm_saved_conf *srm_saved_configs;
+
+void __init
+pdev_save_srm_config(struct pci_dev *dev)
+{
+	struct pdev_srm_saved_conf *tmp;
+	static int printed = 0;
+
+	if (!alpha_using_srm || pci_probe_only)
+		return;
+
+	if (!printed) {
+		printk(KERN_INFO "pci: enabling save/restore of SRM state\n");
+		printed = 1;
+	}
+
+	tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
+	if (!tmp) {
+		printk(KERN_ERR "%s: kmalloc() failed!\n", __FUNCTION__);
+		return;
+	}
+	tmp->next = srm_saved_configs;
+	tmp->dev = dev;
+
+	pci_save_state(dev, tmp->regs);
+
+	srm_saved_configs = tmp;
+}
+
+void
+pci_restore_srm_config(void)
+{
+	struct pdev_srm_saved_conf *tmp;
+
+	/* No need to restore if probed only. */
+	if (pci_probe_only)
+		return;
+
+	/* Restore SRM config. */
+	for (tmp = srm_saved_configs; tmp; tmp = tmp->next) {
+		pci_restore_state(tmp->dev, tmp->regs);
+	}
+}
+#endif
+
 void __init
 pcibios_fixup_resource(struct resource *res, struct resource *root)
 {
@@ -254,6 +301,8 @@
 
 	for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
 		struct pci_dev *dev = pci_dev_b(ln);
+
+		pdev_save_srm_config(dev);
 		if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
 			pcibios_fixup_device_resources(dev, bus);
 	}
@@ -298,8 +347,6 @@
 pcibios_update_irq(struct pci_dev *dev, int irq)
 {
 	pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
-
-	/* ??? FIXME -- record old value for shutdown.  */
 }
 
 /* Most Alphas have straight-forward swizzling needs.  */
diff -urN linux-2.4.22-rc1/arch/alpha/kernel/pci_impl.h linux-2.4.22-rc2/arch/alpha/kernel/pci_impl.h
--- linux-2.4.22-rc1/arch/alpha/kernel/pci_impl.h	2003-06-13 07:51:29.000000000 -0700
+++ linux-2.4.22-rc2/arch/alpha/kernel/pci_impl.h	2003-08-08 13:51:07.000000000 -0700
@@ -147,6 +147,33 @@
 	unsigned int align_entry;
 };
 
+#if defined(CONFIG_ALPHA_SRM) && \
+    (defined(CONFIG_ALPHA_CIA) || defined(CONFIG_ALPHA_LCA))
+# define NEED_SRM_SAVE_RESTORE
+#else
+# undef NEED_SRM_SAVE_RESTORE
+#endif
+
+#if defined(CONFIG_ALPHA_GENERIC) || defined(NEED_SRM_SAVE_RESTORE)
+# define ALPHA_RESTORE_SRM_SETUP
+#else
+# undef ALPHA_RESTORE_SRM_SETUP
+#endif
+
+#ifdef ALPHA_RESTORE_SRM_SETUP
+/* Store PCI device configuration left by SRM here. */
+struct pdev_srm_saved_conf
+{
+	struct pdev_srm_saved_conf *next;
+	struct pci_dev *dev;
+	u32 regs[16];
+};
+
+extern void pci_restore_srm_config(void);
+#else
+#define pdev_save_srm_config(dev)	do {} while (0)
+#define pci_restore_srm_config()	do {} while (0)
+#endif
 
 /* The hose list.  */
 extern struct pci_controller *hose_head, **hose_tail;
diff -urN linux-2.4.22-rc1/arch/alpha/kernel/process.c linux-2.4.22-rc2/arch/alpha/kernel/process.c
--- linux-2.4.22-rc1/arch/alpha/kernel/process.c	2003-06-13 07:51:29.000000000 -0700
+++ linux-2.4.22-rc2/arch/alpha/kernel/process.c	2003-08-08 13:51:07.000000000 -0700
@@ -159,7 +159,7 @@
 		/* This has the effect of resetting the VGA video origin.  */
 		take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1);
 #endif
-		/* reset_for_srm(); */
+		pci_restore_srm_config();
 		set_hae(srm_hae);
 	}
 
diff -urN linux-2.4.22-rc1/arch/alpha/kernel/sys_alcor.c linux-2.4.22-rc2/arch/alpha/kernel/sys_alcor.c
--- linux-2.4.22-rc1/arch/alpha/kernel/sys_alcor.c	2003-06-13 07:51:29.000000000 -0700
+++ linux-2.4.22-rc2/arch/alpha/kernel/sys_alcor.c	2003-08-08 13:51:07.000000000 -0700
@@ -222,6 +222,7 @@
 {
 	cia_kill_arch(mode);
 
+#ifndef ALPHA_RESTORE_SRM_SETUP
 	switch(mode) {
 	case LINUX_REBOOT_CMD_RESTART:
 		/* Who said DEC engineer's have no sense of humor? ;-)  */
@@ -237,6 +238,29 @@
 	}
 
 	halt();
+#endif
+}
+
+static void __init
+alcor_init_pci(void)
+{
+	struct pci_dev *dev;
+
+	cia_init_pci();
+
+	/*
+	 * Now we can look to see if we are really running on an XLT-type
+	 * motherboard, by looking for a 21040 TULIP in slot 6, which is
+	 * built into XLT and BRET/MAVERICK, but not available on ALCOR.
+	 */
+	dev = pci_find_device(PCI_VENDOR_ID_DEC,
+			      PCI_DEVICE_ID_DEC_TULIP,
+			      NULL);
+	if (dev && dev->devfn == PCI_DEVFN(6,0)) {
+		alpha_mv.sys.cia.gru_int_req_bits = XLT_GRU_INT_REQ_BITS; 
+		printk(KERN_INFO "%s: Detected AS500 or XLT motherboard.\n",
+		       __FUNCTION__);
+	}
 }
 
 
@@ -262,7 +286,7 @@
 	init_arch:		cia_init_arch,
 	init_irq:		alcor_init_irq,
 	init_rtc:		common_init_rtc,
-	init_pci:		cia_init_pci,
+	init_pci:		alcor_init_pci,
 	kill_arch:		alcor_kill_arch,
 	pci_map_irq:		alcor_map_irq,
 	pci_swizzle:		common_swizzle,
@@ -292,7 +316,7 @@
 	init_arch:		cia_init_arch,
 	init_irq:		alcor_init_irq,
 	init_rtc:		common_init_rtc,
-	init_pci:		cia_init_pci,
+	init_pci:		alcor_init_pci,
 	kill_arch:		alcor_kill_arch,
 	pci_map_irq:		alcor_map_irq,
 	pci_swizzle:		common_swizzle,
diff -urN linux-2.4.22-rc1/arch/alpha/kernel/sys_miata.c linux-2.4.22-rc2/arch/alpha/kernel/sys_miata.c
--- linux-2.4.22-rc1/arch/alpha/kernel/sys_miata.c	2003-06-13 07:51:29.000000000 -0700
+++ linux-2.4.22-rc2/arch/alpha/kernel/sys_miata.c	2003-08-08 13:51:07.000000000 -0700
@@ -247,6 +247,7 @@
 {
 	cia_kill_arch(mode);
 
+#ifndef ALPHA_RESTORE_SRM_SETUP
 	switch(mode) {
 	case LINUX_REBOOT_CMD_RESTART:
 		/* Who said DEC engineers have no sense of humor? ;-)  */ 
@@ -262,6 +263,7 @@
 	}
 
 	halt();
+#endif
 }
 
 
diff -urN linux-2.4.22-rc1/arch/alpha/kernel/sys_noritake.c linux-2.4.22-rc2/arch/alpha/kernel/sys_noritake.c
--- linux-2.4.22-rc1/arch/alpha/kernel/sys_noritake.c	2000-10-27 10:55:01.000000000 -0700
+++ linux-2.4.22-rc2/arch/alpha/kernel/sys_noritake.c	2003-08-08 13:51:07.000000000 -0700
@@ -217,7 +217,7 @@
 		{ 16+2,  16+2,  16+3,  32+2,  32+3},  /* IdSel 22,  slot 0 */
 		{ 16+4,  16+4,  16+5,  32+4,  32+5},  /* IdSel 23,  slot 1 */
 		{ 16+6,  16+6,  16+7,  32+6,  32+7},  /* IdSel 24,  slot 2 */
-		{ 16+8,  16+8,  16+9,  32+8,  32+9},	/* IdSel 25,  slot 3 */
+		{ 16+8,  16+8,  16+9,  32+8,  32+9},  /* IdSel 25,  slot 3 */
 		/* The following 5 are actually on PCI bus 1, which is 
 		   across the built-in bridge of the NORITAKE only.  */
 		{ 16+1,  16+1,  16+1,  16+1,  16+1},  /* IdSel 16,  QLOGIC */
@@ -341,6 +341,7 @@
 	init_irq:		noritake_init_irq,
 	init_rtc:		common_init_rtc,
 	init_pci:		cia_init_pci,
+	kill_arch:		cia_kill_arch,
 	pci_map_irq:		noritake_map_irq,
 	pci_swizzle:		noritake_swizzle,
 };
diff -urN linux-2.4.22-rc1/arch/alpha/kernel/sys_sio.c linux-2.4.22-rc2/arch/alpha/kernel/sys_sio.c
--- linux-2.4.22-rc1/arch/alpha/kernel/sys_sio.c	2001-06-20 11:10:27.000000000 -0700
+++ linux-2.4.22-rc2/arch/alpha/kernel/sys_sio.c	2003-08-08 13:51:07.000000000 -0700
@@ -35,6 +35,14 @@
 #include "pci_impl.h"
 #include "machvec_impl.h"
 
+#ifdef ALPHA_RESTORE_SRM_SETUP
+/* Save LCA configuration data as the console had it set up.  */
+struct 
+{
+	unsigned int orig_route_tab; /* for SAVE/RESTORE */
+} saved_config __attribute((common));
+#endif
+
 
 static void __init
 sio_init_irq(void)
@@ -76,6 +84,15 @@
 static void __init
 sio_pci_route(void)
 {
+#ifdef ALPHA_RESTORE_SRM_SETUP
+	/* First, read and save the original setting. */
+	pcibios_read_config_dword(0, PCI_DEVFN(7, 0), 0x60,
+				  &saved_config.orig_route_tab);
+	printk("%s: PIRQ original 0x%x new 0x%x\n", __FUNCTION__,
+	       saved_config.orig_route_tab, alpha_mv.sys.sio.route_tab);
+#endif
+
+	/* Now override with desired setting. */
 	pcibios_write_config_dword(0, PCI_DEVFN(7, 0), 0x60,
 				   alpha_mv.sys.sio.route_tab);
 }
@@ -244,6 +261,21 @@
 	outb(0x0f, 0x3ce); outb(orig, 0x3cf); /* (re)lock PR0-4 */
 }
 
+void
+sio_kill_arch(int mode)
+{
+#ifdef ALPHA_RESTORE_SRM_SETUP
+	/* Since we cannot read the PCI DMA Window CSRs, we
+	 * cannot restore them here.
+	 *
+	 * However, we CAN read the PIRQ route register, so restore it
+	 * now...
+	 */
+	pcibios_write_config_dword(0, PCI_DEVFN(7, 0), 0x60,
+                                  saved_config.orig_route_tab);
+#endif
+}
+
 
 /*
  * The System Vectors
@@ -268,7 +300,7 @@
 	init_irq:		sio_init_irq,
 	init_rtc:		common_init_rtc,
 	init_pci:		alphabook1_init_pci,
-	kill_arch:		NULL,
+	kill_arch:		sio_kill_arch,
 	pci_map_irq:		noname_map_irq,
 	pci_swizzle:		common_swizzle,
 
@@ -299,6 +331,7 @@
 	init_irq:		sio_init_irq,
 	init_rtc:		common_init_rtc,
 	init_pci:		noname_init_pci,
+	kill_arch:		sio_kill_arch,
 	pci_map_irq:		noname_map_irq,
 	pci_swizzle:		common_swizzle,
 
@@ -328,6 +361,7 @@
 	init_irq:		sio_init_irq,
 	init_rtc:		common_init_rtc,
 	init_pci:		noname_init_pci,
+	kill_arch:		sio_kill_arch,
 	pci_map_irq:		noname_map_irq,
 	pci_swizzle:		common_swizzle,
 
@@ -366,6 +400,7 @@
 	init_irq:		sio_init_irq,
 	init_rtc:		common_init_rtc,
 	init_pci:		noname_init_pci,
+	kill_arch:		sio_kill_arch,
 	pci_map_irq:		p2k_map_irq,
 	pci_swizzle:		common_swizzle,
 
@@ -395,6 +430,7 @@
 	init_irq:		sio_init_irq,
 	init_rtc:		common_init_rtc,
 	init_pci:		noname_init_pci,
+	kill_arch:		sio_kill_arch,
 	pci_map_irq:		noname_map_irq,
 	pci_swizzle:		common_swizzle,
 
diff -urN linux-2.4.22-rc1/arch/i386/kernel/pci-irq.c linux-2.4.22-rc2/arch/i386/kernel/pci-irq.c
--- linux-2.4.22-rc1/arch/i386/kernel/pci-irq.c	2003-08-08 13:50:56.000000000 -0700
+++ linux-2.4.22-rc2/arch/i386/kernel/pci-irq.c	2003-08-08 13:51:08.000000000 -0700
@@ -473,6 +473,8 @@
 	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, pirq_piix_get, pirq_piix_set },
 	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, pirq_piix_get, pirq_piix_set },
 	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_0, pirq_piix_get, pirq_piix_set },
+	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, pirq_piix_get, pirq_piix_set },
+	{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_0, pirq_piix_get, pirq_piix_set },
 
 	{ "ALI", PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, pirq_ali_get, pirq_ali_set },
 
diff -urN linux-2.4.22-rc1/drivers/i2c/i2c-dev.c linux-2.4.22-rc2/drivers/i2c/i2c-dev.c
--- linux-2.4.22-rc1/drivers/i2c/i2c-dev.c	2003-06-13 07:51:33.000000000 -0700
+++ linux-2.4.22-rc2/drivers/i2c/i2c-dev.c	2003-08-08 13:51:09.000000000 -0700
@@ -219,6 +219,7 @@
 	struct i2c_smbus_ioctl_data data_arg;
 	union i2c_smbus_data temp;
 	struct i2c_msg *rdwr_pa;
+	u8 **data_ptrs;
 	int i,datasize,res;
 	unsigned long funcs;
 
@@ -248,7 +249,7 @@
 		return (copy_to_user((unsigned long *)arg,&funcs,
 		                     sizeof(unsigned long)))?-EFAULT:0;
 
-        case I2C_RDWR:
+	case I2C_RDWR:
 		if (copy_from_user(&rdwr_arg, 
 				   (struct i2c_rdwr_ioctl_data *)arg, 
 				   sizeof(rdwr_arg)))
@@ -265,21 +266,28 @@
 
 		if (rdwr_pa == NULL) return -ENOMEM;
 
+		if (copy_from_user(rdwr_pa, rdwr_arg.msgs,
+				   rdwr_arg.nmsgs * sizeof(struct i2c_msg))) {
+			kfree(rdwr_pa);
+			return -EFAULT;
+		}
+
+		data_ptrs = (u8 **) kmalloc(rdwr_arg.nmsgs * sizeof(u8 *),
+					    GFP_KERNEL);
+		if (data_ptrs == NULL) {
+			kfree(rdwr_pa);
+			return -ENOMEM;
+		}
+
 		res = 0;
 		for( i=0; i<rdwr_arg.nmsgs; i++ )
 		{
-		    	if(copy_from_user(&(rdwr_pa[i]),
-					&(rdwr_arg.msgs[i]),
-					sizeof(rdwr_pa[i])))
-			{
-			        res = -EFAULT;
-				break;
-			}
 			/* Limit the size of the message to a sane amount */
 			if (rdwr_pa[i].len > 8192) {
 				res = -EINVAL;
 				break;
 			}
+			data_ptrs[i] = rdwr_pa[i].buf;
 			rdwr_pa[i].buf = kmalloc(rdwr_pa[i].len, GFP_KERNEL);
 			if(rdwr_pa[i].buf == NULL)
 			{
@@ -287,10 +295,11 @@
 				break;
 			}
 			if(copy_from_user(rdwr_pa[i].buf,
-				rdwr_arg.msgs[i].buf,
+				data_ptrs[i],
 				rdwr_pa[i].len))
 			{
-			    	res = -EFAULT;
+				++i; /* Needs to be kfreed too */
+				res = -EFAULT;
 				break;
 			}
 		}
@@ -298,21 +307,20 @@
 			int j;
 			for (j = 0; j < i; ++j)
 				kfree(rdwr_pa[j].buf);
+			kfree(data_ptrs);
 			kfree(rdwr_pa);
 			return res;
 		}
-		if (!res) 
-		{
-			res = i2c_transfer(client->adapter,
-				rdwr_pa,
-				rdwr_arg.nmsgs);
-		}
+
+		res = i2c_transfer(client->adapter,
+			rdwr_pa,
+			rdwr_arg.nmsgs);
 		while(i-- > 0)
 		{
 			if( res>=0 && (rdwr_pa[i].flags & I2C_M_RD))
 			{
 				if(copy_to_user(
-					rdwr_arg.msgs[i].buf,
+					data_ptrs[i],
 					rdwr_pa[i].buf,
 					rdwr_pa[i].len))
 				{
@@ -321,6 +329,7 @@
 			}
 			kfree(rdwr_pa[i].buf);
 		}
+		kfree(data_ptrs);
 		kfree(rdwr_pa);
 		return res;
 
diff -urN linux-2.4.22-rc1/drivers/ide/Makefile linux-2.4.22-rc2/drivers/ide/Makefile
--- linux-2.4.22-rc1/drivers/ide/Makefile	2003-08-08 13:51:00.000000000 -0700
+++ linux-2.4.22-rc2/drivers/ide/Makefile	2003-08-08 13:51:09.000000000 -0700
@@ -54,6 +54,7 @@
   obj-y		+= arm/idedriver-arm.o
 else
   ifeq ($(CONFIG_BLK_DEV_HD_ONLY),y)
+	subdir-$(CONFIG_BLK_DEV_HD_ONLY) += legacy
 	obj-y	+= legacy/idedriver-legacy.o
   endif
 endif
diff -urN linux-2.4.22-rc1/drivers/ide/ide.c linux-2.4.22-rc2/drivers/ide/ide.c
--- linux-2.4.22-rc1/drivers/ide/ide.c	2003-08-08 13:51:00.000000000 -0700
+++ linux-2.4.22-rc2/drivers/ide/ide.c	2003-08-08 13:51:09.000000000 -0700
@@ -798,6 +798,7 @@
 	hwif->swdma_mask		= old_hwif.swdma_mask;
 
 	hwif->chipset			= old_hwif.chipset;
+	hwif->hold                      = old_hwif.hold;
 
 #ifdef CONFIG_BLK_DEV_IDEPCI
 	hwif->pci_dev			= old_hwif.pci_dev;
diff -urN linux-2.4.22-rc1/drivers/ide/pci/pdc202xx_old.c linux-2.4.22-rc2/drivers/ide/pci/pdc202xx_old.c
--- linux-2.4.22-rc1/drivers/ide/pci/pdc202xx_old.c	2003-08-08 13:51:00.000000000 -0700
+++ linux-2.4.22-rc2/drivers/ide/pci/pdc202xx_old.c	2003-08-08 13:51:09.000000000 -0700
@@ -423,9 +423,9 @@
 		if (ultra_66) {
 			/*
 			 * check to make sure drive on same channel
-			 * is u66 capable
+			 * is u66 capable. Ignore empty slots.
 			 */
-			if (hwif->drives[!(drive->dn%2)].id) {
+			if (hwif->drives[!(drive->dn%2)].present) {
 				if (hwif->drives[!(drive->dn%2)].id->dma_ultra & 0x0078) {
 					hwif->OUTB(CLKSPD | mask, (hwif->dma_master + 0x11));
 				} else {
diff -urN linux-2.4.22-rc1/drivers/ide/pci/siimage.c linux-2.4.22-rc2/drivers/ide/pci/siimage.c
--- linux-2.4.22-rc1/drivers/ide/pci/siimage.c	2003-08-08 13:51:00.000000000 -0700
+++ linux-2.4.22-rc2/drivers/ide/pci/siimage.c	2003-08-08 13:51:09.000000000 -0700
@@ -488,8 +488,6 @@
 	struct hd_driveid *id	= drive->id;
 
 	if ((id->capability & 1) != 0 && drive->autodma) {
-		if (!(hwif->atapi_dma))
-			goto fast_ata_pio;
 		/* Consult the list of known "bad" drives */
 		if (hwif->ide_dma_bad_drive(drive))
 			goto fast_ata_pio;
diff -urN linux-2.4.22-rc1/drivers/ide/pci/via82cxxx.c linux-2.4.22-rc2/drivers/ide/pci/via82cxxx.c
--- linux-2.4.22-rc1/drivers/ide/pci/via82cxxx.c	2003-06-13 07:51:33.000000000 -0700
+++ linux-2.4.22-rc2/drivers/ide/pci/via82cxxx.c	2003-08-08 13:51:09.000000000 -0700
@@ -484,7 +484,7 @@
 			for (i = 24; i >= 0; i -= 8)
 				if (((u >> i) & 0x10) ||
 				    (((u >> i) & 0x20) &&
-				     (((u >> i) & 7) < 8))) {
+				     (((u >> i) & 7) < 6))) {
 					/* BIOS 80-wire bit or
 					 * UDMA w/ < 60ns/cycle
 					 */
diff -urN linux-2.4.22-rc1/drivers/pci/pci.ids linux-2.4.22-rc2/drivers/pci/pci.ids
--- linux-2.4.22-rc1/drivers/pci/pci.ids	2003-08-08 13:51:00.000000000 -0700
+++ linux-2.4.22-rc2/drivers/pci/pci.ids	2003-08-08 13:51:10.000000000 -0700
@@ -1348,6 +1348,7 @@
 		103c 1226  Keystone SP2
 		103c 1227  Powerbar SP2
 		103c 1282  Everest SP2
+	1054  PCI Local Bus Adapter
 	1064  79C970 PCnet Ethernet Controller
 	108b  Visualize FXe
 	10c1  NetServer Smart IRQ Router
@@ -1359,7 +1360,8 @@
 	121c  NetServer PCI COM Port Decoder
 	1229  zx1 System Bus Adapter
 	122a  zx1 I/O Controller
-	122e  zx1 Local Bus Adapter
+	122e  PCI-X/AGP Local Bus Adapter
+	127c  sx1000 I/O Controller
 	1290  Auxiliary Diva Serial Port
 	2910  E2910A PCIBus Exerciser
 	2925  E2925A 32 Bit, 33 MHzPCI Exerciser & Analyzer
diff -urN linux-2.4.22-rc1/drivers/pcmcia/ti113x.h linux-2.4.22-rc2/drivers/pcmcia/ti113x.h
--- linux-2.4.22-rc1/drivers/pcmcia/ti113x.h	2003-08-08 13:51:00.000000000 -0700
+++ linux-2.4.22-rc2/drivers/pcmcia/ti113x.h	2003-08-08 13:51:10.000000000 -0700
@@ -179,7 +179,7 @@
 		u8 irqmux, devctl;
 
 		devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
-		if (devctl & TI113X_DCR_IMODE_MASK != TI12XX_DCR_IMODE_ALL_SERIAL) {
+		if ((devctl & TI113X_DCR_IMODE_MASK) != TI12XX_DCR_IMODE_ALL_SERIAL) {
 			printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n");
 
 			devctl &= ~TI113X_DCR_IMODE_MASK;
diff -urN linux-2.4.22-rc1/drivers/sound/i810_audio.c linux-2.4.22-rc2/drivers/sound/i810_audio.c
--- linux-2.4.22-rc1/drivers/sound/i810_audio.c	2003-08-08 13:51:03.000000000 -0700
+++ linux-2.4.22-rc2/drivers/sound/i810_audio.c	2003-08-08 13:51:10.000000000 -0700
@@ -3091,10 +3091,17 @@
 		return -EIO;
 
 	if (pci_set_dma_mask(pci_dev, I810_DMA_MASK)) {
-		printk(KERN_ERR "intel810: architecture does not support"
+		printk(KERN_ERR "i810_audio: architecture does not support"
 		       " 32bit PCI busmaster DMA\n");
 		return -ENODEV;
 	}
+	
+	if( pci_resource_start(pci_dev, 1) == 0)
+	{
+		/* MMIO only ICH5 .. here be dragons .. */
+		printk(KERN_ERR "i810_audio: Pure MMIO interfaces not yet supported.\n");
+		return -ENODEV;
+	}
 
 	if ((card = kmalloc(sizeof(struct i810_card), GFP_KERNEL)) == NULL) {
 		printk(KERN_ERR "i810_audio: out of memory\n");
diff -urN linux-2.4.22-rc1/drivers/sound/via82cxxx_audio.c linux-2.4.22-rc2/drivers/sound/via82cxxx_audio.c
--- linux-2.4.22-rc1/drivers/sound/via82cxxx_audio.c	2003-08-08 13:51:03.000000000 -0700
+++ linux-2.4.22-rc2/drivers/sound/via82cxxx_audio.c	2003-08-08 13:51:10.000000000 -0700
@@ -1238,7 +1238,6 @@
 		}
 	/* unknown */
 	default:
-		printk (KERN_WARNING PFX "unknown number of channels\n");
 		val = -EINVAL;
 		break;
 	}
diff -urN linux-2.4.22-rc1/fs/binfmt_elf.c linux-2.4.22-rc2/fs/binfmt_elf.c
--- linux-2.4.22-rc1/fs/binfmt_elf.c	2003-08-08 13:51:04.000000000 -0700
+++ linux-2.4.22-rc2/fs/binfmt_elf.c	2003-08-08 13:51:11.000000000 -0700
@@ -480,6 +480,7 @@
 	files = current->files;		/* Refcounted so ok */
 	if(unshare_files() < 0)
 		goto out_free_ph;
+	steal_locks(files, current->files);
 
 	/* exec will make our files private anyway, but for the a.out
 	   loader stuff we need to do it earlier */
@@ -797,7 +798,6 @@
 	if (current->ptrace & PT_PTRACED)
 		send_sig(SIGTRAP, current, 0);
 	retval = 0;
-	steal_locks(files, current->files);
 out:
 	return retval;
 
@@ -813,6 +813,7 @@
 out_free_fh:
 	ftmp = current->files;
 	current->files = files;
+	steal_locks(ftmp, current->files);
 	put_files_struct(ftmp);
 out_free_ph:
 	kfree(elf_phdata);
diff -urN linux-2.4.22-rc1/fs/ext3/inode.c linux-2.4.22-rc2/fs/ext3/inode.c
--- linux-2.4.22-rc1/fs/ext3/inode.c	2003-08-08 13:51:04.000000000 -0700
+++ linux-2.4.22-rc2/fs/ext3/inode.c	2003-08-08 13:51:11.000000000 -0700
@@ -2159,8 +2159,6 @@
 		inode->u.ext3_i.i_data[block] = iloc.raw_inode->i_block[block];
 	INIT_LIST_HEAD(&inode->u.ext3_i.i_orphan);
 
-	brelse (iloc.bh);
-
 	if (inode->i_ino == EXT3_ACL_IDX_INO ||
 	    inode->i_ino == EXT3_ACL_DATA_INO)
 		/* Nothing to do */ ;
@@ -2181,6 +2179,7 @@
 	} else 
 		init_special_inode(inode, inode->i_mode,
 				   le32_to_cpu(iloc.raw_inode->i_block[0]));
+	brelse(iloc.bh);
 	ext3_set_inode_flags(inode);
 	return;
 	
diff -urN linux-2.4.22-rc1/fs/inode.c linux-2.4.22-rc2/fs/inode.c
--- linux-2.4.22-rc1/fs/inode.c	2003-08-08 13:51:04.000000000 -0700
+++ linux-2.4.22-rc2/fs/inode.c	2003-08-08 13:51:11.000000000 -0700
@@ -1188,12 +1188,34 @@
 {
 	if (inode->i_atime == CURRENT_TIME)
 		return;
-	if ( IS_NOATIME (inode) ) return;
-	if ( IS_NODIRATIME (inode) && S_ISDIR (inode->i_mode) ) return;
-	if ( IS_RDONLY (inode) ) return;
+	if (IS_NOATIME(inode))
+		return;
+	if (IS_NODIRATIME(inode) && S_ISDIR(inode->i_mode)) 
+		return;
+	if (IS_RDONLY(inode)) 
+		return;
 	inode->i_atime = CURRENT_TIME;
 	mark_inode_dirty_sync (inode);
-}   /*  End Function update_atime  */
+}
+
+/**
+ *	update_mctime	-	update the mtime and ctime
+ *	@inode: inode accessed
+ *
+ *	Update the modified and changed times on an inode for writes to special
+ *	files such as fifos.  No change is forced if the timestamps are already
+ *	up-to-date or if the filesystem is readonly.
+ */
+ 
+void update_mctime (struct inode *inode)
+{
+	if (inode->i_mtime == CURRENT_TIME && inode->i_ctime == CURRENT_TIME)
+		return;
+	if (IS_RDONLY(inode))
+		return;
+	inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+	mark_inode_dirty (inode);
+}
 
 
 /*
diff -urN linux-2.4.22-rc1/fs/pipe.c linux-2.4.22-rc2/fs/pipe.c
--- linux-2.4.22-rc1/fs/pipe.c	2002-11-28 15:53:15.000000000 -0800
+++ linux-2.4.22-rc2/fs/pipe.c	2003-08-08 13:51:11.000000000 -0700
@@ -230,8 +230,7 @@
 	/* Signal readers asynchronously that there is more data.  */
 	wake_up_interruptible(PIPE_WAIT(*inode));
 
-	inode->i_ctime = inode->i_mtime = CURRENT_TIME;
-	mark_inode_dirty(inode);
+	update_mctime(inode);
 
 out:
 	up(PIPE_SEM(*inode));
diff -urN linux-2.4.22-rc1/fs/reiserfs/inode.c linux-2.4.22-rc2/fs/reiserfs/inode.c
--- linux-2.4.22-rc1/fs/reiserfs/inode.c	2003-08-08 13:51:04.000000000 -0700
+++ linux-2.4.22-rc2/fs/reiserfs/inode.c	2003-08-08 13:51:11.000000000 -0700
@@ -2181,6 +2181,10 @@
 			inode -> i_flags |= S_IMMUTABLE;
 		else
 			inode -> i_flags &= ~S_IMMUTABLE;
+		if( sd_attrs & REISERFS_APPEND_FL )
+			inode -> i_flags |= S_APPEND;
+		else
+			inode -> i_flags &= ~S_APPEND;
 		if( sd_attrs & REISERFS_NOATIME_FL )
 			inode -> i_flags |= S_NOATIME;
 		else
diff -urN linux-2.4.22-rc1/fs/reiserfs/ioctl.c linux-2.4.22-rc2/fs/reiserfs/ioctl.c
--- linux-2.4.22-rc1/fs/reiserfs/ioctl.c	2002-11-28 15:53:15.000000000 -0800
+++ linux-2.4.22-rc2/fs/reiserfs/ioctl.c	2003-08-08 13:51:11.000000000 -0700
@@ -51,7 +51,7 @@
 		if (get_user(flags, (int *) arg))
 			return -EFAULT;
 
-		if ( ( flags & REISERFS_IMMUTABLE_FL ) && 
+		if ( ( ( flags ^ inode->u.reiserfs_i.i_attrs) & ( REISERFS_IMMUTABLE_FL | REISERFS_APPEND_FL)) && 
 		     !capable( CAP_LINUX_IMMUTABLE ) )
 			return -EPERM;
 			
diff -urN linux-2.4.22-rc1/fs/stat.c linux-2.4.22-rc2/fs/stat.c
--- linux-2.4.22-rc1/fs/stat.c	2001-09-13 16:04:43.000000000 -0700
+++ linux-2.4.22-rc2/fs/stat.c	2003-08-08 13:51:11.000000000 -0700
@@ -37,6 +37,8 @@
 	static int warncount = 5;
 	struct __old_kernel_stat tmp;
 
+	memset(&tmp, 0, sizeof(struct __old_kernel_stat));
+	
 	if (warncount > 0) {
 		warncount--;
 		printk(KERN_WARNING "VFS: Warning: %s using old stat() call. Recompile your binary.\n",
diff -urN linux-2.4.22-rc1/include/linux/fs.h linux-2.4.22-rc2/include/linux/fs.h
--- linux-2.4.22-rc1/include/linux/fs.h	2003-08-08 13:51:05.000000000 -0700
+++ linux-2.4.22-rc2/include/linux/fs.h	2003-08-08 13:51:13.000000000 -0700
@@ -201,6 +201,7 @@
 #include <asm/byteorder.h>
 
 extern void update_atime (struct inode *);
+extern void update_mctime (struct inode *);
 #define UPDATE_ATIME(inode) update_atime (inode)
 
 extern void buffer_init(unsigned long);
diff -urN linux-2.4.22-rc1/include/linux/pci_ids.h linux-2.4.22-rc2/include/linux/pci_ids.h
--- linux-2.4.22-rc1/include/linux/pci_ids.h	2003-08-08 13:51:05.000000000 -0700
+++ linux-2.4.22-rc2/include/linux/pci_ids.h	2003-08-08 13:51:13.000000000 -0700
@@ -589,11 +589,13 @@
 #define PCI_DEVICE_ID_HP_DIVA1		0x1049
 #define PCI_DEVICE_ID_HP_DIVA2		0x104A
 #define PCI_DEVICE_ID_HP_SP2_0		0x104B
+#define PCI_DEVICE_ID_HP_PCI_LBA	0x1054
 #define PCI_DEVICE_ID_HP_REO_SBA	0x10f0
 #define PCI_DEVICE_ID_HP_REO_IOC	0x10f1
 #define PCI_DEVICE_ID_HP_ZX1_SBA	0x1229
 #define PCI_DEVICE_ID_HP_ZX1_IOC	0x122a
-#define PCI_DEVICE_ID_HP_ZX1_LBA	0x122e
+#define PCI_DEVICE_ID_HP_PCIX_LBA	0x122e
+#define PCI_DEVICE_ID_HP_SX1000_IOC	0x127c
 
 #define PCI_VENDOR_ID_PCTECH		0x1042
 #define PCI_DEVICE_ID_PCTECH_RZ1000	0x1000
@@ -1834,9 +1836,23 @@
 #define PCI_DEVICE_ID_INTEL_82801EB_5	0x24d5
 #define PCI_DEVICE_ID_INTEL_82801EB_6	0x24d6
 #define PCI_DEVICE_ID_INTEL_82801EB_7	0x24d7
-#define PCI_DEVICE_ID_INTEL_82801DB_10 0x24ca
+#define PCI_DEVICE_ID_INTEL_82801DB_10	0x24ca
 #define PCI_DEVICE_ID_INTEL_82801EB_11	0x24db
 #define PCI_DEVICE_ID_INTEL_82801EB_13	0x24dd
+#define PCI_DEVICE_ID_INTEL_ESB_0	0x25a0
+#define PCI_DEVICE_ID_INTEL_ESB_1	0x25a1
+#define PCI_DEVICE_ID_INTEL_ESB_2	0x25a2
+#define PCI_DEVICE_ID_INTEL_ESB_3	0x25a3
+#define PCI_DEVICE_ID_INTEL_ESB_31	0x25b0
+#define PCI_DEVICE_ID_INTEL_ESB_4	0x25a4
+#define PCI_DEVICE_ID_INTEL_ESB_5	0x25a6
+#define PCI_DEVICE_ID_INTEL_ESB_6	0x25a7
+#define PCI_DEVICE_ID_INTEL_ESB_7	0x25a9
+#define PCI_DEVICE_ID_INTEL_ESB_8	0x25aa
+#define PCI_DEVICE_ID_INTEL_ESB_9	0x25ab
+#define PCI_DEVICE_ID_INTEL_ESB_11	0x25ac
+#define PCI_DEVICE_ID_INTEL_ESB_12	0x25ad
+#define PCI_DEVICE_ID_INTEL_ESB_13	0x25ae
 #define PCI_DEVICE_ID_INTEL_80310	0x530d
 #define PCI_DEVICE_ID_INTEL_82810_MC1	0x7120
 #define PCI_DEVICE_ID_INTEL_82810_IG1	0x7121
diff -urN linux-2.4.22-rc1/include/linux/reiserfs_fs.h linux-2.4.22-rc2/include/linux/reiserfs_fs.h
--- linux-2.4.22-rc1/include/linux/reiserfs_fs.h	2003-08-08 13:51:05.000000000 -0700
+++ linux-2.4.22-rc2/include/linux/reiserfs_fs.h	2003-08-08 13:51:13.000000000 -0700
@@ -867,6 +867,7 @@
 /* we want common flags to have the same values as in ext2,
    so chattr(1) will work without problems */
 #define REISERFS_IMMUTABLE_FL EXT2_IMMUTABLE_FL
+#define REISERFS_APPEND_FL    EXT2_APPEND_FL
 #define REISERFS_SYNC_FL      EXT2_SYNC_FL
 #define REISERFS_NOATIME_FL   EXT2_NOATIME_FL
 #define REISERFS_NODUMP_FL    EXT2_NODUMP_FL
@@ -877,7 +878,7 @@
    Note, that is inheritable: mark directory with this and
    all new files inside will not have tails. 
 
-   Teodore Tso allocated EXT2_NODUMP_FL (0x00008000) for this. Change
+   Teodore Tso allocated EXT2_NOTAIL_FL (0x00008000) for this. Change
    numeric constant to ext2 macro when available. */
 #define REISERFS_NOTAIL_FL    (0x00008000) /* EXT2_NOTAIL_FL */
 
diff -urN linux-2.4.22-rc1/scripts/ver_linux linux-2.4.22-rc2/scripts/ver_linux
--- linux-2.4.22-rc1/scripts/ver_linux	2002-11-28 15:53:16.000000000 -0800
+++ linux-2.4.22-rc2/scripts/ver_linux	2003-08-08 13:51:15.000000000 -0700
@@ -42,6 +42,9 @@
 cardmgr -V 2>&1| grep version | awk \
 'NR==1{print "pcmcia-cs             ", $3}'
 
+quota -V 2>&1 | grep version | awk \
+'NR==1{print "quota-tools           ", $NF}'
+
 pppd --version 2>&1| grep version | awk \
 'NR==1{print "PPP                   ", $3}'
 
