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

diff -urN linux-2.2.13-pre11/arch/alpha/config.in linux-2.2.13-pre12/arch/alpha/config.in
--- linux-2.2.13-pre11/arch/alpha/config.in	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/config.in	1999-05-22 13:41:37.000000000 -0700
@@ -33,7 +33,6 @@
 	 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		\
@@ -118,7 +117,7 @@
 	define_bool CONFIG_ALPHA_EV5 y
 	define_bool CONFIG_ALPHA_PYXIS y
 fi
-if [ "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_EIGER" = "y" ]
+if [ "$CONFIG_ALPHA_DP264" = "y" ]
 then
 	define_bool CONFIG_PCI y
 	define_bool CONFIG_ALPHA_EV6 y
@@ -148,8 +147,7 @@
 	-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_EIGER" = "y" ]
+	-o "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_RAWHIDE" = "y" ]
 then
   bool 'Use SRM as bootloader' CONFIG_ALPHA_SRM
   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
diff -urN linux-2.2.13-pre11/arch/alpha/kernel/alpha_ksyms.c linux-2.2.13-pre12/arch/alpha/kernel/alpha_ksyms.c
--- linux-2.2.13-pre11/arch/alpha/kernel/alpha_ksyms.c	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/kernel/alpha_ksyms.c	2003-08-15 15:08:04.000000000 -0700
@@ -30,7 +30,6 @@
 #include <asm/machvec.h>
 #include <asm/pgtable.h>
 #include <asm/semaphore.h>
-#include <asm/delay.h>
 
 #define __KERNEL_SYSCALLS__
 #include <asm/unistd.h>
@@ -99,7 +98,6 @@
 EXPORT_SYMBOL(__memset);
 EXPORT_SYMBOL(__memsetw);
 EXPORT_SYMBOL(__constant_c_memset);
-EXPORT_SYMBOL(___delay);
 
 EXPORT_SYMBOL(dump_thread);
 EXPORT_SYMBOL(dump_fpu);
diff -urN linux-2.2.13-pre11/arch/alpha/kernel/bios32.c linux-2.2.13-pre12/arch/alpha/kernel/bios32.c
--- linux-2.2.13-pre11/arch/alpha/kernel/bios32.c	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/kernel/bios32.c	1998-12-01 09:33:59.000000000 -0800
@@ -639,11 +639,11 @@
 				/* Bypass hi reg in the loop.  */
 				dev->base_address[++idx] = 0;
 
-				DBG_DEVS(("bios32 WARNING: "
-					  "handling 64-bit device in "
-					  "slot %d, function %d: \n",
-					  PCI_SLOT(dev->devfn),
-					  PCI_FUNC(dev->devfn)));
+				printk("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",
diff -urN linux-2.2.13-pre11/arch/alpha/kernel/head.S linux-2.2.13-pre12/arch/alpha/kernel/head.S
--- linux-2.2.13-pre11/arch/alpha/kernel/head.S	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/kernel/head.S	1999-06-12 11:52:52.000000000 -0700
@@ -95,21 +95,3 @@
 	.prologue 0
 	call_pal PAL_halt
 	.end	halt
-
-	#
-	# Having the delay loop out of line guarantees that we wont
-	# run into weird alignment conditions (on new processors)
-	# that vary the speed of the loop.
-	#
-	.align 5
-	.globl	___delay
-	.ent	___delay
-___delay:
-	.set noat
-	.frame	$30,0,$28,0
-	.prologue 0
-1:	subq	$0,1,$0
-	bge	$0,1b
-	ret	$31,($28),0
-	.set at
-	.end	___delay
diff -urN linux-2.2.13-pre11/arch/alpha/kernel/Makefile linux-2.2.13-pre12/arch/alpha/kernel/Makefile
--- linux-2.2.13-pre11/arch/alpha/kernel/Makefile	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/kernel/Makefile	1999-08-09 12:04:38.000000000 -0700
@@ -64,7 +64,7 @@
 ifneq ($(CONFIG_ALPHA_CABRIOLET)$(CONFIG_ALPHA_EB164)$(CONFIG_ALPHA_EB66P)$(CONFIG_ALPHA_LX164)$(CONFIG_ALPHA_PC164),)
 O_OBJS   += sys_cabriolet.o
 endif
-ifneq ($(CONFIG_ALPHA_DP264)$(CONFIG_ALPHA_EIGER),)
+ifdef CONFIG_ALPHA_DP264
 O_OBJS   += sys_dp264.o
 endif
 ifneq ($(CONFIG_ALPHA_EB64P)$(CONFIG_ALPHA_EB66),)
diff -urN linux-2.2.13-pre11/arch/alpha/kernel/process.c linux-2.2.13-pre12/arch/alpha/kernel/process.c
--- linux-2.2.13-pre11/arch/alpha/kernel/process.c	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/kernel/process.c	1999-08-25 17:29:45.000000000 -0700
@@ -117,46 +117,58 @@
 	}
 }
 
-struct halt_info {
-	int	mode;
-	char *	restart_cmd;
-};
-
-static void
-halt_processor(void * generic_ptr)
-{
-	struct percpu_struct * cpup;
-	struct halt_info * how = (struct halt_info *)generic_ptr;
-	unsigned long *flags, dummy = 0;
-	int cpuid = smp_processor_id();
-
-	/* No point in taking interrupts anymore. */
-	cli();
+void
+generic_kill_arch (int mode, char *restart_cmd)
+{
+	/* The following currently only has any effect on SRM.  We should
+	   fix MILO to understand it.  Should be pretty easy.  Also we can
+	   support RESTART2 via the ipc_buffer machinations pictured below,
+	   which SRM ignores.  */
 
 	if (alpha_using_srm) {
+		struct percpu_struct *cpup;
+		unsigned long flags;
+	
 		cpup = (struct percpu_struct *)
-			((unsigned long)hwrpb + hwrpb->processor_offset
-			 + hwrpb->processor_size * cpuid);
-		flags = &cpup->flags;
-	} else
-		flags = &dummy;
+		  ((unsigned long)hwrpb + hwrpb->processor_offset);
 
-	/* Clear reason to "default"; clear "bootstrap in progress". */
-	*flags &= ~0x00ff0001UL;
+		flags = cpup->flags;
 
-#ifdef __SMP__
-	/* Secondaries halt here. */
-	if (cpuid != smp_boot_cpuid) {
-		*flags |= 0x00040000UL;
-		clear_bit(cpuid, &cpu_present_mask);
-		halt();
+		/* Clear reason to "default"; clear "bootstrap in progress". */
+		flags &= ~0x00ff0001UL;
+
+		if (mode == LINUX_REBOOT_CMD_RESTART) {
+			if (!restart_cmd) {
+				flags |= 0x00020000UL; /* "cold bootstrap" */
+				cpup->ipc_buffer[0] = 0;
+			} else {
+				flags |=  0x00030000UL; /* "warm bootstrap" */
+				strncpy((char *)cpup->ipc_buffer, restart_cmd,
+					sizeof(cpup->ipc_buffer));
+			}
+		} else {
+			flags |=  0x00040000UL; /* "remain halted" */
+		}
+			
+		cpup->flags = flags;					       
+		mb();						
+
+		reset_for_srm();
+		set_hae(srm_hae);
+
+#ifdef CONFIG_DUMMY_CONSOLE
+		/* This has the effect of reseting the VGA video origin.  */
+		take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1);
+#endif
 	}
-#endif /* __SMP__ */
+
 #ifdef CONFIG_RTC
 	/* Reset rtc to defaults.  */
 	{
 		unsigned char control;
 
+		cli();
+
 		/* Reset periodic interrupt frequency.  */
 		CMOS_WRITE(0x26, RTC_FREQ_SELECT);
 
@@ -165,53 +177,22 @@
 		control |= RTC_PIE;
 		CMOS_WRITE(control, RTC_CONTROL);	
 		CMOS_READ(RTC_INTR_FLAGS);
-	}
-#endif /* CONFIG_RTC */
-	if (alpha_using_srm) {
-		if (how->mode == LINUX_REBOOT_CMD_RESTART) {
-			if (!how->restart_cmd) {
-				*flags |= 0x00020000UL; /* "cold bootstrap" */
-				cpup->ipc_buffer[0] = 0;
-			} else {
-				*flags |=  0x00030000UL; /* "warm bootstrap" */
-				strncpy((char *)cpup->ipc_buffer,
-					how->restart_cmd,
-					sizeof(cpup->ipc_buffer));
-			}
-		} else
-			*flags |=  0x00040000UL; /* "remain halted" */
 
-		reset_for_srm();
-		set_hae(srm_hae);
-
-#ifdef CONFIG_DUMMY_CONSOLE
-		/* This has the effect of reseting the VGA video origin.  */
-		take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1);
+		sti();
+	}
 #endif
-#ifdef __SMP__
-		/* Wait for the secondaries to halt. */
-		clear_bit(smp_boot_cpuid, &cpu_present_mask);
-		while (cpu_present_mask)
-			/* Make sure we sample memory and not a register. */
-			barrier();
-#endif /* __SMP__ */
+
+	if (!alpha_using_srm && mode != LINUX_REBOOT_CMD_RESTART) {
+		/* Unfortunately, since MILO doesn't currently understand
+		   the hwrpb bits above, we can't reliably halt the 
+		   processor and keep it halted.  So just loop.  */
+		return;
 	}
-	/* PRIMARY */
-	halt();
-}
 
-void
-generic_kill_arch(int mode, char * restart_cmd)
-{
-	struct halt_info copy_of_args;
+	if (alpha_using_srm)
+		srm_paging_stop();
 
-	copy_of_args.mode = mode;
-	copy_of_args.restart_cmd = restart_cmd;
-#ifdef __SMP__
-	/* A secondary can't wait here for the primary to finish, can it now? */
-	smp_call_function(halt_processor, (void *)&copy_of_args, 1, 0);
-#endif /* __SMP__ */
-	halt_processor(&copy_of_args);
+	halt();
 }
 
 void
diff -urN linux-2.2.13-pre11/arch/alpha/kernel/proto.h linux-2.2.13-pre12/arch/alpha/kernel/proto.h
--- linux-2.2.13-pre11/arch/alpha/kernel/proto.h	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/kernel/proto.h	1999-08-09 12:05:05.000000000 -0700
@@ -153,7 +153,6 @@
 extern void handle_ipi(struct pt_regs *);
 extern void smp_percpu_timer_interrupt(struct pt_regs *);
 extern int smp_boot_cpuid;
-extern unsigned long cpu_present_mask;
 
 /* bios32.c */
 extern void reset_for_srm(void);
diff -urN linux-2.2.13-pre11/arch/alpha/kernel/setup.c linux-2.2.13-pre12/arch/alpha/kernel/setup.c
--- linux-2.2.13-pre11/arch/alpha/kernel/setup.c	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/kernel/setup.c	1999-08-25 17:29:45.000000000 -0700
@@ -112,7 +112,6 @@
 WEAK(eb64p_mv);
 WEAK(eb66_mv);
 WEAK(eb66p_mv);
-WEAK(eiger_mv);
 WEAK(jensen_mv);
 WEAK(lx164_mv);
 WEAK(miata_mv);
@@ -359,7 +358,7 @@
 	"Mikasa", "EB64", "EB66", "EB64+", "AlphaBook1",
 	"Rawhide", "K2", "Lynx", "XL", "EB164", "Noritake",
 	"Cortex", "29", "Miata", "XXM", "Takara", "Yukon",
-	"Tsunami", "Wildfire", "CUSCO", "Eiger"
+	"Tsunami", "Wildfire", "CUSCO"
 };
 
 static char unofficial_names[][8] = {"100", "Ruffian"};
@@ -430,7 +429,6 @@
 		NULL,		/* Tsunami -- see variation.  */
 		NULL,		/* Wildfire */
 		NULL,		/* CUSCO */
-		&eiger_mv,	/* Eiger */
 	};
 
 	static struct alpha_machine_vector *unofficial_vecs[] __initlocaldata =
@@ -560,7 +558,6 @@
 		&eb64p_mv,
 		&eb66_mv,
 		&eb66p_mv,
-		&eiger_mv,
 		&jensen_mv,
 		&lx164_mv,
 		&miata_mv,
diff -urN linux-2.2.13-pre11/arch/alpha/kernel/sys_dp264.c linux-2.2.13-pre12/arch/alpha/kernel/sys_dp264.c
--- linux-2.2.13-pre11/arch/alpha/kernel/sys_dp264.c	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/kernel/sys_dp264.c	1999-08-09 12:04:38.000000000 -0700
@@ -93,24 +93,6 @@
 }
 
 static void
-eiger_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p)
-{
-	if (irq >= 16) {
-		volatile unsigned long *csr;
-
-		csr = &TSUNAMI_cchip->dim0.csr;
-		
-		*csr = ~mask;
-		mb();
-		*csr;
-	}
-	else if (irq >= 8)
-		outb(mask >> 8, 0xA1);	/* ISA PIC2 */
-	else
-		outb(mask, 0x21);	/* ISA PIC1 */
-}
-
-static void
 dp264_device_interrupt(unsigned long vector, struct pt_regs * regs)
 {
 #if 1
@@ -187,21 +169,6 @@
 	handle_irq(irq, ack, regs);
 }
 
-static void 
-eiger_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
-{
-	int irq, ack;
-
-	ack = irq = (vector - 0x800) >> 4;
-
-	/* This is just like TAKARA rather than like the other TSUNAMIs. */
-	/* ??? Is this really correct??? */
-	if (irq > 15)     
-		ack = irq = ((vector - 0x800) >> 6) + 12;   
-
-	handle_irq(irq, ack, regs);
-}
-
 static void __init
 dp264_init_irq(void)
 {
@@ -236,25 +203,6 @@
 	enable_irq(2);
 }
 
-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);
-
-#if 0
-        enable_irq(55);     /* Enable ISA interrupt controller.  */
-#endif
-	enable_irq(2);
-}
-
 
 /*
  * PCI Fixup configuration.
@@ -454,6 +402,7 @@
 {
 	layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
 	common_pci_fixup(webbrick_map_irq, common_swizzle);
+	SMC669_Init(0);
 }
 
 static void __init
@@ -463,13 +412,6 @@
 	common_pci_fixup(clipper_map_irq, common_swizzle);
 }
 
-static void __init
-eiger_pci_fixup(void)
-{
-	layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
-	common_pci_fixup(monet_map_irq, monet_swizzle);
-}
-
 
 /*
  * The System Vectors
@@ -563,29 +505,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.  */
-
-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:		64,
-	irq_probe_mask:		_PROBE_MASK(64),
-	update_irq_hw:		eiger_update_irq_hw,
-	ack_irq:		generic_ack_irq,
-	device_interrupt:	dp264_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.13-pre11/arch/alpha/kernel/sys_takara.c linux-2.2.13-pre12/arch/alpha/kernel/sys_takara.c
--- linux-2.2.13-pre11/arch/alpha/kernel/sys_takara.c	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/kernel/sys_takara.c	1999-06-12 11:52:52.000000000 -0700
@@ -42,7 +42,7 @@
 			outb(mask >> 8, 0xA1);	/* ISA PIC2 */
 	} else if (irq <= 31) {
 		regaddr = 0x510 + ((irq - 16) & 0x0c);
-		outl((mask >> ((irq - 16) & 0x0c)) & 0x000f0000UL, regaddr);
+		outl((mask >> ((irq - 16) & 0x0c)) & 0xf0000Ul, regaddr);
 	}
 }
 
@@ -101,7 +101,8 @@
 
 	if (alpha_using_srm)
 		alpha_mv.device_interrupt = takara_srm_device_interrupt;
-	else {
+
+	if (!alpha_using_srm) {
 		unsigned int ctlreg = inl(0x500);
 
 		/* Return to non-accelerated mode.  */
@@ -128,7 +129,7 @@
 static int __init
 takara_map_irq(struct pci_dev *dev, int slot, int pin)
 {
-	static char arc_irq_tab[15][5] __initlocaldata = {
+	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 */
@@ -145,32 +146,8 @@
 		{ 16+2, 16+2, 16+2, 16+2, 16+2},   /* slot 19 == device 2 */
 		{ 16+1, 16+1, 16+1, 16+1, 16+1},   /* slot 20 == device 1 */
 	};
-	static char srm_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 */
-		{   -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 */
-		{   -1,   -1,   -1,   -1,   -1},   /* slot 16 == nothing */
-		{16+12,16+12,16+13,16+14,16+15},   /* slot 17= device 4 */
-		{16+ 8, 16+8, 16+9,16+10,16+11},   /* slot 18= device 3 */
-		{16+ 4, 16+4, 16+5, 16+6, 16+7},   /* 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;
-
-	if (slot >= min_idsel && slot <= max_idsel && pin < irqs_per_slot) {
-		if (alpha_using_srm)
-			return srm_irq_tab[slot - min_idsel][pin];
-		else
-			return arc_irq_tab[slot - min_idsel][pin];
-	} else
-		return -1;
+	return COMMON_TABLE_LOOKUP;
 }
 
 static int __init
@@ -182,18 +159,14 @@
 	unsigned int busslot = PCI_SLOT(dev->bus->self->devfn);
 
 	/* Check first for built-in bridges.  */
-	if (busslot > 16 && ((1U << (36 - busslot)) & ctlreg)) {
+	if (busslot > 16 && ((1<<(36-busslot)) & ctlreg)) {
 		if (pin == 1)
 			pin += (20 - busslot);
 		else {
-			/* Can only handle INTA pins currently.  */
-			printk(KERN_WARNING "takara_swizzle: cannot only "
-			       "handle cards with INTA IRQ pin now.\n");
+			/* Must be a card-based bridge.  */
+			printk(KERN_WARNING "takara_swizzle: cannot handle "
+			       "card-bridge behind builtin bridge yet.\n");
 		}
-	} else {
-		/* Must be a card-based bridge.  */
-		printk(KERN_WARNING "takara_swizzle: cannot handle "
-		       "card-bridge behind builtin bridge yet.\n");
 	}
 
 	*pinp = pin;
@@ -205,7 +178,7 @@
 {
 	layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
 	common_pci_fixup(takara_map_irq, takara_swizzle);
-	enable_ide(0x26e);
+	/* enable_ide(0x26e); */
 }
 
 
@@ -222,8 +195,8 @@
 	machine_check:		cia_machine_check,
 	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,
 
-	nr_irqs:		32,
-	irq_probe_mask:		_PROBE_MASK(32),
+	nr_irqs:		20,
+	irq_probe_mask:		_PROBE_MASK(20),
 	update_irq_hw:		takara_update_irq_hw,
 	ack_irq:		generic_ack_irq,
 	device_interrupt:	takara_device_interrupt,
diff -urN linux-2.2.13-pre11/arch/alpha/math-emu/fp-emul.c linux-2.2.13-pre12/arch/alpha/math-emu/fp-emul.c
--- linux-2.2.13-pre11/arch/alpha/math-emu/fp-emul.c	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/math-emu/fp-emul.c	1999-08-25 17:29:45.000000000 -0700
@@ -85,15 +85,15 @@
 
 /* For 128-bit division.  */
 
-void
+__complex__ unsigned long
 udiv128(unsigned long divisor_f0, unsigned long divisor_f1,
-	unsigned long dividend_f0, unsigned long dividend_f1,
-	unsigned long *quot, unsigned long *remd)
+	unsigned long dividend_f0, unsigned long dividend_f1)
 {
 	_FP_FRAC_DECL_2(quo);
 	_FP_FRAC_DECL_2(rem);
 	_FP_FRAC_DECL_2(tmp);
 	unsigned long i, num_bits, bit;
+	__complex__ unsigned long ret;
 
 	_FP_FRAC_SET_2(rem, _FP_ZEROFRAC_2);
 	_FP_FRAC_SET_2(quo, _FP_ZEROFRAC_2);
@@ -139,9 +139,9 @@
 	}
 
 out:
-	*quot = quo_f1;
-	*remd = rem_f1;
-	return;
+	__real__ ret = quo_f1;
+	__imag__ ret = rem_f1;
+	return ret;
 }
 
 /*
diff -urN linux-2.2.13-pre11/arch/alpha/math-emu/sfp-machine.h linux-2.2.13-pre12/arch/alpha/math-emu/sfp-machine.h
--- linux-2.2.13-pre11/arch/alpha/math-emu/sfp-machine.h	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/arch/alpha/math-emu/sfp-machine.h	1999-08-25 17:29:45.000000000 -0700
@@ -552,17 +552,15 @@
 	   : "r" ((UDItype)(u)),		\
 	     "r" ((UDItype)(v)))
 
-extern void udiv128(unsigned long, unsigned long,
-		    unsigned long, unsigned long,
-		    unsigned long *,
-		    unsigned long *);
-
-#define udiv_qrnnd(q, r, n1, n0, d)		\
-  do {						\
-    unsigned long xr, xi;			\
-    udiv128((n0), (n1), 0, (d), &xr, &xi);	\
-    (q) = xr; 					\
-    (r) = xi;					\
+extern __complex__ unsigned long udiv128(unsigned long, unsigned long,
+					 unsigned long, unsigned long);
+
+#define udiv_qrnnd(q, r, n1, n0, d)	\
+  do {					\
+    __complex__ unsigned long x_;	\
+    x_ = udiv128((n0), (n1), 0, (d));	\
+    (q) = __real__ x_;			\
+    (r) = __imag__ x_;			\
   } while (0)
 
 #define UDIV_NEEDS_NORMALIZATION 1  
diff -urN linux-2.2.13-pre11/drivers/block/ide-cd.h linux-2.2.13-pre12/drivers/block/ide-cd.h
--- linux-2.2.13-pre11/drivers/block/ide-cd.h	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/drivers/block/ide-cd.h	2003-08-15 15:08:04.000000000 -0700
@@ -523,7 +523,7 @@
 	__u8 door_open     : 1;
 	__u8 reserved1     : 4;
 #elif defined(__LITTLE_ENDIAN_BITFIELD)
-	__u8 reserved1     : 5;
+	__u8 reserved1     : 4;
 	__u8 door_open     : 1;
 	__u8 mech_state    : 3;
 #else
diff -urN linux-2.2.13-pre11/drivers/net/sktr.c linux-2.2.13-pre12/drivers/net/sktr.c
--- linux-2.2.13-pre11/drivers/net/sktr.c	1999-01-07 08:46:59.000000000 -0800
+++ linux-2.2.13-pre12/drivers/net/sktr.c	2003-08-15 15:08:04.000000000 -0700
@@ -24,7 +24,8 @@
  *
  *  Maintainer(s):
  *    JS        Jay Schulist            jschlst@samba.anu.edu.au
- *    CG	Christoph Goos		cgoos@syskonnect.de
+ *    CG	Christoph Goos          cgoos@syskonnect.de
+ *    AF	Adam Fritzler		mid@auk.cx
  *
  *  Modification History:
  *	29-Aug-97	CG	Created
@@ -33,10 +34,14 @@
  *	27-May-98	JS	Formated to Linux Kernel Format
  *	31-May-98	JS	Hacked in PCI support
  *	16-Jun-98	JS	Modulized for multiple cards with one driver
+ *	21-Sep-99	CG	Fixed source routing issues for 2.2 kernels
+ *	21-Sep-99	AF	Added multicast changes recommended by 
+ *				  Jochen Friedrich <jochen@nwe.de> (untested)
+ *				Added detection of compatible Compaq PCI card  
  *
  *  To do:
  *    1. Selectable 16 Mbps or 4Mbps
- *    2. Multi/Broadcast packet handling
+ *    2. Multi/Broadcast packet handling (might be done)
  *
  */
 
@@ -135,7 +140,6 @@
 static void 	sktr_exec_cmd(struct device *dev, unsigned short Command);
 static void 	sktr_exec_sifcmd(struct device *dev, unsigned int WriteValue);
 /* "F" */
-static unsigned char *sktr_fix_srouting(unsigned char *buf, short *FrameLen);
 /* "G" */
 static struct enet_statistics *sktr_get_stats(struct device *dev);
 /* "H" */
@@ -254,10 +258,17 @@
 		/* Remove I/O space marker in bit 0. */
 		pci_ioaddr &= ~3;
 
-		if(vendor != PCI_VENDOR_ID_SK)
+		if((vendor != PCI_VENDOR_ID_SK) &&
+		   (vendor != PCI_VENDOR_ID_COMPAQ))
 			continue;
-		if(device != PCI_DEVICE_ID_SK_TR)
+
+		if((vendor == PCI_VENDOR_ID_SK) && 
+		   (device != PCI_DEVICE_ID_SK_TR))
+			continue;
+		else if((vendor == PCI_VENDOR_ID_COMPAQ) && 
+			(device != PCI_DEVICE_ID_COMPAQ_TOKENRING))
 			continue;
+     
 		if(check_region(pci_ioaddr, SKTR_IO_EXTENT))
 			continue;
 		request_region(pci_ioaddr, SKTR_IO_EXTENT, pci_cardname);
@@ -390,6 +401,7 @@
 {
 	static unsigned version_printed = 0;
 	struct net_local *tp;
+	int DeviceType = SK_PCI;
 	int err;
 
 	if(sktr_debug && version_printed++ == 0)
@@ -407,6 +419,7 @@
 		err = sktr_isa_chk_card(dev, ioaddr);
 		if(err < 0)
 			return (-ENODEV);
+		DeviceType = SK_ISA;
 	}
 
 	/* Setup this devices private information structure */
@@ -414,6 +427,7 @@
 	if(tp == NULL)
 		return (-ENOMEM);
 	memset(tp, 0, sizeof(struct net_local));
+	tp->DeviceType = DeviceType;
 
 	dev->priv		= tp;
 	dev->init               = sktr_init_card;
@@ -690,7 +704,9 @@
 			skb_put(tp->Rpl[i].Skb, tp->MaxPacketSize);
 
 			/* data unreachable for DMA ? then use local buffer */
-			if(virt_to_bus(tp->Rpl[i].Skb->data) + tp->MaxPacketSize > ISA_MAX_ADDRESS)
+			if(tp->DeviceType == SK_ISA &&
+				virt_to_bus(tp->Rpl[i].Skb->data) +
+				tp->MaxPacketSize > ISA_MAX_ADDRESS)
 			{
 				tp->Rpl[i].SkbStat = SKB_DATA_COPY;
 				tp->Rpl[i].FragList[0].DataAddr = htonl(virt_to_bus(tp->LocalRxBuffers[i]));
@@ -748,7 +764,7 @@
 
 	tp->ocpl.OPENOptions 	 = 0;
 	tp->ocpl.OPENOptions 	|= ENABLE_FULL_DUPLEX_SELECTION;
-	tp->ocpl.OPENOptions 	|= PAD_ROUTING_FIELD;
+/*	tp->ocpl.OPENOptions 	|= PAD_ROUTING_FIELD; no more needed */
 	tp->ocpl.FullDuplex 	 = 0;
 	tp->ocpl.FullDuplex 	|= OPEN_FULL_DUPLEX_OFF;
 
@@ -826,32 +842,6 @@
 }
 
 /*
- * Linux always gives 18 byte of source routing information in the frame header.
- * But the length field can indicate shorter length. Then cut header
- * appropriate.
- */
-static unsigned char *sktr_fix_srouting(unsigned char *buf, short *FrameLen)
-{
-	struct trh_hdr *trh = (struct trh_hdr *)buf;
-	int len;
-        
-	if(buf[8] & TR_RII)
-	{
-		trh->rcf &= ~SWAPB((unsigned short) TR_RCF_LONGEST_FRAME_MASK);
-		trh->rcf |= SWAPB((unsigned short) TR_RCF_FRAME4K);
-		len = (SWAPB(trh->rcf) & TR_RCF_LEN_MASK) >> 8;
-		if(len < 18)
-		{
-			memcpy(&buf[18-len],buf,sizeof(struct trh_hdr)-18+len);
-			*FrameLen -= (18 - len);
-		}
-		return (&buf[18-len]);
-	}
-
-	return (buf);
-}
-
-/*
  * Gets skb from system, queues it and checks if it can be sent
  */
 static int sktr_send_packet(struct sk_buff *skb, struct device *dev)
@@ -933,7 +923,8 @@
 
 		tp->QueueSkb++;
 		/* Is buffer reachable for Busmaster-DMA? */
-		if(virt_to_bus((void*)(((long) skb->data) + skb->len))
+		if(tp->DeviceType == SK_ISA && 
+			virt_to_bus((void*)(((long) skb->data) + skb->len))
 			> ISA_MAX_ADDRESS)
 		{
 			/* Copy frame to local buffer */
@@ -941,13 +932,13 @@
 			length 	= skb->len;
 			buf 	= tp->LocalTxBuffers[i];
 			memcpy(buf, skb->data, length);
-			newbuf 	= sktr_fix_srouting(buf, &length);
+			newbuf 	= buf;
 		}
 		else
 		{
 			/* Send direct from skb->data */
 			length = skb->len;
-			newbuf = sktr_fix_srouting(skb->data, &length);
+			newbuf = skb->data;
 		}
 
 		/* Source address in packet? */
@@ -1485,53 +1476,64 @@
 static void sktr_set_multicast_list(struct device *dev)
 {
 	struct net_local *tp = (struct net_local *)dev->priv;
-	unsigned int OpenOptions;
-
-	OpenOptions = tp->ocpl.OPENOptions &
-		~(PASS_ADAPTER_MAC_FRAMES
-		| PASS_ATTENTION_FRAMES
-		| PASS_BEACON_MAC_FRAMES
-		| COPY_ALL_MAC_FRAMES
-		| COPY_ALL_NON_MAC_FRAMES);
-
-	if(dev->flags & IFF_PROMISC)
-		/* Enable promiscuous mode */
-		OpenOptions |= COPY_ALL_NON_MAC_FRAMES | COPY_ALL_MAC_FRAMES;
-	else
-	{
-		if(dev->flags & IFF_ALLMULTI)
-			/* || dev->mc_count > HW_MAX_ADDRS) */
-		{
-			/* Disable promiscuous mode, use normal mode. */
-		}
-		else
-		{
-			if(dev->mc_count)
-			{
-				/* Walk the address list, and load the filter */
-			}
-		}
-	}
-
-	tp->ocpl.OPENOptions = OpenOptions;
-	sktr_exec_cmd(dev, OC_MODIFY_OPEN_PARMS);
-
-	return;
+        unsigned int OpenOptions;
+	
+        OpenOptions = tp->ocpl.OPENOptions &
+                ~(PASS_ADAPTER_MAC_FRAMES
+		  | PASS_ATTENTION_FRAMES
+		  | PASS_BEACON_MAC_FRAMES
+		  | COPY_ALL_MAC_FRAMES
+		  | COPY_ALL_NON_MAC_FRAMES);
+	
+        tp->ocpl.FunctAddr = 0;
+	
+        if(dev->flags & IFF_PROMISC)
+                /* Enable promiscuous mode */
+                OpenOptions |= COPY_ALL_NON_MAC_FRAMES |
+			COPY_ALL_MAC_FRAMES;
+        else
+        {
+                if(dev->flags & IFF_ALLMULTI)
+                {
+                        /* Disable promiscuous mode, use normal mode. */
+                        tp->ocpl.FunctAddr = 0xFFFFFFFF;
+			
+                }
+                else
+                {
+                        int i;
+                        struct dev_mc_list *mclist = dev->mc_list;
+                        for (i=0; i< dev->mc_count; i++)
+                        {
+                                ((char *)(&tp->ocpl.FunctAddr))[0] |=
+					mclist->dmi_addr[2];
+                                ((char *)(&tp->ocpl.FunctAddr))[1] |=
+					mclist->dmi_addr[3];
+                                ((char *)(&tp->ocpl.FunctAddr))[2] |=
+					mclist->dmi_addr[4];
+                                ((char *)(&tp->ocpl.FunctAddr))[3] |=
+					mclist->dmi_addr[5];
+                                mclist = mclist->next;
+                        }
+                }
+                sktr_exec_cmd(dev, OC_SET_FUNCT_ADDR);
+        }
+	
+        tp->ocpl.OPENOptions = OpenOptions;
+        sktr_exec_cmd(dev, OC_MODIFY_OPEN_PARMS);
+        return;
 }
 
 /*
  * Wait for some time (microseconds)
+ *
+ * udelay() is a bit harsh, but using a looser timer causes
+ * the bring-up-diags to stall indefinitly.  
+ *
  */
 static void sktr_wait(unsigned long time)
 {
-	long tmp;
-
-	tmp = jiffies + time/(1000000/HZ);
-	do {
-  		current->state 		= TASK_INTERRUPTIBLE;
-		tmp = schedule_timeout(tmp);
-	} while(time_after(tmp, jiffies));
-
+	udelay(time);
 	return;
 }
 
@@ -2450,8 +2452,6 @@
 			/* Drop frames sent by myself */
 			if(sktr_chk_frame(dev, rpl->MData))
 			{
-				printk(KERN_INFO "%s: Received my own frame\n",
-					dev->name);
 				if(rpl->Skb != NULL)
 					dev_kfree_skb(rpl->Skb);
 			}
@@ -2463,9 +2463,10 @@
 					printk("%s: Packet Length %04X (%d)\n",
 						dev->name, Length, Length);
 
-				/* Indicate the received frame to system the
-				 * adapter does the Source-Routing padding for 
-				 * us. See: OpenOptions in sktr_init_opb()
+				/* Indicate the received frame to system.
+				 * The source routing padding is no more
+				 * necessary with 2.2.x kernel.
+				 * See: OpenOptions in sktr_init_opb()
 				 */
 				skb = rpl->Skb;
 				if(rpl->SkbStat == SKB_UNAVAILABLE)
@@ -2528,7 +2529,8 @@
 			skb_put(rpl->Skb, tp->MaxPacketSize);
 
 			/* Data unreachable for DMA ? then use local buffer */
-			if(virt_to_bus(rpl->Skb->data) + tp->MaxPacketSize
+			if(tp->DeviceType == SK_ISA &&
+				virt_to_bus(rpl->Skb->data) + tp->MaxPacketSize
 				> ISA_MAX_ADDRESS)
 			{
 				rpl->SkbStat = SKB_DATA_COPY;
diff -urN linux-2.2.13-pre11/drivers/net/sktr.h linux-2.2.13-pre12/drivers/net/sktr.h
--- linux-2.2.13-pre11/drivers/net/sktr.h	1998-06-24 14:26:13.000000000 -0700
+++ linux-2.2.13-pre12/drivers/net/sktr.h	2003-08-15 15:08:04.000000000 -0700
@@ -16,6 +16,9 @@
 #define TR_RCF_LONGEST_FRAME_MASK 0x0070
 #define TR_RCF_FRAME4K 0x0030
 
+#define SK_ISA 0
+#define SK_PCI 1
+
 /*------------------------------------------------------------------*/
 /*  Bit order for adapter communication with DMA		    */
 /*  --------------------------------------------------------------  */
@@ -1063,6 +1066,8 @@
 	unsigned char ScbInUse;
 	unsigned short CMDqueue;
 
+	unsigned int DeviceType;
+
 	unsigned long AdapterOpenFlag:1;
 	unsigned long AdapterVirtOpenFlag:1;
 	unsigned long OpenCommandIssued:1;
diff -urN linux-2.2.13-pre11/include/asm-alpha/delay.h linux-2.2.13-pre12/include/asm-alpha/delay.h
--- linux-2.2.13-pre11/include/asm-alpha/delay.h	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/include/asm-alpha/delay.h	1998-12-29 13:56:15.000000000 -0800
@@ -9,22 +9,12 @@
  * Delay routines, using a pre-computed "loops_per_second" value.
  */
 
-/* We must make the innermost loop external, ie called via "jsr/bsr", so
-   that timings will be consistent accross ALL invocations, which is not
-   the case for a completely inline implementation. */
-
-extern void ___delay(void);
-
 extern __inline__ void
 __delay(unsigned long loops)
 {
-        register unsigned long r0 __asm__("$0") = loops;
-#ifdef MODULE
-        __asm__ __volatile__("lda $28,___delay; jsr $28,($28),0"
-                             : "=r"(r0) : "r"(r0) : "$28");
-#else
-        __asm__ __volatile__("bsr $28,___delay" : "=r"(r0) : "r"(r0) : "$28");
-#endif
+	__asm__ __volatile__(".align 3\n"
+		"1:\tsubq %0,1,%0\n\t"
+		"bge %0,1b": "=r" (loops) : "0" (loops));
 }
 
 /*
diff -urN linux-2.2.13-pre11/include/asm-alpha/hwrpb.h linux-2.2.13-pre12/include/asm-alpha/hwrpb.h
--- linux-2.2.13-pre11/include/asm-alpha/hwrpb.h	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/include/asm-alpha/hwrpb.h	1998-10-12 11:40:13.000000000 -0700
@@ -55,7 +55,6 @@
 #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
diff -urN linux-2.2.13-pre11/include/asm-alpha/irq.h linux-2.2.13-pre12/include/asm-alpha/irq.h
--- linux-2.2.13-pre11/include/asm-alpha/irq.h	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/include/asm-alpha/irq.h	1999-05-22 13:42:57.000000000 -0700
@@ -27,8 +27,7 @@
 
 #elif defined(CONFIG_ALPHA_EB66)      || \
       defined(CONFIG_ALPHA_EB64P)     || \
-      defined(CONFIG_ALPHA_MIKASA)    || \
-      defined(CONFIG_ALPHA_TAKARA)
+      defined(CONFIG_ALPHA_MIKASA)
 # define NR_IRQS	32
 
 #elif defined(CONFIG_ALPHA_ALCOR)     || \
@@ -43,11 +42,13 @@
       defined(CONFIG_ALPHA_SX164)
 # define NR_IRQS	40
 
-#elif defined(CONFIG_ALPHA_DP264)     || \
-      defined(CONFIG_ALPHA_RAWHIDE)   || \
-      defined(CONFIG_ALPHA_EIGER)
+#elif defined(CONFIG_ALPHA_DP264) || \
+      defined(CONFIG_ALPHA_RAWHIDE)
 # define NR_IRQS	64
 
+#elif defined(CONFIG_ALPHA_TAKARA)
+# define NR_IRQS	20
+
 #else /* everyone else */
 # define NR_IRQS	16
 #endif
diff -urN linux-2.2.13-pre11/include/linux/pci.h linux-2.2.13-pre12/include/linux/pci.h
--- linux-2.2.13-pre11/include/linux/pci.h	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/include/linux/pci.h	2003-08-15 15:08:05.000000000 -0700
@@ -283,6 +283,7 @@
  * <linux-pcisupport@cck.uni-kl.de>.
  */
 #define PCI_VENDOR_ID_COMPAQ		0x0e11
+#define PCI_DEVICE_ID_COMPAQ_TOKENRING	0x0508
 #define PCI_DEVICE_ID_COMPAQ_1280	0x3033
 #define PCI_DEVICE_ID_COMPAQ_TRIFLEX	0x4000
 #define PCI_DEVICE_ID_COMPAQ_SMART2P	0xae10
diff -urN linux-2.2.13-pre11/Makefile linux-2.2.13-pre12/Makefile
--- linux-2.2.13-pre11/Makefile	2003-08-15 15:08:04.000000000 -0700
+++ linux-2.2.13-pre12/Makefile	2003-08-15 15:08:04.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 13
-EXTRAVERSION = pre11
+EXTRAVERSION = pre12
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
