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

diff -urN linux-2.2.14-pre8/arch/alpha/config.in linux-2.2.14-pre9/arch/alpha/config.in
--- linux-2.2.14-pre8/arch/alpha/config.in	1999-05-22 13:41:37.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/config.in	2003-08-15 15:09:15.000000000 -0700
@@ -33,10 +33,12 @@
 	 EB64+			CONFIG_ALPHA_EB64P		\
 	 EB66			CONFIG_ALPHA_EB66		\
 	 EB66+			CONFIG_ALPHA_EB66P		\
+	 Eiger			CONFIG_ALPHA_EIGER		\
 	 Jensen			CONFIG_ALPHA_JENSEN		\
 	 LX164			CONFIG_ALPHA_LX164		\
 	 Miata			CONFIG_ALPHA_MIATA		\
 	 Mikasa			CONFIG_ALPHA_MIKASA		\
+	 Nautilus		CONFIG_ALPHA_NAUTILUS		\
 	 Noname			CONFIG_ALPHA_NONAME		\
 	 Noritake		CONFIG_ALPHA_NORITAKE		\
 	 PC164			CONFIG_ALPHA_PC164		\
@@ -54,6 +56,7 @@
 unset CONFIG_ALPHA_LCA CONFIG_ALPHA_APECS CONFIG_ALPHA_CIA
 unset CONFIG_ALPHA_T2 CONFIG_ALPHA_PYXIS CONFIG_ALPHA_POLARIS
 unset CONFIG_ALPHA_TSUNAMI CONFIG_ALPHA_MCPCIA
+unset CONFIG_ALPHA_IRONGATE
 
 if [ "$CONFIG_ALPHA_GENERIC" = "y" ]
 then
@@ -117,7 +120,7 @@
 	define_bool CONFIG_ALPHA_EV5 y
 	define_bool CONFIG_ALPHA_PYXIS y
 fi
-if [ "$CONFIG_ALPHA_DP264" = "y" ]
+if [ "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_EIGER" = "y" ]
 then
 	define_bool CONFIG_PCI y
 	define_bool CONFIG_ALPHA_EV6 y
@@ -139,6 +142,12 @@
 then
 	define_bool CONFIG_ALPHA_EV4 y
 fi
+if [ "$CONFIG_ALPHA_NAUTILUS" = "y" ]
+then
+	define_bool CONFIG_PCI y
+	define_bool CONFIG_ALPHA_EV6 y
+	define_bool CONFIG_ALPHA_IRONGATE y
+fi
 
 if [ "$CONFIG_ALPHA_CABRIOLET" = "y" -o "$CONFIG_ALPHA_AVANTI" = "y" \
 	-o "$CONFIG_ALPHA_EB64P" = "y" -o "$CONFIG_ALPHA_JENSEN" = "y" \
@@ -147,7 +156,8 @@
 	-o "$CONFIG_ALPHA_SABLE" = "y" -o "$CONFIG_ALPHA_MIATA" = "y" \
 	-o "$CONFIG_ALPHA_NORITAKE" = "y" -o "$CONFIG_ALPHA_PC164" = "y" \
 	-o "$CONFIG_ALPHA_LX164" = "y" -o "$CONFIG_ALPHA_SX164" = "y" \
-	-o "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_RAWHIDE" = "y" ]
+	-o "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_RAWHIDE" = "y" \
+	-o "$CONFIG_ALPHA_EIGER" = "y" ]
 then
   bool 'Use SRM as bootloader' CONFIG_ALPHA_SRM
   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
diff -urN linux-2.2.14-pre8/arch/alpha/defconfig linux-2.2.14-pre9/arch/alpha/defconfig
--- linux-2.2.14-pre8/arch/alpha/defconfig	1999-06-12 11:52:51.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/defconfig	2003-08-15 15:09:15.000000000 -0700
@@ -32,6 +32,7 @@
 # CONFIG_ALPHA_LX164 is not set
 # CONFIG_ALPHA_MIATA is not set
 # CONFIG_ALPHA_MIKASA is not set
+# CONFIG_ALPHA_NAUTILUS is not set
 # CONFIG_ALPHA_NONAME is not set
 # CONFIG_ALPHA_NORITAKE is not set
 # CONFIG_ALPHA_PC164 is not set
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/alpha_ksyms.c linux-2.2.14-pre9/arch/alpha/kernel/alpha_ksyms.c
--- linux-2.2.14-pre8/arch/alpha/kernel/alpha_ksyms.c	1999-10-19 17:14:00.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/alpha_ksyms.c	2003-08-15 15:09:15.000000000 -0700
@@ -49,8 +49,6 @@
 extern void __remqu (void);
 
 EXPORT_SYMBOL(alpha_mv);
-EXPORT_SYMBOL(local_bh_count);
-EXPORT_SYMBOL(local_irq_count);
 EXPORT_SYMBOL(enable_irq);
 EXPORT_SYMBOL(disable_irq);
 EXPORT_SYMBOL(disable_irq_nosync);
@@ -182,6 +180,9 @@
 EXPORT_SYMBOL(read_lock);
 #endif
 EXPORT_SYMBOL_NOVERS(kernel_flag);
+#else /* __SMP__ */
+EXPORT_SYMBOL(local_bh_count);
+EXPORT_SYMBOL(local_irq_count);
 #endif /* __SMP__ */
 
 /*
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/bios32.c linux-2.2.14-pre9/arch/alpha/kernel/bios32.c
--- linux-2.2.14-pre8/arch/alpha/kernel/bios32.c	1998-12-01 09:33:59.000000000 -0800
+++ linux-2.2.14-pre9/arch/alpha/kernel/bios32.c	2003-08-15 15:09:15.000000000 -0700
@@ -78,6 +78,7 @@
 
 struct linux_hose_info *bus2hose[256];
 struct linux_hose_info *hose_head, **hose_tail = &hose_head;
+struct linux_hose_info default_hose;
 int hose_count;
 int pci_probe_enabled;
 
@@ -639,11 +640,11 @@
 				/* Bypass hi reg in the loop.  */
 				dev->base_address[++idx] = 0;
 
-				printk("bios32 WARNING: "
-				       "handling 64-bit device in "
-				       "slot %d, function %d: \n",
-				       PCI_SLOT(dev->devfn),
-				       PCI_FUNC(dev->devfn));
+				DBG_DEVS(("bios32 WARNING: "
+					  "handling 64-bit device in "
+					  "slot %d, function %d: \n",
+					  PCI_SLOT(dev->devfn),
+					  PCI_FUNC(dev->devfn)));
 			}
 
 			DBG_DEVS(("layout_dev: dev 0x%x MEM @ 0x%lx (0x%x)\n",
@@ -1345,8 +1346,7 @@
 		/* For the benefit of single-bus machines, emulate a
 		   multi-bus machine to the (limited) extent necessary. 
 		   Init all bus2hose entries to point to a dummy.  */
-		hose = kmalloc(sizeof(*hose), GFP_KERNEL);
-		memset(hose, 0, sizeof(*hose));
+		hose = &default_hose;
 		for (i = 0; i < 256; ++i)
 			bus2hose[i] = hose;
 	}
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/core_irongate.c linux-2.2.14-pre9/arch/alpha/kernel/core_irongate.c
--- linux-2.2.14-pre8/arch/alpha/kernel/core_irongate.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre9/arch/alpha/kernel/core_irongate.c	2003-08-15 15:09:15.000000000 -0700
@@ -0,0 +1,369 @@
+/*
+ *	linux/arch/alpha/kernel/core_irongate.c
+ *
+ * Code common to all IRONGATE core logic chips.
+ *
+ * Based on code written by David A. Rusling (david.rusling@reo.mts.dec.com).
+ *	Copyright (C) 1999 Alpha Processor, Inc., (David Daniel, Stig Telfer, Soohoon Lee)
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/pci.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+
+#include <asm/ptrace.h>
+#include <asm/system.h>
+#include <asm/pci.h>
+#include <asm/hwrpb.h>
+
+#define __EXTERN_INLINE inline
+#include <asm/io.h>
+#include <asm/core_irongate.h>
+#undef __EXTERN_INLINE
+
+#include "proto.h"
+#include "bios32.h"
+
+/*
+ * NOTE: Herein lie back-to-back mb instructions.  They are magic.
+ * One plausible explanation is that the I/O controller does not properly
+ * handle the system transaction.  Another involves timing.  Ho hum.
+ */
+
+/*
+ * BIOS32-style PCI interface:
+ */
+
+/* #define DEBUG_CONFIG */
+#define DEBUG_MCHECK
+
+#ifdef DEBUG_CONFIG
+# define DBG_CFG(args)	printk args
+#else
+# define DBG_CFG(args)
+#endif
+
+#ifdef DEBUG_MCHECK
+# define DBG_MCK(args)	printk args
+#define DEBUG_MCHECK_DUMP
+#else
+# define DBG_MCK(args)
+#endif
+
+
+/*
+ * Given a bus, device, and function number, compute resulting
+ * configuration space address accordingly.  It is therefore not safe
+ * to have concurrent invocations to configuration space access
+ * routines, but there really shouldn't be any need for this.
+ *
+ *	addr[31:24]		reserved
+ *	addr[23:16]		bus number (8 bits = 128 possible buses)
+ *	addr[15:11]		Device number (5 bits)
+ *	addr[10: 8]		function number
+ *	addr[ 7: 2]		register number
+
+ * For IRONGATE:
+ *    if (bus = addr[23:16]) == 0
+ *    then
+ *	  type 0 config cycle:
+ *	      addr_on_pci[31:11] = id selection for device = addr[15:11]
+ *	      addr_on_pci[10: 2] = addr[10: 2] ???
+ *	      addr_on_pci[ 1: 0] = 00
+ *    else
+ *	  type 1 config cycle (pass on with no decoding):
+ *	      addr_on_pci[31:24] = 0
+ *	      addr_on_pci[23: 2] = addr[23: 2]
+ *	      addr_on_pci[ 1: 0] = 01
+ *    fi
+ *
+ * Notes:
+ *	The function number selects which function of a multi-function device
+ *	(e.g., SCSI and Ethernet).
+ *
+ *	The register selects a DWORD (32 bit) register offset.	Hence it
+ *	doesn't get shifted by 2 bits as we want to "drop" the bottom two
+ *	bits.
+ */
+
+static int
+mk_conf_addr(u8 bus, u8 device_fn, u8 where, struct linux_hose_info *hose,
+	     unsigned long *pci_addr, unsigned char *type1)
+{
+	unsigned long addr;
+
+	DBG_CFG(("mk_conf_addr(bus=%d ,device_fn=0x%x, where=0x%x, "
+		 "pci_addr=0x%p, type1=0x%p)\n",
+		 bus, device_fn, where, pci_addr, type1));
+
+	*type1 = (bus != 0);
+
+	addr = (bus << 16) | (device_fn << 8) | where;
+	addr |= IRONGATE_CONF;
+
+	*pci_addr = addr;
+	DBG_CFG(("mk_conf_addr: returning pci_addr 0x%lx\n", addr));
+	return 0;
+}
+
+int
+irongate_hose_read_config_byte (u8 bus, u8 device_fn, u8 where, u8 *value,
+			       struct linux_hose_info *hose)
+{
+	unsigned long addr;
+	unsigned char type1;
+
+	if (mk_conf_addr(bus, device_fn, where, hose, &addr, &type1))
+		return PCIBIOS_DEVICE_NOT_FOUND;
+
+	*value = __kernel_ldbu(*(vucp)addr);
+	return PCIBIOS_SUCCESSFUL;
+}
+
+int
+irongate_hose_read_config_word (u8 bus, u8 device_fn, u8 where, u16 *value,
+			       struct linux_hose_info *hose)
+{
+	unsigned long addr;
+	unsigned char type1;
+
+	if (mk_conf_addr(bus, device_fn, where, hose, &addr, &type1))
+		return PCIBIOS_DEVICE_NOT_FOUND;
+
+	*value = __kernel_ldwu(*(vusp)addr);
+	return PCIBIOS_SUCCESSFUL;
+}
+
+int
+irongate_hose_read_config_dword (u8 bus, u8 device_fn, u8 where, u32 *value,
+				struct linux_hose_info *hose)
+{
+	unsigned long addr;
+	unsigned char type1;
+
+	if (mk_conf_addr(bus, device_fn, where, hose, &addr, &type1))
+		return PCIBIOS_DEVICE_NOT_FOUND;
+
+	*value = *(vuip)addr;
+	return PCIBIOS_SUCCESSFUL;
+}
+
+int
+irongate_hose_write_config_byte (u8 bus, u8 device_fn, u8 where, u8 value,
+				struct linux_hose_info *hose)
+{
+	unsigned long addr;
+	unsigned char type1;
+
+	if (mk_conf_addr(bus, device_fn, where, hose, &addr, &type1))
+		return PCIBIOS_DEVICE_NOT_FOUND;
+
+	__kernel_stb(value, *(vucp)addr);
+	mb();
+	__kernel_ldbu(*(vucp)addr);
+	return PCIBIOS_SUCCESSFUL;
+}
+
+int
+irongate_hose_write_config_word (u8 bus, u8 device_fn, u8 where, u16 value,
+				struct linux_hose_info *hose)
+{
+	unsigned long addr;
+	unsigned char type1;
+
+	if (mk_conf_addr(bus, device_fn, where, hose, &addr, &type1))
+		return PCIBIOS_DEVICE_NOT_FOUND;
+
+	__kernel_stw(value, *(vusp)addr);
+	mb();
+	__kernel_ldwu(*(vusp)addr);
+	return PCIBIOS_SUCCESSFUL;
+}
+
+int
+irongate_hose_write_config_dword (u8 bus, u8 device_fn, u8 where, u32 value,
+				 struct linux_hose_info *hose)
+{
+	unsigned long addr;
+	unsigned char type1;
+
+	if (mk_conf_addr(bus, device_fn, where, hose, &addr, &type1))
+		return PCIBIOS_DEVICE_NOT_FOUND;
+
+	*(vuip)addr = value;
+	mb();
+	*(vuip)addr;
+	return PCIBIOS_SUCCESSFUL;
+}
+
+#if 0
+static void
+irongate_register_dump(const char *function_name)
+{
+	printk("%s: Irongate registers:\n"
+	       "\tdev_vendor\t0x%08x\n"
+	       "\tstat_cmd\t0x%08x\n"
+	       "\tclass\t\t0x%08x\n"
+	       "\tlatency\t\t0x%08x\n"
+	       "\tbar0\t\t0x%08x\n"
+	       "\tbar1\t\t0x%08x\n"
+	       "\tbar2\t\t0x%08x\n"
+	       "\trsrvd0[0]\t0x%08x\n"
+	       "\trsrvd0[1]\t0x%08x\n"
+	       "\trsrvd0[2]\t0x%08x\n"
+	       "\trsrvd0[3]\t0x%08x\n"
+	       "\trsrvd0[4]\t0x%08x\n"
+	       "\trsrvd0[5]\t0x%08x\n"
+	       "\tcapptr\t\t0x%08x\n"
+	       "\trsrvd1[0]\t0x%08x\n"
+	       "\trsrvd1[1]\t0x%08x\n"
+	       "\tbacsr10\t\t0x%08x\n"
+	       "\tbacsr32\t\t0x%08x\n"
+	       "\tbacsr54\t\t0x%08x\n"
+	       "\trsrvd2[0]\t0x%08x\n"
+	       "\tdrammap\t\t0x%08x\n"
+	       "\tdramtm\t\t0x%08x\n"
+	       "\tdramms\t\t0x%08x\n"
+	       "\trsrvd3[0]\t0x%08x\n"
+	       "\tbiu0\t\t0x%08x\n"
+	       "\tbiusip\t\t0x%08x\n"
+	       "\trsrvd4[0]\t0x%08x\n"
+	       "\trsrvd4[1]\t0x%08x\n"
+	       "\tmro\t\t0x%08x\n"
+	       "\trsrvd5[0]\t0x%08x\n"
+	       "\trsrvd5[1]\t0x%08x\n"
+	       "\trsrvd5[2]\t0x%08x\n"
+	       "\twhami\t\t0x%08x\n"
+	       "\tpciarb\t\t0x%08x\n"
+	       "\tpcicfg\t\t0x%08x\n"
+	       "\trsrvd6[0]\t0x%08x\n"
+	       "\trsrvd6[1]\t0x%08x\n"
+	       "\trsrvd6[2]\t0x%08x\n"
+	       "\trsrvd6[3]\t0x%08x\n"
+	       "\trsrvd6[4]\t0x%08x\n"
+	       "\tagpcap\t\t0x%08x\n"
+	       "\tagpstat\t\t0x%08x\n"
+	       "\tagpcmd\t\t0x%08x\n"
+	       "\tagpva\t\t0x%08x\n"
+	       "\tagpmode\t\t0x%08x\n",
+	       function_name,
+	       IRONGATE0->dev_vendor,
+	       IRONGATE0->stat_cmd,
+	       IRONGATE0->class,
+	       IRONGATE0->latency,
+	       IRONGATE0->bar0,
+	       IRONGATE0->bar1,
+	       IRONGATE0->bar2,
+	       IRONGATE0->rsrvd0[0],
+	       IRONGATE0->rsrvd0[1],
+	       IRONGATE0->rsrvd0[2],
+	       IRONGATE0->rsrvd0[3],
+	       IRONGATE0->rsrvd0[4],
+	       IRONGATE0->rsrvd0[5],
+	       IRONGATE0->capptr,
+	       IRONGATE0->rsrvd1[0],
+	       IRONGATE0->rsrvd1[1],
+	       IRONGATE0->bacsr10,
+	       IRONGATE0->bacsr32,
+	       IRONGATE0->bacsr54,
+	       IRONGATE0->rsrvd2[0],
+	       IRONGATE0->drammap,
+	       IRONGATE0->dramtm,
+	       IRONGATE0->dramms,
+	       IRONGATE0->rsrvd3[0],
+	       IRONGATE0->biu0,
+	       IRONGATE0->biusip,
+	       IRONGATE0->rsrvd4[0],
+	       IRONGATE0->rsrvd4[1],
+	       IRONGATE0->mro,
+	       IRONGATE0->rsrvd5[0],
+	       IRONGATE0->rsrvd5[1],
+	       IRONGATE0->rsrvd5[2],
+	       IRONGATE0->whami,
+	       IRONGATE0->pciarb,
+	       IRONGATE0->pcicfg,
+	       IRONGATE0->rsrvd6[0],
+	       IRONGATE0->rsrvd6[1],
+	       IRONGATE0->rsrvd6[2],
+	       IRONGATE0->rsrvd6[3],
+	       IRONGATE0->rsrvd6[4],
+	       IRONGATE0->agpcap,
+	       IRONGATE0->agpstat,
+	       IRONGATE0->agpcmd,
+	       IRONGATE0->agpva,
+	       IRONGATE0->agpmode);
+}
+#else
+#define irongate_register_dump(x)	1
+#endif
+
+void __init
+irongate_init_arch(unsigned long *mem_start, unsigned long *mem_end)
+{
+	struct linux_hose_info *hose;
+
+	irongate_register_dump(__FUNCTION__);
+
+	/* Align memory to cache line; we'll be allocating from it. */
+
+	*mem_start = (*mem_start | 31) + 1;
+
+	/*
+	 * Irongate only supports one PCI bus but do the hose thing anyway.
+	 * Anything to do for AGP???
+	 */
+
+	hose = (struct linux_hose_info *) *mem_start;
+	*mem_start = (unsigned long)(hose + 1);
+	memset(hose, 0, sizeof(*hose));
+	hose->pci_io_space = IRONGATE_IO;
+	hose->pci_mem_space = IRONGATE_MEM;
+	hose->pci_config_space = IRONGATE_CONF;
+	hose->pci_sparse_space = 0;
+	hose->pci_hose_index = 0;
+
+	/* add it to the hose list for bios32.[ch] */
+
+	*hose_tail = hose;
+	hose_tail = &hose->next;
+
+	irongate_pci_clr_err();
+}
+
+int
+irongate_pci_clr_err(void)
+{
+	
+	unsigned int nmi_ctl=0;
+	unsigned int IRONGATE_jd;
+
+again:
+
+	IRONGATE_jd = IRONGATE0->stat_cmd;
+	printk("Iron stat_cmd %x\n", IRONGATE_jd);
+	IRONGATE0->stat_cmd = IRONGATE_jd; /* write again clears error bits */
+	mb();
+	IRONGATE_jd = IRONGATE0->stat_cmd;  /* re-read to force write */
+
+	IRONGATE_jd = IRONGATE0->dramms;
+	printk("Iron dramms %x\n", IRONGATE_jd);
+	IRONGATE0->dramms = IRONGATE_jd; /* write again clears error bits */
+	mb();
+	IRONGATE_jd = IRONGATE0->dramms;  /* re-read to force write */
+
+	/* Clear ALI NMI */
+        nmi_ctl = inb(0x61);
+        nmi_ctl |= 0x0c;
+        outb(nmi_ctl, 0x61);
+        nmi_ctl &= ~0x0c;
+        outb(nmi_ctl, 0x61);
+	
+	IRONGATE_jd = IRONGATE0->dramms;
+	if (IRONGATE_jd & 0x300) goto again;
+	
+	return 0;
+}
+
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/core_mcpcia.c linux-2.2.14-pre9/arch/alpha/kernel/core_mcpcia.c
--- linux-2.2.14-pre8/arch/alpha/kernel/core_mcpcia.c	1999-08-25 17:29:45.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/core_mcpcia.c	2003-08-15 15:09:15.000000000 -0700
@@ -24,6 +24,7 @@
 #include <asm/core_mcpcia.h>
 #undef __EXTERN_INLINE
 
+#include "machvec.h"
 #include "proto.h"
 #include "bios32.h"
 
@@ -51,9 +52,12 @@
 static volatile unsigned int MCPCIA_mcheck_taken[NR_CPUS];
 static volatile unsigned int MCPCIA_mcheck_hose[NR_CPUS];
 static unsigned int MCPCIA_jd[NR_CPUS];
+static unsigned int MCPCIA_mcheck_enable_print = 1;
+static unsigned int MCPCIA_mcheck_probing_hose = 0;
 
-#define MCPCIA_MAX_HOSES 2
+#define MCPCIA_MAX_HOSES	4
 
+static struct linux_hose_info *mcpcia_hoses[MCPCIA_MAX_HOSES];
 
 /*
  * Given a bus, device, and function number, compute resulting
@@ -297,24 +301,65 @@
 	return PCIBIOS_SUCCESSFUL;
 }
 
+static void
+mcpcia_pci_clr_err(int cpu, int hose)
+{
+	MCPCIA_jd[cpu] = *(vuip)MCPCIA_CAP_ERR(hose);
+	*(vuip)MCPCIA_CAP_ERR(hose) = 0xffffffff; mb(); /* clear them all */
+	MCPCIA_jd[cpu] = *(vuip)MCPCIA_CAP_ERR(hose); /* read to force write */
+}
+
 void __init
 mcpcia_init_arch(unsigned long *mem_start, unsigned long *mem_end)
 {
-	extern asmlinkage void entInt(void);
 	struct linux_hose_info *hose;
-	unsigned int mcpcia_err;
-	unsigned int pci_rev;
-	int h, cpu;
-
-	/* Ho hum.. init_arch is called before init_IRQ, but we need to be
-	   able to handle machine checks.  So install the handler now.  */
-	wrent(entInt, 0);
+	int h;
 
 	/* Align memory to cache line; we'll be allocating from it.  */
 	*mem_start = (*mem_start | 31) + 1;
 
+	/* First, allocate for the maximum number of hoses we might have.  */
+	for (h = 0; h < MCPCIA_MAX_HOSES; h++) {
+
+		hose = (struct linux_hose_info *)*mem_start;
+		*mem_start = (unsigned long)(hose + 1);
+
+		memset(hose, 0, sizeof(*hose));
+
+		mcpcia_hoses[h] = hose;
+
+		hose->pci_io_space = MCPCIA_IO(h);
+		hose->pci_mem_space = MCPCIA_DENSE(h);
+		hose->pci_config_space = MCPCIA_CONF(h);
+		hose->pci_sparse_space = MCPCIA_SPARSE(h);
+		hose->pci_hose_index = h;
+		hose->pci_first_busno = 255;
+		hose->pci_last_busno = 0;
+	}
+
+#if 1
+	printk("mcpcia_init_arch: allocating for %d hoses\n",
+	       MCPCIA_MAX_HOSES);
+#endif
+}
+
+/*
+ * This is called from init_IRQ, since we cannot take interrupts
+ * before then, so we cannot do this in init_arch.
+ */
+void __init
+mcpcia_init_hoses(void)
+{
+	struct linux_hose_info *hose;
+	unsigned int mcpcia_err;
+	unsigned int pci_rev;
+	int h, cpu;
+
 	cpu = smp_processor_id();
 
+	MCPCIA_mcheck_enable_print = 0;
+	MCPCIA_mcheck_probing_hose = 1;
+
 	/* First, find how many hoses we have.  */
 	for (h = 0; h < MCPCIA_MAX_HOSES; h++) {
 
@@ -324,50 +369,49 @@
 		mb();
 		mb();
 		draina();
+		wrmces(7);
 		MCPCIA_mcheck_expected[cpu] = 1;
 		MCPCIA_mcheck_taken[cpu]    = 0;
+		MCPCIA_mcheck_hose[cpu] = h;
+		pci_rev = 0xffffffff;
 		mb();
 
 		/* Access the bus revision word. */
 		pci_rev = *(vuip)MCPCIA_REV(h);
 
+#if 0
+		draina(); /* huh? */
+#endif
+
 		mb();
 		mb();  /* magic */
 		if (MCPCIA_mcheck_taken[cpu]) {
 			MCPCIA_mcheck_taken[cpu] = 0;
 			pci_rev = 0xffffffff;
 			mb();
+			break;
 		}
 		MCPCIA_mcheck_expected[cpu] = 0;
 		mb();
 
-#if 0
-		printk("mcpcia_init_arch: got 0x%x for PCI_REV for hose %d\n",
-		       pci_rev, h);
-#endif
 		if ((pci_rev >> 16) == PCI_CLASS_BRIDGE_HOST) {
+
 			hose_count++;
 
-			hose = (struct linux_hose_info *)*mem_start;
-			*mem_start = (unsigned long)(hose + 1);
+			mcpcia_pci_clr_err(cpu, h);
 
-			memset(hose, 0, sizeof(*hose));
+			hose = mcpcia_hoses[h];
 
 			*hose_tail = hose;
 			hose_tail = &hose->next;
-
-			hose->pci_io_space = MCPCIA_IO(h);
-			hose->pci_mem_space = MCPCIA_DENSE(h);
-			hose->pci_config_space = MCPCIA_CONF(h);
-			hose->pci_sparse_space = MCPCIA_SPARSE(h);
-			hose->pci_hose_index = h;
-			hose->pci_first_busno = 255;
-			hose->pci_last_busno = 0;
 		}
 	}
 
+	MCPCIA_mcheck_enable_print = 1;
+	MCPCIA_mcheck_probing_hose = 0;
+
 #if 1
-	printk("mcpcia_init_arch: found %d hoses\n", hose_count);
+	printk("mcpcia_init_hoses: found %d hoses\n", hose_count);
 #endif
 
 	/* Now do init for each hose.  */
@@ -390,22 +434,16 @@
 		printk("MCPCIA_HBASE 0x%x\n", *(vuip)MCPCIA_HBASE(h));
 #endif
 
+#if 1
 		/* 
-		 * Set up error reporting. Make sure CPU_PE is OFF in the mask.
+		 * Set up error reporting.
 		 */
-#if 0
-		mcpcia_err = *(vuip)MCPCIA_ERR_MASK(h);
-		mcpcia_err &= ~4;   
-		*(vuip)MCPCIA_ERR_MASK(h) = mcpcia_err;
-		mb();
-		mcpcia_err = *(vuip)MCPCIA_ERR_MASK;
-#endif
-
 		mcpcia_err = *(vuip)MCPCIA_CAP_ERR(h);
 		mcpcia_err |= 0x0006;   /* master/target abort */
 		*(vuip)MCPCIA_CAP_ERR(h) = mcpcia_err;
 		mb() ;
 		mcpcia_err = *(vuip)MCPCIA_CAP_ERR(h);
+#endif
 
 		switch (alpha_use_srm_setup)
 		{
@@ -486,11 +524,10 @@
 		case 0:
 			/*
 			 * Set up the PCI->physical memory translation windows.
-			 * For now, windows 1,2 and 3 are disabled.  In the
-			 * future, we may want to use them to do scatter/
-			 * gather DMA.
+			 * For now, windows 2 and 3 are disabled. 
 			 *
 			 * Window 0 goes at 2 GB and is 2 GB large.
+			 * Window 1 goes at ? MB and is ? MB large, S/G.
 			 */
 
 			*(vuip)MCPCIA_W0_BASE(h) = 1U | (MCPCIA_DMA_WIN_BASE_DEFAULT & 0xfff00000U);
@@ -551,14 +588,6 @@
 }
 
 static void
-mcpcia_pci_clr_err(int cpu, int hose)
-{
-	MCPCIA_jd[cpu] = *(vuip)MCPCIA_CAP_ERR(hose);
-	*(vuip)MCPCIA_CAP_ERR(hose) = 0xffffffff; mb(); /* clear them all */
-	MCPCIA_jd[cpu] = *(vuip)MCPCIA_CAP_ERR(hose); /* read to force write */
-}
-
-static void
 mcpcia_print_uncorrectable(struct el_MCPCIA_uncorrected_frame_mcheck *logout)
 {
 	struct el_common_EV5_uncorrectable_mcheck *frame;
@@ -568,65 +597,64 @@
 
 	/* Print PAL fields */
 	for (i = 0; i < 24; i += 2) {
-		printk("\tpal temp[%d-%d]\t\t= %16lx %16lx\n",
+		printk("  paltmp[%2d-%2d]    = %16lx %16lx\n",
 		       i, i+1, frame->paltemp[i], frame->paltemp[i+1]);
 	}
 	for (i = 0; i < 8; i += 2) {
-		printk("\tshadow[%d-%d]\t\t= %16lx %16lx\n",
+		printk("  shadow[%2d-%2d]     = %16lx %16lx\n",
 		       i, i+1, frame->shadow[i], 
 		       frame->shadow[i+1]);
 	}
-	printk("\tAddr of excepting instruction\t= %16lx\n",
+	printk("  Addr of excepting instruction  = %16lx\n",
 	       frame->exc_addr);
-	printk("\tSummary of arithmetic traps\t= %16lx\n",
+	printk("  Summary of arithmetic traps    = %16lx\n",
 	       frame->exc_sum);
-	printk("\tException mask\t\t\t= %16lx\n",
+	printk("  Exception mask                 = %16lx\n",
 	       frame->exc_mask);
-	printk("\tBase address for PALcode\t= %16lx\n",
+	printk("  Base address for PALcode       = %16lx\n",
 	       frame->pal_base);
-	printk("\tInterrupt Status Reg\t\t= %16lx\n",
+	printk("  Interrupt Status Reg           = %16lx\n",
 	       frame->isr);
-	printk("\tCURRENT SETUP OF EV5 IBOX\t= %16lx\n",
+	printk("  CURRENT SETUP OF EV5 IBOX      = %16lx\n",
 	       frame->icsr);
-	printk("\tI-CACHE Reg %s parity error\t= %16lx\n",
-	       (frame->ic_perr_stat & 0x800L) ? 
-	       "Data" : "Tag", 
+	printk("  I-CACHE Reg %s parity error    = %16lx\n",
+	       (frame->ic_perr_stat & 0x800L) ? "Data" : "Tag", 
 	       frame->ic_perr_stat); 
-	printk("\tD-CACHE error Reg\t\t= %16lx\n",
+	printk("  D-CACHE error Reg              = %16lx\n",
 	       frame->dc_perr_stat);
 	if (frame->dc_perr_stat & 0x2) {
 		switch (frame->dc_perr_stat & 0x03c) {
 		case 8:
-			printk("\t\tData error in bank 1\n");
+			printk("    Data error in bank 1\n");
 			break;
 		case 4:
-			printk("\t\tData error in bank 0\n");
+			printk("    Data error in bank 0\n");
 			break;
 		case 20:
-			printk("\t\tTag error in bank 1\n");
+			printk("    Tag error in bank 1\n");
 			break;
 		case 10:
-			printk("\t\tTag error in bank 0\n");
+			printk("    Tag error in bank 0\n");
 			break;
 		}
 	}
-	printk("\tEffective VA\t\t\t= %16lx\n",
+	printk("  Effective VA                   = %16lx\n",
 	       frame->va);
-	printk("\tReason for D-stream\t\t= %16lx\n",
+	printk("  Reason for D-stream            = %16lx\n",
 	       frame->mm_stat);
-	printk("\tEV5 SCache address\t\t= %16lx\n",
+	printk("  EV5 SCache address             = %16lx\n",
 	       frame->sc_addr);
-	printk("\tEV5 SCache TAG/Data parity\t= %16lx\n",
+	printk("  EV5 SCache TAG/Data parity     = %16lx\n",
 	       frame->sc_stat);
-	printk("\tEV5 BC_TAG_ADDR\t\t\t= %16lx\n",
+	printk("  EV5 BC_TAG_ADDR                = %16lx\n",
 	       frame->bc_tag_addr);
-	printk("\tEV5 EI_ADDR: Phys addr of Xfer\t= %16lx\n",
+	printk("  EV5 EI_ADDR: Phys addr of Xfer = %16lx\n",
 	       frame->ei_addr);
-	printk("\tFill Syndrome\t\t\t= %16lx\n",
+	printk("  Fill Syndrome                  = %16lx\n",
 	       frame->fill_syndrome);
-	printk("\tEI_STAT reg\t\t\t= %16lx\n",
+	printk("  EI_STAT reg                    = %16lx\n",
 	       frame->ei_stat);
-	printk("\tLD_LOCK\t\t\t\t= %16lx\n",
+	printk("  LD_LOCK                        = %16lx\n",
 	       frame->ld_lock);
 }
 
@@ -636,32 +664,53 @@
 {
 	struct el_common *mchk_header;
 	struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout;
-	unsigned int cpu = smp_processor_id();
+	unsigned int cpu;
+#if 0
+halt();
+#endif
+	mb();
+	mb();  /* magic */
+#if 0
+	draina();
+#endif
 
 	mchk_header = (struct el_common *)la_ptr;
 	mchk_logout = (struct el_MCPCIA_uncorrected_frame_mcheck *)la_ptr;
 
-	mb();
-	mb();  /* magic */
-	draina();
-	if (MCPCIA_mcheck_expected[cpu])
+	cpu = smp_processor_id();
+
+	if (!MCPCIA_mcheck_probing_hose) {
+
+	    if (MCPCIA_mcheck_expected[cpu])
 		mcpcia_pci_clr_err(cpu, MCPCIA_mcheck_hose[cpu]);
-	else {
+	    else {
 		/* FIXME: how do we figure out which hose the error was on? */
 		mcpcia_pci_clr_err(cpu, 0);
 		mcpcia_pci_clr_err(cpu, 1);
+	    }
+
+	} else {
+		/* FIXME: clear out known always good hoses */
+		mcpcia_pci_clr_err(cpu, 0);
+		mcpcia_pci_clr_err(cpu, 1);
 	}
+
 	wrmces(0x7);
 	mb();
 
-	process_mcheck_info(vector, la_ptr, regs, "MCPCIA",
-			    DEBUG_MCHECK, MCPCIA_mcheck_expected[cpu]);
+	if (MCPCIA_mcheck_enable_print) {
+
+	    process_mcheck_info(vector, la_ptr, regs, "MCPCIA",
+				DEBUG_MCHECK, MCPCIA_mcheck_expected[cpu]);
 
-	if (vector != 0x620 && vector != 0x630
-	    && ! MCPCIA_mcheck_expected[cpu]) {
+	    if (vector != 0x620 && vector != 0x630
+		&& ! MCPCIA_mcheck_expected[cpu]) {
 		mcpcia_print_uncorrectable(mchk_logout);
+	    }
 	}
 
+#if 0
 	MCPCIA_mcheck_expected[cpu] = 0;
+#endif
 	MCPCIA_mcheck_taken[cpu] = 1;
 }
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/core_pyxis.c linux-2.2.14-pre9/arch/alpha/kernel/core_pyxis.c
--- linux-2.2.14-pre8/arch/alpha/kernel/core_pyxis.c	1999-08-09 12:05:05.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/core_pyxis.c	2003-08-15 15:09:15.000000000 -0700
@@ -43,8 +43,6 @@
 
 static volatile unsigned int PYXIS_mcheck_expected = 0;
 static volatile unsigned int PYXIS_mcheck_taken = 0;
-static unsigned int PYXIS_jd;
-
 
 /*
  * Given a bus, device, and function number, compute resulting
@@ -526,23 +524,17 @@
 pyxis_machine_check(unsigned long vector, unsigned long la_ptr,
 		    struct pt_regs * regs)
 {
-	struct el_common *mchk_header;
-	struct el_PYXIS_sysdata_mcheck *mchk_sysdata;
-
-	mchk_header = (struct el_common *)la_ptr;
-
-	mchk_sysdata = (struct el_PYXIS_sysdata_mcheck *)
-		(la_ptr + mchk_header->sys_offset);
+	unsigned int tmp;
 
 	/* Clear the error before reporting anything. */
 	mb();
 	mb();  /* magic */
 	draina();
 
-	PYXIS_jd = *(vuip)PYXIS_ERR;
-	*(vuip)PYXIS_ERR = PYXIS_jd;
+	tmp = *(vuip)PYXIS_ERR;
+	*(vuip)PYXIS_ERR = tmp;
 	mb();
-	PYXIS_jd = *(vuip)PYXIS_ERR;  /* re-read to force write */
+	*(vuip)PYXIS_ERR;  /* re-read to force write */
 
 	wrmces(0x7);
 	mb();
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/core_tsunami.c linux-2.2.14-pre9/arch/alpha/kernel/core_tsunami.c
--- linux-2.2.14-pre8/arch/alpha/kernel/core_tsunami.c	1999-08-09 12:05:05.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/core_tsunami.c	2003-08-15 15:09:15.000000000 -0700
@@ -164,6 +164,8 @@
 		return PCIBIOS_DEVICE_NOT_FOUND;
 
 	__kernel_stb(value, *(vucp)addr);
+	mb();
+	__kernel_ldbu(*(vucp)addr);
 	return PCIBIOS_SUCCESSFUL;
 }
 
@@ -178,6 +180,8 @@
 		return PCIBIOS_DEVICE_NOT_FOUND;
 
 	__kernel_stw(value, *(vusp)addr);
+	mb();
+	__kernel_ldwu(*(vusp)addr);
 	return PCIBIOS_SUCCESSFUL;
 }
 
@@ -192,6 +196,8 @@
 		return PCIBIOS_DEVICE_NOT_FOUND;
 
 	*(vuip)addr = value;
+	mb();
+	*(vuip)addr;
 	return PCIBIOS_SUCCESSFUL;
 }
 
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/irq.c linux-2.2.14-pre9/arch/alpha/kernel/irq.c
--- linux-2.2.14-pre8/arch/alpha/kernel/irq.c	1999-08-09 12:05:05.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/irq.c	2003-08-15 15:09:15.000000000 -0700
@@ -35,12 +35,16 @@
 #define vulp	volatile unsigned long *
 #define vuip	volatile unsigned int *
 
-unsigned int local_irq_count[NR_CPUS];
-unsigned int local_bh_count[NR_CPUS];
-unsigned long hardirq_no[NR_CPUS];
+/* Only uniprocessor needs this IRQ/BH locking depth, on SMP it
+ * lives in the per-cpu structure for cache reasons.
+ */
+#ifndef __SMP__
+unsigned long local_bh_count;
+unsigned long local_irq_count;
+#endif
 
-#if NR_IRQS > 64
-#  error Unable to handle more than 64 irq levels.
+#if NR_IRQS > 128
+#  error Unable to handle more than 128 irq levels.
 #endif
 
 #ifdef CONFIG_ALPHA_GENERIC
@@ -57,7 +61,7 @@
 /*
  * Shadow-copy of masked interrupts.
  */
-unsigned long alpha_irq_mask = ~0UL;
+unsigned long _alpha_irq_masks[2] = {~0UL, ~0UL };
 
 /*
  * The ack_irq routine used by 80% of the systems.
@@ -107,6 +111,8 @@
 # define IACK_SC	TSUNAMI_IACK_SC
 #elif defined(CONFIG_ALPHA_POLARIS)
 # define IACK_SC	POLARIS_IACK_SC
+#elif defined(CONFIG_ALPHA_IRONGATE)
+# define IACK_SC        IRONGATE_IACK_SC
 #else
   /* This is bogus but necessary to get it to compile on all platforms. */
 # define IACK_SC	1L
@@ -182,13 +188,15 @@
 static inline void
 mask_irq(unsigned long irq)
 {
-	alpha_mv.update_irq_hw(irq, alpha_irq_mask |= 1UL << irq, 0);
+	set_bit(irq, _alpha_irq_masks);
+	alpha_mv.update_irq_hw(irq, alpha_irq_mask, 0);
 }
 
 static inline void
 unmask_irq(unsigned long irq)
 {
-	alpha_mv.update_irq_hw(irq, alpha_irq_mask &= ~(1UL << irq), 1);
+	clear_bit(irq, _alpha_irq_masks);
+	alpha_mv.update_irq_hw(irq, alpha_irq_mask, 1);
 }
 
 void
@@ -205,7 +213,7 @@
 disable_irq(unsigned int irq_nr)
 {
 	/* This works non-SMP, and SMP until we write code to distribute
-	   interrupts to more that cpu 0.  */
+	   interrupts to more than CPU 0.  */
 	disable_irq_nosync(irq_nr);
 }
 
@@ -384,6 +392,8 @@
 
 static void show(char * str, void *where);
 
+#define SYNC_OTHER_CPUS(x)	udelay((x)+1)
+
 static inline void
 wait_on_irq(int cpu, void *where)
 {
@@ -397,8 +407,7 @@
 		 * already executing in one..
 		 */
 		if (!atomic_read(&global_irq_count)) {
-			if (local_bh_count[cpu] ||
-			    !atomic_read(&global_bh_count))
+			if (local_bh_count || !atomic_read(&global_bh_count))
 				break;
 		}
 
@@ -412,18 +421,14 @@
 				count = MAXCOUNT;
 			}
 			__sti();
-#if 0
-			SYNC_OTHER_CORES(cpu);
-#else
-			udelay(cpu+1);
-#endif
+			SYNC_OTHER_CPUS(cpu);
 			__cli();
 
 			if (atomic_read(&global_irq_count))
 				continue;
-			if (global_irq_lock.lock)
+			if (spin_is_locked(&global_irq_lock))
 				continue;
-			if (!local_bh_count[cpu] &&
+			if (!local_bh_count &&
 			    atomic_read(&global_bh_count))
 				continue;
 			if (spin_trylock(&global_irq_lock))
@@ -437,13 +442,8 @@
 {
 	if (!spin_trylock(&global_irq_lock)) {
 		/* do we already hold the lock? */
-		if (cpu == global_irq_holder) {
-#if 0
-			printk("get_irqlock: already held at %08lx\n",
-			       previous_irqholder);
-#endif
+		if (cpu == global_irq_holder)
 			return;
-		}
 		/* Uhhuh.. Somebody else got it. Wait.. */
 		spin_lock(&global_irq_lock);
 	}
@@ -469,25 +469,19 @@
 void
 __global_cli(void)
 {
-	int cpu;
-	void *where = __builtin_return_address(0);
-
 	/*
 	 * Maximize ipl.  If ipl was previously 0 and if this thread
 	 * is not in an irq, then take global_irq_lock.
 	 */
-	if ((swpipl(7) == 0) && !local_irq_count[cpu = smp_processor_id()])
-		get_irqlock(cpu, where);
+	if ((swpipl(7) == 0) && !local_irq_count)
+		get_irqlock(smp_processor_id(), __builtin_return_address(0));
 }
 
 void
 __global_sti(void)
 {
-        int cpu = smp_processor_id();
-
-        if (!local_irq_count[cpu]) {
-		release_irqlock(cpu);
-	}
+        if (!local_irq_count)
+		release_irqlock(smp_processor_id());
 	__sti();
 }
 
@@ -512,7 +506,7 @@
         retval = 2 + local_enabled;
 
         /* Check for global flags if we're not in an interrupt.  */
-        if (!local_irq_count[cpu]) {
+        if (!local_irq_count) {
                 if (local_enabled)
                         retval = 1;
                 if (global_irq_holder == cpu)
@@ -566,11 +560,10 @@
 
 	hardirq_enter(cpu, irq);
 	barrier();
-	while (global_irq_lock.lock) {
+	while (spin_is_locked(&global_irq_lock)) {
 		if (cpu == global_irq_holder) {
-			int globl_locked = global_irq_lock.lock;
+			int globl_locked = spin_is_locked(&global_irq_lock);
 			int globl_icount = atomic_read(&global_irq_count);
-			int local_count = local_irq_count[cpu];
 
 			/* It is very important that we load the state
 			   variables before we do the first call to
@@ -578,9 +571,9 @@
 			   them...  */
 
 			printk("CPU[%d]: where [%p] glocked[%d] gicnt[%d]"
-			       " licnt[%d]\n",
+			       " licnt[%ld]\n",
 			       cpu, previous_irqholder, globl_locked,
-			       globl_icount, local_count);
+			       globl_icount, local_irq_count);
 #ifdef VERBOSE_IRQLOCK_DEBUGGING
 			printk("Performing backtrace on all CPUs,"
 			       " write this down!\n");
@@ -609,19 +602,17 @@
 #endif
         int cpu = smp_processor_id();
 
-	int global_count = atomic_read(&global_irq_count);
-        int local_count0 = local_irq_count[0];
-        int local_count1 = local_irq_count[1];
-        long hardirq_no0 = hardirq_no[0];
-        long hardirq_no1 = hardirq_no[1];
-
         printk("\n%s, CPU %d: %p\n", str, cpu, where);
-        printk("irq:  %d [%d(0x%016lx) %d(0x%016lx)]\n", global_count,
-               local_count0, hardirq_no0, local_count1, hardirq_no1);
+	printk("irq:  %d [%ld %ld]\n",
+	       atomic_read(&global_irq_count),
+	       cpu_data[0].irq_count,
+	       cpu_data[1].irq_count);
+
+	printk("bh:   %d [%ld %ld]\n",
+	       atomic_read(&global_bh_count),
+	       cpu_data[0].bh_count,
+	       cpu_data[1].bh_count);
 
-        printk("bh:   %d [%d %d]\n",
-	       atomic_read(&global_bh_count), local_bh_count[0],
-	       local_bh_count[1]);
 #if 0
         stack = (unsigned long *) &str;
         for (i = 40; i ; i--) {
@@ -644,6 +635,7 @@
                         count = ~0;
                 }
                 /* nothing .. wait for the other bh's to go away */
+		barrier();
         } while (atomic_read(&global_bh_count) != 0);
 }
 
@@ -658,12 +650,8 @@
 void
 synchronize_bh(void)
 {
-	if (atomic_read(&global_bh_count)) {
-		int cpu = smp_processor_id();
-                if (!local_irq_count[cpu] && !local_bh_count[cpu]) {
+	if (atomic_read(&global_bh_count) && !in_interrupt())
 			wait_on_bh();
-		}
-        }
 }
 
 /*
@@ -680,6 +668,7 @@
 void
 synchronize_irq(void)
 {
+#ifdef JOES_ORIGINAL_VERSION
 	int cpu = smp_processor_id();
 	int local_count;
 	int global_count;
@@ -688,7 +677,7 @@
 
 	mb();
 	do {
-		local_count = local_irq_count[cpu];
+		local_count = local_irq_count;
 		global_count = atomic_read(&global_irq_count);
 		if (DEBUG_SYNCHRONIZE_IRQ && (--countdown == 0)) {
 			printk("%d:%d/%d\n", cpu, local_count, global_count);
@@ -696,12 +685,19 @@
 			break;
 		}
 	} while (global_count != local_count);
+#else
+	if (atomic_read(&global_irq_count)) {
+		/* Stupid approach */
+		cli();
+		sti();
+	}
+#endif
 }
 
 #else /* !__SMP__ */
 
-#define irq_enter(cpu, irq)	(++local_irq_count[cpu])
-#define irq_exit(cpu, irq)	(--local_irq_count[cpu])
+#define irq_enter(cpu, irq)	(++local_irq_count)
+#define irq_exit(cpu, irq)	(--local_irq_count)
 
 #endif /* __SMP__ */
 
@@ -816,7 +812,8 @@
 	unsigned long delay;
 	unsigned int i;
 
-	for (i = ACTUAL_NR_IRQS - 1; i > 0; i--) {
+	/* Handle only the first 64 IRQs here. */
+	for (i = (ACTUAL_NR_IRQS - 1) & 63; i > 0; i--) {
 		if (!(PROBE_MASK & (1UL << i))) {
 			continue;
 		}
@@ -849,6 +846,7 @@
 {
 	int i;
 	
+	/* Handle only the first 64 IRQs here. */
         irqs &= alpha_irq_mask;
 	if (!irqs)
 		return 0;
@@ -934,6 +932,19 @@
 	if (expected)
 		return;
 
+	/* Just in case we get some incomplete arguments... */
+	if (!la_ptr) {
+	    if (!regs)
+		printk(KERN_CRIT "%s machine check: vector=0x%lx\n",
+		       machine, vector);
+	    else
+		printk(KERN_CRIT "%s machine check: vector=0x%lx"
+		       " pc=0x%lx ra=0x%lx args=0x%lx/0x%lx/0x%lx\n",
+		       machine, vector, regs->pc, regs->r26,
+		       regs->r16, regs->r17, regs->r18);
+	    return;
+	}
+
 	mchk_header = (struct el_common *)la_ptr;
 
 	printk(KERN_CRIT "%s machine check: vector=0x%lx pc=0x%lx code=0x%lx\n",
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/irq.h linux-2.2.14-pre9/arch/alpha/kernel/irq.h
--- linux-2.2.14-pre8/arch/alpha/kernel/irq.h	1999-08-09 12:04:38.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/irq.h	2003-08-15 15:09:15.000000000 -0700
@@ -9,6 +9,7 @@
  */
 
 #include <linux/config.h>
+#include <asm/irq.h>
 
 #define STANDARD_INIT_IRQ_PROLOG	\
 	outb(0, DMA1_RESET_REG);	\
@@ -16,7 +17,8 @@
 	outb(0, DMA1_CLR_MASK_REG);	\
 	outb(0, DMA2_CLR_MASK_REG)
 
-extern unsigned long alpha_irq_mask;
+extern unsigned long _alpha_irq_masks[2];
+#define alpha_irq_mask _alpha_irq_masks[0]
 
 extern void generic_ack_irq(unsigned long irq);
 extern void isa_device_interrupt(unsigned long vector, struct pt_regs * regs);
@@ -48,3 +50,40 @@
 #define TIMER_IRQ  RTC_IRQ		 /* timer is the rtc */
 #endif
 
+/*
+ * PROBE_MASK is the bitset of irqs that we consider for autoprobing.
+ */
+
+/* NOTE: we only handle the first 64 IRQs in this code. */
+
+/* The normal mask includes all the IRQs except timer IRQ 0.  */
+#define _PROBE_MASK(nr_irqs)	\
+	(((nr_irqs > 63) ? ~0UL : ((1UL << (nr_irqs & 63)) - 1)) & ~1UL)
+
+/* Mask out unused timer irq 0 and RTC irq 8. */
+#define P2K_PROBE_MASK		(_PROBE_MASK(16) & ~0x101UL)
+
+/* Mask out unused timer irq 0, "irqs" 20-30, and the EISA cascade. */
+#define ALCOR_PROBE_MASK	(_PROBE_MASK(48) & ~0xfff000000001UL)
+
+/* Leave timer IRQ 0 in the mask.  */
+#define RUFFIAN_PROBE_MASK	(_PROBE_MASK(48) | 1UL)
+
+/* Do not probe/enable beyond the PCI devices. */
+#define TSUNAMI_PROBE_MASK	_PROBE_MASK(48)
+
+#if defined(CONFIG_ALPHA_GENERIC)
+# define PROBE_MASK	alpha_mv.irq_probe_mask
+#elif defined(CONFIG_ALPHA_P2K)
+# define PROBE_MASK	P2K_PROBE_MASK
+#elif defined(CONFIG_ALPHA_ALCOR) || defined(CONFIG_ALPHA_XLT)
+# define PROBE_MASK	ALCOR_PROBE_MASK
+#elif defined(CONFIG_ALPHA_RUFFIAN)
+# define PROBE_MASK	RUFFIAN_PROBE_MASK
+#elif defined(CONFIG_ALPHA_DP264)
+# define PROBE_MASK	TSUNAMI_PROBE_MASK
+#else
+# define PROBE_MASK	_PROBE_MASK(NR_IRQS)
+#endif
+
+
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/machvec.h linux-2.2.14-pre9/arch/alpha/kernel/machvec.h
--- linux-2.2.14-pre8/arch/alpha/kernel/machvec.h	1999-08-09 12:04:38.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/machvec.h	2003-08-15 15:09:15.000000000 -0700
@@ -18,6 +18,11 @@
    we can read and write it as we like.  ;-)  */
 #define POLARIS_HAE_ADDRESS	(&alpha_mv.hae_cache)
 
+/* Whee.  IRONGATE doesn't have an HAE.  Fix things up for the GENERIC
+   kernel by defining the HAE address to be that of the cache.  Now
+   we can read and write it as we like.  ;-)  */
+#define IRONGATE_HAE_ADDRESS	(&alpha_mv.hae_cache)
+
 /* Only a few systems don't define IACK_SC, handling all interrupts through
    the SRM console.  But splitting out that one case from IO() below
    seems like such a pain.  Define this to get things to compile.  */
@@ -90,6 +95,7 @@
 
 #define DO_APECS_IO	IO(APECS,apecs,apecs)
 #define DO_CIA_IO	IO(CIA,cia,cia)
+#define DO_IRONGATE_IO	IO(IRONGATE,irongate,irongate)
 #define DO_LCA_IO	IO(LCA,lca,lca)
 #define DO_MCPCIA_IO	IO(MCPCIA,mcpcia,mcpcia)
 #define DO_PYXIS_IO	IO(PYXIS,pyxis_bw,pyxis)
@@ -103,6 +109,7 @@
 
 #define DO_APECS_BUS	BUS(apecs)
 #define DO_CIA_BUS	BUS(cia)
+#define DO_IRONGATE_BUS	BUS(irongate)
 #define DO_LCA_BUS	BUS(lca)
 #define DO_MCPCIA_BUS	BUS(mcpcia)
 #define DO_PYXIS_BUS	BUS(pyxis)
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/Makefile linux-2.2.14-pre9/arch/alpha/kernel/Makefile
--- linux-2.2.14-pre8/arch/alpha/kernel/Makefile	1999-08-09 12:04:38.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/Makefile	2003-08-15 15:09:15.000000000 -0700
@@ -12,8 +12,6 @@
 .S.o:
 	$(CC) -D__ASSEMBLY__ $(AFLAGS) -c -o $*.o $<
 
-all: kernel.o head.o
-
 O_TARGET := kernel.o
 O_OBJS   := entry.o traps.o process.o osf_sys.o irq.o signal.o setup.o \
 	    bios32.o ptrace.o time.o fpreg.o
@@ -22,12 +20,12 @@
 
 ifdef CONFIG_ALPHA_GENERIC
 
-O_OBJS	 += core_apecs.o core_cia.o core_lca.o core_mcpcia.o core_pyxis.o \
-	    core_t2.o core_tsunami.o core_polaris.o \
-	    sys_alcor.o sys_cabriolet.o sys_dp264.o sys_eb64p.o \
-	    sys_jensen.o sys_miata.o sys_mikasa.o sys_noritake.o \
-	    sys_rawhide.o sys_ruffian.o sys_sable.o sys_sio.o \
-	    sys_sx164.o sys_takara.o sys_rx164.o \
+O_OBJS	 += core_apecs.o core_cia.o core_irongate.o core_lca.o core_mcpcia.o \
+	    core_pyxis.o core_t2.o core_tsunami.o core_polaris.o \
+	    sys_alcor.o sys_cabriolet.o sys_dp264.o sys_eb64p.o sys_eiger.o \
+	    sys_jensen.o sys_miata.o sys_mikasa.o sys_nautilus.o \
+	    sys_noritake.o sys_rawhide.o sys_ruffian.o sys_rx164.o \
+	    sys_sable.o sys_sio.o sys_sx164.o sys_takara.o \
 	    es1888.o smc37c669.o smc37c93x.o
 else
 
@@ -38,6 +36,9 @@
 ifdef CONFIG_ALPHA_CIA
 O_OBJS   += core_cia.o
 endif
+ifdef CONFIG_ALPHA_IRONGATE
+O_OBJS   += core_irongate.o
+endif
 ifdef CONFIG_ALPHA_LCA
 O_OBJS   += core_lca.o
 endif
@@ -70,6 +71,9 @@
 ifneq ($(CONFIG_ALPHA_EB64P)$(CONFIG_ALPHA_EB66),)
 O_OBJS   += sys_eb64p.o
 endif
+ifdef CONFIG_ALPHA_EIGER
+O_OBJS   += sys_eiger.o
+endif
 ifdef CONFIG_ALPHA_JENSEN
 O_OBJS   += sys_jensen.o
 endif
@@ -79,6 +83,9 @@
 ifdef CONFIG_ALPHA_MIKASA
 O_OBJS   += sys_mikasa.o
 endif
+ifdef CONFIG_ALPHA_NAUTILUS
+O_OBJS   += sys_nautilus.o
+endif
 ifdef CONFIG_ALPHA_NORITAKE
 O_OBJS   += sys_noritake.o
 endif
@@ -121,7 +128,7 @@
 O_OBJS   += smp.o
 endif
 
-all: kernel.o head.o
+all: kernel.o head.o asm_offsets
 
 asm_offsets: check_asm
 	./check_asm > $(TOPDIR)/include/asm-alpha/asm_offsets.h
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/proto.h linux-2.2.14-pre9/arch/alpha/kernel/proto.h
--- linux-2.2.14-pre8/arch/alpha/kernel/proto.h	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/proto.h	2003-08-15 15:09:15.000000000 -0700
@@ -1,4 +1,5 @@
 /* Prototypes of functions used across modules here in this directory.  */
+#include <linux/pci.h>
 
 #define vucp	volatile unsigned char  *
 #define vusp	volatile unsigned short *
@@ -44,6 +45,22 @@
 extern void cia_init_arch(unsigned long *, unsigned long *);
 extern void cia_machine_check(u64, u64, struct pt_regs *);
 
+/* core_irongate.c */
+extern int irongate_hose_read_config_byte (u8, u8, u8, u8 *value,
+					  struct linux_hose_info *hose);
+extern int irongate_hose_read_config_word (u8, u8, u8, u16 *value,
+					  struct linux_hose_info *hose);
+extern int irongate_hose_read_config_dword (u8, u8, u8, u32 *value,
+					   struct linux_hose_info *hose);
+extern int irongate_hose_write_config_byte (u8, u8, u8, u8 value,
+					   struct linux_hose_info *hose);
+extern int irongate_hose_write_config_word (u8, u8, u8, u16 value,
+					   struct linux_hose_info *hose);
+extern int irongate_hose_write_config_dword (u8, u8, u8, u32 value,
+					    struct linux_hose_info *hose);
+extern void irongate_init_arch(unsigned long *, unsigned long *);
+extern void irongate_machine_check(u64, u64, struct pt_regs *);
+
 /* core_lca.c */
 extern int lca_hose_read_config_byte (u8, u8, u8, u8 *value,
 				      struct linux_hose_info *hose);
@@ -74,6 +91,7 @@
 extern int mcpcia_hose_write_config_dword (u8, u8, u8, u32 value,
 					   struct linux_hose_info *hose);
 extern void mcpcia_init_arch(unsigned long *, unsigned long *);
+extern void mcpcia_init_hoses(void);
 extern void mcpcia_machine_check(u64, u64, struct pt_regs *);
 
 /* core_polaris.c */
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/setup.c linux-2.2.14-pre9/arch/alpha/kernel/setup.c
--- linux-2.2.14-pre8/arch/alpha/kernel/setup.c	1999-08-25 17:29:45.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/setup.c	2003-08-15 15:09:15.000000000 -0700
@@ -37,6 +37,7 @@
 #include <asm/pgtable.h>
 #include <asm/system.h>
 #include <asm/hwrpb.h>
+#include <asm/page.h>
 #include <asm/dma.h>
 #include <asm/io.h>
 
@@ -56,6 +57,7 @@
 #define N(a) (sizeof(a)/sizeof(a[0]))
 
 static unsigned long find_end_memory(void);
+static unsigned long get_memory_end_override(char *);
 static struct alpha_machine_vector *get_sysvec(long, long, long);
 static struct alpha_machine_vector *get_sysvec_byname(const char *);
 static void get_sysnames(long, long, char **, char **);
@@ -112,12 +114,14 @@
 WEAK(eb64p_mv);
 WEAK(eb66_mv);
 WEAK(eb66p_mv);
+WEAK(eiger_mv);
 WEAK(jensen_mv);
 WEAK(lx164_mv);
 WEAK(miata_mv);
 WEAK(mikasa_mv);
 WEAK(mikasa_primo_mv);
 WEAK(monet_mv);
+WEAK(nautilus_mv);
 WEAK(noname_mv);
 WEAK(noritake_mv);
 WEAK(noritake_primo_mv);
@@ -136,7 +140,6 @@
 
 #undef WEAK
 
-
 void __init
 setup_arch(char **cmdline_p, unsigned long * memory_start_p,
 	   unsigned long * memory_end_p)
@@ -146,8 +149,9 @@
 	struct alpha_machine_vector *vec = NULL;
 	struct percpu_struct *cpu;
 	char *type_name, *var_name, *p;
+	unsigned long memory_end_override = 0;
 
-	hwrpb = (struct hwrpb_struct*)(IDENT_ADDR + INIT_HWRPB->phys_addr);
+	hwrpb = (struct hwrpb_struct*) __va(INIT_HWRPB->phys_addr);
 
 	/* 
 	 * Locate the command line.
@@ -189,6 +193,11 @@
 			est_cycle_freq = simple_strtol(p+6, NULL, 0);
 			continue;
 		}
+
+		if (strncmp(p, "mem=", 4) == 0) {
+			memory_end_override = get_memory_end_override(p+4);
+			continue;
+		}
 	}
 
 	/* Replace the command line, not that we've killed it with strtok.  */
@@ -215,9 +224,10 @@
 		      type_name, (*var_name ? " variation " : ""), var_name,
 		      hwrpb->sys_type, hwrpb->sys_variation);
 	}
-	if (vec != &alpha_mv)
+	if (vec != &alpha_mv) {
 		alpha_mv = *vec;
-
+	}
+	
 #ifdef CONFIG_ALPHA_GENERIC
 	/* Assume that we've booted from SRM if we havn't booted from MILO.
 	   Detect the later by looking for "MILO" in the system serial nr.  */
@@ -248,8 +258,14 @@
 	wrmces(0x7);
 
 	/* Find our memory.  */
-	*memory_end_p = find_end_memory();
 	*memory_start_p = (unsigned long) _end;
+	*memory_end_p = find_end_memory();
+	if (memory_end_override && memory_end_override < *memory_end_p) {
+		printk("Overriding memory size from %luMB to %luMB\n",
+		       __pa(*memory_end_p) >> 20,
+		       __pa(memory_end_override) >> 20);
+		*memory_end_p = memory_end_override;
+	}
 
 #ifdef CONFIG_BLK_DEV_INITRD
 	initrd_start = INITRD_START;
@@ -339,13 +355,35 @@
 	/* Round it up to an even number of pages. */
 	high = (high + PAGE_SIZE) & (PAGE_MASK*2);
 
-	/* Enforce maximum of 2GB even if there is more.  Blah.  */
+	/* Enforce maximum of 2GB even if there is more,
+	 * but only if the platform (support) cannot handle it.
+	 */
 	if (high > 0x80000000UL) {
-		printk("Cropping memory from %luMB to 2048MB\n", high);
+		printk("Cropping memory from %luMB to 2048MB\n", high >> 20);
 		high = 0x80000000UL;
 	}
 
-	return PAGE_OFFSET + high;
+	return (unsigned long) __va(high);
+}
+
+static unsigned long __init
+get_memory_end_override(char *s)
+{
+	unsigned long end = 0;
+	char *from = s;
+
+	end = simple_strtoul(from, &from, 0);
+	if ( *from == 'K' || *from == 'k' ) {
+		end = end << 10;
+		from++;
+	} else if ( *from == 'M' || *from == 'm' ) {
+		end = end << 20;
+		from++;
+	} else if ( *from == 'G' || *from == 'g' ) {
+		end = end << 30;
+		from++;
+	}
+	return (unsigned long) __va(end);
 }
 
 
@@ -358,11 +396,13 @@
 	"Mikasa", "EB64", "EB66", "EB64+", "AlphaBook1",
 	"Rawhide", "K2", "Lynx", "XL", "EB164", "Noritake",
 	"Cortex", "29", "Miata", "XXM", "Takara", "Yukon",
-	"Tsunami", "Wildfire", "CUSCO"
+	"Tsunami", "Wildfire", "CUSCO", "Eiger"
 };
 
 static char unofficial_names[][8] = {"100", "Ruffian"};
 
+static char api_names[][16] = {"200", "Nautilus"};
+
 static char eb164_names[][8] = {"EB164", "PC164", "LX164", "SX164", "RX164"};
 static int eb164_indices[] = {0,0,0,1,1,1,1,1,2,2,2,2,3,3,3,3,4};
 
@@ -386,7 +426,6 @@
 };
 static int tsunami_indices[] = {0,1,2,3,4,5,6,7,8};
 
-
 static struct alpha_machine_vector * __init
 get_sysvec(long type, long variation, long cpu)
 {
@@ -429,6 +468,7 @@
 		NULL,		/* Tsunami -- see variation.  */
 		NULL,		/* Wildfire */
 		NULL,		/* CUSCO */
+		&eiger_mv,	/* Eiger */
 	};
 
 	static struct alpha_machine_vector *unofficial_vecs[] __initlocaldata =
@@ -437,6 +477,12 @@
 		&ruffian_mv,
 	};
 
+	static struct alpha_machine_vector *api_vecs[] __initlocaldata =
+	{
+		NULL,		/* 200 */
+		&nautilus_mv,
+	};
+
 	static struct alpha_machine_vector *alcor_vecs[] __initlocaldata = 
 	{
 		&alcor_mv, &xlt_mv, &xlt_mv
@@ -485,6 +531,9 @@
 	vec = NULL;
 	if (type < N(systype_vecs)) {
 		vec = systype_vecs[type];
+	} else if ((type > ST_API_BIAS) &&
+		   (type - ST_API_BIAS) < N(api_vecs)) {
+		vec = api_vecs[type - ST_API_BIAS];
 	} else if ((type > ST_UNOFFICIAL_BIAS) &&
 		   (type - ST_UNOFFICIAL_BIAS) < N(unofficial_vecs)) {
 		vec = unofficial_vecs[type - ST_UNOFFICIAL_BIAS];
@@ -558,12 +607,14 @@
 		&eb64p_mv,
 		&eb66_mv,
 		&eb66p_mv,
+		&eiger_mv,
 		&jensen_mv,
 		&lx164_mv,
 		&miata_mv,
 		&mikasa_mv,
 		&mikasa_primo_mv,
 		&monet_mv,
+		&nautilus_mv,
 		&noname_mv,
 		&noritake_mv,
 		&noritake_primo_mv,
@@ -604,6 +655,9 @@
 	   else set type name to family */
 	if (type < N(systype_names)) {
 		*type_name = systype_names[type];
+	} else if ((type > ST_API_BIAS) &&
+		   (type - ST_API_BIAS) < N(api_names)) {
+		*type_name = api_names[type - ST_API_BIAS];
 	} else if ((type > ST_UNOFFICIAL_BIAS) &&
 		   (type - ST_UNOFFICIAL_BIAS) < N(unofficial_names)) {
 		*type_name = unofficial_names[type - ST_UNOFFICIAL_BIAS];
@@ -689,6 +743,21 @@
 	}
 }
 
+static int
+get_nr_processors(struct percpu_struct *cpubase, unsigned long num)
+{
+	struct percpu_struct *cpu;
+	int i, count = 0;
+
+	for (i = 0; i < num; i++) {
+		cpu = (struct percpu_struct *)
+			((char *)cpubase + i*hwrpb->processor_size);
+		if ((cpu->flags & 0x1cc) == 0x1cc)
+			count++;
+	}
+	return count;
+}
+
 /*
  * BUFFER is PAGE_SIZE bytes long.
  */
@@ -708,7 +777,7 @@
 	char *cpu_name;
 	char *systype_name;
 	char *sysvariation_name;
-	int len;
+	int len, nr_processors;
 
 	cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset);
 	cpu_index = (unsigned) (cpu->type - 1);
@@ -719,6 +788,8 @@
 	get_sysnames(hwrpb->sys_type, hwrpb->sys_variation,
 		     &systype_name, &sysvariation_name);
 
+	nr_processors = get_nr_processors(cpu, hwrpb->nr_processors);
+
 	len = sprintf(buffer,
 		      "cpu\t\t\t: Alpha\n"
 		      "cpu model\t\t: %s\n"
@@ -738,7 +809,7 @@
 		      "kernel unaligned acc\t: %ld (pc=%lx,va=%lx)\n"
 		      "user unaligned acc\t: %ld (pc=%lx,va=%lx)\n"
 		      "platform string\t\t: %s\n"
-		      "cpus detected\t\t: %ld\n",
+		      "cpus detected\t\t: %d\n",
 		       cpu_name, cpu->variation, cpu->revision,
 		       (char*)cpu->serial_no,
 		       systype_name, sysvariation_name, hwrpb->sys_revision,
@@ -753,7 +824,7 @@
 		       loops_per_sec / 500000, (loops_per_sec / 5000) % 100,
 		       unaligned[0].count, unaligned[0].pc, unaligned[0].va,
 		       unaligned[1].count, unaligned[1].pc, unaligned[1].va,
-		       platform_string(), hwrpb->nr_processors);
+		       platform_string(), nr_processors);
 
 #ifdef __SMP__
 	len += smp_info(buffer+len);
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/smp.c linux-2.2.14-pre9/arch/alpha/kernel/smp.c
--- linux-2.2.14-pre8/arch/alpha/kernel/smp.c	1999-08-09 12:04:38.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/smp.c	2003-08-15 15:09:15.000000000 -0700
@@ -97,6 +97,9 @@
 	cpu_data[cpuid].loops_per_sec = loops_per_sec;
 	cpu_data[cpuid].last_asn
 	  = (cpuid << WIDTH_HARDWARE_ASN) + ASN_FIRST_VERSION;
+
+        cpu_data[cpuid].irq_count = 0;
+        cpu_data[cpuid].bh_count = 0;
 }
 
 /*
@@ -580,7 +583,7 @@
 smp_percpu_timer_interrupt(struct pt_regs *regs)
 {
 	int cpu = smp_processor_id();
-	int user = user_mode(regs);
+	unsigned long user = user_mode(regs);
 	struct cpuinfo_alpha *data = &cpu_data[cpu];
 
 	/* Record kernel PC */
@@ -902,7 +905,7 @@
 			return;
 	} else
 		flush_tlb_other(mm);
-	
+       
 	data.vma = vma;
 	data.mm = mm;
 	data.addr = addr;
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/sys_dp264.c linux-2.2.14-pre9/arch/alpha/kernel/sys_dp264.c
--- linux-2.2.14-pre8/arch/alpha/kernel/sys_dp264.c	1999-08-09 12:04:38.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/sys_dp264.c	2003-08-15 15:09:15.000000000 -0700
@@ -203,7 +203,6 @@
 	enable_irq(2);
 }
 
-
 /*
  * PCI Fixup configuration.
  *
@@ -402,7 +401,6 @@
 {
 	layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
 	common_pci_fixup(webbrick_map_irq, common_swizzle);
-	SMC669_Init(0);
 }
 
 static void __init
@@ -412,7 +410,6 @@
 	common_pci_fixup(clipper_map_irq, common_swizzle);
 }
 
-
 /*
  * The System Vectors
  */
@@ -427,7 +424,7 @@
 	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,
 
 	nr_irqs:		64,
-	irq_probe_mask:		_PROBE_MASK(64),
+	irq_probe_mask:		TSUNAMI_PROBE_MASK,
 	update_irq_hw:		dp264_update_irq_hw,
 	ack_irq:		generic_ack_irq,
 	device_interrupt:	dp264_device_interrupt,
@@ -450,7 +447,7 @@
 	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,
 
 	nr_irqs:		64,
-	irq_probe_mask:		_PROBE_MASK(64),
+	irq_probe_mask:		TSUNAMI_PROBE_MASK,
 	update_irq_hw:		dp264_update_irq_hw,
 	ack_irq:		generic_ack_irq,
 	device_interrupt:	dp264_device_interrupt,
@@ -472,7 +469,7 @@
 	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,
 
 	nr_irqs:		64,
-	irq_probe_mask:		_PROBE_MASK(64),
+	irq_probe_mask:		TSUNAMI_PROBE_MASK,
 	update_irq_hw:		dp264_update_irq_hw,
 	ack_irq:		generic_ack_irq,
 	device_interrupt:	dp264_device_interrupt,
@@ -494,7 +491,7 @@
 	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,
 
 	nr_irqs:		64,
-	irq_probe_mask:		_PROBE_MASK(64),
+	irq_probe_mask:		TSUNAMI_PROBE_MASK,
 	update_irq_hw:		clipper_update_irq_hw,
 	ack_irq:		generic_ack_irq,
 	device_interrupt:	dp264_device_interrupt,
@@ -505,6 +502,6 @@
 	pci_fixup:		clipper_pci_fixup,
 	kill_arch:		generic_kill_arch,
 };
-
 /* No alpha_mv alias for webbrick/monet/clipper, since we compile them
    in unconditionally with DP264; setup_arch knows how to cope.  */
+
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/sys_eiger.c linux-2.2.14-pre9/arch/alpha/kernel/sys_eiger.c
--- linux-2.2.14-pre8/arch/alpha/kernel/sys_eiger.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre9/arch/alpha/kernel/sys_eiger.c	2003-08-15 15:09:15.000000000 -0700
@@ -0,0 +1,237 @@
+/*
+ *	linux/arch/alpha/kernel/sys_eiger.c
+ *
+ *	Copyright (C) 1995 David A Rusling
+ *	Copyright (C) 1996, 1999 Jay A Estabrook
+ *	Copyright (C) 1998, 1999 Richard Henderson
+ *	Copyright (C) 1999 Iain Grant
+ *
+ * Code supporting the EIGER (EV6+TSUNAMI).
+ */
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+
+#include <asm/ptrace.h>
+#include <asm/system.h>
+#include <asm/dma.h>
+#include <asm/irq.h>
+#include <asm/bitops.h>
+#include <asm/mmu_context.h>
+#include <asm/io.h>
+#include <asm/pci.h>
+#include <asm/pgtable.h>
+#include <asm/core_tsunami.h>
+#include <asm/hwrpb.h>
+
+#include "proto.h"
+#include "irq.h"
+#include "bios32.h"
+#include "machvec.h"
+
+#define dev2hose(d) (bus2hose[(d)->bus->number]->pci_hose_index)
+
+/*
+ * HACK ALERT! only the boot cpu is used for interrupts.
+ */
+
+static void
+eiger_update_irq_hw(unsigned long irq, unsigned long unused, int unmask_p)
+{
+
+	unsigned int regaddr;
+	unsigned long mask;
+
+	if (irq <= 15) {
+		if (irq <= 7)
+			outb(alpha_irq_mask, 0x21);		/* ISA PIC1 */
+	else
+			outb(alpha_irq_mask >> 8, 0xA1);	/* ISA PIC2 */
+	} else {
+		if (irq > 63)
+			mask = _alpha_irq_masks[1] << 16;
+		else
+			mask = _alpha_irq_masks[0] >> ((irq - 16) & 0x30);
+
+		regaddr = 0x510 + (((irq - 16) >> 2) & 0x0c);
+
+		outl(mask & 0xffff0000UL, regaddr);
+	}
+
+}
+
+static void
+eiger_device_interrupt(unsigned long vector, struct pt_regs * regs)
+{
+	unsigned intstatus;
+
+	/*
+	 * The PALcode will have passed us vectors 0x800 or 0x810,
+	 * which are fairly arbitrary values and serve only to tell
+	 * us whether an interrupt has come in on IRQ0 or IRQ1. If
+	 * it's IRQ1 it's a PCI interrupt; if it's IRQ0, it's
+	 * probably ISA, but PCI interrupts can come through IRQ0
+	 * as well if the interrupt controller isn't in accelerated
+	 * mode.
+	 *
+	 * OTOH, the accelerator thing doesn't seem to be working
+	 * overly well, so what we'll do instead is try directly
+	 * examining the Master Interrupt Register to see if it's a
+	 * PCI interrupt, and if _not_ then we'll pass it on to the
+	 * ISA handler.
+	 */
+
+	intstatus = inw(0x500) & 15;
+	if (intstatus) {
+		/*
+		 * This is a PCI interrupt. Check each bit and
+		 * despatch an interrupt if it's set.
+		 */
+
+		if (intstatus & 8) handle_irq(16+3, 16+3, regs);
+		if (intstatus & 4) handle_irq(16+2, 16+2, regs);
+		if (intstatus & 2) handle_irq(16+1, 16+1, regs);
+		if (intstatus & 1) handle_irq(16+0, 16+0, regs);
+	} else
+		isa_device_interrupt (vector, regs);
+}
+
+
+static void
+eiger_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
+{
+   int irq = (vector - 0x800) >> 4;
+
+   handle_irq(irq, irq, regs);
+
+}
+
+static void __init
+eiger_init_irq(void)
+{
+	outb(0, DMA1_RESET_REG);
+	outb(0, DMA2_RESET_REG);
+	outb(DMA_MODE_CASCADE, DMA2_MODE_REG);
+	outb(0, DMA2_MASK_REG);
+
+	if (alpha_using_srm)
+		alpha_mv.device_interrupt = eiger_srm_device_interrupt;
+
+	eiger_update_irq_hw(16, alpha_irq_mask, 0);
+
+	enable_irq(2);
+}
+
+static int __init
+eiger_map_irq(struct pci_dev *dev, int slot, int pin)
+{
+	u8 irq_orig;
+	int irq;
+
+	/* The SRM console has already calculated out the IRQ value's for
+	   option cards. As this works lets just read in the value already
+	   set and change it to a useable value by Linux.
+
+	   All the IRQ values generated by the console are greater than 90,
+	   so we calculate a value for Linux by the following:
+
+	   irq = (card Irq - 80);
+
+	   We subtract 80 because it is (90 - allocated ISA IRQ's ).
+	*/
+	pcibios_read_config_byte(dev->bus->number,
+				 dev->devfn,
+				 PCI_INTERRUPT_LINE,
+				 &irq_orig);
+
+	irq = ( irq_orig - 0x80);
+
+	return irq;
+}
+
+/* New swizzle routine with code for card based bridges */
+static int __init
+eiger_swizzle(struct pci_dev *dev, int *pinp)
+{
+	int slot, pin = *pinp;
+	int bridge_count = 0;
+
+	/* Find the number of backplane bridges */
+	int backplane = ( inw(0x502) & 0x0f);
+
+	switch (backplane)
+	{
+	   case 0x00: bridge_count = 0; break; /* No bridges */
+	   case 0x01: bridge_count = 1; break; /* 1 */
+	   case 0x03: bridge_count = 2; break; /* 2 */
+	   case 0x07: bridge_count = 3; break; /* 3 */
+	   case 0x0f: bridge_count = 4; break; /* 4 */
+	};
+
+
+	/*  Check first for the built-in bridges on hose 0. */
+	if ( dev2hose(dev) == 0 &&
+            ( (PCI_SLOT(dev->bus->self->devfn) > (20-bridge_count))))
+	{
+		slot = PCI_SLOT(dev->devfn);
+	} else {
+		/*  Must be a card-based bridge.  */
+		do {
+			/* Check for built-in bridges on hose 0. */
+			if ( dev2hose(dev) == 0 &&
+			     (PCI_SLOT(dev->bus->self->devfn) >
+				(20 - bridge_count)))
+			{
+                  		slot = PCI_SLOT(dev->devfn);
+				break;
+			}
+			pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)) ;
+
+			/* Move up the chain of bridges.  */
+			dev = dev->bus->self;
+			/* Slot of the next bridge.  */
+			slot = PCI_SLOT(dev->devfn);
+		} while (dev->bus->self);
+	}
+	*pinp = pin;
+
+	return slot;
+}
+
+static void __init
+eiger_pci_fixup(void)
+{
+	layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
+	common_pci_fixup(eiger_map_irq, eiger_swizzle);
+}
+
+/*
+ * The System Vectors
+ */
+
+struct alpha_machine_vector eiger_mv __initmv = {
+	vector_name:		"Eiger",
+	DO_EV6_MMU,
+	DO_DEFAULT_RTC,
+	DO_TSUNAMI_IO,
+	DO_TSUNAMI_BUS,
+	machine_check:		tsunami_machine_check,
+	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,
+
+	nr_irqs:		128,
+	irq_probe_mask:		TSUNAMI_PROBE_MASK,
+	update_irq_hw:		eiger_update_irq_hw,
+	ack_irq:		generic_ack_irq,
+	device_interrupt:	eiger_device_interrupt,
+
+	init_arch:		tsunami_init_arch,
+	init_irq:		eiger_init_irq,
+	init_pit:		generic_init_pit,
+	pci_fixup:		eiger_pci_fixup,
+	kill_arch:		generic_kill_arch,
+};
+ALIAS_MV(eiger)
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/sys_nautilus.c linux-2.2.14-pre9/arch/alpha/kernel/sys_nautilus.c
--- linux-2.2.14-pre8/arch/alpha/kernel/sys_nautilus.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre9/arch/alpha/kernel/sys_nautilus.c	2003-08-15 15:09:15.000000000 -0700
@@ -0,0 +1,535 @@
+/*
+ *	linux/arch/alpha/kernel/sys_nautilus.c
+ *
+ *	Copyright (C) 1995 David A Rusling
+ *	Copyright (C) 1998 Richard Henderson
+ *	Copyright (C) 1999 Alpha Processor, Inc., (David Daniel, Stig Telfer, Soohoon Lee)
+ *
+ * Code supporting NAUTILUS systems.
+ *
+ *
+ * NAUTILUS has the following I/O features:
+ *
+ * a) Driven by AMD 751 aka IRONGATE (northbridge):
+ *     4 PCI slots
+ *     1 AGP slot
+ *
+ * b) Driven by ALI M1543C (southbridge)
+ *     2 ISA slots
+ *     2 IDE connectors
+ *     1 dual drive capable FDD controller
+ *     2 serial ports
+ *     1 ECP/EPP/SP parallel port
+ *     2 USB ports
+ */
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/reboot.h>
+
+#include <asm/ptrace.h>
+#include <asm/system.h>
+#include <asm/dma.h>
+#include <asm/irq.h>
+#include <asm/bitops.h>
+#include <asm/mmu_context.h>
+#include <asm/io.h>
+#include <asm/pci.h>
+#include <asm/pgtable.h>
+#include <asm/core_irongate.h>
+#include <asm/hwrpb.h>
+
+#include "proto.h"
+#include "irq.h"
+#include "bios32.h"
+#include "machvec.h"
+
+#define dev2hose(d) (bus2hose[(d)->bus->number]->pci_hose_index)
+
+static void
+nautilus_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p)
+{
+	mask |= 0x100;	/*Timer is connected to PIC int. line also on Nautilus*/
+		      	/*And the timer int. handler enables PIC line */
+			/*So not to get multiple timer int. sources*/
+			/*Mask it all the times*/
+	if (irq >= 8)
+		outb(mask >> 8, 0xA1);
+	else
+		outb(mask, 0x21);
+}
+
+static void __init
+nautilus_init_irq(void)
+{
+	STANDARD_INIT_IRQ_PROLOG;
+
+	enable_irq(2);			/* enable cascade */
+	disable_irq(8);
+}
+
+
+static void __init
+nautilus_pci_fixup(void)
+{
+/* All BIOS setups are preserved */
+}
+
+void
+nautilus_kill_arch (int mode, char *restart_cmd)
+{
+
+#ifdef CONFIG_RTC
+	/* Reset rtc to defaults.  */
+	{
+		unsigned char control;
+
+		cli();
+
+		/* Reset periodic interrupt frequency.  */
+		CMOS_WRITE(0x26, RTC_FREQ_SELECT);
+
+		/* Turn on periodic interrupts.  */
+		control = CMOS_READ(RTC_CONTROL);
+		control |= RTC_PIE;
+		CMOS_WRITE(control, RTC_CONTROL);	
+		CMOS_READ(RTC_INTR_FLAGS);
+
+		sti();
+	}
+#endif
+
+	switch(mode) {
+        case LINUX_REBOOT_CMD_HALT:
+		printk("Press Reset bottun");
+		break;
+	case LINUX_REBOOT_CMD_RESTART:
+		{
+			int v;
+			irongate_hose_write_config_byte(0, 0x07<<3, 0x43, &v, 0);
+			irongate_hose_write_config_byte(0, 0x07<<3, 0x43, v | 0x80, 0);
+			outb(1, 0x92);
+			outb(0, 0x92);
+			printk("Press Reset button");
+		}
+		break;
+        case LINUX_REBOOT_CMD_POWER_OFF:
+	}
+
+	while (1)
+		;
+	halt();
+}
+
+/*----------------------------------------------------------------------*/
+/* Machine check handler code 
+ *
+ * Perform analysis of a machine check that was triggered by the EV6 CPU's
+ * fault-detection mechanism. */
+
+/* IPR structures for EV6, containing the necessary data for the
+ * machine check handler to unpick the logout frame
+ */
+
+
+/* I_STAT */
+
+#define EV6__I_STAT__PAR                ( 1 << 29 )
+
+
+/* MM_STAT */
+
+#define EV6__MM_STAT__DC_TAG_PERR       ( 1 << 10 )
+
+
+/* DC_STAT */
+
+#define EV6__DC_STAT__SEO               ( 1 << 4 )
+#define EV6__DC_STAT__ECC_ERR_LD        ( 1 << 3 )
+#define EV6__DC_STAT__ECC_ERR_ST        ( 1 << 2 )
+#define EV6__DC_STAT__TPERR_P1          ( 1 << 1 )
+#define EV6__DC_STAT__TPERR_P0          ( 1      )
+
+
+/* C_STAT */
+
+#define EV6__C_STAT__BC_PERR            ( 0x01 )
+#define EV6__C_STAT__DC_PERR            ( 0x02 )
+#define EV6__C_STAT__DSTREAM_MEM_ERR    ( 0x03 )
+#define EV6__C_STAT__DSTREAM_BC_ERR     ( 0x04 )
+#define EV6__C_STAT__DSTREAM_DC_ERR     ( 0x05 )
+#define EV6__C_STAT__PROBE_BC_ERR0      ( 0x06 )
+#define EV6__C_STAT__PROBE_BC_ERR1      ( 0x07 )
+#define EV6__C_STAT__ISTREAM_MEM_ERR    ( 0x0B )
+#define EV6__C_STAT__ISTREAM_BC_ERR     ( 0x0C )
+#define EV6__C_STAT__DSTREAM_MEM_DBL    ( 0x13 )
+#define EV6__C_STAT__DSTREAM_BC_DBL     ( 0x14 )
+#define EV6__C_STAT__ISTREAM_MEM_DBL    ( 0x1B )
+#define EV6__C_STAT__ISTREAM_BC_DBL     ( 0x1C )
+
+
+/* take the two syndromes from the CBOX error chain and convert them
+ * into a bit number */
+
+/* NOTE - since I don't know of any difference between C0 and C1
+ * I just ignore C1, since in all cases I've seen so far they are identical */
+
+static const unsigned char ev6_bit_to_syndrome[72] =
+{
+    0xce, 0xcb, 0xd3, 0xd5, 0xd6, 0xd9, 0xda, 0xdc,     /* 0 */
+    0x23, 0x25, 0x26, 0x29, 0x2a, 0x2c, 0x31, 0x34,     /* 8 */
+    0x0e, 0x0b, 0x13, 0x15, 0x16, 0x19, 0x1a, 0x1c,     /* 16 */
+    0xe3, 0xe5, 0xe6, 0xe9, 0xea, 0xec, 0xf1, 0xf4,     /* 24 */
+    0x4f, 0x4a, 0x52, 0x54, 0x57, 0x58, 0x5b, 0x5d,     /* 32 */
+    0xa2, 0xa4, 0xa7, 0xa8, 0xab, 0xad, 0xb0, 0xb5,     /* 40 */
+    0x8f, 0x8a, 0x92, 0x94, 0x97, 0x98, 0x9b, 0x9d,     /* 48 */
+    0x62, 0x64, 0x67, 0x68, 0x6b, 0x6d, 0x70, 0x75,     /* 56 */
+    0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80      /* 64 */
+};
+
+
+static int ev6_syn2bit(unsigned long c0, unsigned long c1)
+{
+    int bit;
+
+    for (bit = 0; bit < 72; bit++)
+        if (ev6_bit_to_syndrome[bit] == c0)	return bit;
+    for (bit = 0; bit < 72; bit++)
+        if (ev6_bit_to_syndrome[bit] == c1)	return bit + 64;
+
+    return -1;                  /* not found */
+}
+
+
+/* single bit ECC errors are categorised here */
+
+#if 0
+static const char *interr = "CPU internal error";
+static const char *slotb= "Slot-B error";
+static const char *membus= "Memory/EV6-bus error";
+#else
+static const char *interr = "";
+static const char *slotb = "";
+static const char *membus = "";
+#endif
+
+static void ev6_crd_interp(char *interp, struct el_common_EV6_mcheck * L)
+{
+
+    /* Icache data or tag parity error */
+    if (L->I_STAT & EV6__I_STAT__PAR) {
+	sprintf(interp, "%s: I_STAT[PAR]\n Icache data or tag parity error", interr);
+	return;
+    }
+
+    /* Dcache tag parity error (on issue) (DFAULT) */
+    if (L->MM_STAT & EV6__MM_STAT__DC_TAG_PERR) {
+	sprintf(interp, "%s: MM_STAT[DC_TAG_PERR]\n Dcache tag parity error(on issue)", interr);
+	return;
+    }
+
+    /* Errors relating to D-stream set non-zero DC_STAT - mask CRD bits */
+    switch (L->DC_STAT & (EV6__DC_STAT__ECC_ERR_ST | EV6__DC_STAT__ECC_ERR_LD)) 
+    {
+
+    case EV6__DC_STAT__ECC_ERR_ST:
+	/* Dcache single-bit ECC error on small store */
+	sprintf(interp, "%s: DC_STAT[ECC_ERR_ST]\n Dcache single-bit ECC error on small store", interr);
+	return;
+
+    case EV6__DC_STAT__ECC_ERR_LD:
+	switch (L->C_STAT) {
+	case 0:
+	    /* Dcache single-bit error on speculative load */
+	    /* Bcache victim read on Dcache/Bcache miss */
+	    sprintf(interp, "%s: DC_STAT[ECC_ERR_LD] C_STAT=0\n Dcache single-bit ECC error on speculative load", slotb);
+	    return;
+
+	case EV6__C_STAT__DSTREAM_DC_ERR:
+	    /* Dcache single bit error on load */
+	    sprintf(interp, "%s: DC_STAT[ECC_ERR_LD] C_STAT[DSTREAM_DC_ERR]\n Dcache single-bit ECC error on speculative load, bit %d", interr, ev6_syn2bit(L->DC0_SYNDROME, L->DC1_SYNDROME));
+	    return;
+
+
+	case EV6__C_STAT__DSTREAM_BC_ERR:
+	    /* Bcache single-bit error on Dcache fill */
+	    sprintf(interp, "%s: DC_STAT[ECC_ERR_LD] C_STAT[DSTREAM_BC_ERR]\n Bcache single-bit error on Dcache fill, bit %d", slotb, ev6_syn2bit(L->DC0_SYNDROME, L->DC1_SYNDROME));
+	    return;
+
+	case EV6__C_STAT__DSTREAM_MEM_ERR:
+	    /* Memory single-bit error on Dcache fill */
+	    sprintf(interp, "%s (to Dcache): DC_STAT[ECC_ERR_LD] C_STAT[DSTREAM_MEM_ERR]\n Memory single-bit error on Dcache fill, Address 0x%lX, bit %d", membus, L->C_ADDR, ev6_syn2bit(L->DC0_SYNDROME, L->DC1_SYNDROME));
+	    return;
+
+	default:			/* not one of these */
+	}
+    default:				/* not one of these */
+    }
+
+    /* I-stream, other misc errors go on C_STAT alone */
+    switch (L->C_STAT) {
+
+    case EV6__C_STAT__ISTREAM_BC_ERR:
+	/* Bcache single-bit error on Icache fill (also MCHK) */
+	sprintf(interp, "%s: C_STAT[ISTREAM_BC_ERR]\n Bcache single-bit error on Icache fill, bit %d", slotb, 
+		    ev6_syn2bit(L->DC0_SYNDROME, L->DC1_SYNDROME));
+	return;
+
+    case EV6__C_STAT__ISTREAM_MEM_ERR:
+	/* Memory single-bit error on Icache fill (also MCHK) */
+	sprintf(interp, "%s : C_STATISTREAM_MEM_ERR]\n Memory single-bit error on Icache fill addr 0x%lX, bit %d", membus, L->C_ADDR, ev6_syn2bit(L->DC0_SYNDROME, L->DC1_SYNDROME));
+	return;
+
+    case EV6__C_STAT__PROBE_BC_ERR0:
+    case EV6__C_STAT__PROBE_BC_ERR1:
+	/* Bcache single-bit error on a probe hit */
+	sprintf(interp, "%s: C_STAT[PROBE_BC_ERR]\n Bcache single-bit error on a probe hit, addr 0x$lX, bit %d", slotb, L->C_ADDR, ev6_syn2bit(L->DC0_SYNDROME, L->DC1_SYNDROME));
+	return;
+
+    default:				/* not one of these */
+    }
+}
+
+
+/* these are the really nasty ones... */
+
+static void ev6_mchk_interp(char *interp, struct el_common_EV6_mcheck * L)
+{
+    /* Machine check errors described by DC_STAT */
+    switch (L->DC_STAT) {
+    case EV6__DC_STAT__TPERR_P0:
+    case EV6__DC_STAT__TPERR_P1:
+	/* Dcache tag parity error (on retry) */
+	sprintf(interp, "%s: DC_STAT[TPERR_P0|TPERR_P1]\n Dcache tag parity error(on retry)", interr);
+	return;
+
+    case EV6__DC_STAT__SEO:
+	/* Dcache second error on store */
+	sprintf(interp, "%s: DC_STAT[SEO]\n Dcache second error during mcheck", interr);
+	return;
+
+    default:				/* some other kind of error */
+    }
+
+    /* Machine check errors described by C_STAT */
+    switch (L->C_STAT) {
+    case EV6__C_STAT__DC_PERR:		/* Dcache duplicate tag parity error */
+	sprintf(interp, "%s: C_STAT[DC_PERR]\n Dcache duplicate tag parity error at 0x%lX",
+			interr, L->C_ADDR);
+	return;
+
+    case EV6__C_STAT__BC_PERR:		/* Bcache tag parity error */
+	sprintf(interp, "%s: C_STAT[BC_PERR]\n Bcache tag parity error at 0x%lX", slotb, L->C_ADDR);
+	return;
+
+    case EV6__C_STAT__ISTREAM_BC_ERR:
+	/* Bcache single-bit error on Icache fill (also CRD) */
+	sprintf(interp, "%s: C_STAT[ISTREAM_BC_ERR]\n Bcache single-bit error on Icache fill 0x%lX bit %d",
+		    slotb, L->C_ADDR,
+		    ev6_syn2bit(L->DC0_SYNDROME, L->DC1_SYNDROME));
+	return;
+
+
+    case EV6__C_STAT__ISTREAM_MEM_ERR:
+	/* Memory single-bit error on Icache fill (also CRD) */
+	sprintf(interp, "%s: C_STAT[ISTREAM_MEM_ERR]\n Memory single-bit error on Icache fill 0x%lX, bit %d",
+		    membus, L->C_ADDR,
+		    ev6_syn2bit(L->DC0_SYNDROME, L->DC1_SYNDROME));
+	return;
+
+
+    case EV6__C_STAT__ISTREAM_BC_DBL:
+	/* Bcache double-bit error on Icache fill */
+	sprintf(interp, "%s: C_STAT[ISTREAM_BC_DBL]\n Bcache double-bit error on Icache fill at 0x%lX",
+			slotb, L->C_ADDR);
+	return;
+    case EV6__C_STAT__DSTREAM_BC_DBL:
+	/* Bcache double-bit error on Dcache fill */
+	sprintf(interp, "%s: C_STAT[DSTREAM_BC_DBL]\n Bcache double-bit error on Dcache fill at 0x%lX",
+			slotb, L->C_ADDR);
+	return;
+
+    case EV6__C_STAT__ISTREAM_MEM_DBL:
+	/* Memory double-bit error on Icache fill */
+	sprintf(interp, "%s: C_STAT[ISTREAM_MEM_DBL]\n Memory double-bit error on Icache fill at 0x%lX", 
+			membus, L->C_ADDR);
+	return;
+    case EV6__C_STAT__DSTREAM_MEM_DBL:
+	/* Memory double-bit error on Dcache fill */
+	sprintf(interp, "%s: C_STAT[DSTREAM_MEM_DBL]\n Memory double-bit error on Dcache fill at 0x%lX", 
+			membus, L->C_ADDR);
+	return;
+
+    default:			/* something else */
+    }
+}
+
+
+static void ev6_cpu_machine_check( unsigned long vector,
+		 struct el_common_EV6_mcheck *L, struct pt_regs *regs)
+{
+    char interp[80];			/* buffer for interpretation details */
+
+    /* this is verbose and looks intimidating.  Should it be printed for
+     * corrected (CRD) machine checks? */
+
+    printk(KERN_CRIT "PALcode logout frame:  "
+           "MCHK_Code       %d  "
+           "MCHK_Frame_Rev  %d\n"
+           "I_STAT  %016lx  "
+           "DC_STAT %016lx  "
+           "C_ADDR  %016lx\n"
+           "SYND1   %016lx  "
+           "SYND0   %016lx  "
+           "C_STAT  %016lx\n"
+           "C_STS   %016lx  "
+           "RES     %016lx  "
+           "EXC_ADDR%016lx\n"
+           "IER_CM  %016lx  "
+           "ISUM    %016lx  "
+           "MM_STAT %016lx\n"
+           "PALBASE %016lx  "
+           "I_CTL   %016lx  "
+           "PCTX    %016lx\n"
+           "CPU registers: "
+           "PC      %016lx  "
+           "Return  %016lx\n",
+           L->MCHK_Code, L->MCHK_Frame_Rev, L->I_STAT, L->DC_STAT,
+           L->C_ADDR, L->DC1_SYNDROME, L->DC0_SYNDROME, L->C_STAT,
+           L->C_STS, L->RESERVED0, L->EXC_ADDR, L->IER_CM, L->ISUM,
+           L->MM_STAT, L->PAL_BASE, L->I_CTL, L->PCTX,
+           regs->pc, regs->r26 );
+
+    /* Attempt an interpretation on the meanings of the fields above */
+    sprintf(interp, "No interpretation available!" );
+    if ( vector == SCB_Q_PROCERR )		ev6_crd_interp( interp, L );
+    else if ( vector == SCB_Q_PROCMCHK )	ev6_mchk_interp( interp, L );
+
+    printk( KERN_CRIT "interpretation: %s\n\n", interp );
+}
+
+
+/* Perform analysis of a machine check that arrived from the system (NMI) */
+
+static void naut_sys_machine_check( unsigned long vector, unsigned long la_ptr,
+			     struct pt_regs *regs )
+{
+    printk("xtime %lx\n", CURRENT_TIME);
+    printk("PC %lx RA %lx\n", regs->pc, regs->r26);
+    irongate_pci_clr_err();
+}
+
+
+
+/* Machine checks can come from two sources - those on the CPU and those
+ * in the system.  They are analysed separately but all starts here */
+
+void nautilus_machine_check(unsigned long vector, unsigned long la_ptr,
+			    struct pt_regs *regs)
+{
+    char *mchk_class;
+    unsigned cpu_analysis=0, sys_analysis=0;	/* interpretation flags */
+
+    /* now for some analysis.  Machine checks fall into two classes -
+     * those picked up by the system, and those picked up by the CPU.
+     * add to that the two levels of severity - correctable or not
+     */
+
+    if (vector == SCB_Q_SYSMCHK && ((IRONGATE0->dramms & 0x3FF) == 0x300)) {
+	unsigned long nmi_ctl, temp;
+
+	/* Clear ALI NMI */
+        nmi_ctl = inb(0x61);
+        nmi_ctl |= 0x0c;
+        outb(nmi_ctl, 0x61);
+        nmi_ctl &= ~0x0c;
+        outb(nmi_ctl, 0x61);
+	
+	temp = IRONGATE0->stat_cmd;
+	IRONGATE0->stat_cmd = temp; /* write again clears error bits */
+	mb();
+	temp = IRONGATE0->stat_cmd;  /* re-read to force write */
+
+	temp = IRONGATE0->dramms;
+	IRONGATE0->dramms = temp; /* write again clears error bits */
+	mb();
+	temp = IRONGATE0->dramms;  /* re-read to force write */
+
+	draina();
+	wrmces(0x7);
+	mb();
+	return;
+    }
+
+    switch (vector) {
+    case SCB_Q_SYSERR:
+	mchk_class = "Correctable System Machine Check (NMI)";
+	sys_analysis = 1;
+	break;
+    case SCB_Q_SYSMCHK:
+	mchk_class = "Fatal System Machine Check (NMI)";
+	sys_analysis = 1;
+	break;
+
+    case SCB_Q_PROCERR:
+	mchk_class = "Correctable Processor Machine Check";
+	cpu_analysis = 1;
+	break;
+    case SCB_Q_PROCMCHK:
+	mchk_class = "Fatal Processor Machine Check";
+	cpu_analysis = 1;
+	break;
+
+    default:
+	mchk_class = "Unknown vector!";
+	break;
+    }
+
+    printk(KERN_CRIT "> NAUTILUS Machine check 0x%x [%s]\n", vector, mchk_class);
+
+    if ( cpu_analysis )	
+	ev6_cpu_machine_check(  vector,
+				(struct el_common_EV6_mcheck *)la_ptr,
+				regs );
+    if ( sys_analysis )
+	naut_sys_machine_check( vector, la_ptr, regs );
+
+    /* Tell the PALcode to clear the machine check */
+    draina();
+    wrmces(0x7);
+    mb();
+}
+
+
+
+/*
+ * The System Vectors
+ */
+
+struct alpha_machine_vector nautilus_mv __initmv = {
+	vector_name:		"NAUTILUS",
+	DO_EV6_MMU,
+	DO_DEFAULT_RTC,
+	DO_IRONGATE_IO,
+	DO_IRONGATE_BUS,
+	machine_check:		nautilus_machine_check,
+	max_dma_address:	ALPHA_NAUTILUS_MAX_DMA_ADDRESS,
+
+	nr_irqs:		16,
+	irq_probe_mask:		(_PROBE_MASK(16) & ~0x101UL),
+
+	update_irq_hw:		nautilus_update_irq_hw,
+	ack_irq:		generic_ack_irq,
+	device_interrupt:	isa_device_interrupt,
+
+	init_arch:		irongate_init_arch,
+	init_irq:		nautilus_init_irq,
+	init_pit:		generic_init_pit,
+	pci_fixup:		nautilus_pci_fixup,
+	kill_arch:		nautilus_kill_arch,
+};
+ALIAS_MV(nautilus)
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/sys_rawhide.c linux-2.2.14-pre9/arch/alpha/kernel/sys_rawhide.c
--- linux-2.2.14-pre8/arch/alpha/kernel/sys_rawhide.c	1999-01-10 09:59:59.000000000 -0800
+++ linux-2.2.14-pre9/arch/alpha/kernel/sys_rawhide.c	2003-08-15 15:09:15.000000000 -0700
@@ -30,38 +30,53 @@
 #include "bios32.h"
 #include "machvec.h"
 
+static unsigned int hose_irq_masks[4] = { 0xff0000, 0xfe0000,
+					  0xff0000, 0xff0000 };
 
 static void
-rawhide_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p)
+rawhide_update_irq_hw(unsigned long irq, unsigned long unused, int unmask_p)
 {
-	if (irq >= 40) {
-		/* PCI bus 1 with builtin NCR810 SCSI */
-		*(vuip)MCPCIA_INT_MASK0(1) =
-			(~((mask) >> 40) & 0x00ffffffU) | 0x00fe0000U;
-		mb();
-		/* ... and read it back to make sure it got written.  */
-	  	*(vuip)MCPCIA_INT_MASK0(1);
+	unsigned int saddle, hose, new_irq;
+	unsigned long mask;
+
+	saddle = (irq > 63); /* Which saddle are we on? */
+	mask = _alpha_irq_masks[saddle]; /* Use the correct mask. */
+
+	if (irq < 16) {
+		if (irq < 8)
+			outb(mask, 0x21);	/* ISA PIC1 */
+		else
+			outb(mask >> 8, 0xA1);	/* ISA PIC2 */
+		return;
 	}
-	else if (irq >= 16) {
-		/* PCI bus 0 with EISA bridge */
-		*(vuip)MCPCIA_INT_MASK0(0) =
-			(~((mask) >> 16) & 0x00ffffffU) | 0x00ff0000U;
-		mb();
-		/* ... and read it back to make sure it got written.  */
-	  	*(vuip)MCPCIA_INT_MASK0(0);
+
+	if (!saddle) {
+		mask >>= 16; /* Saddle 0 includes EISA interrupts. */
+		new_irq = irq - 16;
+	} else {
+		new_irq = irq - 64;
 	}
-	else if (irq >= 8)
-		outb(mask >> 8, 0xA1);	/* ISA PIC2 */
-	else
-		outb(mask, 0x21);	/* ISA PIC1 */
+
+	hose = (saddle << 1);
+
+	if (new_irq >= 24) {
+		mask >>= 24;
+		hose++;
+	}
+
+	*(vuip)MCPCIA_INT_MASK0(hose) =
+		(~(mask) & 0x00ffffffU) | hose_irq_masks[hose];
+	mb();
+	/* ... and read it back to make sure it got written.  */
+	*(vuip)MCPCIA_INT_MASK0(hose);
 }
 
 static void 
 rawhide_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
 {
-	int irq, ack;
+	int irq;
 
-	ack = irq = (vector - 0x800) >> 4;
+	irq = (vector - 0x800) >> 4;
 
         /*
          * The RAWHIDE SRM console reports PCI interrupts with a vector
@@ -73,34 +88,31 @@
 	 * also, PCI #1 interrupts are offset some more... :-(
          */
 	if (irq == 52)
-		ack = irq = 56; /* SCSI on PCI 1 is special */
-	else {
-		if (irq >= 24) /* adjust all PCI interrupts down 8 */
-			ack = irq = irq - 8;
-		if (irq >= 48) /* adjust PCI bus 1 interrupts down another 8 */
-			ack = irq = irq - 8;
-	}
+		irq = 72; /* SCSI on PCI 1 is special */
+
+	/* Adjust by which hose it is from. */
+	irq -= (((irq + 16) >> 2) & 0x38);
 
-	handle_irq(irq, ack, regs);
+	handle_irq(irq, irq, regs);
 }
 
 static void __init
 rawhide_init_irq(void)
 {
-	STANDARD_INIT_IRQ_PROLOG;
+	unsigned int hose;
 
-	/* HACK ALERT! only PCI busses 0 and 1 are used currently,
-	   and routing is only to CPU #1*/
+	mcpcia_init_hoses();
 
-	*(vuip)MCPCIA_INT_MASK0(0) =
-		(~((alpha_irq_mask) >> 16) & 0x00ffffffU) | 0x00ff0000U; mb();
-	/* ... and read it back to make sure it got written.  */
-	*(vuip)MCPCIA_INT_MASK0(0);
+	STANDARD_INIT_IRQ_PROLOG;
 
-	*(vuip)MCPCIA_INT_MASK0(1) =
-		(~((alpha_irq_mask) >> 40) & 0x00ffffffU) | 0x00fe0000U; mb();
-	/* ... and read it back to make sure it got written.  */
-	*(vuip)MCPCIA_INT_MASK0(1);
+	/* HACK ALERT! routing is only to CPU #0. */
+
+	for (hose = 0; hose < hose_count; hose++) {
+		*(vuip)MCPCIA_INT_MASK0(hose) = hose_irq_masks[hose];
+		mb();
+		/* ... and read it back to make sure it got written.  */
+		*(vuip)MCPCIA_INT_MASK0(hose);
+	}
 
 	enable_irq(2);
 }
@@ -177,8 +189,8 @@
 	machine_check:		mcpcia_machine_check,
 	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,
 
-	nr_irqs:		64,
-	irq_probe_mask:		_PROBE_MASK(64),
+	nr_irqs:		128,
+	irq_probe_mask:		_PROBE_MASK(128),
 	update_irq_hw:		rawhide_update_irq_hw,
 	ack_irq:		generic_ack_irq,
 	device_interrupt:	rawhide_srm_device_interrupt,
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/sys_takara.c linux-2.2.14-pre9/arch/alpha/kernel/sys_takara.c
--- linux-2.2.14-pre8/arch/alpha/kernel/sys_takara.c	1999-06-12 11:52:52.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/sys_takara.c	2003-08-15 15:09:15.000000000 -0700
@@ -31,18 +31,25 @@
 
 
 static void 
-takara_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p)
+takara_update_irq_hw(unsigned long irq, unsigned long unused, int unmask_p)
 {
 	unsigned int regaddr;
+	unsigned long mask;
 
 	if (irq <= 15) {
 		if (irq <= 7)
-			outb(mask, 0x21);	/* ISA PIC1 */
+			outb(alpha_irq_mask, 0x21);		/* ISA PIC1 */
 		else
-			outb(mask >> 8, 0xA1);	/* ISA PIC2 */
-	} else if (irq <= 31) {
-		regaddr = 0x510 + ((irq - 16) & 0x0c);
-		outl((mask >> ((irq - 16) & 0x0c)) & 0xf0000Ul, regaddr);
+			outb(alpha_irq_mask >> 8, 0xA1);	/* ISA PIC2 */
+	} else {
+		if (irq > 63)
+			mask = _alpha_irq_masks[1] << 16;
+		else
+			mask = _alpha_irq_masks[0] >> ((irq - 16) & 0x30);
+
+		regaddr = 0x510 + (((irq - 16) >> 2) & 0x0c);
+
+		outl(mask & 0xffff0000UL, regaddr);
 	}
 }
 
@@ -88,9 +95,6 @@
 {
 	int irq = (vector - 0x800) >> 4;
 
-	if (irq > 15)
-		irq = ((vector - 0x800) >> 6) + 12;
-	
 	handle_irq(irq, irq, regs);
 }
 
@@ -101,8 +105,7 @@
 
 	if (alpha_using_srm)
 		alpha_mv.device_interrupt = takara_srm_device_interrupt;
-
-	if (!alpha_using_srm) {
+	else {
 		unsigned int ctlreg = inl(0x500);
 
 		/* Return to non-accelerated mode.  */
@@ -127,6 +130,43 @@
  */
 
 static int __init
+takara_map_irq_srm(struct pci_dev *dev, int slot, int pin)
+{
+	static char irq_tab[15][5] __initlocaldata = {
+		{ 16+3, 16+3, 16+3, 16+3, 16+3},   /* slot  6 == device 3 */
+		{ 16+2, 16+2, 16+2, 16+2, 16+2},   /* slot  7 == device 2 */
+		{ 16+1, 16+1, 16+1, 16+1, 16+1},   /* slot  8 == device 1 */
+		{   -1,   -1,   -1,   -1,   -1},   /* slot  9 == nothing */
+		{   -1,   -1,   -1,   -1,   -1},   /* slot 10 == nothing */
+		{   -1,   -1,   -1,   -1,   -1},   /* slot 11 == nothing */
+#if 0
+		{   -1,   -1,   -1,   -1,   -1},   /* slot 12 == nothing */
+		{   -1,   -1,   -1,   -1,   -1},   /* slot 13 == nothing */
+		{   -1,   -1,   -1,   -1,   -1},   /* slot 14 == nothing */
+		{   -1,   -1,   -1,   -1,   -1},   /* slot 15 == nothing */
+#else
+		/* these are behind the bridges */
+		{   12,   12,   13,   14,   15},   /* slot 12 == nothing */
+		{    8,    8,    9,   19,   11},   /* slot 13 == nothing */
+		{    4,    4,    5,    6,    7},   /* slot 14 == nothing */
+		{    0,    0,    1,    2,    3},   /* slot 15 == nothing */
+#endif
+		{   -1,   -1,   -1,   -1,   -1},   /* slot 16 == nothing */
+		{64+ 0, 64+0, 64+1, 64+2, 64+3},   /* slot 17= device 4 */
+		{48+ 0, 48+0, 48+1, 48+2, 48+3},   /* slot 18= device 3 */
+		{32+ 0, 32+0, 32+1, 32+2, 32+3},   /* slot 19= device 2 */
+		{16+ 0, 16+0, 16+1, 16+2, 16+3},   /* slot 20= device 1 */
+	};
+	const long min_idsel = 6, max_idsel = 20, irqs_per_slot = 5;
+        int irq = COMMON_TABLE_LOOKUP;
+	if (irq >= 0 && irq < 16) { /* guess that we are behind a bridge */
+	    unsigned int busslot = PCI_SLOT(dev->bus->self->devfn);
+	    irq += irq_tab[busslot-min_idsel][0];
+	}
+	return irq;
+}
+
+static int __init
 takara_map_irq(struct pci_dev *dev, int slot, int pin)
 {
 	static char irq_tab[15][5] __initlocaldata = {
@@ -147,7 +187,7 @@
 		{ 16+1, 16+1, 16+1, 16+1, 16+1},   /* slot 20 == device 1 */
 	};
 	const long min_idsel = 6, max_idsel = 20, irqs_per_slot = 5;
-	return COMMON_TABLE_LOOKUP;
+        return COMMON_TABLE_LOOKUP;
 }
 
 static int __init
@@ -159,14 +199,21 @@
 	unsigned int busslot = PCI_SLOT(dev->bus->self->devfn);
 
 	/* Check first for built-in bridges.  */
-	if (busslot > 16 && ((1<<(36-busslot)) & ctlreg)) {
+	if (busslot > 16 && ((1U << (36 - busslot)) & ctlreg)) {
+#if 0
 		if (pin == 1)
 			pin += (20 - busslot);
 		else {
-			/* Must be a card-based bridge.  */
-			printk(KERN_WARNING "takara_swizzle: cannot handle "
-			       "card-bridge behind builtin bridge yet.\n");
+			/* Can only handle INTA pins currently.  */
+			printk(KERN_WARNING "takara_swizzle: cannot only "
+			       "handle cards with INTA IRQ pin now.\n");
 		}
+#else
+#endif
+	} else {
+		/* Must be a card-based bridge.  */
+		printk(KERN_WARNING "takara_swizzle: cannot handle "
+		       "card-bridge behind builtin bridge yet.\n");
 	}
 
 	*pinp = pin;
@@ -177,8 +224,11 @@
 takara_pci_fixup(void)
 {
 	layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
-	common_pci_fixup(takara_map_irq, takara_swizzle);
-	/* enable_ide(0x26e); */
+	if (alpha_using_srm)
+		common_pci_fixup(takara_map_irq_srm, takara_swizzle);
+	else
+		common_pci_fixup(takara_map_irq, takara_swizzle);
+	enable_ide(0x26e);
 }
 
 
@@ -195,8 +245,8 @@
 	machine_check:		cia_machine_check,
 	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,
 
-	nr_irqs:		20,
-	irq_probe_mask:		_PROBE_MASK(20),
+	nr_irqs:		128,
+	irq_probe_mask:		_PROBE_MASK(48),
 	update_irq_hw:		takara_update_irq_hw,
 	ack_irq:		generic_ack_irq,
 	device_interrupt:	takara_device_interrupt,
diff -urN linux-2.2.14-pre8/arch/alpha/kernel/traps.c linux-2.2.14-pre9/arch/alpha/kernel/traps.c
--- linux-2.2.14-pre8/arch/alpha/kernel/traps.c	1999-05-22 13:42:51.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/kernel/traps.c	2003-08-15 15:09:15.000000000 -0700
@@ -27,66 +27,270 @@
 {
 	printk("pc = [<%016lx>]  ra = [<%016lx>]  ps = %04lx\n",
 	       regs->pc, regs->r26, regs->ps);
-	printk("r0 = %016lx  r1 = %016lx  r2 = %016lx\n",
+	printk("v0 = %016lx  t0 = %016lx  t1 = %016lx\n",
 	       regs->r0, regs->r1, regs->r2);
-	printk("r3 = %016lx  r4 = %016lx  r5 = %016lx\n",
+	printk("t2 = %016lx  t3 = %016lx  t4 = %016lx\n",
  	       regs->r3, regs->r4, regs->r5);
-	printk("r6 = %016lx  r7 = %016lx  r8 = %016lx\n",
+	printk("t5 = %016lx  t6 = %016lx  t7 = %016lx\n",
 	       regs->r6, regs->r7, regs->r8);
 
 	if (r9_15) {
-		printk("r9 = %016lx  r10= %016lx  r11= %016lx\n",
+		printk("s0 = %016lx  s1 = %016lx  s2 = %016lx\n",
 		       r9_15[9], r9_15[10], r9_15[11]);
-		printk("r12= %016lx  r13= %016lx  r14= %016lx\n",
+		printk("s3 = %016lx  s4 = %016lx  s5 = %016lx\n",
 		       r9_15[12], r9_15[13], r9_15[14]);
-		printk("r15= %016lx\n", r9_15[15]);
+		printk("s6 = %016lx", r9_15[15]);
 	}
 
-	printk("r16= %016lx  r17= %016lx  r18= %016lx\n",
+	printk("  a0 = %016lx  a1 = %016lx\na2 = %016lx",
 	       regs->r16, regs->r17, regs->r18);
-	printk("r19= %016lx  r20= %016lx  r21= %016lx\n",
+	printk("  a3 = %016lx  a4 = %016lx\na5 = %016lx",
  	       regs->r19, regs->r20, regs->r21);
- 	printk("r22= %016lx  r23= %016lx  r24= %016lx\n",
+ 	printk("  t8 = %016lx  t9 = %016lx\nt10= %016lx",
 	       regs->r22, regs->r23, regs->r24);
-	printk("r25= %016lx  r27= %016lx  r28= %016lx\n",
+	printk("  t11= %016lx  pv = %016lx\nat = %016lx",
 	       regs->r25, regs->r27, regs->r28);
-	printk("gp = %016lx  sp = %p\n", regs->gp, regs+1);
+	printk("  gp = %016lx  sp = %p\n", regs->gp, regs+1);
+}
+
+static char * ireg_name[] = {"v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6",
+			   "t7", "s0", "s1", "s2", "s3", "s4", "s5", "s6",
+			   "a0", "a1", "a2", "a3", "a4", "a5", "t8", "t9",
+			   "t10", "t11", "ra", "pv", "at", "gp", "sp", "zero"};
+
+static char * inst_name[] = {"call_pal", "", "", "", "", "", "", "",
+	"lda", "ldah", "ldbu", "ldq_u", "ldwu", "stw", "stb", "stq_u",
+	"ALU", "ALU", "ALU", "ALU", "SQRT", "FVAX", "FIEEE", "FLOAT",
+	"MISC", "PAL19", "JMP", "PAL1B", "GRAPH", "PAL1D", "PAL1E", "PAL1F",
+	"ldf", "ldg", "lds", "ldt", "stf", "stg", "sts", "stt",
+	"ldl", "ldq", "ldl_l", "ldq_l", "stl", "stq", "stl_c", "stq_c",
+	"br", "fbeq", "fblt", "fble", "bsr", "fbne", "fbge", "fbgt"
+	"blbc", "beq", "blt", "ble", "blbs", "bne", "bge", "bgt"
+};
+
+static char * jump_name[] = {"jmp", "jsr", "ret", "jsr_coroutine"};
+
+typedef struct {int func; char * text;} alist;
+
+static alist inta_name[] = {{0, "addl"}, {2, "s4addl"}, {9, "subl"},
+	{0xb, "s4subl"}, {0xf, "cmpbge"}, {0x12, "s8addl"}, {0x1b, "s8subl"},
+	{0x1d, "cmpult"}, {0x20, "addq"}, {0x22, "s4addq"}, {0x29, "subq"},
+	{0x2b, "s4subq"}, {0x2d, "cmpeq"}, {0x32, "s8addq"}, {0x3b, "s8subq"},
+	{0x3d, "cmpule"}, {0x40, "addl/v"}, {0x49, "subl/v"}, {0x4d, "cmplt"},
+	{0x60, "addq/v"}, {0x69, "subq/v"}, {0x6d, "cmple"}, {-1, 0}};
+
+static alist intl_name[] = {{0, "and"}, {8, "andnot"}, {0x14, "cmovlbs"},
+	{0x16, "cmovlbc"}, {0x20, "or"}, {0x24, "cmoveq"}, {0x26, "cmovne"},
+	{0x28, "ornot"}, {0x40, "xor"}, {0x44, "cmovlt"}, {0x46, "cmovge"},
+	{0x48, "eqv"}, {0x61, "amask"}, {0x64, "cmovle"}, {0x66, "cmovgt"},
+	{0x6c, "implver"}, {-1, 0}};
+
+static alist ints_name[] = {{2, "mskbl"}, {6, "extbl"}, {0xb, "insbl"},
+	{0x12, "mskwl"}, {0x16, "extwl"}, {0x1b, "inswl"}, {0x22, "mskll"},
+	{0x26, "extll"}, {0x2b, "insll"}, {0x30, "zap"}, {0x31, "zapnot"},
+	{0x32, "mskql"}, {0x34, "srl"}, {0x36, "extql"}, {0x39, "sll"},
+	{0x3b, "insql"}, {0x3c, "sra"}, {0x52, "mskwh"}, {0x57, "inswh"},
+	{0x5a, "extwh"}, {0x62, "msklh"}, {0x67, "inslh"}, {0x6a, "extlh"},
+	{0x72, "mskqh"}, {0x77, "insqh"}, {0x7a, "extqh"}, {-1, 0}};
+
+static alist intm_name[] = {{0, "mull"}, {0x20, "mulq"}, {0x30, "umulh"},
+	{0x40, "mull/v"}, {0x60, "mulq/v"}, {-1, 0}};
+
+static alist * int_name[] = {inta_name, intl_name, ints_name, intm_name};
+
+static char *
+assoc(int fcode, alist * a)
+{
+	while ((fcode != a->func) && (a->func != -1))
+		++a;
+	return a->text;
+}
+
+static char *
+iname(unsigned int instr)
+{
+	int opcode = instr >> 26;
+	char * name = inst_name[opcode];
+
+	switch (opcode) {
+		default:
+			break;
+
+		case 0x10:
+		case 0x11:
+		case 0x12:
+		case 0x13: {
+			char * specific_name
+			  = assoc((instr >> 5) & 0x3f, int_name[opcode - 0x10]);
+			if (specific_name)
+				name = specific_name;
+			break;
+		}
+
+		case 0x1a:
+			name = jump_name[(instr >> 14) & 3];
+			break;
+	}
+	
+	return name;
+}
+
+static enum {NOT_INST, PAL, BRANCH, MEMORY, JUMP, OPERATE, FOPERATE, MISC}
+iformat(int opcode)
+{
+	if (opcode >= 0x30)
+		return BRANCH;
+	if (opcode >= 0x20)
+		return MEMORY;
+	if (opcode == 0)
+		return PAL;
+	if (opcode < 8)
+		return NOT_INST;
+	if (opcode < 0x10)
+		return MEMORY;
+	if (opcode < 0x14)
+		return OPERATE;
+	if (opcode < 0x18)
+		return FOPERATE;
+	switch (opcode) {
+		case 0x18:
+			return MISC;
+		case 0x1A:
+			return JUMP;
+		case 0x1C:
+			return OPERATE;
+		default:
+			return NOT_INST;
+	}
+}
+
+/*
+ * The purpose here is to provide useful clues about a kernel crash, so
+ * less likely instructions, e.g. floating point, aren't fully decoded.
+ */
+static void
+disassemble(unsigned int instr)
+{
+	int optype = instr >> 26;
+	char buf[40], *s = buf;
+
+	s += sprintf(buf, "%08x  %s ", instr, iname(instr));
+	switch (iformat(optype)) {
+		default:
+		case NOT_INST:
+		case MISC:
+			break;
+
+		case PAL:
+			s += sprintf(s, "%d", instr);
+			break;
+
+		case BRANCH: {
+			int reg = (instr >> 21) & 0x1f;
+			int offset = instr & 0x1fffff;
+
+			if (offset >= 0x100000)
+				offset -= 0x200000;
+			if (((optype & 3) == 0) || (optype >= 0x38)) {
+				if ((optype != 0x30) || (reg != 0x1f))
+					s += sprintf(s, "%s,", ireg_name[reg]);
+			} else
+				s += sprintf(s, "f%d,", reg);
+			s += sprintf(s, ".%+d", (offset + 1) << 2);
+			break;
+		}
+
+		case MEMORY: {
+			int addr_reg = (instr >> 16) & 0x1f;
+			int value_reg = (instr >> 21) & 0x1f;
+			int offset = instr & 0xffff;
+
+			if (offset >= 0x8000)
+				offset -= 0x10000;
+			if ((optype >= 0x20) && (optype < 0x28))
+				s += sprintf(s, "f%d", value_reg);
+			else
+				s += sprintf(s, "%s", ireg_name[value_reg]);
+
+			s += sprintf(s, ",%d(%s)", offset, ireg_name[addr_reg]);
+			break;
+		}
+
+		case JUMP: {
+			int target_reg = (instr >> 16) & 0x1f;
+			int return_reg = (instr >> 21) & 0x1f;
+
+			s += sprintf(s, "%s,", ireg_name[return_reg]);
+			s += sprintf(s, "(%s)", ireg_name[target_reg]);
+			break;
+		}
+
+		case OPERATE: {
+			int areg = (instr >> 21) & 0x1f;
+			int breg = (instr >> 16) & 0x1f;
+			int creg = instr & 0x1f;
+			int litflag = instr & (1<<12);
+			int lit = (instr >> 13) & 0xff;
+
+			s += sprintf(s, "%s,", ireg_name[areg]);
+			if (litflag)
+				s += sprintf(s, "%d", lit);
+			else
+				s += sprintf(s, "%s", ireg_name[breg]);
+			s += sprintf(s, ",%s", ireg_name[creg]);
+			break;
+		}
+
+		case FOPERATE: {
+			int areg = (instr >> 21) & 0x1f;
+			int breg = (instr >> 16) & 0x1f;
+			int creg = instr & 0x1f;
+
+			s += sprintf(s, "f%d,f%d,f%d", areg, breg, creg);
+			break;
+		}
+	}
+	buf[s-buf] = 0;
+	printk("%s\n", buf);
 }
 
 static void
 dik_show_code(unsigned int *pc)
 {
-	long i;
+	int i;
 
-	printk("Code:");
-	for (i = -3; i < 6; i++) {
+	printk("Code:\n");
+	for (i = -6; i < 2; i++) {
 		unsigned int insn;
 		if (__get_user(insn, pc+i))
 			break;
-		printk("%c%08x%c",i?' ':'<',insn,i?' ':'>');
+		printk("%c", i ? ' ' : '*');
+		disassemble(insn);
 	}
-	printk("\n");
 }
 
 static void
 dik_show_trace(unsigned long *sp)
 {
-	long i = 0;
-	printk("Trace:");
-	while (0x1ff8 & (unsigned long) sp) {
+	int i = 1;
+
+	printk("Trace: ");
+	do {
 		extern unsigned long _stext, _etext;
-		unsigned long tmp = *sp;
-		sp++;
-		if (tmp < (unsigned long) &_stext)
+		unsigned long kpc = *sp;
+
+		if (kpc < (unsigned long) &_stext)
 			continue;
-		if (tmp >= (unsigned long) &_etext)
+		if (kpc >= (unsigned long) &_etext)
 			continue;
-		printk(" [<%lx>]", tmp);
-		if (++i > 40) {
-			printk(" ...");
-			break;
-		}
-	}
+		/*
+		 * Assume that only the low 24-bits of a kernel text address
+		 * is interesting.
+		 */
+		printk("%6x%c", (int)kpc & 0xffffff, (++i % 11) ? ' ' : '\n');
+	} while (((unsigned long)++sp & 0x1ff8) && (i < 33));
+	if (i >= 33)
+		printk(" ...");
 	printk("\n");
 }
 
diff -urN linux-2.2.14-pre8/arch/alpha/Makefile linux-2.2.14-pre9/arch/alpha/Makefile
--- linux-2.2.14-pre8/arch/alpha/Makefile	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/Makefile	2003-08-15 15:09:15.000000000 -0700
@@ -60,9 +60,10 @@
 
 # For TSUNAMI, we must have the assembler not emulate our instructions.
 # The same is true for POLARIS.
+# The same is true for IRONGATE.
 # BWX is most important, but we don't really want any emulation ever.
 ifeq ($(old_gas),y)
- ifneq ($(CONFIG_ALPHA_GENERIC)$(CONFIG_ALPHA_TSUNAMI)$(CONFIG_ALPHA_POLARIS),)
+ ifneq ($(CONFIG_ALPHA_GENERIC)$(CONFIG_ALPHA_TSUNAMI)$(CONFIG_ALPHA_POLARIS)$(CONFIG_ALPHA_IRONGATE),)
    # How do we do #error in make?
    CFLAGS := --error-please-upgrade-your-assembler
  endif
@@ -79,6 +80,9 @@
  ifeq ($(CONFIG_ALPHA_TSUNAMI),y)
    CFLAGS := $(CFLAGS) -Wa,-mev6
  endif
+ ifeq ($(CONFIG_ALPHA_IRONGATE),y)
+   CFLAGS := $(CFLAGS) -Wa,-mev6
+ endif
 endif
 
 HEAD := arch/alpha/kernel/head.o
diff -urN linux-2.2.14-pre8/arch/alpha/mm/init.c linux-2.2.14-pre9/arch/alpha/mm/init.c
--- linux-2.2.14-pre8/arch/alpha/mm/init.c	1999-08-09 12:04:38.000000000 -0700
+++ linux-2.2.14-pre9/arch/alpha/mm/init.c	2003-08-15 15:09:15.000000000 -0700
@@ -179,7 +179,7 @@
 {
 	register unsigned long sp __asm__("$30");
 	pcb->ksp = sp;
-	return __reload_tss(pcb);
+	return (struct thread_struct *) __reload_tss(pcb);
 }
 
 /*
diff -urN linux-2.2.14-pre8/arch/ppc/kernel/head.S linux-2.2.14-pre9/arch/ppc/kernel/head.S
--- linux-2.2.14-pre8/arch/ppc/kernel/head.S	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/arch/ppc/kernel/head.S	2003-08-15 15:09:15.000000000 -0700
@@ -233,8 +233,12 @@
 	bl	prom_init
 	.globl	__secondary_start
 __secondary_start:
-/*
- * Use the first pair of BAT registers to map the 1st 16MB
+/* Switch MMU off, clear BATs and flush TLB */
+ 	bl	mmu_off
+	bl	clear_bats
+	bl	flush_tlbs
+
+/* Use the first pair of BAT registers to map the 1st 16MB
  * of RAM to KERNELBASE.  From this point on we can't safely
  * call OF any more.
  */
@@ -267,11 +271,6 @@
 	 * If the MMU is off clear the bats.  See clear_bat() -- Cort
 	 */
 #ifndef CONFIG_GEMINI	
-	mfmsr	r20
-	andi.	r20,r20,MSR_DR
-	bne	100f
-	bl	clear_bats
-100:
 	/* 
 	 * allow secondary cpus to get at all of ram in early bootup
 	 * since their init_task may be up there -- Cort
@@ -1639,6 +1638,19 @@
 	blr
 #endif /* CONFIG_8xx */
 
+mmu_off:
+ 	addi	r4, r3, __secondary_start - _start
+	mfmsr	r3
+	andi.	r0,r3,MSR_DR|MSR_IR		/* MMU enabled? */
+	beq	1f
+	ori	r3,r3,MSR_DR|MSR_IR
+	xori	r3,r3,MSR_DR|MSR_IR
+	mtspr	SRR0,r4
+	mtspr	SRR1,r3
+	sync
+	rfi
+1:	blr
+
 /*
  * This code is jumped to from the startup code to copy
  * the kernel image to physical address 0.
@@ -1648,8 +1660,10 @@
 	addi	r9,r9,0x6f58		/* translate source addr */
 	cmpw	r31,r9			/* (we have to on chrp) */
 	beq	7f
+#if 0 // still needed ? breaks on me if I don't disable this
 	rlwinm	r4,r4,0,8,31		/* translate source address */
 	add	r4,r4,r3		/* to region mapped with BATs */
+#endif	
 7:	addis	r9,r26,klimit@ha	/* fetch klimit */
 	lwz	r25,klimit@l(r9)
 	addis	r25,r25,-KERNELBASE@h
@@ -2675,26 +2689,38 @@
  *  -- Cort 
  */
 clear_bats:
+#if !defined(CONFIG_GEMINI)
 	li	r20,0
+	mfspr	r9,PVR
+	rlwinm	r9,r9,16,16,31		/* r9 = 1 for 601, 4 for 604 */
+	cmpwi	r9, 1
+	beq	1f
 	
 	mtspr	DBAT0U,r20
-	mtspr	DBAT0L,r20
-	mtspr	IBAT0U,r20
-	mtspr	IBAT0L,r20
-	
+	mtspr	DBAT0L,r20	
 	mtspr	DBAT1U,r20
 	mtspr	DBAT1L,r20
+	mtspr	DBAT2U,r20
+	mtspr	DBAT2L,r20	
+	mtspr	DBAT3U,r20
+	mtspr	DBAT3L,r20
+1:	
+	mtspr	IBAT0U,r20
+	mtspr	IBAT0L,r20
 	mtspr	IBAT1U,r20
 	mtspr	IBAT1L,r20
-	
-	mtspr	DBAT2U,r20
-	mtspr	DBAT2L,r20
 	mtspr	IBAT2U,r20
 	mtspr	IBAT2L,r20
-	
-	mtspr	DBAT3U,r20
-	mtspr	DBAT3L,r20
 	mtspr	IBAT3U,r20
 	mtspr	IBAT3L,r20
+#endif /* !defined(CONFIG_GEMINI) */
+	blr
 
+flush_tlbs:
+	lis	r20, 0x1000
+1:	addic.	r20, r20, -0x1000
+	tlbie	r20
+	blt	1b
+	sync
 	blr
+	
diff -urN linux-2.2.14-pre8/arch/ppc/kernel/prom.c linux-2.2.14-pre9/arch/ppc/kernel/prom.c
--- linux-2.2.14-pre8/arch/ppc/kernel/prom.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/arch/ppc/kernel/prom.c	2003-08-15 15:09:15.000000000 -0700
@@ -264,7 +264,7 @@
  * handling exceptions and the MMU hash table for us.
  */
 __init
-void
+unsigned long
 prom_init(int r3, int r4, prom_entry pp)
 {
 #ifdef CONFIG_SMP	
@@ -273,19 +273,23 @@
 	char type[16], *path;
 #endif	
 	unsigned long mem;
-	ihandle prom_rtas;
+	ihandle prom_rtas, prom_mmu;
 	unsigned long offset = reloc_offset();
 	int l;
 	char *p, *d;
+ 	unsigned long phys;
+ 	
+ 	/* Default */
+ 	phys = offset + KERNELBASE;
 	
 #ifdef CONFIG_GEMINI
 	gemini_prom_init();
-	return;
+		return phys;
 #endif /* CONFIG_GEMINI */
 	
 	/* check if we're apus, return if we are */
 	if ( r3 == 0x61707573 )
-		return;
+ 		return phys;
 
 	/* If we came here from BootX, clear the screen,
 	 * set up some pointers and return. */
@@ -381,12 +385,12 @@
 		prom_print(RELOC("booting...\n"));
 		flushscreen();
 #endif
-		return;
+		return phys;
 	}
 	
 	/* check if we're prep, return if we are */
 	if ( *(unsigned long *)(0) == 0xdeadc0de )
-		return;
+		return phys;
 
 	/* First get a handle for the stdout device */
 	RELOC(prom) = pp;
@@ -478,6 +482,29 @@
 			prom_print(RELOC(" done\n"));
 	}
 
+	if ((int) call_prom(RELOC("getprop"), 4, 1, RELOC(prom_chosen),
+			    RELOC("mmu"), &prom_mmu, sizeof(prom_mmu)) <= 0) {	
+		prom_print(RELOC(" no MMU found\n"));
+	} else {
+		int nargs;
+		struct prom_args prom_args;
+		nargs = 4;
+		prom_args.service = RELOC("call-method");
+		prom_args.nargs = nargs;
+		prom_args.nret = 4;
+		prom_args.args[0] = RELOC("translate");
+		prom_args.args[1] = prom_mmu;
+		prom_args.args[2] = (void *)(offset + KERNELBASE);
+		prom_args.args[3] = (void *)1;
+		RELOC(prom)(&prom_args);
+
+		/* We assume the phys. address size is 3 cells */
+		if (prom_args.args[nargs] != 0)
+			prom_print(RELOC(" (translate failed) "));
+		else
+			phys = (unsigned long)prom_args.args[nargs+3];
+	}
+
 #ifdef CONFIG_SMP
 	/*
 	 * With CHRP SMP we need to use the OF to start the other
@@ -554,6 +581,7 @@
 			prom_print(RELOC("...failed\n"));
 	}
 #endif	
+	return phys;
 }
 
 /*
diff -urN linux-2.2.14-pre8/CREDITS linux-2.2.14-pre9/CREDITS
--- linux-2.2.14-pre8/CREDITS	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/CREDITS	2003-08-15 15:09:15.000000000 -0700
@@ -1283,11 +1283,11 @@
 S: Czech Republic
 
 N: Paul Mackerras
-E: paulus@cs.anu.edu.au
+E: paulus@linuxcare.com
 D: Linux port for PCI Power Macintosh
-S: Dept. of Computer Science
-S: Australian National University
-S: Canberra  ACT  0200
+S: Linuxcare, Inc.
+S: 24 Marcus Clarke Street
+S: Canberra ACT 2601
 S: Australia
 
 N: Pat Mackinlay
@@ -1536,7 +1536,7 @@
 S: Australia
 
 N: Greg Page
-E: greg@caldera.com
+E: gpage@sovereign.org
 D: IPX development and support
 
 N: David Parsons
@@ -1964,7 +1964,8 @@
 S: Canada K2L 1S2
 
 N: Andrew Tridgell
-E: Andrew.Tridgell@anu.edu.au
+E: tridge@samba.org
+W: http://linuxcare.com.au/tridge/
 D: dosemu, networking, samba
 S: 3 Ballow Crescent
 S: MacGregor A.C.T 2615
diff -urN linux-2.2.14-pre8/drivers/char/lp.c linux-2.2.14-pre9/drivers/char/lp.c
--- linux-2.2.14-pre8/drivers/char/lp.c	1999-10-19 17:14:00.000000000 -0700
+++ linux-2.2.14-pre9/drivers/char/lp.c	2003-08-15 15:09:15.000000000 -0700
@@ -424,7 +424,7 @@
 {
 	unsigned int last = lp_table[minor].last_error;
 	unsigned char status = r_str(minor);
-	if (status & LP_PERRORP)
+	if ((status & LP_PERRORP) && !(LP_F(minor) & LP_CAREFUL))
 		/* No error. */
 		last = 0;
 	else if ((status & LP_POUTPA)) {
@@ -437,11 +437,14 @@
 			last = LP_PSELECD;
 			printk(KERN_INFO "lp%d off-line\n", minor);
 		}
-	} else {
+	} else if (!(status & LP_PERRORP)) {
 		if (last != LP_PERRORP) {
 			last = LP_PERRORP;
 			printk(KERN_INFO "lp%d on fire\n", minor);
 		}
+	} else {
+		last = 0; /* Come here if LP_CAREFUL is set and no
+                             errors are reported. */
 	}
 
 	lp_table[minor].last_error = last;
diff -urN linux-2.2.14-pre8/drivers/char/serial.c linux-2.2.14-pre9/drivers/char/serial.c
--- linux-2.2.14-pre8/drivers/char/serial.c	1999-10-19 17:14:00.000000000 -0700
+++ linux-2.2.14-pre9/drivers/char/serial.c	2003-08-15 15:09:15.000000000 -0700
@@ -61,6 +61,7 @@
  * 		Check the magic number for the async_structure where
  * 		ever possible.
  */
+#include <linux/config.h>
 
 #undef SERIAL_PARANOIA_CHECK
 #define CONFIG_SERIAL_NOPAUSE_IO
@@ -119,7 +120,6 @@
  * End of serial driver configuration section.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/signal.h>
diff -urN linux-2.2.14-pre8/drivers/isdn/eicon/eicon_mod.c linux-2.2.14-pre9/drivers/isdn/eicon/eicon_mod.c
--- linux-2.2.14-pre8/drivers/isdn/eicon/eicon_mod.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/drivers/isdn/eicon/eicon_mod.c	2003-08-15 15:09:15.000000000 -0700
@@ -839,7 +839,8 @@
 }
 
 /* jiftime() copied from HiSax */
-inline int
+/* Copying functions without making them static causes nameclashed --ADVE */
+static inline int
 jiftime(char *s, long mark)
 {
         s += 8;
diff -urN linux-2.2.14-pre8/drivers/net/pcnet32.c linux-2.2.14-pre9/drivers/net/pcnet32.c
--- linux-2.2.14-pre8/drivers/net/pcnet32.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/drivers/net/pcnet32.c	2003-08-15 15:09:15.000000000 -0700
@@ -944,7 +944,7 @@
 	lp->tx_ring[i].status = 0;
     }
 
-    lp->init_block.tlen_rlen = TX_RING_LEN_BITS | RX_RING_LEN_BITS;
+    lp->init_block.tlen_rlen = le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS); 
     for (i = 0; i < 6; i++)
 	lp->init_block.phys_addr[i] = dev->dev_addr[i];
     lp->init_block.rx_ring = (u32)le32_to_cpu(virt_to_bus(lp->rx_ring));
diff -urN linux-2.2.14-pre8/drivers/net/sbni.c linux-2.2.14-pre9/drivers/net/sbni.c
--- linux-2.2.14-pre8/drivers/net/sbni.c	1999-10-19 17:14:01.000000000 -0700
+++ linux-2.2.14-pre9/drivers/net/sbni.c	2003-08-15 15:09:15.000000000 -0700
@@ -1371,7 +1371,7 @@
 		"movl %%edx,%%eax"
 		: 
 		: "S" (mem), "D" (&crc32tab[0]), "c" (len), "d" (initial)
-		: "eax", "edx", "ecx"
+		: "eax"
 	);
 	/* return crc; */
 }
diff -urN linux-2.2.14-pre8/drivers/net/sk98lin/skge.c linux-2.2.14-pre9/drivers/net/sk98lin/skge.c
--- linux-2.2.14-pre8/drivers/net/sk98lin/skge.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/drivers/net/sk98lin/skge.c	2003-08-15 15:09:15.000000000 -0700
@@ -2,8 +2,8 @@
  *
  * Name:      	skge.c
  * Project:	GEnesis, PCI Gigabit Ethernet Adapter
- * Version:	$Revision: 1.25 $
- * Date:       	$Date: 1999/10/07 14:47:52 $
+ * Version:	$Revision: 1.27 $
+ * Date:       	$Date: 1999/11/25 09:06:28 $
  * Purpose:	The main driver source module
  *
  ******************************************************************************/
@@ -46,6 +46,16 @@
  * History:
  *
  *	$Log: skge.c,v $
+ *	Revision 1.27  1999/11/25 09:06:28  cgoos
+ *	Changed base_addr to unsigned long.
+ *	
+ *	Revision 1.26  1999/11/22 13:29:16  cgoos
+ *	Changed license header to GPL.
+ *	Changes for inclusion in linux kernel (2.2.13).
+ *	Removed 2.0.x defines.
+ *	Changed SkGeProbe to skge_probe.
+ *	Added checks in SkGeIoctl.
+ *	
  *	Revision 1.25  1999/10/07 14:47:52  cgoos
  *	Changed 984x to 98xx.
  *	
@@ -337,7 +347,7 @@
 int		version_disp = 0;
 SK_AC		*pAC;
 struct pci_dev	*pdev = NULL;
-unsigned int	base_address;
+unsigned long	base_address;
 
 	if (probed)
 		return -ENODEV;
diff -urN linux-2.2.14-pre8/drivers/net/Space.c linux-2.2.14-pre9/drivers/net/Space.c
--- linux-2.2.14-pre8/drivers/net/Space.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/drivers/net/Space.c	2003-08-15 15:09:15.000000000 -0700
@@ -624,8 +624,8 @@
 #endif
 
 #ifdef CONFIG_SDLA
-    extern int sdla_c_init(struct device *);
-    static struct device sdla0_dev = { "sdla0", 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV, sdla_c_init, };
+    extern int sdla_init(struct device *);
+    static struct device sdla0_dev = { "sdla0", 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV, sdla_init, };
 
 #   undef NEXT_DEV
 #   define NEXT_DEV	(&sdla0_dev)
diff -urN linux-2.2.14-pre8/drivers/scsi/atp870u.c linux-2.2.14-pre9/drivers/scsi/atp870u.c
--- linux-2.2.14-pre8/drivers/scsi/atp870u.c	1999-10-19 17:14:01.000000000 -0700
+++ linux-2.2.14-pre9/drivers/scsi/atp870u.c	2003-08-15 15:09:15.000000000 -0700
@@ -17,9 +17,9 @@
 #include <linux/delay.h>
 #include <linux/sched.h>
 #include <linux/proc_fs.h>
+#include <asm/spinlock.h>
 #include <asm/system.h>
 #include <asm/io.h>
-#include <asm/spinlock.h>
 #include <linux/pci.h>
 #include <linux/blk.h>
 #include "scsi.h"
@@ -42,47 +42,59 @@
  *   static const char RCSid[] = "$Header: /usr/src/linux/kernel/blk_drv/scsi/RCS/atp870u.c,v 1.0 1997/05/07 15:22:00 root Exp root $";
  */
 
-static unsigned char admaxu = 1, host_idu[2], chip_veru[2], scam_on[2], global_map[2];
-static unsigned short int active_idu[2], wide_idu[2], sync_idu, ultra_map[2];
-static int workingu[2] = {0, 0};
-
-static Scsi_Cmnd *querequ[2][qcnt], *curr_req[2][16];
-
-static unsigned char devspu[2][16] = {
-	{0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-	 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20},
-	{0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-	 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20}
-};
+static unsigned char admaxu = 1;
+static unsigned short int sync_idu;
 
-static unsigned char dirctu[2][16], last_cmd[2], in_snd[2], in_int[2];
-static unsigned char ata_cdbu[2][16];
-static unsigned int ioportu[2] = {0, 0};
 static unsigned int irqnumu[2] = {0, 0};
-static unsigned short int pciportu[2];
-static unsigned long prdaddru[2][16], tran_lenu[2][16], last_lenu[2][16];
-static unsigned char prd_tableu[2][16][1024];
-static unsigned char *prd_posu[2][16];
-static unsigned char quhdu[2], quendu[2];
 
-static unsigned char devtypeu[2][16] =
+struct atp_unit
 {
-	{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
-	{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+	unsigned long ioport;
+	unsigned long irq;
+	unsigned long pciport;
+	unsigned char last_cmd;
+	unsigned char in_snd;
+	unsigned char in_int;
+	unsigned char quhdu;
+	unsigned char quendu;
+	unsigned char scam_on;
+	unsigned char global_map;
+	unsigned char chip_veru;
+	unsigned char host_idu;
+	int working;
+	unsigned short wide_idu;
+	unsigned short active_idu;
+	unsigned short ultra_map;
+	unsigned char ata_cdbu[16];
+	Scsi_Cmnd *querequ[qcnt];
+	struct atp_id
+	{
+		unsigned char dirctu;
+		unsigned char devspu;
+		unsigned char devtypeu;
+		unsigned long prdaddru;
+		unsigned long tran_lenu;
+		unsigned long last_lenu;
+		unsigned char *prd_posu;
+		unsigned char *prd_tableu;
+		Scsi_Cmnd *curr_req;
+	} id[16];
 };
 
 static struct Scsi_Host *atp_host[2] = {NULL, NULL};
+static struct atp_unit atp_unit[2];
 
 static void atp870u_intr_handle(int irq, void *dev_id, struct pt_regs *regs)
 {
 	unsigned long flags;
 	unsigned short int tmpcip, id;
-	unsigned char i, j, h, tarid, lun;
+	unsigned char i, j, h, target_id, lun;
 	unsigned char *prd;
 	Scsi_Cmnd *workrequ;
 	unsigned int workportu, tmport;
 	unsigned long adrcntu, k;
 	int errstus;
+	struct atp_unit *dev = dev_id;
 
 	for (h = 0; h < 2; h++) {
 		if (irq == irqnumu[h]) {
@@ -91,59 +103,84 @@
 	}
 	return;
 irq_numok:
-	in_int[h] = 1;
-	workportu = ioportu[h];
+	dev->in_int = 1;
+	workportu = dev->ioport;
 	tmport = workportu;
-
-	if (workingu[h] != 0) 
+	
+	if (dev->working != 0) 
 	{
 		tmport += 0x1f;
 		j = inb(tmport);
 
-		tmpcip = pciportu[h];
+		tmpcip = dev->pciport;
 		if ((inb(tmpcip) & 0x08) != 0) 
 		{
 			tmpcip += 0x2;
-			while ((inb(tmpcip) & 0x08) != 0);
+			for (k=0; k < 1000; k++)
+			{
+				if ((inb(tmpcip) & 0x08) == 0)
+				{
+					goto stop_dma;
+				}
+				if ((inb(tmpcip) & 0x01) == 0)
+				{
+					goto stop_dma;
+				}    
+			}
 		}
-		tmpcip = pciportu[h];
+stop_dma:
+		tmpcip = dev->pciport;
 		outb(0x00, tmpcip);
 		tmport -= 0x08;
 
 		i = inb(tmport);
 		if ((j & 0x40) == 0) 
 		{
-			if ((last_cmd[h] & 0x40) == 0) 
+			if ((dev->last_cmd & 0x40) == 0) 
 			{
-				last_cmd[h] = 0xff;
+				dev->last_cmd = 0xff;
 			}
 		}
-		else last_cmd[h] |= 0x40;
+		else dev->last_cmd |= 0x40;
 
 		tmport -= 0x02;
-		tarid = inb(tmport);
+		target_id = inb(tmport);
 		tmport += 0x02;
 
-		if ((tarid & 0x40) != 0) {
-			tarid = (tarid & 0x07) | 0x08;
+		/*
+		 *	Remap wide devices onto id numbers
+		 */
+		 
+		if ((target_id & 0x40) != 0) {
+			target_id = (target_id & 0x07) | 0x08;
 		} else {
-			tarid &= 0x07;
+			target_id &= 0x07;
 		}
+		
 		if (i == 0x85) 
 		{
-			if (wide_idu[h] != 0) 
+			/*
+			 *	Flip wide
+			 */
+			if (dev->wide_idu != 0) 
 			{
 				tmport = workportu + 0x1b;
 				j = inb(tmport) & 0x0e;
 				j |= 0x01;
 				outb(j, tmport);
 			}
-			if (((quhdu[h] != quendu[h]) || (last_cmd[h] != 0xff)) &&
-			    (in_snd[h] == 0)) 
+			/*
+			 *	Issue more commands
+			 */
+			if (((dev->quhdu != dev->quendu) || (dev->last_cmd != 0xff)) &&
+			    (dev->in_snd == 0)) 
 			{
 				send_s870(h);
 			}
-			in_int[h] = 0;
+			/*
+			 *	Done
+			 */
+			dev->in_int = 0;
 			return;
 		}
 		if (i == 0x21) 
@@ -153,15 +190,15 @@
 			((unsigned char *) &adrcntu)[2] = inb(tmport++);
 			((unsigned char *) &adrcntu)[1] = inb(tmport++);
 			((unsigned char *) &adrcntu)[0] = inb(tmport);
-			k = last_lenu[h][tarid];
+			k = dev->id[target_id].last_lenu;
 			k -= adrcntu;
-			tran_lenu[h][tarid] = k;
-			last_lenu[h][tarid] = adrcntu;
+			dev->id[target_id].tran_lenu = k;
+			dev->id[target_id].last_lenu = adrcntu;
 			tmport -= 0x04;
 			outb(0x41, tmport);
 			tmport += 0x08;
 			outb(0x08, tmport);
-			in_int[h] = 0;
+			dev->in_int = 0;
 			return;
 		}
 		if ((i == 0x80) || (i == 0x8f)) 
@@ -169,7 +206,7 @@
 			lun = 0;
 			tmport -= 0x07;
 			j = inb(tmport);
-			if (j == 0x44) {
+			if (j == 0x44 || i==0x80) {
 				tmport += 0x0d;
 				lun = inb(tmport) & 0x07;
 			} else {
@@ -180,71 +217,80 @@
 					((unsigned char *) &adrcntu)[2] = inb(tmport++);
 					((unsigned char *) &adrcntu)[1] = inb(tmport++);
 					((unsigned char *) &adrcntu)[0] = inb(tmport);
-					k = last_lenu[h][tarid];
+					k = dev->id[target_id].last_lenu;
 					k -= adrcntu;
-					tran_lenu[h][tarid] = k;
-					last_lenu[h][tarid] = adrcntu;
+					dev->id[target_id].tran_lenu = k;
+					dev->id[target_id].last_lenu = adrcntu;
 					tmport += 0x04;
 					outb(0x08, tmport);
-					in_int[h] = 0;
+					dev->in_int = 0;
 					return;
 				}
 				else 
 				{
 					outb(0x46, tmport);
-					dirctu[h][tarid] = 0x00;
+					dev->id[target_id].dirctu = 0x00;
 					tmport += 0x02;
 					outb(0x00, tmport++);
 					outb(0x00, tmport++);
 					outb(0x00, tmport++);
 					tmport += 0x03;
 					outb(0x08, tmport);
-					in_int[h] = 0;
+					dev->in_int = 0;
 					return;
 				}
 			}
 			tmport = workportu + 0x10;
 			outb(0x45, tmport);
 			tmport += 0x06;
-			tarid = inb(tmport);
-			if ((tarid & 0x10) != 0) 
+			target_id = inb(tmport);
+			/*
+			 *	Remap wide identifiers
+			 */
+			if ((target_id & 0x10) != 0) 
 			{
-				tarid = (tarid & 0x07) | 0x08;
+				target_id = (target_id & 0x07) | 0x08;
 			} else {
-				tarid &= 0x07;
+				target_id &= 0x07;
 			}
-			workrequ = curr_req[h][tarid];
+			workrequ = dev->id[target_id].curr_req;
 			tmport = workportu + 0x0f;
 			outb(lun, tmport);
 			tmport += 0x02;
-			outb(devspu[h][tarid], tmport++);
-			adrcntu = tran_lenu[h][tarid];
-			k = last_lenu[h][tarid];
+			outb(dev->id[target_id].devspu, tmport++);
+			adrcntu = dev->id[target_id].tran_lenu;
+			k = dev->id[target_id].last_lenu;
 			outb(((unsigned char *) &k)[2], tmport++);
 			outb(((unsigned char *) &k)[1], tmport++);
 			outb(((unsigned char *) &k)[0], tmport++);
-			j = tarid;
-			if (tarid > 7) {
+			/* Remap wide */
+			j = target_id;
+			if (target_id > 7) {
 				j = (j & 0x07) | 0x40;
 			}
-			j |= dirctu[h][tarid];
+			/* Add direction */
+			j |= dev->id[target_id].dirctu;
 			outb(j, tmport++);
 			outb(0x80, tmport);
 			tmport = workportu + 0x1b;
 			j = inb(tmport) & 0x0e;
 			id = 1;
-			id = id << tarid;
-			if ((id & wide_idu[h]) != 0) {
+			id = id << target_id;
+			/*
+			 *	Is this a wide device
+			 */
+			if ((id & dev->wide_idu) != 0) {
 				j |= 0x01;
 			}
 			outb(j, tmport);
-			if (last_lenu[h][tarid] == 0) {
+			
+			if (dev->id[target_id].last_lenu == 0) {
 				tmport = workportu + 0x18;
 				outb(0x08, tmport);
-				in_int[h] = 0;
+				dev->in_int = 0;
 				return;
 			}
-			prd = prd_posu[h][tarid];
+			prd = dev->id[target_id].prd_posu;
 			while (adrcntu != 0) 
 			{
 				id = ((unsigned short int *) (prd))[2];
@@ -258,35 +304,44 @@
 					    (k - adrcntu);
 					((unsigned long *) (prd))[0] += adrcntu;
 					adrcntu = 0;
-					prd_posu[h][tarid] = prd;
+					dev->id[target_id].prd_posu = prd;
 				} else {
 					adrcntu -= k;
-					prdaddru[h][tarid] += 0x08;
+					dev->id[target_id].prdaddru += 0x08;
 					prd += 0x08;
 					if (adrcntu == 0) {
-						prd_posu[h][tarid] = prd;
+						dev->id[target_id].prd_posu = prd;
 					}
 				}
 			}
-			tmpcip = pciportu[h] + 0x04;
-			outl(prdaddru[h][tarid], tmpcip);
+			tmpcip = dev->pciport + 0x04;
+			outl(dev->id[target_id].prdaddru, tmpcip);
 			tmpcip -= 0x02;
 			outb(0x06, tmpcip);
 			outb(0x00, tmpcip);
 			tmpcip -= 0x02;
 			tmport = workportu + 0x18;
-			if (dirctu[h][tarid] != 0) {
+			/*
+			 *	Check transfer direction
+			 */
+			if (dev->id[target_id].dirctu != 0) {
 				outb(0x08, tmport);
 				outb(0x01, tmpcip);
-				in_int[h] = 0;
+				dev->in_int = 0;
 				return;
 			}
 			outb(0x08, tmport);
 			outb(0x09, tmpcip);
-			in_int[h] = 0;
+			dev->in_int = 0;
 			return;
 		}
-		workrequ = curr_req[h][tarid];
+		
+		/*
+		 *	Current scsi request on this target
+		 */
+		 
+		workrequ = dev->id[target_id].curr_req;
+		
 		if (i == 0x42) {
 			errstus = 0x02;
 			workrequ->result = errstus;
@@ -299,24 +354,36 @@
 			errstus = inb(tmport);
 			workrequ->result = errstus;
 go_42:
+			/*
+			 *	Complete the command
+			 */
 			spin_lock_irqsave(&io_request_lock, flags);
 			(*workrequ->scsi_done) (workrequ);
 			spin_unlock_irqrestore(&io_request_lock, flags);
 
-			curr_req[h][tarid] = 0;
-			workingu[h]--;
-			if (wide_idu[h] != 0) {
+			/*
+			 *	Clear it off the queue
+			 */
+			dev->id[target_id].curr_req = 0;
+			dev->working--;
+			/*
+			 *	Take it back wide
+			 */
+			if (dev->wide_idu != 0) {
 				tmport = workportu + 0x1b;
 				j = inb(tmport) & 0x0e;
 				j |= 0x01;
 				outb(j, tmport);
 			}
-			if (((last_cmd[h] != 0xff) || (quhdu[h] != quendu[h])) &&
-			    (in_snd[h] == 0)) 
+			/*
+			 *	If there is stuff to send and nothing going then send it
+			 */
+			if (((dev->last_cmd != 0xff) || (dev->quhdu != dev->quendu)) &&
+			    (dev->in_snd == 0)) 
 			{
 				send_s870(h);
 			}
-			in_int[h] = 0;
+			dev->in_int = 0;
 			return;
 		}
 		if (i == 0x4f) {
@@ -325,23 +392,23 @@
 		i &= 0x0f;
 		if (i == 0x09) {
 			tmpcip = tmpcip + 4;
-			outl(prdaddru[h][tarid], tmpcip);
+			outl(dev->id[target_id].prdaddru, tmpcip);
 			tmpcip = tmpcip - 2;
 			outb(0x06, tmpcip);
 			outb(0x00, tmpcip);
 			tmpcip = tmpcip - 2;
 			tmport = workportu + 0x10;
 			outb(0x41, tmport);
-			dirctu[h][tarid] = 0x00;
+			dev->id[target_id].dirctu = 0x00;
 			tmport += 0x08;
 			outb(0x08, tmport);
 			outb(0x09, tmpcip);
-			in_int[h] = 0;
+			dev->in_int = 0;
 			return;
 		}
 		if (i == 0x08) {
 			tmpcip = tmpcip + 4;
-			outl(prdaddru[h][tarid], tmpcip);
+			outl(dev->id[target_id].prdaddru, tmpcip);
 			tmpcip = tmpcip - 2;
 			outb(0x06, tmpcip);
 			outb(0x00, tmpcip);
@@ -350,11 +417,11 @@
 			outb(0x41, tmport);
 			tmport += 0x05;
 			outb((unsigned char) (inb(tmport) | 0x20), tmport);
-			dirctu[h][tarid] = 0x20;
+			dev->id[target_id].dirctu = 0x20;
 			tmport += 0x03;
 			outb(0x08, tmport);
 			outb(0x01, tmpcip);
-			in_int[h] = 0;
+			dev->in_int = 0;
 			return;
 		}
 		tmport -= 0x07;
@@ -363,20 +430,20 @@
 		} else {
 			outb(0x46, tmport);
 		}
-		dirctu[h][tarid] = 0x00;
+		dev->id[target_id].dirctu = 0x00;
 		tmport += 0x02;
 		outb(0x00, tmport++);
 		outb(0x00, tmport++);
 		outb(0x00, tmport++);
 		tmport += 0x03;
 		outb(0x08, tmport);
-		in_int[h] = 0;
+		dev->in_int = 0;
 		return;
 	} else {
 		tmport = workportu + 0x17;
 		inb(tmport);
-		workingu[h] = 0;
-		in_int[h] = 0;
+		dev->working = 0;
+		dev->in_int = 0;
 		return;
 	}
 }
@@ -387,6 +454,7 @@
 	unsigned long flags;
 	unsigned short int m;
 	unsigned int tmport;
+	struct atp_unit *dev;
 
 	for (h = 0; h <= admaxu; h++) {
 		if (req_p->host == atp_host[h]) {
@@ -400,9 +468,15 @@
 		done(req_p);
 		return 0;
 	}
+	dev = &atp_unit[h];
 	m = 1;
 	m = m << req_p->target;
-	if ((m & active_idu[h]) == 0) {
+
+	/*
+	 *	Fake a timeout for missing targets
+	 */
+	 
+	if ((m & dev->active_idu) == 0) {
 		req_p->result = 0x00040000;
 		done(req_p);
 		return 0;
@@ -410,30 +484,36 @@
 	if (done) {
 		req_p->scsi_done = done;
 	} else {
-		printk("atp870u_queuecommand: done can't be NULL\n");
+		printk(KERN_WARNING "atp870u_queuecommand: done can't be NULL\n");
 		req_p->result = 0;
 		done(req_p);
 		return 0;
 	}
-	quendu[h]++;
-	if (quendu[h] >= qcnt) {
-		quendu[h] = 0;
+	/*
+	 *	Count new command
+	 */
+	dev->quendu++;
+	if (dev->quendu >= qcnt) {
+		dev->quendu = 0;
 	}
+	/*
+	 *	Check queue state
+	 */
 wait_que_empty:
-	if (quhdu[h] == quendu[h]) {
+	if (dev->quhdu == dev->quendu) {
 		goto wait_que_empty;
 	}
 	save_flags(flags);
 	cli();
-	querequ[h][quendu[h]] = req_p;
-	if (quendu[h] == 0) {
+	dev->querequ[dev->quendu] = req_p;
+	if (dev->quendu == 0) {
 		i = qcnt - 1;
 	} else {
-		i = quendu[h] - 1;
+		i = dev->quendu - 1;
 	}
-	tmport = ioportu[h] + 0x1c;
+	tmport = dev->ioport + 0x1c;
 	restore_flags(flags);
-	if ((inb(tmport) == 0) && (in_int[h] == 0) && (in_snd[h] == 0)) {
+	if ((inb(tmport) == 0) && (dev->in_int == 0) && (dev->in_snd == 0)) {
 		send_s870(h);
 	}
 	return 0;
@@ -453,44 +533,45 @@
 	Scsi_Cmnd *workrequ;
 	unsigned long flags;
 	unsigned int i;
-	unsigned char j, tarid;
+	unsigned char j, target_id;
 	unsigned char *prd;
 	unsigned short int tmpcip, w;
 	unsigned long l, bttl;
 	unsigned int workportu;
 	struct scatterlist *sgpnt;
+	struct atp_unit *dev = &atp_unit[h];
 
 	save_flags(flags);
 	cli();
-	if (in_snd[h] != 0) {
+	if (dev->in_snd != 0) {
 		restore_flags(flags);
 		return;
 	}
-	in_snd[h] = 1;
-	if ((last_cmd[h] != 0xff) && ((last_cmd[h] & 0x40) != 0)) {
-		last_cmd[h] &= 0x0f;
-		workrequ = curr_req[h][last_cmd[h]];
+	dev->in_snd = 1;
+	if ((dev->last_cmd != 0xff) && ((dev->last_cmd & 0x40) != 0)) {
+		dev->last_cmd &= 0x0f;
+		workrequ = dev->id[dev->last_cmd].curr_req;
 		goto cmd_subp;
 	}
-	workingu[h]++;
-	j = quhdu[h];
-	quhdu[h]++;
-	if (quhdu[h] >= qcnt) {
-		quhdu[h] = 0;
-	}
-	workrequ = querequ[h][quhdu[h]];
-	if (curr_req[h][workrequ->target] == 0) {
-		curr_req[h][workrequ->target] = workrequ;
-		last_cmd[h] = workrequ->target;
+	dev->working++;
+	j = dev->quhdu;
+	dev->quhdu++;
+	if (dev->quhdu >= qcnt) {
+		dev->quhdu = 0;
+	}
+	workrequ = dev->querequ[dev->quhdu];
+	if (dev->id[workrequ->target].curr_req == 0) {
+		dev->id[workrequ->target].curr_req = workrequ;
+		dev->last_cmd = workrequ->target;
 		goto cmd_subp;
 	}
-	quhdu[h] = j;
-	workingu[h]--;
-	in_snd[h] = 0;
+	dev->quhdu = j;
+	dev->working--;
+	dev->in_snd = 0;
 	restore_flags(flags);
 	return;
 cmd_subp:
-	workportu = ioportu[h];
+	workportu = dev->ioport;
 	tmport = workportu + 0x1f;
 	if ((inb(tmport) & 0xb0) != 0) {
 		goto abortsnd;
@@ -500,43 +581,63 @@
 		goto oktosend;
 	}
 abortsnd:
-	last_cmd[h] |= 0x40;
-	in_snd[h] = 0;
+	dev->last_cmd |= 0x40;
+	dev->in_snd = 0;
 	restore_flags(flags);
 	return;
 oktosend:
-	memcpy(&ata_cdbu[h][0], &workrequ->cmnd[0], workrequ->cmd_len);
-	if (ata_cdbu[h][0] == 0x25) {
+	memcpy(&dev->ata_cdbu[0], &workrequ->cmnd[0], workrequ->cmd_len);
+	if (dev->ata_cdbu[0] == READ_CAPACITY) {
 		if (workrequ->request_bufflen > 8) {
 			workrequ->request_bufflen = 0x08;
 		}
 	}
-	if (ata_cdbu[h][0] == 0x12) {
+	/*
+	 *	Why limit this ????
+	 */
+	if (dev->ata_cdbu[0] == INQUIRY) {
 		if (workrequ->request_bufflen > 0x24) {
 			workrequ->request_bufflen = 0x24;
-			ata_cdbu[h][4] = 0x24;
+			dev->ata_cdbu[4] = 0x24;
 		}
 	}
+	
 	tmport = workportu + 0x1b;
 	j = inb(tmport) & 0x0e;
-	tarid = workrequ->target;
+	target_id = workrequ->target;
+	
+	/*
+	 *	Wide ?
+	 */
 	w = 1;
-	w = w << tarid;
-	if ((w & wide_idu[h]) != 0) {
+	w = w << target_id;
+	if ((w & dev->wide_idu) != 0) {
 		j |= 0x01;
-	}
+	}	
 	outb(j, tmport);
+	
+	/*
+	 *	Write the command
+	 */
+	 
 	tmport = workportu;
 	outb(workrequ->cmd_len, tmport++);
 	outb(0x2c, tmport++);
 	outb(0xcf, tmport++);
 	for (i = 0; i < workrequ->cmd_len; i++) {
-		outb(ata_cdbu[h][i], tmport++);
+		outb(dev->ata_cdbu[i], tmport++);
 	}
 	tmport = workportu + 0x0f;
-	outb(0x00, tmport);
+	outb(workrequ->lun, tmport);
 	tmport += 0x02;
-	outb(devspu[h][tarid], tmport++);
+	/*
+	 *	Write the target
+	 */
+	outb(dev->id[target_id].devspu, tmport++);
+	
+	/*
+	 *	Figure out the transfer size
+	 */
 	if (workrequ->use_sg) 
 	{
 		l = 0;
@@ -552,38 +653,54 @@
 	} else {
 		l = workrequ->request_bufflen;
 	}
+	/*
+	 *	Write transfer size
+	 */
 	outb((unsigned char) (((unsigned char *) (&l))[2]), tmport++);
 	outb((unsigned char) (((unsigned char *) (&l))[1]), tmport++);
 	outb((unsigned char) (((unsigned char *) (&l))[0]), tmport++);
-	j = tarid;
-	last_lenu[h][j] = l;
-	tran_lenu[h][j] = 0;
+	j = target_id;
+	dev->id[j].last_lenu = l;
+	dev->id[j].tran_lenu = 0;
+	/*
+	 *	Flip the wide bits
+	 */
 	if ((j & 0x08) != 0) {
 		j = (j & 0x07) | 0x40;
 	}
-	if ((ata_cdbu[h][0] == 0x0a) || (ata_cdbu[h][0] == 0x2a) ||
-	    (ata_cdbu[h][0] == 0xaa) || (ata_cdbu[h][0] == 0x15)) {
+	/*
+	 *	Check transfer direction
+	 */
+	if ((dev->ata_cdbu[0] == WRITE_6) || (dev->ata_cdbu[0] == WRITE_10) ||
+	    (dev->ata_cdbu[0] == WRITE_12) || (dev->ata_cdbu[0] == MODE_SELECT)) {
 		outb((unsigned char) (j | 0x20), tmport++);
 	} else {
 		outb(j, tmport++);
 	}
+	outb((unsigned char)(inb(tmport) | 0x80),tmport);
 	outb(0x80, tmport);
 	tmport = workportu + 0x1c;
-	dirctu[h][tarid] = 0;
+	dev->id[target_id].dirctu = 0;
 	if (l == 0) {
 		if (inb(tmport) == 0) {
 			tmport = workportu + 0x18;
 			outb(0x08, tmport);
 		} else {
-			last_cmd[h] |= 0x40;
+			dev->last_cmd |= 0x40;
 		}
-		in_snd[h] = 0;
+		dev->in_snd = 0;
 		restore_flags(flags);
 		return;
 	}
-	tmpcip = pciportu[h];
-	prd = &prd_tableu[h][tarid][0];
-	prd_posu[h][tarid] = prd;
+	tmpcip = dev->pciport;
+	prd = dev->id[target_id].prd_tableu;
+	dev->id[target_id].prd_posu = prd;
+	
+	/*
+	 *	Now write the request list. Either as scatter/gather or as
+	 *	a linear chain.
+	 */
+	 
 	if (workrequ->use_sg) 
 	{
 		sgpnt = (struct scatterlist *) workrequ->request_buffer;
@@ -596,6 +713,9 @@
 		}
 		(unsigned short int) (((unsigned short int *) (prd))[i - 1]) = 0x8000;
 	} else {
+		/*
+		 *	For a linear request write a chain of blocks
+		 */
 		bttl = virt_to_bus(workrequ->request_buffer);
 		l = workrequ->request_bufflen;
 		i = 0;
@@ -612,24 +732,24 @@
 		(unsigned long) (((unsigned long *) (prd))[i >> 1]) = bttl;
 	}
 	tmpcip = tmpcip + 4;
-	prdaddru[h][tarid] = virt_to_bus(&prd_tableu[h][tarid][0]);
-	outl(prdaddru[h][tarid], tmpcip);
+	dev->id[target_id].prdaddru = virt_to_bus(dev->id[target_id].prd_tableu);
+	outl(dev->id[target_id].prdaddru, tmpcip);
 	tmpcip = tmpcip - 2;
 	outb(0x06, tmpcip);
 	outb(0x00, tmpcip);
 	tmpcip = tmpcip - 2;
-	if ((ata_cdbu[h][0] == 0x0a) || (ata_cdbu[h][0] == 0x2a) ||
-	    (ata_cdbu[h][0] == 0xaa) || (ata_cdbu[h][0] == 0x15)) 
+	if ((dev->ata_cdbu[0] == WRITE_6) || (dev->ata_cdbu[0] == WRITE_10) ||
+	    (dev->ata_cdbu[0] == WRITE_12) || (dev->ata_cdbu[0] == MODE_SELECT)) 
 	{
-		dirctu[h][tarid] = 0x20;
+		dev->id[target_id].dirctu = 0x20;
 		if (inb(tmport) == 0) {
 			tmport = workportu + 0x18;
 			outb(0x08, tmport);
 			outb(0x01, tmpcip);
 		} else {
-			last_cmd[h] |= 0x40;
+			dev->last_cmd |= 0x40;
 		}
-		in_snd[h] = 0;
+		dev->in_snd = 0;
 		restore_flags(flags);
 		return;
 	}
@@ -639,9 +759,9 @@
 		outb(0x08, tmport);
 		outb(0x09, tmpcip);
 	} else {
-		last_cmd[h] |= 0x40;
+		dev->last_cmd |= 0x40;
 	}
-	in_snd[h] = 0;
+	dev->in_snd = 0;
 	restore_flags(flags);
 	return;
 
@@ -663,13 +783,13 @@
 	return SCpnt->result;
 }
 
-unsigned char fun_scam(unsigned char host, unsigned short int *val)
+unsigned char fun_scam(struct atp_unit *dev, unsigned short int *val)
 {
 	unsigned int tmport;
 	unsigned short int i, k;
 	unsigned char j;
 
-	tmport = ioportu[host] + 0x1c;
+	tmport = dev->ioport + 0x1c;
 	outw(*val, tmport);
 FUN_D7:
 	for (i = 0; i < 10; i++) {	/* stable >= bus settle delay(400 ns)  */
@@ -712,32 +832,34 @@
 	unsigned long n;
 	unsigned short int m, assignid_map, val;
 	unsigned char mbuf[33], quintet[2];
-	static unsigned char g2q_tab[8] =
-	{0x38, 0x31, 0x32, 0x2b, 0x34, 0x2d, 0x2e, 0x27};
+	struct atp_unit *dev = &atp_unit[host];
+	static unsigned char g2q_tab[8] = {
+		0x38, 0x31, 0x32, 0x2b, 0x34, 0x2d, 0x2e, 0x27
+	};
 
 
 	for (i = 0; i < 0x10; i++) {
 		mydlyu(0xffff);
 	}
 
-	tmport = ioportu[host] + 1;
+	tmport = dev->ioport + 1;
 	outb(0x08, tmport++);
 	outb(0x7f, tmport);
-	tmport = ioportu[host] + 0x11;
+	tmport = dev->ioport + 0x11;
 	outb(0x20, tmport);
 
-	if ((scam_on[host] & 0x40) == 0) {
+	if ((dev->scam_on & 0x40) == 0) {
 		return;
 	}
 	m = 1;
-	m <<= host_idu[host];
+	m <<= dev->host_idu;
 	j = 16;
-	if (chip_veru[host] < 4) {
+	if (dev->chip_veru < 4) {
 		m |= 0xff00;
 		j = 8;
 	}
 	assignid_map = m;
-	tmport = ioportu[host] + 0x02;
+	tmport = dev->ioport + 0x02;
 	outb(0x02, tmport++);	/* 2*2=4ms,3EH 2/32*3E=3.9ms */
 	outb(0, tmport++);
 	outb(0, tmport++);
@@ -752,7 +874,7 @@
 		if ((m & assignid_map) != 0) {
 			continue;
 		}
-		tmport = ioportu[host] + 0x0f;
+		tmport = dev->ioport + 0x0f;
 		outb(0, tmport++);
 		tmport += 0x02;
 		outb(0, tmport++);
@@ -764,14 +886,14 @@
 			k = i;
 		}
 		outb(k, tmport++);
-		tmport = ioportu[host] + 0x1b;
-		if (chip_veru[host] == 4) {
+		tmport = dev->ioport + 0x1b;
+		if (dev->chip_veru == 4) {
 			outb((unsigned char) ((inb(tmport) & 0x0e) | 0x01), tmport);
 		} else {
 			outb((unsigned char) (inb(tmport) & 0x0e), tmport);
 		}
 wait_rdyok:
-		tmport = ioportu[host] + 0x18;
+		tmport = dev->ioport + 0x18;
 		outb(0x09, tmport);
 		tmport += 0x07;
 
@@ -782,22 +904,22 @@
 			if ((k == 0x85) || (k == 0x42)) {
 				continue;
 			}
-			tmport = ioportu[host] + 0x10;
+			tmport = dev->ioport + 0x10;
 			outb(0x41, tmport);
 			goto wait_rdyok;
 		}
 		assignid_map |= m;
 
 	}
-	tmport = ioportu[host] + 0x02;
+	tmport = dev->ioport + 0x02;
 	outb(0x7f, tmport);
-	tmport = ioportu[host] + 0x1b;
+	tmport = dev->ioport + 0x1b;
 	outb(0x02, tmport);
 
 	outb(0, 0x80);
 
 	val = 0x0080;		/* bsy  */
-	tmport = ioportu[host] + 0x1c;
+	tmport = dev->ioport + 0x1c;
 	outw(val, tmport);
 	val |= 0x0040;		/* sel  */
 	outw(val, tmport);
@@ -842,7 +964,7 @@
 	if ((inb(tmport) & 0x80) == 0x00) {	/* bsy ? */
 		outw(0, tmport--);
 		outb(0, tmport);
-		tmport = ioportu[host] + 0x15;
+		tmport = dev->ioport + 0x15;
 		outb(0, tmport);
 		tmport += 0x03;
 		outb(0x09, tmport);
@@ -854,11 +976,11 @@
 	}
 	val &= 0x00ff;		/* synchronization  */
 	val |= 0x3f00;
-	fun_scam(host, &val);
+	fun_scam(dev, &val);
 	outb(3, 0x80);
 	val &= 0x00ff;		/* isolation        */
 	val |= 0x2000;
-	fun_scam(host, &val);
+	fun_scam(dev, &val);
 	outb(4, 0x80);
 	i = 8;
 	j = 0;
@@ -869,7 +991,7 @@
 	outb(5, 0x80);
 	val &= 0x00ff;		/* get ID_STRING */
 	val |= 0x2000;
-	k = fun_scam(host, &val);
+	k = fun_scam(dev, &val);
 	if ((k & 0x03) == 0) {
 		goto TCM_5;
 	}
@@ -933,11 +1055,11 @@
 	val &= 0x00ff;		/* AssignID 1stQuintet,AH=001xxxxx  */
 	m = quintet[0] << 8;
 	val |= m;
-	fun_scam(host, &val);
+	fun_scam(dev, &val);
 	val &= 0x00ff;		/* AssignID 2ndQuintet,AH=001xxxxx */
 	m = quintet[1] << 8;
 	val |= m;
-	fun_scam(host, &val);
+	fun_scam(dev, &val);
 
 	goto TCM_SYNC;
 
@@ -955,25 +1077,26 @@
 	static unsigned char synu[6] =	{0x80, 1, 3, 1, 0x0c, 0x0e};
 	static unsigned char synw[6] =	{0x80, 1, 3, 1, 0x0c, 0x07};
 	static unsigned char wide[6] =  {0x80, 1, 2, 3, 1, 0};
+	struct atp_unit *dev = &atp_unit[host];
 
 	sync_idu = 0;
 	tmport = wkport + 0x3a;
 	outb((unsigned char) (inb(tmport) | 0x10), tmport);
 
 	for (i = 0; i < 16; i++) {
-		if ((chip_veru[host] != 4) && (i > 7)) {
+		if ((dev->chip_veru != 4) && (i > 7)) {
 			break;
 		}
 		m = 1;
 		m = m << i;
-		if ((m & active_idu[host]) != 0) {
+		if ((m & dev->active_idu) != 0) {
 			continue;
 		}
-		if (i == host_idu[host]) {
-			printk("         ID: %2d  Host Adapter\n", host_idu[host]);
+		if (i == dev->host_idu) {
+			printk(KERN_INFO "         ID: %2d  Host Adapter\n", dev->host_idu);
 			continue;
 		}
-		if (chip_veru[host] == 4) {
+		if (dev->chip_veru == 4) {
 			tmport = wkport + 0x1b;
 			j = (inb(tmport) & 0x0e) | 0x01;
 			outb(j, tmport);
@@ -990,7 +1113,7 @@
 		tmport += 0x06;
 		outb(0, tmport);
 		tmport += 0x02;
-		outb(devspu[host][i], tmport++);
+		outb(dev->id[i].devspu, tmport++);
 		outb(0, tmport++);
 		outb(satn[6], tmport++);
 		outb(satn[7], tmport++);
@@ -1009,7 +1132,7 @@
 			continue;
 		}
 		while (inb(tmport) != 0x8e);
-		active_idu[host] |= m;
+		dev->active_idu |= m;
 
 		tmport = wkport + 0x10;
 		outb(0x30, tmport);
@@ -1039,7 +1162,7 @@
 		tmport += 0x07;
 		outb(0, tmport);
 		tmport += 0x02;
-		outb(devspu[host][i], tmport++);
+		outb(dev->id[i].devspu, tmport++);
 		outb(0, tmport++);
 		outb(inqd[6], tmport++);
 		outb(inqd[7], tmport++);
@@ -1052,7 +1175,7 @@
 			continue;
 		}
 		while (inb(tmport) != 0x8e);
-		if (chip_veru[host] == 4) {
+		if (dev->chip_veru == 4) {
 			tmport = wkport + 0x1b;
 			j = inb(tmport) & 0x0e;
 			outb(j, tmport);
@@ -1093,16 +1216,16 @@
 		}
 inq_ok:
 		mbuf[36] = 0;
-		printk("         ID: %2d  %s\n", i, &mbuf[8]);
-		devtypeu[host][i] = mbuf[0];
+		printk(KERN_INFO "         ID: %2d  %s\n", i, &mbuf[8]);
+		dev->id[i].devtypeu = mbuf[0];
 		rmb = mbuf[1];
-		if (chip_veru[host] != 4) {
+		if (dev->chip_veru != 4) {
 			goto not_wide;
 		}
 		if ((mbuf[7] & 0x60) == 0) {
 			goto not_wide;
 		}
-		if ((global_map[host] & 0x20) == 0) {
+		if ((dev->global_map & 0x20) == 0) {
 			goto not_wide;
 		}
 		tmport = wkport + 0x1b;
@@ -1118,7 +1241,7 @@
 		tmport += 0x06;
 		outb(0, tmport);
 		tmport += 0x02;
-		outb(devspu[host][i], tmport++);
+		outb(dev->id[i].devspu, tmport++);
 		outb(0, tmport++);
 		outb(satn[6], tmport++);
 		outb(satn[7], tmport++);
@@ -1244,16 +1367,16 @@
 		}
 		m = 1;
 		m = m << i;
-		wide_idu[host] |= m;
+		dev->wide_idu |= m;
 not_wide:
-		if ((devtypeu[host][i] == 0x00) || (devtypeu[host][i] == 0x07)) {
+		if ((dev->id[i].devtypeu == 0x00) || (dev->id[i].devtypeu == 0x07)) {
 			goto set_sync;
 		}
 		continue;
 set_sync:
 		tmport = wkport + 0x1b;
 		j = inb(tmport) & 0x0e;
-		if ((m & wide_idu[host]) != 0) {
+		if ((m & dev->wide_idu) != 0) {
 			j |= 0x01;
 		}
 		outb(j, tmport);
@@ -1267,7 +1390,7 @@
 		tmport += 0x06;
 		outb(0, tmport);
 		tmport += 0x02;
-		outb(devspu[host][i], tmport++);
+		outb(dev->id[i].devspu, tmport++);
 		outb(0, tmport++);
 		outb(satn[6], tmport++);
 		outb(satn[7], tmport++);
@@ -1295,10 +1418,10 @@
 				if (rmb != 0) {
 					outb(synn[j++], tmport);
 				} else {
-					if ((m & wide_idu[host]) != 0) {
+					if ((m & dev->wide_idu) != 0) {
 						outb(synw[j++], tmport);
 					} else {
-						if ((m & ultra_map[host]) != 0) {
+						if ((m & dev->ultra_map) != 0) {
 							outb(synu[j++], tmport);
 						} else {
 							outb(synn[j++], tmport);
@@ -1413,7 +1536,7 @@
 		if (mbuf[4] > 0x0c) {
 			mbuf[4] = 0x0c;
 		}
-		devspu[host][i] = mbuf[4];
+		dev->id[i].devspu = mbuf[4];
 		if ((mbuf[3] < 0x0d) && (rmb == 0)) {
 			j = 0xa0;
 			goto set_syn_ok;
@@ -1432,7 +1555,7 @@
 		}
 		j = 0x60;
 	      set_syn_ok:
-		devspu[host][i] = (devspu[host][i] & 0x0f) | j;
+		dev->id[i].devspu = (dev->id[i].devspu & 0x0f) | j;
 	}
 	tmport = wkport + 0x3a;
 	outb((unsigned char) (inb(tmport) & 0xef), tmport);
@@ -1445,124 +1568,123 @@
 	unsigned long flags;
 	unsigned int base_io, error, tmport;
 	unsigned short index = 0;
-	unsigned char pci_bus[3], pci_device_fn[3], chip_ver[3], host_id;
+	struct pci_dev *pdev[3];
+	unsigned char chip_ver[3], host_id;
 	struct Scsi_Host *shpnt = NULL;
+	int tmpcnt = 0;
 	int count = 0;
-	static unsigned short devid[7] =
-	{0x8002, 0x8010, 0x8020, 0x8030, 0x8040, 0x8050, 0};
-	static struct pci_dev *pdev = NULL, *acard_pdev[3];
+	int result;
+	
+	static unsigned short devid[7] = {
+		0x8002, 0x8010, 0x8020, 0x8030, 0x8040, 0x8050, 0
+	};
 
-	printk("aec671x_detect: \n");
+	printk(KERN_INFO "aec671x_detect: \n");
 	if (!pci_present()) {
-		printk("   NO BIOS32 SUPPORT.\n");
+		printk(KERN_INFO"   NO PCI SUPPORT.\n");
 		return count;
 	}
-	tpnt->proc_dir = &proc_scsi_atp870u;
 
 	for (h = 0; h < 2; h++) {
-		active_idu[h] = 0;
-		wide_idu[h] = 0;
-		host_idu[h] = 0x07;
-		quhdu[h] = 0;
-		quendu[h] = 0;
-		pci_bus[h] = 0;
-		pci_device_fn[h] = 0xff;
-		chip_ver[h] = 0;
-		last_cmd[h] = 0xff;
-		in_snd[h] = 0;
-		in_int[h] = 0;
+		struct atp_unit *dev = &atp_unit[h];
+		for(k=0;k<16;k++)
+		{
+			dev->id[k].prd_tableu = kmalloc(1024, GFP_KERNEL);
+			dev->id[k].devspu=0x20;
+			dev->id[k].devtypeu = 0;
+			dev->id[k].curr_req = NULL;
+		}
+		dev->active_idu = 0;
+		dev->wide_idu = 0;
+		dev->host_idu = 0x07;
+		dev->quhdu = 0;
+		dev->quendu = 0;
+		pdev[h]=NULL;
+		pdev[2]=NULL;
+		dev->chip_veru = 0;
+		dev->last_cmd = 0xff;
+		dev->in_snd = 0;
+		dev->in_int = 0;
 		for (k = 0; k < qcnt; k++) {
-			querequ[h][k] = 0;
+			dev->querequ[k] = 0;
 		}
 		for (k = 0; k < 16; k++) {
-			curr_req[h][k] = 0;
+			dev->id[k].curr_req = 0;
 		}
 	}
 	h = 0;
 	while (devid[h] != 0) {
-		pdev = pci_find_device(0x1191, devid[h], pdev);
-		if (pdev == NULL) {
+		pdev[2] = pci_find_device(0x1191, devid[h], pdev[2]);
+		if (pdev[2] == NULL) {
 			h++;
 			index = 0;
 			continue;
 		}
 		chip_ver[2] = 0;
 
-		/* To avoid messing with the things below...  */
-		acard_pdev[2] = pdev;
-		pci_device_fn[2] = pdev->devfn;
-		pci_bus[2] = pdev->bus->number;
-
 		if (devid[h] == 0x8002) {
-			error = pci_read_config_byte(pdev, 0x08, &chip_ver[2]);
+			error = pci_read_config_byte(pdev[2], 0x08, &chip_ver[2]);
 			if (chip_ver[2] < 2) {
 				goto nxt_devfn;
 			}
 		}
-		if (devid[h] == 0x8010) {
+		if (devid[h] == 0x8010 || devid[h] == 0x8050) {
 			chip_ver[2] = 0x04;
 		}
-		if (pci_device_fn[2] < pci_device_fn[0]) {
-			acard_pdev[1] = acard_pdev[0];
-			pci_bus[1] = pci_bus[0];
-			pci_device_fn[1] = pci_device_fn[0];
-			chip_ver[1] = chip_ver[0];
-			acard_pdev[0] = acard_pdev[2];
-			pci_bus[0] = pci_bus[2];
-			pci_device_fn[0] = pci_device_fn[2];
-			chip_ver[0] = chip_ver[2];
-		} else if (pci_device_fn[2] < pci_device_fn[1]) {
-			acard_pdev[1] = acard_pdev[2];
-			pci_bus[1] = pci_bus[2];
-			pci_device_fn[1] = pci_device_fn[2];
-			chip_ver[1] = chip_ver[2];
-		}
+		pdev[tmpcnt] = pdev[2];
+		chip_ver[tmpcnt] = chip_ver[2];
+		tmpcnt++;
 	      nxt_devfn:
 		index++;
 		if (index > 3) {
 			index = 0;
 			h++;
 		}
+		if(tmpcnt>1)
+			break;
 	}
 	for (h = 0; h < 2; h++) {
-		if (pci_device_fn[h] == 0xff) {
+		struct atp_unit *dev=&atp_unit[h];
+		if (pdev[h]==NULL) {
 			return count;
 		}
-		pdev = acard_pdev[h];
-		pdev->devfn = pci_device_fn[h];
-		pdev->bus->number = pci_bus[h];
 
 		/* Found an atp870u/w. */
-		error = pci_read_config_dword(pdev, 0x10, &base_io);
-		error += pci_read_config_byte(pdev, 0x3c, &irq);
-		error += pci_read_config_byte(pdev, 0x49, &host_id);
+		base_io = pdev[h]->base_address[0];
+		irq = pdev[h]->irq;
+		error = pci_read_config_byte(pdev[h],0x49,&host_id);
 
 		base_io &= 0xfffffff8;
-		printk("   ACARD AEC-671X PCI Ultra/W SCSI-3 Host Adapter: %d    IO:%x, IRQ:%d.\n"
+
+		if (check_region(base_io,0x40) != 0)
+		{  
+			return 0;
+		}
+		printk(KERN_INFO "   ACARD AEC-671X PCI Ultra/W SCSI-3 Host Adapter: %d    IO:%x, IRQ:%d.\n"
 		       ,h, base_io, irq);
-		ioportu[h] = base_io;
-		pciportu[h] = base_io + 0x20;
+		dev->ioport = base_io;
+		dev->pciport = base_io + 0x20;
 		irqnumu[h] = irq;
 		host_id &= 0x07;
-		host_idu[h] = host_id;
-		chip_veru[h] = chip_ver[h];
+		dev->host_idu = host_id;
+		dev->chip_veru = chip_ver[h];
 
 		tmport = base_io + 0x22;
-		scam_on[h] = inb(tmport);
+		dev->scam_on = inb(tmport);
 		tmport += 0x0b;
-		global_map[h] = inb(tmport++);
-		ultra_map[h] = inw(tmport);
-		if (ultra_map[h] == 0) {
-			scam_on[h] = 0x00;
-			global_map[h] = 0x20;
-			ultra_map[h] = 0xffff;
+		dev->global_map = inb(tmport++);
+		dev->ultra_map = inw(tmport);
+		if (dev->ultra_map == 0) {
+			dev->scam_on = 0x00;
+			dev->global_map = 0x20;
+			dev->ultra_map = 0xffff;
 		}
 		shpnt = scsi_register(tpnt, 4);
 
 		save_flags(flags);
 		cli();
-		if (request_irq(irq, atp870u_intr_handle, 0, "atp870u", NULL)) {
-			printk("Unable to allocate IRQ for Acard controller.\n");
+		if (request_irq(irq, atp870u_intr_handle, SA_SHIRQ, "atp870u", dev)) {
+			printk(KERN_ERR "Unable to allocate IRQ for Acard controller.\n");
 			goto unregister;
 		}
 		tmport = base_io + 0x3a;
@@ -1590,9 +1712,11 @@
 		is870(h, base_io);
 		tmport = base_io + 0x3a;
 		outb((inb(tmport) & 0xef), tmport);
+		tmport++;
+		outb((inb(tmport) | 0x20),tmport);
 
 		atp_host[h] = shpnt;
-		if (chip_ver[h] == 4) {
+		if (dev->chip_veru == 4) {
 			shpnt->max_id = 16;
 		}
 		shpnt->this_id = host_id;
@@ -1623,7 +1747,7 @@
 {
 	unsigned char h, j;
 	unsigned int tmport;
-/*    printk(" atp870u_abort: \n");   */
+	struct atp_unit *dev;
 	for (h = 0; h <= admaxu; h++) {
 		if (SCpnt->host == atp_host[h]) {
 			goto find_adp;
@@ -1631,20 +1755,23 @@
 	}
 	panic("Abort host not found !");
 find_adp:
-	printk(" workingu=%x last_cmd=%x ", workingu[h], last_cmd[h]);
-	printk(" quhdu=%x quendu=%x ", quhdu[h], quendu[h]);
-	tmport = ioportu[h];
+	dev=&atp_unit[h];
+	printk(KERN_DEBUG "working=%x last_cmd=%x ", dev->working, dev->last_cmd);
+	printk(" quhdu=%x quendu=%x ", dev->quhdu, dev->quendu);
+	tmport = dev->ioport;
 	for (j = 0; j < 0x17; j++) {
 		printk(" r%2x=%2x", j, inb(tmport++));
 	}
 	tmport += 0x05;
 	printk(" r1c=%2x", inb(tmport));
 	tmport += 0x03;
-	printk(" r1f=%2x in_snd=%2x ", inb(tmport), in_snd[h]);
+	printk(" r1f=%2x in_snd=%2x ", inb(tmport), dev->in_snd);
 	tmport++;
 	printk(" r20=%2x", inb(tmport));
 	tmport += 0x02;
-	printk(" r22=%2x \n", inb(tmport));
+	printk(" r22=%2x", inb(tmport));
+	tmport += 0x18;
+	printk(" r3a=%2x \n",inb(tmport));
 	return (SCSI_ABORT_SNOOZE);
 }
 
@@ -1654,7 +1781,6 @@
 	/*
 	 * See if a bus reset was suggested.
 	 */
-/*	printk("atp870u_reset: \n");    */
 	for (h = 0; h <= admaxu; h++) {
 		if (SCpnt->host == atp_host[h]) {
 			goto find_host;
@@ -1664,9 +1790,9 @@
 find_host:
 /*      SCpnt->result = 0x00080000;
 	SCpnt->scsi_done(SCpnt);
-	workingu[h]=0;
-	quhdu[h]=0;
-	quendu[h]=0;
+	dev->working=0;
+	dev->quhdu=0;
+	dev->quendu=0;
 	return (SCSI_RESET_SUCCESS | SCSI_RESET_BUS_RESET);  */
 	return (SCSI_RESET_SNOOZE);
 }
@@ -1675,14 +1801,14 @@
 {
 	static char buffer[128];
 
-	strcpy(buffer, "ACARD AEC-6710/6712 PCI Ultra/W SCSI-3 Adapter Driver V1.0 ");
+	strcpy(buffer, "ACARD AEC-6710/6712 PCI Ultra/W SCSI-3 Adapter Driver V2.0+ac ");
 
 	return buffer;
 }
 
 int atp870u_set_info(char *buffer, int length, struct Scsi_Host *HBAptr)
 {
-	return (-ENOSYS);	/* Currently this is a no-op */
+	return -ENOSYS;		/* Currently this is a no-op */
 }
 
 #define BLS buffer + len + size
@@ -1720,7 +1846,7 @@
 	if (offset == 0) {
 		memset(buff, 0, sizeof(buff));
 	}
-	size += sprintf(BLS, "ACARD AEC-671X Driver Version: 1.0\n");
+	size += sprintf(BLS, "ACARD AEC-671X Driver Version: 2.0+ac\n");
 	len += size;
 	pos = begin + len;
 	size = 0;
@@ -1733,7 +1859,7 @@
 	pos = begin + len;
 	size = 0;
 
-      stop_output:
+stop_output:
 	*start = buffer + (offset - begin);	/* Start of wanted data */
 	len -= (offset - begin);	/* Start slop */
 	if (len > length) {
@@ -1764,6 +1890,26 @@
 	return 0;
 }
 
+
+int atp870u_release (struct Scsi_Host *pshost)
+{
+	int h;
+	for (h = 0; h <= admaxu; h++) 
+	{
+		if (pshost == atp_host[h]) {
+			int k;
+			free_irq (pshost->irq, &atp_unit[h]);
+			release_region (pshost->io_port, pshost->n_io_port);
+			scsi_unregister(pshost);
+			for(k=0;k<16;k++)
+				kfree(atp_unit[h].id[k].prd_tableu);
+			return 0;
+		}
+	}
+	panic("atp870u: bad scsi host passed.\n");
+		
+}
+
 #ifdef MODULE
 Scsi_Host_Template driver_template = ATP870U;
 
diff -urN linux-2.2.14-pre8/drivers/scsi/atp870u.h linux-2.2.14-pre9/drivers/scsi/atp870u.h
--- linux-2.2.14-pre8/drivers/scsi/atp870u.h	1999-10-19 17:14:01.000000000 -0700
+++ linux-2.2.14-pre9/drivers/scsi/atp870u.h	2003-08-15 15:09:15.000000000 -0700
@@ -24,49 +24,49 @@
 int atp870u_abort(Scsi_Cmnd *);
 int atp870u_reset(Scsi_Cmnd *, unsigned int);
 int atp870u_biosparam(Disk *, kdev_t, int *);
+int atp870u_release(struct Scsi_Host *);
 void send_s870(unsigned char);
 
-#define qcnt            32
-#define ATP870U_SCATTER 127
+#define qcnt		32
+#define ATP870U_SCATTER 128
 #define ATP870U_CMDLUN 1
 
 #ifndef NULL
 #define NULL 0
 #endif
 
-extern struct proc_dir_entry proc_scsi_atp870u;
-
 extern const char *atp870u_info(struct Scsi_Host *);
 
 extern int atp870u_proc_info(char *, char **, off_t, int, int, int);
 
-#define ATP870U {  						\
-	next:				NULL, 			\
-	module:				NULL, 			\
+#define ATP870U {						\
+	next: NULL,						\
+	module: NULL,						\
 	proc_dir:			&proc_scsi_atp870u,	\
-	proc_info:			atp870u_proc_info,      \
-	name:				NULL,			\
-	detect:                 	atp870u_detect,		\
-	release:               	 	NULL,                   \
-	info:                   	atp870u_info,           \
-	command:                	atp870u_command,	\
-        queuecommand:           	atp870u_queuecommand,	\
-        eh_strategy_handler: 		NULL,			\
-        eh_abort_handler: 		NULL,			\
-        eh_device_reset_handler:	NULL,			\
-        eh_bus_reset_handler:		NULL,			\
-        eh_host_reset_handler:		NULL,			\
-	abort:				atp870u_abort,          \
-	reset:				atp870u_reset,       	\
-	slave_attach:               	NULL,                   \
-	bios_param:                     atp870u_biosparam,	\
-	can_queue:                     	qcnt,                   \
-	this_id:                     	1,			\
-	sg_tablesize:                   ATP870U_SCATTER,        \
-	cmd_per_lun:                    ATP870U_CMDLUN,         \
-	present:                     	0,                      \
-	unchecked_isa_dma:              0,                      \
-	use_clustering:                 ENABLE_CLUSTERING,	\
-	use_new_eh_code:		0			\
+	proc_info: atp870u_proc_info,				\
+	name: NULL,						\
+	detect: atp870u_detect, 				\
+	release: atp870u_release,				\
+	info: atp870u_info,					\
+	command: atp870u_command,				\
+	queuecommand: atp870u_queuecommand,			\
+	eh_strategy_handler: NULL,				\
+	eh_abort_handler: NULL, 				\
+	eh_device_reset_handler: NULL,				\
+	eh_bus_reset_handler: NULL,				\
+	eh_host_reset_handler: NULL,				\
+	abort: atp870u_abort,					\
+	reset: atp870u_reset,					\
+	slave_attach: NULL,					\
+	bios_param: atp870u_biosparam,				\
+	can_queue: qcnt,	 /* max simultaneous cmds      */\
+	this_id: 7,	       /* scsi id of host adapter    */\
+	sg_tablesize: ATP870U_SCATTER,	/* max scatter-gather cmds    */\
+	cmd_per_lun: ATP870U_CMDLUN,	/* cmds per lun (linked cmds) */\
+	present: 0,		/* number of 7xxx's present   */\
+	unchecked_isa_dma: 0,	/* no memory DMA restrictions */\
+	use_clustering: ENABLE_CLUSTERING,			\
+	use_new_eh_code: 0					\
 }
+
 #endif
diff -urN linux-2.2.14-pre8/drivers/scsi/in2000.h linux-2.2.14-pre9/drivers/scsi/in2000.h
--- linux-2.2.14-pre8/drivers/scsi/in2000.h	1999-08-09 12:04:40.000000000 -0700
+++ linux-2.2.14-pre9/drivers/scsi/in2000.h	2003-08-15 15:09:15.000000000 -0700
@@ -62,6 +62,8 @@
  */
 
 #define FAST_READ2_IO()    \
+({ \
+int __dummy_1,__dummy_2; \
    __asm__ __volatile__ ("\n \
    cld                    \n \
    orl %%ecx, %%ecx       \n \
@@ -69,11 +71,14 @@
    rep                    \n \
    insw (%%dx),%%es:(%%edi) \n \
 1: "                       \
-   : "=D" (sp)                   /* output */   \
-   : "d" (f), "D" (sp), "c" (i)  /* input */    \
-   : "edx", "ecx", "edi" )       /* trashed */
+   : "=D" (sp) ,"=c" (__dummy_1) ,"=d" (__dummy_2)  /* output */   \
+   : "2" (f), "0" (sp), "1" (i)  /* input */    \
+   );       /* trashed */ \
+})
 
 #define FAST_WRITE2_IO()   \
+({ \
+int __dummy_1,__dummy_2; \
    __asm__ __volatile__ ("\n \
    cld                    \n \
    orl %%ecx, %%ecx       \n \
@@ -81,10 +86,10 @@
    rep                    \n \
    outsw %%ds:(%%esi),(%%dx) \n \
 1: "                       \
-   : "=S" (sp)                   /* output */   \
-   : "d" (f), "S" (sp), "c" (i)  /* input */    \
-   : "edx", "ecx", "esi" )       /* trashed */
-
+   : "=S" (sp) ,"=c" (__dummy_1) ,"=d" (__dummy_2)/* output */   \
+   : "2" (f), "0" (sp), "1" (i)  /* input */    \
+   );       /* trashed */ \
+})
 
 /* IN2000 io_port offsets */
 #define IO_WD_ASR       0x00     /* R - 3393 auxstat reg */
diff -urN linux-2.2.14-pre8/drivers/scsi/scsi.c linux-2.2.14-pre9/drivers/scsi/scsi.c
--- linux-2.2.14-pre8/drivers/scsi/scsi.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/drivers/scsi/scsi.c	2003-08-15 15:09:15.000000000 -0700
@@ -135,6 +135,12 @@
 static unsigned char   ** dma_malloc_pages = NULL;
 
 /*
+ * get rid of callers having to aquire the io_request_lock before
+ * calling scsi_malloc and scsi_free
+ */
+spinlock_t		  scsi_malloc_lock = SPIN_LOCK_UNLOCKED;
+
+/*
  * Note - the initial logging level can be set here to log events at boot time.
  * After the system is up, you may enable logging via the /proc interface.
  */
@@ -299,6 +305,8 @@
 {"MATSHITA","PD-2 LF-D100","*", BLIST_GHOST},
 {"HITACHI","GF-1050","*", BLIST_GHOST},        /* Hitachi SCSI DVD-RAM */
 {"TOSHIBA","CDROM","*", BLIST_ISROM},
+{"TOSHIBA","DVD-RAM SD-W1101","*", BLIST_GHOST},
+{"TOSHIBA","DVD-RAM SD-W1111","*", BLIST_GHOST},
 /*
  * Must be at end of list...
  */
@@ -1888,6 +1896,7 @@
 void *scsi_malloc(unsigned int len)
 {
     unsigned int nbits, mask;
+    unsigned long flags;
     int i, j;
     if(len % SECTOR_SIZE != 0 || len > PAGE_SIZE)
 	return NULL;
@@ -1895,6 +1904,7 @@
     nbits = len >> 9;
     mask = (1 << nbits) - 1;
 
+    spin_lock_irqsave(&scsi_malloc_lock, flags);
     for(i=0;i < dma_sectors / SECTORS_PER_PAGE; i++)
 	for(j=0; j<=SECTORS_PER_PAGE - nbits; j++){
 	    if ((dma_malloc_freelist[i] & (mask << j)) == 0){
@@ -1904,15 +1914,18 @@
                 SCSI_LOG_MLQUEUE(3,printk("SMalloc: %d %p [From:%p]\n",len, dma_malloc_pages[i] + (j << 9)));
 		printk("SMalloc: %d %p [From:%p]\n",len, dma_malloc_pages[i] + (j << 9));
 #endif
+		spin_unlock_irqrestore(&scsi_malloc_lock, flags);
 		return (void *) ((unsigned long) dma_malloc_pages[i] + (j << 9));
 	    }
 	}
+    spin_unlock_irqrestore(&scsi_malloc_lock, flags);
     return NULL;  /* Nope.  No more */
 }
 
 int scsi_free(void *obj, unsigned int len)
 {
     unsigned int page, sector, nbits, mask;
+    unsigned long flags;
 
 #ifdef DEBUG
     unsigned long ret = 0;
@@ -1926,6 +1939,7 @@
     SCSI_LOG_MLQUEUE(3,printk("SFree: %p %d\n",obj, len));
 #endif
 
+    spin_lock_irqsave(&scsi_malloc_lock, flags);
     for (page = 0; page < dma_sectors / SECTORS_PER_PAGE; page++) {
         unsigned long page_addr = (unsigned long) dma_malloc_pages[page];
         if ((unsigned long) obj >= page_addr &&
@@ -1949,9 +1963,11 @@
             }
             scsi_dma_free_sectors += nbits;
             dma_malloc_freelist[page] &= ~(mask << sector);
+	    spin_unlock_irqrestore(&scsi_malloc_lock, flags);
             return 0;
 	}
     }
+    spin_unlock_irqrestore(&scsi_malloc_lock, flags);
     panic("scsi_free:Bad offset");
 }
 
diff -urN linux-2.2.14-pre8/drivers/scsi/scsi_ioctl.c linux-2.2.14-pre9/drivers/scsi/scsi_ioctl.c
--- linux-2.2.14-pre8/drivers/scsi/scsi_ioctl.c	1999-04-29 11:53:41.000000000 -0700
+++ linux-2.2.14-pre9/drivers/scsi/scsi_ioctl.c	2003-08-15 15:09:15.000000000 -0700
@@ -227,10 +227,8 @@
     if(buf_needed){
 	buf_needed = (buf_needed + 511) & ~511;
 	if (buf_needed > MAX_BUF) buf_needed = MAX_BUF;
-        spin_lock_irqsave(&io_request_lock, flags);
-	buf = (char *) scsi_malloc(buf_needed);
-        spin_unlock_irqrestore(&io_request_lock, flags);
-	if (!buf) return -ENOMEM;
+	if ((buf = (char *) scsi_malloc(buf_needed)) == NULL)
+		return -ENOMEM;
 	memset(buf, 0, buf_needed);
     } else
 	buf = NULL;
diff -urN linux-2.2.14-pre8/drivers/scsi/sd.c linux-2.2.14-pre9/drivers/scsi/sd.c
--- linux-2.2.14-pre8/drivers/scsi/sd.c	1999-10-19 17:14:01.000000000 -0700
+++ linux-2.2.14-pre9/drivers/scsi/sd.c	2003-08-15 15:09:15.000000000 -0700
@@ -1239,13 +1239,16 @@
 		    spintime = jiffies;
 		}
 
-		time1 = jiffies + HZ;
 		spin_unlock_irq(&io_request_lock);
-		while(jiffies < time1); /* Wait 1 second for next try */
+		time1 = jiffies + HZ;
+		do {
+		    current->state = TASK_UNINTERRUPTIBLE;
+		    time1 = schedule_timeout(time1);
+		} while (time1); /* Wait 1 second for next try */
 		printk( "." );
 		spin_lock_irq(&io_request_lock);
 	    }
-	} while(the_result && spintime && spintime+100*HZ > jiffies);
+	} while(the_result && spintime && time_before(jiffies, spintime+100*HZ));
 	if (spintime) {
 	    if (the_result)
 		printk( "not responding...\n" );
@@ -1315,6 +1318,7 @@
 
 	printk("%s : block size assumed to be 512 bytes, disk size 1GB.  \n",
 	       nbuff);
+
 	rscsi_disks[i].capacity = 0x1fffff;
 	rscsi_disks[i].sector_size = 512;
 
diff -urN linux-2.2.14-pre8/drivers/scsi/seagate.c linux-2.2.14-pre9/drivers/scsi/seagate.c
--- linux-2.2.14-pre8/drivers/scsi/seagate.c	1998-12-29 11:40:35.000000000 -0800
+++ linux-2.2.14-pre9/drivers/scsi/seagate.c	2003-08-15 15:09:15.000000000 -0700
@@ -1216,6 +1216,9 @@
 
 /* SJT: Start. Slow Write. */
 #ifdef SEAGATE_USE_ASM
+
+int __dummy_1,__dummy_2;
+
 /*
  *      We loop as long as we are in a data out phase, there is data to send, 
  *      and BSY is still active.
@@ -1246,9 +1249,9 @@
                     "movb %%al, (%%edi)\n\t"
                     "loop 1b\n\t"
                 "2:\n"
-/* output */    : "=S" (data), "=c" (len) 
-/* input */     : "0" (data), "1" (len), "b" (phys_to_virt(st0x_cr_sr)), "D" (phys_to_virt(st0x_dr)) 
-/* clobbered */ : "eax", "ebx", "edi"); 
+/* output */    : "=S" (data), "=c" (len)  ,"=b" (__dummy_1) ,"=D" (__dummy_2)
+/* input */     : "0" (data), "1" (len), "2" (phys_to_virt(st0x_cr_sr)), "3" (phys_to_virt(st0x_dr)) 
+/* clobbered */ : "eax"); 
 #else /* SEAGATE_USE_ASM */
             while (len)
             {
@@ -1374,6 +1377,11 @@
 
 /* SJT: Start. */
 #ifdef SEAGATE_USE_ASM
+
+int __dummy_3,__dummy_4;
+
+/* Dummy clobbering variables for the new gcc-2.95 */
+
 /*
  *      We loop as long as we are in a data in phase, there is room to read, 
  *      and BSY is still active
@@ -1405,9 +1413,9 @@
                 "stosb\n\t"   
                 "loop 1b\n\t"
             "2:\n"
-/* output */    : "=D" (data), "=c" (len) 
-/* input */     : "0" (data), "1" (len), "S" (phys_to_virt(st0x_cr_sr)), "b" (phys_to_virt(st0x_dr)) 
-/* clobbered */ : "eax","ebx", "esi"); 
+/* output */    : "=D" (data), "=c" (len) ,"=S" (__dummy_3) ,"=b" (__dummy_4)
+/* input */     : "0" (data), "1" (len), "2" (phys_to_virt(st0x_cr_sr)), "3" (phys_to_virt(st0x_dr)) 
+/* clobbered */ : "eax" ); 
 #else /* SEAGATE_USE_ASM */
             while (len)
             {
diff -urN linux-2.2.14-pre8/drivers/scsi/sg.c linux-2.2.14-pre9/drivers/scsi/sg.c
--- linux-2.2.14-pre8/drivers/scsi/sg.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/drivers/scsi/sg.c	2003-08-15 15:09:15.000000000 -0700
@@ -16,7 +16,7 @@
  *
  *  Borrows code from st driver. Thanks to Alessandro Rubini's "dd" book.
  */
- static char * sg_version_str = "Version: 2.1.36 (991119)";
+ static char * sg_version_str = "Version: 2.1.36 (991008)";
  static int sg_version_num = 20136; /* 2 digits for each component */
 /*
  *  D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au), notes:
@@ -1606,7 +1606,6 @@
    GFP_KERNEL to be used instead of GFP_ATOMIC */
 static char * sg_low_malloc(int rqSz, int lowDma, int mem_src, int * retSzp)
 {
-    unsigned long flags;
     char * resp = NULL;
     int page_mask = lowDma ? (GFP_KERNEL | GFP_DMA) : GFP_KERNEL;
 
@@ -1634,9 +1633,7 @@
         while (num_sect > 0) {
             if ((num_sect <= sg_pool_secs_avail) &&
                 (scsi_dma_free_sectors > (SG_LOW_POOL_THRESHHOLD + num_sect))) {
-                spin_lock_irqsave(&io_request_lock, flags);
                 resp = scsi_malloc(rqSz);
-                spin_unlock_irqrestore(&io_request_lock, flags);
                 if (resp) {
                     if (retSzp) *retSzp = rqSz;
                     sg_pool_secs_avail -= num_sect;
diff -urN linux-2.2.14-pre8/drivers/scsi/sr.c linux-2.2.14-pre9/drivers/scsi/sr.c
--- linux-2.2.14-pre8/drivers/scsi/sr.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/drivers/scsi/sr.c	1999-01-15 14:41:04.000000000 -0800
@@ -880,9 +880,7 @@
     Scsi_Cmnd * SCpnt;
     unsigned long flags;
 
-    spin_lock_irqsave(&io_request_lock, flags);
     buffer = (unsigned char *) scsi_malloc(512);
-    spin_unlock_irqrestore(&io_request_lock, flags);
     SCpnt = scsi_allocate_device(NULL, scsi_CDs[i].device, 1);
 
     retries = 3;
@@ -965,7 +963,6 @@
     unsigned char cmd[6];
     unsigned char *buffer;
     int           rc,n;
-    unsigned long flags;
 
     static char *loadmech[] = {
         "caddy",
@@ -978,9 +975,7 @@
         ""
     };          
 
-    spin_lock_irqsave(&io_request_lock, flags);
     buffer = (unsigned char *) scsi_malloc(512);
-    spin_unlock_irqrestore(&io_request_lock, flags);
     cmd[0] = MODE_SENSE;
     cmd[1] = (scsi_CDs[i].device->lun << 5) & 0xe0;
     cmd[2] = 0x2a;
diff -urN linux-2.2.14-pre8/drivers/scsi/sr_ioctl.c linux-2.2.14-pre9/drivers/scsi/sr_ioctl.c
--- linux-2.2.14-pre8/drivers/scsi/sr_ioctl.c	1999-05-14 16:04:16.000000000 -0700
+++ linux-2.2.14-pre9/drivers/scsi/sr_ioctl.c	2003-08-15 15:09:15.000000000 -0700
@@ -241,7 +241,6 @@
         u_char  sr_cmd[10];
 	char * buffer;
         int result;
-        unsigned long flags;
         	
 	sr_cmd[0] = SCMD_READ_SUBCHANNEL;
 	sr_cmd[1] = ((scsi_CDs[MINOR(cdi->dev)].device->lun) << 5);
@@ -253,20 +252,15 @@
 	sr_cmd[8] = 24;
 	sr_cmd[9] = 0;
 
-        spin_lock_irqsave(&io_request_lock, flags);
-	buffer = (unsigned char*) scsi_malloc(512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
-	if(!buffer) return -ENOMEM;
+	if ((buffer = (unsigned char*) scsi_malloc(512)) == NULL)
+		return -ENOMEM;
 	
 	result = sr_do_ioctl(MINOR(cdi->dev), sr_cmd, buffer, 24, 0);
 	
 	memcpy (mcn->medium_catalog_number, buffer + 9, 13);
         mcn->medium_catalog_number[13] = 0;
 
-        spin_lock_irqsave(&io_request_lock, flags);
 	scsi_free(buffer, 512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
-	
 	return result;
 }
 
@@ -395,7 +389,6 @@
     {
 	struct cdrom_tochdr* tochdr = (struct cdrom_tochdr*)arg;
 	char * buffer;
-        unsigned long flags;
 	
 	sr_cmd[0] = SCMD_READ_TOC;
 	sr_cmd[1] = ((scsi_CDs[target].device->lun) << 5);
@@ -405,19 +398,15 @@
 	sr_cmd[8] = 12;             /* LSB of length */
 	sr_cmd[9] = 0;
 	
-        spin_lock_irqsave(&io_request_lock, flags);
-	buffer = (unsigned char *) scsi_malloc(512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
-	if(!buffer) return -ENOMEM;
+	if ((buffer = (unsigned char *) scsi_malloc(512)) == NULL)
+		return -ENOMEM;
 	
 	result = sr_do_ioctl(target, sr_cmd, buffer, 12, 1);
 	
 	tochdr->cdth_trk0 = buffer[2];
 	tochdr->cdth_trk1 = buffer[3];
 	
-        spin_lock_irqsave(&io_request_lock, flags);
 	scsi_free(buffer, 512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
         break;
     }
 	
@@ -425,7 +414,6 @@
     {
 	struct cdrom_tocentry* tocentry = (struct cdrom_tocentry*)arg;
 	unsigned char * buffer;
-        unsigned long flags;
 	
 	sr_cmd[0] = SCMD_READ_TOC;
 	sr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) |
@@ -436,10 +424,8 @@
 	sr_cmd[8] = 12;            /* LSB of length */
 	sr_cmd[9] = 0;
 	
-        spin_lock_irqsave(&io_request_lock, flags);
-	buffer = (unsigned char *) scsi_malloc(512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
-	if(!buffer) return -ENOMEM;
+	if ((buffer = (unsigned char *) scsi_malloc(512)) == NULL)
+		return -ENOMEM;
 	
 	result = sr_do_ioctl (target, sr_cmd, buffer, 12, 0);
 	
@@ -454,9 +440,7 @@
 	    tocentry->cdte_addr.lba = (((((buffer[8] << 8) + buffer[9]) << 8)
                                        + buffer[10]) << 8) + buffer[11];
 	
-        spin_lock_irqsave(&io_request_lock, flags);
 	scsi_free(buffer, 512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
         break;
     }
 	
@@ -482,7 +466,6 @@
     {
 	char * buffer, * mask;
 	struct cdrom_volctrl* volctrl = (struct cdrom_volctrl*)arg;
-        unsigned long flags;
 	
 	/* First we get the current params so we can just twiddle the volume */
 	
@@ -493,16 +476,12 @@
 	sr_cmd[4] = 28;
 	sr_cmd[5] = 0;
 	
-        spin_lock_irqsave(&io_request_lock, flags);
-	buffer = (unsigned char *) scsi_malloc(512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
-	if(!buffer) return -ENOMEM;
+	if ((buffer = (unsigned char *) scsi_malloc(512)) == NULL)
+		return -ENOMEM;
 	
 	if ((result = sr_do_ioctl (target, sr_cmd, buffer, 28, 0))) {
 	    printk ("Hosed while obtaining audio mode page\n");
-            spin_lock_irqsave(&io_request_lock, flags);
 	    scsi_free(buffer, 512);
-            spin_unlock_irqrestore(&io_request_lock, flags);
             break;
 	}
 	
@@ -513,23 +492,17 @@
 	sr_cmd[4] = 28;
 	sr_cmd[5] = 0;
 	
-        spin_lock_irqsave(&io_request_lock, flags);
 	mask = (unsigned char *) scsi_malloc(512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
 	if(!mask) {
-            spin_lock_irqsave(&io_request_lock, flags);
 	    scsi_free(buffer, 512);
-            spin_unlock_irqrestore(&io_request_lock, flags);
 	    result = -ENOMEM;
             break;
 	};
 
 	if ((result = sr_do_ioctl (target, sr_cmd, mask, 28, 0))) {
 	    printk ("Hosed while obtaining mask for audio mode page\n");
-            spin_lock_irqsave(&io_request_lock, flags);
 	    scsi_free(buffer, 512);
 	    scsi_free(mask, 512);
-            spin_unlock_irqrestore(&io_request_lock, flags);
 	    break;
 	}
 	
@@ -548,10 +521,8 @@
 	sr_cmd[5] = 0;
 	
 	result = sr_do_ioctl (target, sr_cmd, buffer, 28, 0);
-        spin_lock_irqsave(&io_request_lock, flags);
 	scsi_free(buffer, 512);
 	scsi_free(mask, 512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
         break;
     }
 	
@@ -559,7 +530,6 @@
     {
 	char * buffer;
 	struct cdrom_volctrl* volctrl = (struct cdrom_volctrl*)arg;
-        unsigned long flags;
 	
 	/* Get the current params */
 	
@@ -570,16 +540,12 @@
 	sr_cmd[4] = 28;
 	sr_cmd[5] = 0;
 	
-        spin_lock_irqsave(&io_request_lock, flags);
-	buffer = (unsigned char *) scsi_malloc(512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
-	if(!buffer) return -ENOMEM;
+	if ((buffer = (unsigned char *) scsi_malloc(512)) == NULL)
+		return -ENOMEM;
 	
 	if ((result = sr_do_ioctl (target, sr_cmd, buffer, 28, 0))) {
 	    printk ("(CDROMVOLREAD) Hosed while obtaining audio mode page\n");
-            spin_lock_irqsave(&io_request_lock, flags);
 	    scsi_free(buffer, 512);
-            spin_unlock_irqrestore(&io_request_lock, flags);
             break;
 	}
 
@@ -588,9 +554,7 @@
 	volctrl->channel2 = buffer[25];
 	volctrl->channel3 = buffer[27];
 
-        spin_lock_irqsave(&io_request_lock, flags);
 	scsi_free(buffer, 512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
         break;
     }
 	
@@ -598,7 +562,6 @@
     {
 	struct cdrom_subchnl* subchnl = (struct cdrom_subchnl*)arg;
 	char * buffer;
-        unsigned long flags;
 	
 	sr_cmd[0] = SCMD_READ_SUBCHANNEL;
 	sr_cmd[1] = ((scsi_CDs[target].device->lun) << 5) | 0x02;    /* MSF format */
@@ -610,10 +573,8 @@
 	sr_cmd[8] = 16;
 	sr_cmd[9] = 0;
 	
-        spin_lock_irqsave(&io_request_lock, flags);
-	buffer = (unsigned char *) scsi_malloc(512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
-	if(!buffer) return -ENOMEM;
+	if ((buffer = (unsigned char *) scsi_malloc(512)) == NULL)
+		return -ENOMEM;
 	
 	result = sr_do_ioctl(target, sr_cmd, buffer, 16, 0);
 	
@@ -630,9 +591,7 @@
 	subchnl->cdsc_absaddr.msf.second = buffer[10];
 	subchnl->cdsc_absaddr.msf.frame = buffer[11];
 	
-        spin_lock_irqsave(&io_request_lock, flags);
 	scsi_free(buffer, 512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
         break;
     }
     default:
@@ -740,15 +699,13 @@
 {
     unsigned char *raw_sector;
     int is_xa;
-    unsigned long flags;
     
     if (!xa_test)
         return 0;
    
-    spin_lock_irqsave(&io_request_lock, flags);
-    raw_sector = (unsigned char *) scsi_malloc(2048+512);
-    spin_unlock_irqrestore(&io_request_lock, flags);
-    if (!raw_sector) return -ENOMEM;
+    if ((raw_sector = (unsigned char *) scsi_malloc(2048+512)) == NULL)
+    	return -ENOMEM;
+
     if (0 == sr_read_sector(minor,scsi_CDs[minor].ms_offset+16,
                             CD_FRAMESIZE_RAW1,raw_sector)) {
         is_xa = (raw_sector[3] == 0x02) ? 1 : 0;
@@ -756,9 +713,7 @@
         /* read a raw sector failed for some reason. */
         is_xa = -1;
     }
-    spin_lock_irqsave(&io_request_lock, flags);
     scsi_free(raw_sector, 2048+512);
-    spin_unlock_irqrestore(&io_request_lock, flags);
 #ifdef DEBUG
     printk("sr%d: sr_is_xa: %d\n",minor,is_xa);
 #endif
@@ -781,7 +736,6 @@
         struct cdrom_msf   msf;
         int                lba, rc;
 	int                blocksize = 2048;
-        unsigned long flags;
 
         switch (cmd) {
         case CDROMREADMODE2: blocksize = CD_FRAMESIZE_RAW0; break; /* 2336 */
@@ -790,11 +744,9 @@
 
 	if (copy_from_user(&msf,(void*)arg,sizeof(msf)))
 		return -EFAULT;
-        spin_lock_irqsave(&io_request_lock, flags);
-        raw = scsi_malloc(2048+512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
-	if (!(raw))
-                return -ENOMEM;
+
+	if ((raw = scsi_malloc(2048+512)) == NULL)
+		return -ENOMEM;
 
 	lba = (((msf.cdmsf_min0 * CD_SECS) + msf.cdmsf_sec0)
 			* CD_FRAMES + msf.cdmsf_frame0) - CD_MSF_OFFSET;
@@ -806,9 +758,7 @@
 		if (copy_to_user((void*)arg, raw, blocksize))
 			rc = -EFAULT;
 
-        spin_lock_irqsave(&io_request_lock, flags);
 	scsi_free(raw,2048+512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
 	return rc;
     }
     case CDROMREADAUDIO:
@@ -816,7 +766,6 @@
 	unsigned char      *raw;
         int                lba, rc=0;
         struct cdrom_read_audio ra;
-        unsigned long flags;
 
         if (!scsi_CDs[target].readcd_known || !scsi_CDs[target].readcd_cdda)
             return -EINVAL;  /* -EDRIVE_DOES_NOT_SUPPORT_THIS ? */
@@ -832,11 +781,8 @@
 
         if (lba < 0 || lba >= scsi_CDs[target].capacity)
             return -EINVAL;
-        spin_lock_irqsave(&io_request_lock, flags);
-        raw = scsi_malloc(2048+512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
-	if (!(raw))
-            return -ENOMEM;
+        if ((raw = scsi_malloc(2048+512)) == NULL)
+		return -ENOMEM;
 
         while (ra.nframes > 0) {
             rc = sr_read_cd(target, raw, lba, 1, CD_FRAMESIZE_RAW);
@@ -850,9 +796,7 @@
             ra.nframes -= 1;
             lba++;
         }
-        spin_lock_irqsave(&io_request_lock, flags);
 	scsi_free(raw,2048+512);
-        spin_unlock_irqrestore(&io_request_lock, flags);
         return rc;
     }
     case BLKRAGET:
diff -urN linux-2.2.14-pre8/drivers/scsi/sr_vendor.c linux-2.2.14-pre9/drivers/scsi/sr_vendor.c
--- linux-2.2.14-pre8/drivers/scsi/sr_vendor.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/drivers/scsi/sr_vendor.c	2003-08-15 15:09:15.000000000 -0700
@@ -111,17 +111,14 @@
 	unsigned char		cmd[12];    /* the scsi-command */
 	struct ccs_modesel_head	*modesel;
 	int			rc,density = 0;
-	unsigned long		flags;
 
 #ifdef CONFIG_BLK_DEV_SR_VENDOR
 	if (VENDOR_ID == VENDOR_TOSHIBA)
 		density = (blocklength > 2048) ? 0x81 : 0x83;
 #endif
 
-	spin_lock_irqsave(&io_request_lock, flags);
-	buffer = (unsigned char *) scsi_malloc(512);
-	spin_unlock_irqrestore(&io_request_lock, flags);
-	if (!buffer) return -ENOMEM;
+	if ((buffer = (unsigned char *) scsi_malloc(512)) == NULL)
+		return -ENOMEM;
 
 #ifdef DEBUG
 	printk("sr%d: MODE SELECT 0x%x/%d\n",minor,density,blocklength);
@@ -154,7 +151,7 @@
 
 int sr_cd_check(struct cdrom_device_info *cdi)
 {
-	unsigned long   sector, flags;
+	unsigned long   sector;
 	unsigned char   *buffer;     /* the buffer for the ioctl */
 	unsigned char   cmd[12];     /* the scsi-command */
 	int             rc,no_multi,minor;
@@ -163,10 +160,8 @@
 	if (scsi_CDs[minor].cdi.mask & CDC_MULTI_SESSION)
 		return 0;
 	
-	spin_lock_irqsave(&io_request_lock, flags);
-	buffer = (unsigned char *) scsi_malloc(512);
-	spin_unlock_irqrestore(&io_request_lock, flags);
-	if(!buffer) return -ENOMEM;
+	if ((buffer = (unsigned char *) scsi_malloc(512)) == NULL)
+		return -ENOMEM;
 	
 	sector   = 0;         /* the multisession sector offset goes here  */
 	no_multi = 0;         /* flag: the drive can't handle multisession */
diff -urN linux-2.2.14-pre8/drivers/sound/maestro.c linux-2.2.14-pre9/drivers/sound/maestro.c
--- linux-2.2.14-pre8/drivers/sound/maestro.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/drivers/sound/maestro.c	2003-08-15 15:09:15.000000000 -0700
@@ -175,11 +175,11 @@
 /*****************************************************************************/
 
 #include <linux/version.h>
+#include <linux/module.h>
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
 
  #ifdef MODULE
-  #include <linux/module.h>
   #ifdef MODVERSIONS
    #include <linux/modversions.h>
   #endif
diff -urN linux-2.2.14-pre8/fs/buffer.c linux-2.2.14-pre9/fs/buffer.c
--- linux-2.2.14-pre8/fs/buffer.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/fs/buffer.c	2003-08-15 15:09:15.000000000 -0700
@@ -80,7 +80,7 @@
 static int nr_hashed_buffers = 0;
 
 /* This is used by some architectures to estimate available memory. */
-int buffermem = 0;
+long buffermem = 0;
 
 /* Here is the parameter block for the bdflush process. If you add or
  * remove any of the parameters, make sure to update kernel/sysctl.c.
@@ -1465,7 +1465,7 @@
 	int nlist;
 	static char *buf_types[NR_LIST] = {"CLEAN","LOCKED","DIRTY"};
 
-	printk("Buffer memory:   %6dkB\n",buffermem>>10);
+	printk("Buffer memory:   %8ldkB\n",buffermem>>10);
 	printk("Buffer heads:    %6d\n",nr_buffer_heads);
 	printk("Buffer blocks:   %6d\n",nr_buffers);
 	printk("Buffer hashed:   %6d\n",nr_hashed_buffers);
diff -urN linux-2.2.14-pre8/fs/nfsd/nfsfh.c linux-2.2.14-pre9/fs/nfsd/nfsfh.c
--- linux-2.2.14-pre8/fs/nfsd/nfsfh.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/fs/nfsd/nfsfh.c	2003-08-15 15:09:15.000000000 -0700
@@ -1184,7 +1184,7 @@
 	   not set, don't return stale filehandle. */
 	if (inode->i_generation != fh->fh_generation) {
 		if (fh->fh_dcookie) {
-			dprintk("fh_verify: Bad version %u %u %u: 0x%x, 0x%x\n",
+			dprintk("fh_verify: Bad version %lu %u %u: 0x%x, 0x%x\n",
 				inode->i_ino,
 				inode->i_generation,
 				fh->fh_generation,
@@ -1476,7 +1476,7 @@
 	if (!filetable)
 		return;
 	printk(KERN_DEBUG 
-		"nfsd_fh_shutdown : freeing %d fhcache entries.\n", NFSD_MAXFH);
+		"nfsd_fh_shutdown : freeing %ld fhcache entries.\n", NFSD_MAXFH);
 	kfree(filetable);
 	kfree(dirstable);
 	filetable = dirstable = NULL;
diff -urN linux-2.2.14-pre8/include/asm-alpha/asm_offsets.h linux-2.2.14-pre9/include/asm-alpha/asm_offsets.h
--- linux-2.2.14-pre8/include/asm-alpha/asm_offsets.h	1998-10-12 11:40:12.000000000 -0700
+++ linux-2.2.14-pre9/include/asm-alpha/asm_offsets.h	2003-08-15 15:09:15.000000000 -0700
@@ -6,7 +6,7 @@
 #define TASK_ADDR_LIMIT 24
 #define TASK_EXEC_DOMAIN 32
 #define TASK_NEED_RESCHED 40
-#define TASK_SIZE 1096
+#define TASK_SIZE 1064
 #define STACK_SIZE 16384
 #define HAE_CACHE 0
 #define HAE_REG 8
diff -urN linux-2.2.14-pre8/include/asm-alpha/core_irongate.h linux-2.2.14-pre9/include/asm-alpha/core_irongate.h
--- linux-2.2.14-pre8/include/asm-alpha/core_irongate.h	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre9/include/asm-alpha/core_irongate.h	2003-08-15 15:09:15.000000000 -0700
@@ -0,0 +1,599 @@
+#ifndef __ALPHA_IRONGATE__H__
+#define __ALPHA_IRONGATE__H__
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <asm/compiler.h>
+
+/*
+ * IRONGATE is the internal name for the AMD-751 K7 core logic chipset
+ * which provides memory controller and PCI access for NAUTILUS-based
+ * EV6 (21264) systems.
+ *
+ * This file is based on:
+ *
+ * IronGate management library, (c) 1999 Alpha Processor, Inc.
+ * Begun 19 January 1999 by Stig Telfer, Alpha Processor, Inc.
+ */
+
+/*
+ * The 21264 supports, and internally recognizes, a 44-bit physical
+ * address space that is divided equally between memory address space
+ * and I/O address space. Memory address space resides in the lower
+ * half of the physical address space (PA[43]=0) and I/O address space
+ * resides in the upper half of the physical address space (PA[43]=1).
+ *
+ */
+
+
+/* ???
+
+#define IRONGATE_DMA_WIN_BASE_DEFAULT	 (1024*1024*1024U)
+#define IRONGATE_DMA_WIN_SIZE_DEFAULT	 (1024*1024*1024U)
+
+*/
+
+#define IRONGATE_DMA_WIN_BASE_DEFAULT	 (0U)
+#define IRONGATE_DMA_WIN_SIZE_DEFAULT	 (0U)
+
+#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM_SETUP)
+#define IRONGATE_DMA_WIN_BASE		alpha_mv.dma_win_base
+#define IRONGATE_DMA_WIN_SIZE		alpha_mv.dma_win_size
+#else
+#define IRONGATE_DMA_WIN_BASE		IRONGATE_DMA_WIN_BASE_DEFAULT
+#define IRONGATE_DMA_WIN_SIZE		IRONGATE_DMA_WIN_SIZE_DEFAULT
+#endif
+
+/*
+ * Irongate CSR map.  Some of the CSRs are 8 or 16 bits, but all access
+ * through the routines given is 32-bit.
+ *
+ * The first 0x40 bytes are standard as per the PCI spec.
+ */
+
+typedef volatile __u32	igcsr32;
+
+typedef struct {
+	igcsr32 dev_vendor;		/* 0x00 - device ID, vendor ID */
+	igcsr32 stat_cmd;		/* 0x04 - status, command */
+	igcsr32 class;			/* 0x08 - class code, rev ID */
+	igcsr32 latency;		/* 0x0C - header type, PCI latency */
+	igcsr32 bar0;			/* 0x10 - BAR0 - AGP */
+	igcsr32 bar1;			/* 0x14 - BAR1 - GART */
+	igcsr32 bar2;			/* 0x18 - Power Management reg block */
+
+	igcsr32 rsrvd0[6];		/* 0x1C-0x33 reserved */
+
+	igcsr32 capptr;			/* 0x34 - Capabilities pointer */
+
+	igcsr32 rsrvd1[2];		/* 0x38-0x3F reserved */
+
+	igcsr32 bacsr10;		/* 0x40 - base address chip selects */
+	igcsr32 bacsr32;		/* 0x44 - base address chip selects */
+	igcsr32 bacsr54;		/* 0x48 - base address chip selects */
+
+	igcsr32 rsrvd2[1];		/* 0x4C-0x4F reserved */
+
+	igcsr32 drammap;		/* 0x50 - address mapping control */
+	igcsr32 dramtm;			/* 0x54 - timing, driver strength */
+	igcsr32 dramms;			/* 0x58 - ECC, mode/status */
+
+	igcsr32 rsrvd3[1];		/* 0x5C-0x5F reserved */
+
+	igcsr32 biu0;			/* 0x60 - bus interface unit */
+	igcsr32 biusip;			/* 0x64 - Serial initialisation pkt */
+
+	igcsr32 rsrvd4[2];		/* 0x68-0x6F reserved */
+
+	igcsr32 mro;			/* 0x70 - memory request optimiser */
+
+	igcsr32 rsrvd5[3];		/* 0x74-0x7F reserved */
+
+	igcsr32 whami;			/* 0x80 - who am I */
+	igcsr32 pciarb;			/* 0x84 - PCI arbitration control */
+	igcsr32 pcicfg;			/* 0x88 - PCI config status */
+
+	igcsr32 rsrvd6[5];		/* 0x8C-0x9F reserved */
+
+	/* AGP (bus 1) control registers */
+	igcsr32 agpcap;			/* 0xA0 - AGP Capability Identifier */
+	igcsr32 agpstat;		/* 0xA4 - AGP status register */
+	igcsr32 agpcmd;			/* 0xA8 - AGP control register */
+	igcsr32 agpva;			/* 0xAC - AGP Virtual Address Space */
+	igcsr32 agpmode;		/* 0xB0 - AGP/GART mode control */
+
+} Irongate0;
+
+/*----------------------------------------------------------------------*/
+/* Bitfield and mask register definitions */
+
+/* Device, vendor IDs - offset 0x00 */
+
+typedef union {
+	igcsr32 i;			/* integer value of CSR */
+	struct {
+		unsigned v : 16;
+		unsigned d : 16;
+	} r;				/* structured interpretation */
+} ig_dev_vendor_t;
+
+
+/* Status, command registers - offset 0x04 */
+
+typedef union {
+
+	igcsr32 i;
+	struct {
+		unsigned command;
+		unsigned status;
+	} s;
+	struct {
+		/* command register fields */
+		unsigned iospc : 1;		/* always reads zero */
+		unsigned memspc	 : 1;		/* PCI memory space accesses? */
+		unsigned iten : 1;		/* always 1: can be bus initiator */
+		unsigned scmon : 1;		/* always 0 special cycles not chckd */
+		unsigned mwic : 1;		/* always 0 - no mem write & invalid */
+		unsigned vgaps : 1;		/* always 0 - palette rds not special */
+		unsigned per : 1;		/* parity error resp: always 0 */
+		unsigned step : 1;		/* address/data stepping : always 0 */
+		unsigned serre : 1;		/* 1 = sys err output driver enable */
+		unsigned fbbce : 1;		/* fast back-back cycle : always 0 */
+		unsigned zero1 : 6;		/* must be zero */
+
+		/* status register fields */
+		unsigned zero2 : 4;	     /* must be zero */
+		unsigned cl : 1;	    /* config space capa list: always 1 */
+		unsigned pci66 : 1;	    /* 66 MHz PCI support - always 0 */
+		unsigned udf : 1;	    /* user defined features - always 0 */
+		unsigned fbbc : 1;	    /* back-back transactions - always 0 */
+		unsigned ppe : 1;	    /* PCI parity error detected (0) */
+		unsigned devsel : 2;	    /* DEVSEL timing (always 01) */
+		unsigned sta : 1;	    /* signalled target abort (0) */
+		unsigned rta : 1;	    /* recvd target abort */
+		unsigned ria : 1;	    /* recvd initiator abort */
+		unsigned serr : 1;	    /* SERR has been asserted */
+		unsigned dpe : 1;	    /* DRAM parity error (0) */
+	} r;
+} ig_stat_cmd_t;
+
+
+/* Revision ID, Programming interface, subclass, baseclass - offset 0x08 */
+
+typedef union {
+
+	igcsr32 i;
+	struct {
+		/* revision ID */
+		unsigned step : 4;		/* stepping Revision ID */
+		unsigned die : 4;		/* die Revision ID */
+		unsigned pif : 8;		/* programming interface (0x00) */
+		unsigned sub : 8;		/* subclass code (0x00) */
+		unsigned base: 8;		/* baseclass code (0x06) */
+	} r;
+} ig_class_t;
+
+
+/* Latency Timer, PCI Header type - offset 0x0C */
+
+typedef union {
+
+	igcsr32 i;
+	struct {
+		unsigned zero1:8;		/* reserved */
+		unsigned lat : 8;		/* latency in PCI bus clocks */
+		unsigned hdr : 8;		/* PCI header type */
+		unsigned zero2:8;		/* reserved */
+	} r;
+} ig_latency_t;
+
+
+/* Base Address Register 0 - offset 0x10 */
+
+typedef union {
+
+	igcsr32 i;
+	struct {
+		unsigned mem : 1;		/* Reg pts to memory (always 0) */
+		unsigned type: 2;		/* 32 bit register = 0b00 */
+		unsigned pref: 1;		/* graphics mem prefetchable=1 */
+		unsigned baddrl : 21;		/* 32M = minimum alloc -> all zero */
+		unsigned size : 6;		/* size requirements for AGP */
+		unsigned zero : 1;		/* reserved=0 */
+	} r;
+} ig_bar0_t;
+
+
+/* Base Address Register 1 - offset 0x14 */
+
+typedef union {
+
+	igcsr32 i;
+	struct {
+		unsigned mem : 1;		/* BAR0 maps to memory -> 0 */
+		unsigned type : 2;		/* BAR1 is 32-bit -> 0b00 */
+		unsigned pref : 1;		/* graphics mem prefetchable=1 */
+		unsigned baddrl : 8;		/* 4K alloc for AGP CSRs -> 0b00 */
+		unsigned baddrh : 20;		/* base addr of AGP CSRs A[30:11] */
+	} r;
+} ig_bar1_t;
+
+
+/* Base Address Register 2 - offset 0x18 */
+
+typedef union {
+
+	igcsr32 i;
+	struct {
+		unsigned io  : 1;		/* BAR2 maps to I/O space -> 1 */
+		unsigned zero1: 1;		/* reserved */
+		unsigned addr : 22;		/* BAR2[31:10] - PM2_BLK base */
+		unsigned zero2: 8;		/* reserved */
+	} r;
+} ig_bar2_t;
+
+
+/* Capabilities Pointer - offset 0x34 */
+
+typedef union {
+
+	igcsr32 i;
+	struct {
+		unsigned cap : 8;		/* =0xA0, offset of AGP ctrl regs */
+		unsigned zero: 24;		/* reserved */
+	} r;
+} ig_capptr_t;
+
+
+/* Base Address Chip Select Register 1,0 - offset 0x40 */
+/* Base Address Chip Select Register 3,2 - offset 0x44 */
+/* Base Address Chip Select Register 5,4 - offset 0x48 */
+
+typedef union {
+
+	igcsr32 i;
+	struct {
+		/* lower bank */
+		unsigned en0 : 1;		/* memory bank enabled */
+		unsigned mask0 : 6;		/* Address mask for A[28:23] */
+		unsigned base0 : 9;		/* Bank Base Address A[31:23] */
+
+		/* upper bank */
+		unsigned en1 : 1;		/* memory bank enabled */
+		unsigned mask1 : 6;		/* Address mask for A[28:23] */
+		unsigned base1 : 9;		/* Bank Base Address A[31:23] */
+	} r;
+} ig_bacsr_t, ig_bacsr10_t, ig_bacsr32_t, ig_bacsr54_t;
+
+
+/* SDRAM Address Mapping Control Register - offset 0x50 */
+
+typedef union {
+
+	igcsr32 i;
+	struct {
+		unsigned z1 : 1;		/* reserved */
+		unsigned bnks0: 1;		/* 0->2 banks in chip select 0 */
+		unsigned am0 : 1;		/* row/column addressing */
+		unsigned z2 : 1;		/* reserved */
+
+		unsigned z3 : 1;		/* reserved */
+		unsigned bnks1: 1;		/* 0->2 banks in chip select 1 */
+		unsigned am1 : 1;		/* row/column addressing */
+		unsigned z4 : 1;		/* reserved */
+
+		unsigned z5 : 1;		/* reserved */
+		unsigned bnks2: 1;		/* 0->2 banks in chip select 2 */
+		unsigned am2 : 1;		/* row/column addressing */
+		unsigned z6 : 1;		/* reserved */
+
+		unsigned z7 : 1;		/* reserved */
+		unsigned bnks3: 1;		/* 0->2 banks in chip select 3 */
+		unsigned am3 : 1;		/* row/column addressing */
+		unsigned z8 : 1;		/* reserved */
+
+		unsigned z9 : 1;		/* reserved */
+		unsigned bnks4: 1;		/* 0->2 banks in chip select 4 */
+		unsigned am4 : 1;		/* row/column addressing */
+		unsigned z10 : 1;		/* reserved */
+
+		unsigned z11 : 1;		/* reserved */
+		unsigned bnks5: 1;		/* 0->2 banks in chip select 5 */
+		unsigned am5 : 1;		/* row/column addressing */
+		unsigned z12 : 1;		/* reserved */
+
+		unsigned rsrvd: 8;		/* reserved */
+	} r;
+} ig_drammap_t;
+
+
+/* DRAM timing and driver strength register - offset 0x54 */
+
+typedef union {
+
+	igcsr32 i;
+	struct {
+		/* DRAM timing parameters */
+		unsigned trcd : 2;
+		unsigned tcl : 2;
+		unsigned tras: 3;
+		unsigned trp : 2;
+		unsigned trc : 3;
+		unsigned icl: 2;
+		unsigned ph : 2;
+
+		/* Chipselect driver strength */
+		unsigned adra : 1;
+		unsigned adrb : 1;
+		unsigned ctrl : 3;
+		unsigned dqm : 1;
+		unsigned cs : 1;
+		unsigned clk: 1;
+		unsigned rsrvd:8;
+	} r;
+} ig_dramtm_t;
+
+
+/* DRAM Mode / Status and ECC Register - offset 0x58 */
+
+typedef union {
+
+	igcsr32 i;
+	struct {
+		unsigned chipsel : 6;		/* failing ECC chip select */
+		unsigned zero1 : 2;		/* always reads zero */
+		unsigned status : 2;		/* ECC Detect logic status */
+		unsigned zero2 : 6;		/* always reads zero */
+
+		unsigned cycles : 2;		/* cycles per refresh, see table */
+		unsigned en : 1;		/* ECC enable */
+		unsigned r : 1;			/* Large burst enable (=0) */
+		unsigned bre : 1;		/* Burst refresh enable */
+		unsigned zero3 : 2;		/* reserved = 0 */
+		unsigned mwe : 1;		/* Enable writes to DRAM mode reg */
+		unsigned type : 1;		/* SDRAM = 0, default */
+		unsigned sdraminit : 1;		/* SDRAM init - set params first! */
+		unsigned zero4 : 6;		/* reserved = 0 */
+	} r;
+} ig_dramms_t;
+
+/*----------------------------------------------------------------------*/
+
+
+/*
+ * Memory spaces:
+ */
+
+/* ??? the following probably needs fixing */
+/* Irongate is consistent with a subset of the Tsunami memory map */
+/* XXX: Do we need to conditionalize on this?  */
+#ifdef USE_48_BIT_KSEG
+#define IRONGATE_BIAS 0x80000000000UL
+#else
+#define IRONGATE_BIAS 0x10000000000UL
+#endif
+
+
+#define IRONGATE_MEM		(IDENT_ADDR | IRONGATE_BIAS | 0x000000000UL)
+#define IRONGATE_IACK_SC	(IDENT_ADDR | IRONGATE_BIAS | 0x1F8000000UL)
+#define IRONGATE_IO		(IDENT_ADDR | IRONGATE_BIAS | 0x1FC000000UL)
+#define IRONGATE_CONF		(IDENT_ADDR | IRONGATE_BIAS | 0x1FE000000UL)
+
+
+/* ??? the following probably needs fixing */
+
+#define IRONGATE0	( (Irongate0 *) IRONGATE_CONF )
+
+/*
+ * Data structure for handling IRONGATE machine checks:
+ * This is the standard OSF logout frame
+ */
+
+#define SCB_Q_SYSERR	0x620			/* OSF definitions */
+#define SCB_Q_PROCERR	0x630
+#define SCB_Q_SYSMCHK	0x660
+#define SCB_Q_PROCMCHK	0x670
+
+struct el_IRONGATE_sysdata_mcheck {
+  __u32 FrameSize;                 /* Bytes, including this field */
+  __u32 FrameFlags;                /* <31> = Retry, <30> = Second Error */
+  __u32 CpuOffset;                 /* Offset to CPU-specific into */
+  __u32 SystemOffset;              /* Offset to system-specific info */
+  __u32 MCHK_Code;
+  __u32 MCHK_Frame_Rev;
+  __u64 I_STAT;
+  __u64 DC_STAT;
+  __u64 C_ADDR;
+  __u64 DC1_SYNDROME;
+  __u64 DC0_SYNDROME;
+  __u64 C_STAT;
+  __u64 C_STS;
+  __u64 RESERVED0;
+  __u64 EXC_ADDR;
+  __u64 IER_CM;
+  __u64 ISUM;
+  __u64 MM_STAT;
+  __u64 PAL_BASE;
+  __u64 I_CTL;
+  __u64 PCTX;
+};
+
+/*----------------------------------------------------------------------*/
+
+#ifdef __KERNEL__
+
+#ifndef __EXTERN_INLINE
+#define __EXTERN_INLINE extern inline
+#define __IO_EXTERN_INLINE
+#endif
+
+/*
+ * Translate physical memory address as seen on (PCI) bus into
+ * a kernel virtual address and vv.
+ */
+
+__EXTERN_INLINE unsigned long irongate_virt_to_bus(void * address)
+{
+	return virt_to_phys(address) + IRONGATE_DMA_WIN_BASE;
+}
+
+__EXTERN_INLINE void * irongate_bus_to_virt(unsigned long address)
+{
+	return phys_to_virt(address - IRONGATE_DMA_WIN_BASE);
+}
+
+/*
+ * I/O functions:
+ *
+ * IRONGATE (AMD-751) PCI/memory support chip for the EV6 (21264) and
+ * K7 can only use linear accesses to get at PCI memory and I/O spaces
+ */
+
+#define vucp	volatile unsigned char *
+#define vusp	volatile unsigned short *
+#define vuip	volatile unsigned int *
+#define vulp	volatile unsigned long *
+
+#define XADDR	((addr) & 0xffffffffUL)
+
+__EXTERN_INLINE unsigned int irongate_inb(unsigned long addr)
+{
+	return __kernel_ldbu(*(vucp)(XADDR + IRONGATE_IO));
+}
+
+__EXTERN_INLINE void irongate_outb(unsigned char b, unsigned long addr)
+{
+        __kernel_stb(b, *(vucp)(XADDR + IRONGATE_IO));
+	mb();
+}
+
+__EXTERN_INLINE unsigned int irongate_inw(unsigned long addr)
+{
+	return __kernel_ldwu(*(vusp)(XADDR + IRONGATE_IO));
+}
+
+__EXTERN_INLINE void irongate_outw(unsigned short b, unsigned long addr)
+{
+        __kernel_stw(b, *(vusp)(XADDR + IRONGATE_IO));
+	mb();
+}
+
+__EXTERN_INLINE unsigned int irongate_inl(unsigned long addr)
+{
+	return *(vuip)(XADDR + IRONGATE_IO);
+}
+
+__EXTERN_INLINE void irongate_outl(unsigned int b, unsigned long addr)
+{
+        *(vuip)(XADDR + IRONGATE_IO) = b;
+	mb();
+}
+
+/*
+ * Memory functions.  all accesses are done through linear space.
+ */
+
+__EXTERN_INLINE unsigned long irongate_readb(unsigned long addr)
+{
+	return __kernel_ldbu(*(vucp)(XADDR + IRONGATE_MEM));
+}
+
+__EXTERN_INLINE unsigned long irongate_readw(unsigned long addr)
+{
+	return __kernel_ldwu(*(vusp)(XADDR + IRONGATE_MEM));
+}
+
+__EXTERN_INLINE unsigned long irongate_readl(unsigned long addr)
+{
+	return *(vuip)(XADDR + IRONGATE_MEM);
+}
+
+__EXTERN_INLINE unsigned long irongate_readq(unsigned long addr)
+{
+	return *(vulp)(XADDR + IRONGATE_MEM);
+}
+
+__EXTERN_INLINE void irongate_writeb(unsigned char b, unsigned long addr)
+{
+	__kernel_stb(b, *(vucp)(XADDR + IRONGATE_MEM));
+}
+
+__EXTERN_INLINE void irongate_writew(unsigned short b, unsigned long addr)
+{
+	__kernel_stw(b, *(vusp)(XADDR + IRONGATE_MEM));
+}
+
+__EXTERN_INLINE void irongate_writel(unsigned int b, unsigned long addr)
+{
+	*(vuip)(XADDR + IRONGATE_MEM) = b;
+}
+
+__EXTERN_INLINE void irongate_writeq(unsigned long b, unsigned long addr)
+{
+	*(vulp)(XADDR + IRONGATE_MEM) = b;
+}
+
+/* Find the DENSE memory area for a given bus address.	*/
+
+__EXTERN_INLINE unsigned long irongate_dense_mem(unsigned long addr)
+{
+	return IRONGATE_MEM;
+}
+
+#undef vucp
+#undef vusp
+#undef vuip
+#undef vulp
+
+#undef XADDR
+
+#ifdef __WANT_IO_DEF
+
+#define virt_to_bus	irongate_virt_to_bus
+#define bus_to_virt	irongate_bus_to_virt
+
+#define __inb		irongate_inb
+#define __inw		irongate_inw
+#define __inl		irongate_inl
+#define __outb		irongate_outb
+#define __outw		irongate_outw
+#define __outl		irongate_outl
+#define __readb		irongate_readb
+#define __readw		irongate_readw
+#define __writeb	irongate_writeb
+#define __writew	irongate_writew
+#define __readl		irongate_readl
+#define __readq		irongate_readq
+#define __writel	irongate_writel
+#define __writeq	irongate_writeq
+#define dense_mem	irongate_dense_mem
+
+#define inb(port) __inb((port))
+#define inw(port) __inw((port))
+#define inl(port) __inl((port))
+
+#define outb(v, port) __outb((v),(port))
+#define outw(v, port) __outw((v),(port))
+#define outl(v, port) __outl((v),(port))
+
+#define readb(a)	__readb((unsigned long)(a))
+#define readw(a)	__readw((unsigned long)(a))
+#define readl(a)	__readl((unsigned long)(a))
+#define readq(a)	__readq((unsigned long)(a))
+
+#define writeb(v,a)	__writeb((v),(unsigned long)(a))
+#define writew(v,a)	__writew((v),(unsigned long)(a))
+#define writel(v,a)	__writel((v),(unsigned long)(a))
+#define writeq(v,a)	__writeq((v),(unsigned long)(a))
+
+#endif /* __WANT_IO_DEF */
+
+#ifdef __IO_EXTERN_INLINE
+#undef __EXTERN_INLINE
+#undef __IO_EXTERN_INLINE
+#endif
+
+#endif /* __KERNEL__ */
+
+#endif /* __ALPHA_IRONGATE__H__ */
+
diff -urN linux-2.2.14-pre8/include/asm-alpha/core_mcpcia.h linux-2.2.14-pre9/include/asm-alpha/core_mcpcia.h
--- linux-2.2.14-pre8/include/asm-alpha/core_mcpcia.h	1999-01-10 09:59:59.000000000 -0800
+++ linux-2.2.14-pre9/include/asm-alpha/core_mcpcia.h	2003-08-15 15:09:15.000000000 -0700
@@ -215,41 +215,6 @@
 #define vuip	volatile unsigned int *
 #define vulp	volatile unsigned long *
 
-#if 0 /* BWIO */
-__EXTERN_INLINE unsigned int mcpcia_bw_inb(unsigned long addr)
-{
-	return __kernel_ldbu(*(vucp)(addr+MCPCIA_BW_IO));
-}
-
-__EXTERN_INLINE void mcpcia_bw_outb(unsigned char b, unsigned long addr)
-{
-	__kernel_stb(b, *(vucp)(addr+MCPCIA_BW_IO));
-	mb();
-}
-
-__EXTERN_INLINE unsigned int mcpcia_bw_inw(unsigned long addr)
-{
-	return __kernel_ldwu(*(vusp)(addr+MCPCIA_BW_IO));
-}
-
-__EXTERN_INLINE void mcpcia_bw_outw(unsigned short b, unsigned long addr)
-{
-	__kernel_stw(b, *(vusp)(addr+MCPCIA_BW_IO));
-	mb();
-}
-
-__EXTERN_INLINE unsigned int mcpcia_bw_inl(unsigned long addr)
-{
-	return *(vuip)(addr+MCPCIA_BW_IO);
-}
-
-__EXTERN_INLINE void mcpcia_bw_outl(unsigned int b, unsigned long addr)
-{
-	*(vuip)(addr+MCPCIA_BW_IO) = b;
-	mb();
-}
-#endif
-
 __EXTERN_INLINE unsigned int mcpcia_inb(unsigned long in_addr)
 {
 	unsigned long addr = in_addr & 0xffffffffUL;
@@ -336,48 +301,6 @@
  * 
  */
 
-#if 0 /* BWIO */
-__EXTERN_INLINE unsigned long mcpcia_bw_readb(unsigned long addr)
-{
-	return __kernel_ldbu(*(vucp)(addr+MCPCIA_BW_MEM));
-}
-
-__EXTERN_INLINE unsigned long mcpcia_bw_readw(unsigned long addr)
-{
-	return __kernel_ldbw(*(vusp)(addr+MCPCIA_BW_MEM));
-}
-
-__EXTERN_INLINE unsigned long mcpcia_bw_readl(unsigned long addr)
-{
-	return *(vuip)(addr + MCPCIA_BW_MEM);
-}
-
-__EXTERN_INLINE unsigned long mcpcia_bw_readq(unsigned long addr)
-{
-	return *(vulp)(addr + MCPCIA_BW_MEM);
-}
-
-__EXTERN_INLINE void mcpcia_bw_writeb(unsigned char b, unsigned long addr)
-{
-	__kernel_stb(b, *(vucp)(addr+MCPCIA_BW_MEM));
-}
-
-__EXTERN_INLINE void mcpcia_bw_writew(unsigned short b, unsigned long addr)
-{
-	__kernel_stw(b, *(vusp)(addr+MCPCIA_BW_MEM));
-}
-
-__EXTERN_INLINE void mcpcia_bw_writel(unsigned int b, unsigned long addr)
-{
-	*(vuip)(addr+MCPCIA_BW_MEM) = b;
-}
-
-__EXTERN_INLINE void mcpcia_bw_writeq(unsigned long b, unsigned long addr)
-{
-	*(vulp)(addr+MCPCIA_BW_MEM) = b;
-}
-#endif
-
 __EXTERN_INLINE unsigned long mcpcia_srm_base(unsigned long addr)
 {
 	unsigned long mask, base;
@@ -543,64 +466,34 @@
 #define virt_to_bus	mcpcia_virt_to_bus
 #define bus_to_virt	mcpcia_bus_to_virt
 
-#if 0 /* BWIO */
-# define __inb		mcpcia_bw_inb
-# define __inw		mcpcia_bw_inw
-# define __inl		mcpcia_bw_inl
-# define __outb		mcpcia_bw_outb
-# define __outw		mcpcia_bw_outw
-# define __outl		mcpcia_bw_outl
-# define __readb	mcpcia_bw_readb
-# define __readw	mcpcia_bw_readw
-# define __writeb	mcpcia_bw_writeb
-# define __writew	mcpcia_bw_writew
-# define __readl	mcpcia_bw_readl
-# define __readq	mcpcia_bw_readq
-# define __writel	mcpcia_bw_writel
-# define __writeq	mcpcia_bw_writeq
+#define __inb		mcpcia_inb
+#define __inw		mcpcia_inw
+#define __inl		mcpcia_inl
+#define __outb		mcpcia_outb
+#define __outw		mcpcia_outw
+#define __outl		mcpcia_outl
+#ifdef CONFIG_ALPHA_SRM_SETUP
+# define __readb	mcpcia_srm_readb
+# define __readw	mcpcia_srm_readw
+# define __writeb	mcpcia_srm_writeb
+# define __writew	mcpcia_srm_writew
 #else
-# define __inb		mcpcia_inb
-# define __inw		mcpcia_inw
-# define __inl		mcpcia_inl
-# define __outb		mcpcia_outb
-# define __outw		mcpcia_outw
-# define __outl		mcpcia_outl
-# ifdef CONFIG_ALPHA_SRM_SETUP
-#  define __readb	mcpcia_srm_readb
-#  define __readw	mcpcia_srm_readw
-#  define __writeb	mcpcia_srm_writeb
-#  define __writew	mcpcia_srm_writew
-# else
-#  define __readb	mcpcia_readb
-#  define __readw	mcpcia_readw
-#  define __writeb	mcpcia_writeb
-#  define __writew	mcpcia_writew
-# endif
-# define __readl	mcpcia_readl
-# define __readq	mcpcia_readq
-# define __writel	mcpcia_writel
-# define __writeq	mcpcia_writeq
-#endif /* BWIO */
+# define __readb	mcpcia_readb
+# define __readw	mcpcia_readw
+# define __writeb	mcpcia_writeb
+# define __writew	mcpcia_writew
+#endif
+#define __readl		mcpcia_readl
+#define __readq		mcpcia_readq
+#define __writel	mcpcia_writel
+#define __writeq	mcpcia_writeq
 
 #define dense_mem	mcpcia_dense_mem
 
-#if 0 /* BWIO */
-# define inb(port) __inb((port))
-# define inw(port) __inw((port))
-# define inl(port) __inl((port))
-# define outb(x, port) __outb((x),(port))
-# define outw(x, port) __outw((x),(port))
-# define outl(x, port) __outl((x),(port))
-# define readb(addr) __readb((addr))
-# define readw(addr) __readw((addr))
-# define writeb(b, addr) __writeb((b),(addr))
-# define writew(b, addr) __writew((b),(addr))
-#else
-# define inb(port) \
-  (__builtin_constant_p((port))?__inb(port):_inb(port))
-# define outb(x, port) \
-  (__builtin_constant_p((port))?__outb((x),(port)):_outb((x),(port)))
-#endif /* BWIO */
+#define inb(port) \
+ (__builtin_constant_p((port))?__inb(port):_inb(port))
+#define outb(x, port) \
+ (__builtin_constant_p((port))?__outb((x),(port)):_outb((x),(port)))
 
 #define readl(a)	__readl((unsigned long)(a))
 #define readq(a)	__readq((unsigned long)(a))
diff -urN linux-2.2.14-pre8/include/asm-alpha/core_pyxis.h linux-2.2.14-pre9/include/asm-alpha/core_pyxis.h
--- linux-2.2.14-pre8/include/asm-alpha/core_pyxis.h	1999-08-09 12:05:05.000000000 -0700
+++ linux-2.2.14-pre9/include/asm-alpha/core_pyxis.h	2003-08-15 15:09:15.000000000 -0700
@@ -602,7 +602,7 @@
 #define virt_to_bus	pyxis_virt_to_bus
 #define bus_to_virt	pyxis_bus_to_virt
 
-#if defined(BWIO_ENABLED) && !defined(CONFIG_ALPHA_RUFFIAN)
+#if defined(BWIO_ENABLED)
 # define __inb		pyxis_bw_inb
 # define __inw		pyxis_bw_inw
 # define __inl		pyxis_bw_inl
@@ -643,7 +643,7 @@
 
 #define dense_mem	pyxis_dense_mem
 
-#if defined(BWIO_ENABLED) && !defined(CONFIG_ALPHA_RUFFIAN)
+#if defined(BWIO_ENABLED)
 # define inb(port) __inb((port))
 # define inw(port) __inw((port))
 # define inl(port) __inl((port))
diff -urN linux-2.2.14-pre8/include/asm-alpha/dma.h linux-2.2.14-pre9/include/asm-alpha/dma.h
--- linux-2.2.14-pre8/include/asm-alpha/dma.h	1998-12-31 12:03:48.000000000 -0800
+++ linux-2.2.14-pre9/include/asm-alpha/dma.h	2003-08-15 15:09:15.000000000 -0700
@@ -91,6 +91,7 @@
 */
 #define ALPHA_XL_MAX_DMA_ADDRESS	(IDENT_ADDR+0x3000000UL)
 #define ALPHA_RUFFIAN_MAX_DMA_ADDRESS	(IDENT_ADDR+0x1000000UL)
+#define ALPHA_NAUTILUS_MAX_DMA_ADDRESS	(IDENT_ADDR+0x1000000UL)
 #define ALPHA_MAX_DMA_ADDRESS		(~0UL)
 
 #ifdef CONFIG_ALPHA_GENERIC
@@ -100,6 +101,8 @@
 #  define MAX_DMA_ADDRESS		ALPHA_XL_MAX_DMA_ADDRESS
 # elif defined(CONFIG_ALPHA_RUFFIAN)
 #  define MAX_DMA_ADDRESS		ALPHA_RUFFIAN_MAX_DMA_ADDRESS
+# elif defined(CONFIG_ALPHA_NAUTILUS)
+#  define MAX_DMA_ADDRESS		ALPHA_NAUTILUS_MAX_DMA_ADDRESS
 # else
 #  define MAX_DMA_ADDRESS		ALPHA_MAX_DMA_ADDRESS
 # endif
diff -urN linux-2.2.14-pre8/include/asm-alpha/floppy.h linux-2.2.14-pre9/include/asm-alpha/floppy.h
--- linux-2.2.14-pre8/include/asm-alpha/floppy.h	1998-09-06 10:34:33.000000000 -0700
+++ linux-2.2.14-pre9/include/asm-alpha/floppy.h	2003-08-15 15:09:15.000000000 -0700
@@ -64,7 +64,7 @@
 #ifdef CONFIG_ALPHA_GENERIC
 # define CROSS_64KB(a,s)   (__CROSS_64KB(a,s) && ~alpha_mv.max_dma_address)
 #else
-# if defined(CONFIG_ALPHA_XL) || defined(CONFIG_ALPHA_RUFFIAN)
+# if defined(CONFIG_ALPHA_XL) || defined(CONFIG_ALPHA_RUFFIAN) || defined(CONFIG_ALPHA_NAUTILUS)
 #  define CROSS_64KB(a,s)  __CROSS_64KB(a,s)
 # else
 #  define CROSS_64KB(a,s)  (0)
diff -urN linux-2.2.14-pre8/include/asm-alpha/hardirq.h linux-2.2.14-pre9/include/asm-alpha/hardirq.h
--- linux-2.2.14-pre8/include/asm-alpha/hardirq.h	1998-10-12 11:40:13.000000000 -0700
+++ linux-2.2.14-pre9/include/asm-alpha/hardirq.h	2003-08-15 15:09:15.000000000 -0700
@@ -5,27 +5,26 @@
 
 #include <linux/tasks.h>
 
-extern unsigned int local_irq_count[NR_CPUS];
-extern unsigned long hardirq_no[NR_CPUS];
+#ifndef __SMP__
+extern unsigned long local_irq_count;
+#else
+#define local_irq_count         (cpu_data[smp_processor_id()].irq_count)
+#endif
 
 /*
  * Are we in an interrupt context? Either doing bottom half
  * or hardware interrupt processing?
  */
 
-#define in_interrupt()						\
-({								\
-	int __cpu = smp_processor_id();				\
-	(local_irq_count[__cpu] + local_bh_count[__cpu]) != 0;	\
-})
+#define in_interrupt()	((local_irq_count + local_bh_count) != 0)
 
 #ifndef __SMP__
 
-#define hardirq_trylock(cpu)	(local_irq_count[cpu] == 0)
+#define hardirq_trylock(cpu)	(local_irq_count == 0)
 #define hardirq_endlock(cpu)	((void) 0)
 
-#define hardirq_enter(cpu, irq)	(local_irq_count[cpu]++)
-#define hardirq_exit(cpu, irq)	(local_irq_count[cpu]--)
+#define hardirq_enter(cpu, irq)	(local_irq_count++)
+#define hardirq_exit(cpu, irq)	(local_irq_count--)
 
 #define synchronize_irq()	barrier()
 
@@ -50,24 +49,23 @@
 
 static inline void hardirq_enter(int cpu, int irq)
 {
-	++local_irq_count[cpu];
+	++(cpu_data[cpu].irq_count);
         atomic_inc(&global_irq_count);
-	hardirq_no[cpu] |= 1L << irq;		/* debugging only */
 }
 
 static inline void hardirq_exit(int cpu, int irq)
 {
-	hardirq_no[cpu] &= ~(1L << irq);	/* debugging only */
 	atomic_dec(&global_irq_count);
-        --local_irq_count[cpu];
+	--(cpu_data[cpu].irq_count);
 }
 
 static inline int hardirq_trylock(int cpu)
 {
-	return !atomic_read(&global_irq_count) && !global_irq_lock.lock;
+	return  ! atomic_read(&global_irq_count) &&
+		! spin_is_locked(&global_irq_lock);
 }
 
-#define hardirq_endlock(cpu)  ((void)0)
+#define hardirq_endlock(cpu)	((void) 0)
 
 extern void synchronize_irq(void);
 
diff -urN linux-2.2.14-pre8/include/asm-alpha/hwrpb.h linux-2.2.14-pre9/include/asm-alpha/hwrpb.h
--- linux-2.2.14-pre8/include/asm-alpha/hwrpb.h	1998-10-12 11:40:13.000000000 -0700
+++ linux-2.2.14-pre9/include/asm-alpha/hwrpb.h	2003-08-15 15:09:15.000000000 -0700
@@ -55,11 +55,16 @@
 #define ST_DEC_TSUNAMI		 34	/* Tsunami systype	*/
 #define ST_DEC_WILDFIRE		 35	/* Wildfire systype	*/
 #define ST_DEC_CUSCO		 36	/* CUSCO systype	*/
+#define ST_DEC_EIGER		 37	/* Eiger systype	*/
 
 /* UNOFFICIAL!!! */
 #define ST_UNOFFICIAL_BIAS	100
 #define ST_DTI_RUFFIAN		101	/* RUFFIAN systype	*/
 
+/* Alpha Processor, Inc. systems */
+#define ST_API_BIAS		200			/* Offset for API systems */
+#define ST_API_NAUTILUS		(ST_API_BIAS + 1)	/* Nautilus systype */
+
 struct pcb_struct {
 	unsigned long ksp;
 	unsigned long usp;
diff -urN linux-2.2.14-pre8/include/asm-alpha/io.h linux-2.2.14-pre9/include/asm-alpha/io.h
--- linux-2.2.14-pre8/include/asm-alpha/io.h	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/include/asm-alpha/io.h	2003-08-15 15:09:15.000000000 -0700
@@ -146,6 +146,8 @@
 # include <asm/core_polaris.h>
 #elif defined(CONFIG_ALPHA_LX164)
 # include <asm/core_pyxis.h>
+#elif defined(CONFIG_ALPHA_IRONGATE)
+# include <asm/core_irongate.h>
 #else
 #error "What system is this?"
 #endif
diff -urN linux-2.2.14-pre8/include/asm-alpha/irq.h linux-2.2.14-pre9/include/asm-alpha/irq.h
--- linux-2.2.14-pre8/include/asm-alpha/irq.h	1999-05-22 13:42:57.000000000 -0700
+++ linux-2.2.14-pre9/include/asm-alpha/irq.h	2003-08-15 15:09:15.000000000 -0700
@@ -16,7 +16,7 @@
    many places throughout the kernel to size static arrays.  That's ok,
    we'll use alpha_mv.nr_irqs when we want the real thing.  */
 
-# define NR_IRQS	64
+# define NR_IRQS	128
 
 #elif defined(CONFIG_ALPHA_CABRIOLET) || \
       defined(CONFIG_ALPHA_EB66P)     || \
@@ -42,46 +42,18 @@
       defined(CONFIG_ALPHA_SX164)
 # define NR_IRQS	40
 
-#elif defined(CONFIG_ALPHA_DP264) || \
-      defined(CONFIG_ALPHA_RAWHIDE)
+#elif defined(CONFIG_ALPHA_DP264)     || \
+      defined(CONFIG_ALPHA_EIGER)
 # define NR_IRQS	64
 
-#elif defined(CONFIG_ALPHA_TAKARA)
-# define NR_IRQS	20
+#elif defined(CONFIG_ALPHA_RAWHIDE)   || \
+      defined(CONFIG_ALPHA_TAKARA)
+# define NR_IRQS	128
 
 #else /* everyone else */
 # define NR_IRQS	16
 #endif
 
-/*
- * PROBE_MASK is the bitset of irqs that we consider for autoprobing.
- */
-
-/* The normal mask includes all the IRQs except the timer.  */
-#define _PROBE_MASK(nr_irqs)	(((1UL << (nr_irqs & 63)) - 1) & ~1UL)
-
-/* Mask out unused timer irq 0 and RTC irq 8. */
-#define P2K_PROBE_MASK		(_PROBE_MASK(16) & ~0x101UL)
-
-/* Mask out unused timer irq 0, "irqs" 20-30, and the EISA cascade. */
-#define ALCOR_PROBE_MASK	(_PROBE_MASK(48) & ~0xfff000000001UL)
-
-/* Leave timer irq 0 in the mask.  */
-#define RUFFIAN_PROBE_MASK	(_PROBE_MASK(48) | 1UL)
-
-#if defined(CONFIG_ALPHA_GENERIC)
-# define PROBE_MASK	alpha_mv.irq_probe_mask
-#elif defined(CONFIG_ALPHA_P2K)
-# define PROBE_MASK	P2K_PROBE_MASK
-#elif defined(CONFIG_ALPHA_ALCOR) || defined(CONFIG_ALPHA_XLT)
-# define PROBE_MASK	ALCOR_PROBE_MASK
-#elif defined(CONFIG_ALPHA_RUFFIAN)
-# define PROBE_MASK	RUFFIAN_PROBE_MASK
-#else
-# define PROBE_MASK	_PROBE_MASK(NR_IRQS)
-#endif
-
-
 static __inline__ int irq_cannonicalize(int irq)
 {
 	/*
diff -urN linux-2.2.14-pre8/include/asm-alpha/smp.h linux-2.2.14-pre9/include/asm-alpha/smp.h
--- linux-2.2.14-pre8/include/asm-alpha/smp.h	1999-08-09 12:04:41.000000000 -0700
+++ linux-2.2.14-pre9/include/asm-alpha/smp.h	2003-08-15 15:09:15.000000000 -0700
@@ -7,6 +7,7 @@
 #include <asm/init.h>
 #include <asm/pal.h>
 
+/* make a multiple of 64-bytes */
 struct cpuinfo_alpha {
 	unsigned long loops_per_sec;
 	unsigned long last_asn;
@@ -16,6 +17,10 @@
 	unsigned long ipi_count;
 	unsigned long prof_multiplier;
 	unsigned long prof_counter;
+  /* start of second 64-bytes */
+	unsigned long irq_count;
+	unsigned long bh_count;
+	unsigned long __pad[6];
 } __cacheline_aligned;
 
 extern struct cpuinfo_alpha cpu_data[NR_CPUS];
diff -urN linux-2.2.14-pre8/include/asm-alpha/softirq.h linux-2.2.14-pre9/include/asm-alpha/softirq.h
--- linux-2.2.14-pre8/include/asm-alpha/softirq.h	1998-12-27 15:20:32.000000000 -0800
+++ linux-2.2.14-pre9/include/asm-alpha/softirq.h	2003-08-15 15:09:15.000000000 -0700
@@ -5,7 +5,11 @@
 #include <asm/atomic.h>
 #include <asm/hardirq.h>
 
-extern unsigned int local_bh_count[NR_CPUS];
+#ifndef __SMP__
+extern unsigned long local_bh_count;
+#else
+#define local_bh_count          (cpu_data[smp_processor_id()].bh_count)
+#endif
 
 #define get_active_bhs()	(bh_mask & bh_active)
 
@@ -70,7 +74,7 @@
 {
 	if (!test_and_set_bit(0,&global_bh_count)) {
 		if (atomic_read(&global_bh_lock) == 0) {
-			++local_bh_count[cpu];
+			++local_bh_count;
 			return 1;
 		}
 		clear_bit(0,&global_bh_count);
@@ -80,7 +84,7 @@
 
 static inline void softirq_endlock(int cpu)
 {
-	local_bh_count[cpu]--;
+	local_bh_count--;
 	clear_bit(0,&global_bh_count);
 }
 
@@ -88,22 +92,22 @@
 
 extern inline void start_bh_atomic(void)
 {
-	local_bh_count[smp_processor_id()]++;
+	local_bh_count++;
 	barrier();
 }
 
 extern inline void end_bh_atomic(void)
 {
 	barrier();
-	local_bh_count[smp_processor_id()]--;
+	local_bh_count--;
 }
 
 /* These are for the irq's testing the lock */
 #define softirq_trylock(cpu) \
-  (local_bh_count[cpu] ? 0 : (local_bh_count[cpu] = 1))
+  (local_bh_count ? 0 : (local_bh_count = 1))
 
 #define softirq_endlock(cpu) \
-  (local_bh_count[cpu] = 0)
+  (local_bh_count = 0)
 
 #define synchronize_bh()	do { } while (0)
 
diff -urN linux-2.2.14-pre8/include/asm-alpha/spinlock.h linux-2.2.14-pre9/include/asm-alpha/spinlock.h
--- linux-2.2.14-pre8/include/asm-alpha/spinlock.h	1999-08-09 12:04:41.000000000 -0700
+++ linux-2.2.14-pre9/include/asm-alpha/spinlock.h	2003-08-15 15:09:15.000000000 -0700
@@ -25,6 +25,7 @@
 #define spin_unlock(lock)			((void) 0)
 #define spin_lock_irq(lock)			cli()
 #define spin_unlock_irq(lock)			sti()
+#define spin_is_locked(lock)			(0)
 
 #define spin_lock_irqsave(lock, flags)		save_and_cli(flags)
 #define spin_unlock_irqrestore(lock, flags)	restore_flags(flags)
@@ -98,6 +99,9 @@
 #define spin_lock_init(x)	((x)->lock = 0)
 #endif
 
+#define spin_is_locked(lp) \
+	(*((volatile unsigned int *)(&((lp)->lock))) != 0)
+
 #define spin_unlock_wait(x) \
 	({ do { barrier(); } while(((volatile spinlock_t *)x)->lock); })
 
diff -urN linux-2.2.14-pre8/include/asm-alpha/system.h linux-2.2.14-pre9/include/asm-alpha/system.h
--- linux-2.2.14-pre8/include/asm-alpha/system.h	1999-08-09 12:04:41.000000000 -0700
+++ linux-2.2.14-pre9/include/asm-alpha/system.h	2003-08-15 15:09:15.000000000 -0700
@@ -86,6 +86,30 @@
         unsigned long   ld_lock;          /* Contents of EV5 LD_LOCK register*/
 };
 
+struct el_common_EV6_mcheck {
+	unsigned int FrameSize;		/* Bytes, including this field */
+	unsigned int FrameFlags;	/* <31> = Retry, <30> = Second Error */
+	unsigned int CpuOffset;		/* Offset to CPU-specific info */
+	unsigned int SystemOffset;	/* Offset to system-specific info */
+	unsigned int MCHK_Code;
+	unsigned int MCHK_Frame_Rev;
+	unsigned long I_STAT;		/* EV6 Internal Processor Registers */
+	unsigned long DC_STAT;		/* (See the 21264 Spec) */
+	unsigned long C_ADDR;
+	unsigned long DC1_SYNDROME;
+	unsigned long DC0_SYNDROME;
+	unsigned long C_STAT;
+	unsigned long C_STS;
+	unsigned long RESERVED0;
+	unsigned long EXC_ADDR;
+	unsigned long IER_CM;
+	unsigned long ISUM;
+	unsigned long MM_STAT;
+	unsigned long PAL_BASE;
+	unsigned long I_CTL;
+	unsigned long PCTX;
+};
+
 extern void halt(void) __attribute__((noreturn));
 
 #define switch_to(prev,next,last)			\
diff -urN linux-2.2.14-pre8/include/asm-alpha/vga.h linux-2.2.14-pre9/include/asm-alpha/vga.h
--- linux-2.2.14-pre8/include/asm-alpha/vga.h	1999-02-25 10:02:12.000000000 -0800
+++ linux-2.2.14-pre9/include/asm-alpha/vga.h	2003-08-15 15:09:15.000000000 -0700
@@ -11,6 +11,7 @@
 
 #define VT_BUF_HAVE_RW
 #define VT_BUF_HAVE_MEMSETW
+#define VT_BUF_HAVE_MEMCPYW
 #define VT_BUF_HAVE_MEMCPYF
 
 extern inline void scr_writew(u16 val, u16 *addr)
@@ -37,16 +38,28 @@
 		memsetw_io(s, c, count);
 }
 
-extern inline void scr_memcpyw_from(u16 *d, const u16 *s, unsigned int count)
+/* Try to do this the optimal way for the given destination and source. */
+extern inline void scr_memcpyw(u16 *d, const u16 *s, unsigned int count)
 {
-	memcpy_fromio(d, s, count);
-}
-
-extern inline void scr_memcpyw_to(u16 *d, const u16 *s, unsigned int count)
-{
-	memcpy_toio(d, s, count);
+    if ((long)s < 0) {	/* source is memory */
+	if ((long)d < 0) memcpy(d, s, count);		/* dest is memory */
+        else memcpy_toio(d, s, count);			/* dest is screen */
+    } else {		/* source is screen */
+	if ((long)d < 0) memcpy_fromio(d, s, count);	/* dest is memory */
+	else {						/* dest is screen */
+	    /* Right now, we do this the slow way,
+	       as we cannot handle screen unaligned ops...
+	    */
+	    count /= 2;
+	    while (count--)
+                scr_writew(scr_readw(s++), d++);
+	}
+    }
 }
 
+/* Do not trust that the usage will be correct; analyze the arguments. */
+#define scr_memcpyw_from scr_memcpyw
+#define scr_memcpyw_to   scr_memcpyw
 
 #define vga_readb readb
 #define vga_writeb writeb
diff -urN linux-2.2.14-pre8/include/asm-ppc/prom.h linux-2.2.14-pre9/include/asm-ppc/prom.h
--- linux-2.2.14-pre8/include/asm-ppc/prom.h	1999-10-19 17:14:02.000000000 -0700
+++ linux-2.2.14-pre9/include/asm-ppc/prom.h	2003-08-15 15:09:15.000000000 -0700
@@ -63,7 +63,7 @@
 
 /* Prototypes */
 extern void abort(void);
-extern void prom_init(int, int, prom_entry);
+extern unsigned long prom_init(int, int, prom_entry);
 extern void prom_print(const char *msg);
 extern void relocate_nodes(void);
 extern void finish_device_tree(void);
diff -urN linux-2.2.14-pre8/include/linux/fs.h linux-2.2.14-pre9/include/linux/fs.h
--- linux-2.2.14-pre8/include/linux/fs.h	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/include/linux/fs.h	2003-08-15 15:09:15.000000000 -0700
@@ -753,7 +753,7 @@
 extern int try_to_free_buffers(struct page *);
 
 extern int nr_buffers;
-extern int buffermem;
+extern long buffermem;
 extern int nr_buffer_heads;
 
 #define BUF_CLEAN	0
diff -urN linux-2.2.14-pre8/include/linux/swap.h linux-2.2.14-pre9/include/linux/swap.h
--- linux-2.2.14-pre8/include/linux/swap.h	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/include/linux/swap.h	2003-08-15 15:09:15.000000000 -0700
@@ -68,7 +68,7 @@
 extern atomic_t nr_async_pages;
 extern struct inode swapper_inode;
 extern unsigned long page_cache_size;
-extern int buffermem;
+extern long buffermem;
 
 /* Incomplete types for prototype declarations: */
 struct task_struct;
diff -urN linux-2.2.14-pre8/include/scsi/scsi.h linux-2.2.14-pre9/include/scsi/scsi.h
--- linux-2.2.14-pre8/include/scsi/scsi.h	1999-03-15 16:11:31.000000000 -0800
+++ linux-2.2.14-pre9/include/scsi/scsi.h	2003-08-15 15:09:15.000000000 -0700
@@ -18,6 +18,8 @@
  *      SCSI opcodes
  */
 
+extern spinlock_t scsi_malloc_lock;
+
 #define TEST_UNIT_READY       0x00
 #define REZERO_UNIT           0x01
 #define REQUEST_SENSE         0x03
diff -urN linux-2.2.14-pre8/MAINTAINERS linux-2.2.14-pre9/MAINTAINERS
--- linux-2.2.14-pre8/MAINTAINERS	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/MAINTAINERS	2003-08-15 15:09:15.000000000 -0700
@@ -121,9 +121,9 @@
 
 APM DRIVER
 P:	Stephen Rothwell
-M:	sfr@linuxcare.com
+M:	apm@linuxcare.com.au
 L:	linux-laptop@vger.rutgers.edu
-W:	http://www.linuxcare.com.au/apm/
+W:	http://linuxcare.com.au/apm/
 S:	Supported
 
 APPLETALK NETWORK LAYER
@@ -490,8 +490,9 @@
 
 LINUX FOR POWER MACINTOSH
 P:	Paul Mackerras
-M:	paulus@cs.anu.edu.au
-L:	linux-pmac@samba.anu.edu.au
+M:	paulus@linuxcare.com
+W:	http://www.linuxppc.org/
+L:	linuxppc-dev@lists.linuxppc.org
 S:	Maintained
 
 LOGICAL VOLUME MANAGER
diff -urN linux-2.2.14-pre8/Makefile linux-2.2.14-pre9/Makefile
--- linux-2.2.14-pre8/Makefile	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/Makefile	2003-08-15 15:09:15.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 14
-EXTRAVERSION = pre8
+EXTRAVERSION = pre9
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
diff -urN linux-2.2.14-pre8/net/core/dev.c linux-2.2.14-pre9/net/core/dev.c
--- linux-2.2.14-pre8/net/core/dev.c	2003-08-15 15:09:14.000000000 -0700
+++ linux-2.2.14-pre9/net/core/dev.c	2003-08-15 15:09:15.000000000 -0700
@@ -1853,6 +1853,7 @@
 extern int bpq_init(void);
 extern int scc_init(void);
 extern void sdla_setup(void);
+extern void sdla_c_setup(void);
 extern void dlci_setup(void);
 extern int dmascc_init(void);
 extern int sm_init(void);
@@ -1930,7 +1931,7 @@
 	dlci_setup();
 #endif
 #if defined(CONFIG_SDLA)
-	sdla_setup();
+	sdla_c_setup();
 #endif
 #if defined(CONFIG_BAYCOM_PAR)
 	baycom_par_init();
