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

diff -urN linux-2.4.23-pre9/Documentation/Configure.help linux-2.4.23-rc1/Documentation/Configure.help
--- linux-2.4.23-pre9/Documentation/Configure.help	2003-11-10 11:26:20.000000000 -0800
+++ linux-2.4.23-rc1/Documentation/Configure.help	2003-11-10 11:26:24.000000000 -0800
@@ -4013,7 +4013,7 @@
   You should say Y here if you use XFree86 3.3.6 or 4.x and want to
   use GLX or DRI.  If unsure, say N.
 
-CONFIG_AGP_AMD_8151
+CONFIG_AGP_AMD_K8
   This option gives you AGP support for the GLX component of
   XFree86 on an AMD Opteron/Athlon64 using the on-CPU GART.
 
@@ -21391,10 +21391,10 @@
   DSP 16 card. Enter: 0 for Sony, 1 for Panasonic, 2 for IDE, 4 for no
   CD-ROM present.
 
-C-Media PCI (CMI8338/8378)
+C-Media PCI (CMI8338/8738)
 CONFIG_SOUND_CMPCI
   Say Y or M if you have a PCI sound card using the CMI8338
-  or the CMI8378 chipset.  Data on these chips are available at
+  or the CMI8738 chipset.  Data on these chips are available at
   <http://www.cmedia.com.tw/>.
 
   A userspace utility to control some internal registers of these
diff -urN linux-2.4.23-pre9/Documentation/video4linux/meye.txt linux-2.4.23-rc1/Documentation/video4linux/meye.txt
--- linux-2.4.23-pre9/Documentation/video4linux/meye.txt	2003-11-10 11:26:20.000000000 -0800
+++ linux-2.4.23-rc1/Documentation/video4linux/meye.txt	2003-11-10 11:26:24.000000000 -0800
@@ -33,6 +33,11 @@
 driver however), but things are not moving very fast (see
 http://r-engine.sourceforge.net/) (PCI vendor/device is 0x10cf/0x2011).
 
+There is a forth model connected on the USB bus in TR1* Vaio laptops.
+This camera is not supported at all by the current driver, in fact
+little information if any is available for this camera
+(USB vendor/device is 0x054c/0x0107).
+
 Driver options:
 ---------------
 
diff -urN linux-2.4.23-pre9/MAINTAINERS linux-2.4.23-rc1/MAINTAINERS
--- linux-2.4.23-pre9/MAINTAINERS	2003-11-10 11:26:20.000000000 -0800
+++ linux-2.4.23-rc1/MAINTAINERS	2003-11-10 11:26:24.000000000 -0800
@@ -430,26 +430,24 @@
 W:	http://www.coda.cs.cmu.edu/
 S:	Maintained
 
-HP (was COMPAQ) FIBRE CHANNEL 64-bit/66MHz PCI non-intelligent HBA
-P:      Stephen Cameron
-M:      arrays@hp.com 
-M:      steve.cameron@hp.com
-L:	cpqfc-discuss@lists.sourceforge.net
+HP FIBRE CHANNEL 64-bit/66MHz PCI non-intelligent HBA
+P:      Chase Maupin
+M:      chase.maupin@hp.com
+L:     iss_storagedev@hp.com
 S:      Odd Fixes
 
-HP (was COMPAQ) SMART2 RAID DRIVER
-P:	Stephen Cameron
-M:	arrays@hp.com
-M:	steve.cameron@hp.com
-L:	cpqarray-discuss@lists.sourceforge.net
+
+HP SMART2 RAID DRIVER
+P:     Francis Wiran
+M:     francis.wiran@hp.com
+L:     iss_storagedev@hp.com
 S:	Odd Fixes
 
-HP (was COMPAQ) SMART CISS RAID DRIVER 
-P:	Stephen Cameron
-M:	arrays@hp.com
-M:	steve.cameron@hp.com
-L:	cciss-discuss@lists.sourceforge.net
-S:	Supported 
+HP SMART CISS RAID DRIVER
+P:     Mike Miller, Michael Ni
+M:     mike.miller@hp.com
+L:     iss_storagedev@hp.com
+S:	Supported
 
 COMPUTONE INTELLIPORT MULTIPORT CARD
 P:     Michael H. Warfield
diff -urN linux-2.4.23-pre9/Makefile linux-2.4.23-rc1/Makefile
--- linux-2.4.23-pre9/Makefile	2003-11-10 11:26:20.000000000 -0800
+++ linux-2.4.23-rc1/Makefile	2003-11-10 11:26:24.000000000 -0800
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 23
-EXTRAVERSION = -pre9
+EXTRAVERSION = -rc1
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.23-pre9/arch/arm/kernel/isa.c linux-2.4.23-rc1/arch/arm/kernel/isa.c
--- linux-2.4.23-pre9/arch/arm/kernel/isa.c	2000-09-18 15:15:25.000000000 -0700
+++ linux-2.4.23-rc1/arch/arm/kernel/isa.c	2003-11-10 11:26:24.000000000 -0800
@@ -38,7 +38,7 @@
 
 static struct ctl_table_header *isa_sysctl_header;
 
-static ctl_table ctl_isa[2] = {{BUS_ISA, "isa", NULL, 0, 0555, ctl_isa_vars},
+static ctl_table ctl_isa[2] = {{CTL_BUS_ISA, "isa", NULL, 0, 0555, ctl_isa_vars},
 			       {0}};
 static ctl_table ctl_bus[2] = {{CTL_BUS, "bus", NULL, 0, 0555, ctl_isa},
 			       {0}};
diff -urN linux-2.4.23-pre9/arch/i386/kernel/mpparse.c linux-2.4.23-rc1/arch/i386/kernel/mpparse.c
--- linux-2.4.23-pre9/arch/i386/kernel/mpparse.c	2003-11-10 11:26:20.000000000 -0800
+++ linux-2.4.23-rc1/arch/i386/kernel/mpparse.c	2003-11-10 11:26:24.000000000 -0800
@@ -587,10 +587,6 @@
 		++mpc_record;
 	}
 
-	if (clustered_apic_mode){
-		phys_cpu_present_map = logical_cpu_present_map;
-	}
-
 
 	printk("Enabling APIC mode: ");
 	if(clustered_apic_mode == CLUSTERED_APIC_NUMAQ)
diff -urN linux-2.4.23-pre9/arch/i386/kernel/process.c linux-2.4.23-rc1/arch/i386/kernel/process.c
--- linux-2.4.23-pre9/arch/i386/kernel/process.c	2003-11-10 11:26:20.000000000 -0800
+++ linux-2.4.23-rc1/arch/i386/kernel/process.c	2003-11-10 11:26:24.000000000 -0800
@@ -44,6 +44,7 @@
 #include <asm/irq.h>
 #include <asm/desc.h>
 #include <asm/mmu_context.h>
+#include <asm/smpboot.h>
 #ifdef CONFIG_MATH_EMULATION
 #include <asm/math_emu.h>
 #endif
@@ -377,7 +378,7 @@
 		   if its not, default to the BSP */
 		if ((reboot_cpu == -1) ||  
 		      (reboot_cpu > (NR_CPUS -1))  || 
-		      !(phys_cpu_present_map & (1<<cpuid))) 
+		      !(phys_cpu_present_map & apicid_to_phys_cpu_present(cpuid)))
 			reboot_cpu = boot_cpu_physical_apicid;
 
 		reboot_smp = 0;  /* use this as a flag to only go through this once*/
diff -urN linux-2.4.23-pre9/arch/i386/kernel/smpboot.c linux-2.4.23-rc1/arch/i386/kernel/smpboot.c
--- linux-2.4.23-pre9/arch/i386/kernel/smpboot.c	2003-11-10 11:26:20.000000000 -0800
+++ linux-2.4.23-rc1/arch/i386/kernel/smpboot.c	2003-11-10 11:26:24.000000000 -0800
@@ -1108,13 +1108,17 @@
 
 	for (bit = 0; bit < NR_CPUS; bit++) {
 		apicid = cpu_present_to_apicid(bit);
+		
+		/* don't try to boot BAD_APICID */
+		if (apicid == BAD_APICID)
+			continue; 
 		/*
 		 * Don't even attempt to start the boot CPU!
 		 */
 		if (apicid == boot_cpu_apicid)
 			continue;
 
-		if (!(phys_cpu_present_map & (1ul << bit)))
+		if (!(phys_cpu_present_map & apicid_to_phys_cpu_present(apicid)))
 			continue;
 		if (max_cpus <= cpucount+1)
 			continue;
@@ -1125,7 +1129,8 @@
 		 * Make sure we unmap all failed CPUs
 		 */
 		if ((boot_apicid_to_cpu(apicid) == -1) &&
-				(phys_cpu_present_map & (1ul << bit)))
+			(phys_cpu_present_map & 
+				apicid_to_phys_cpu_present(apicid)))
 			printk("CPU #%d/0x%02x not responding - cannot use it.\n",
 								bit, apicid);
 	}
diff -urN linux-2.4.23-pre9/arch/i386/kernel/time.c linux-2.4.23-rc1/arch/i386/kernel/time.c
--- linux-2.4.23-pre9/arch/i386/kernel/time.c	2003-06-13 07:51:29.000000000 -0700
+++ linux-2.4.23-rc1/arch/i386/kernel/time.c	2003-11-10 11:26:24.000000000 -0800
@@ -279,6 +279,7 @@
 static inline void mark_timeoffset_cyclone(void)
 {
 	int count;
+	unsigned long lost;
 	unsigned long delta = last_cyclone_timer;
 	spin_lock(&i8253_lock);
 	/* quickly read the cyclone timer */
@@ -293,11 +294,12 @@
 	spin_unlock(&i8253_lock);
 
 	/*lost tick compensation*/
-	delta = last_cyclone_timer - delta;
-	if(delta > loops_per_jiffy+2000){
-		delta = (delta/loops_per_jiffy)-1;
-		jiffies += delta;
-	}
+	delta = last_cyclone_timer - delta;	
+	delta /= (CYCLONE_TIMER_FREQ/1000000);
+	delta += delay_at_last_interrupt;
+	lost = delta/(1000000/HZ);
+	if (lost >= 2)
+		jiffies += lost-1;
                
 	count = ((LATCH-1) - count) * TICK_SIZE;
 	delay_at_last_interrupt = (count + LATCH/2) / LATCH;
diff -urN linux-2.4.23-pre9/arch/x86_64/ia32/sys_ia32.c linux-2.4.23-rc1/arch/x86_64/ia32/sys_ia32.c
--- linux-2.4.23-pre9/arch/x86_64/ia32/sys_ia32.c	2003-11-10 11:26:21.000000000 -0800
+++ linux-2.4.23-rc1/arch/x86_64/ia32/sys_ia32.c	2003-11-10 11:26:24.000000000 -0800
@@ -16,7 +16,7 @@
  *
  * This file assumes that there is a hole at the end of user address space.
  *
- * $Id: sys_ia32.c,v 1.62 2003/09/22 04:25:53 ak Exp $
+ * $Id: sys_ia32.c,v 1.65 2003/10/11 15:16:35 ak Exp $
  */
 
 #include <linux/config.h>
@@ -93,6 +93,8 @@
 static int
 putstat(struct stat32 *ubuf, struct stat *kbuf)
 {
+	if (kbuf->st_size > 0x7fffffff)
+		return -EOVERFLOW;
 	if (verify_area(VERIFY_WRITE, ubuf, sizeof(struct stat32)) ||
 	    __put_user (kbuf->st_dev, &ubuf->st_dev) ||
 	    __put_user (kbuf->st_ino, &ubuf->st_ino) ||
@@ -123,9 +125,9 @@
 	set_fs (KERNEL_DS);
 	ret = sys_newstat(filename, &s);
 	set_fs (old_fs);
-	if (putstat (statbuf, &s))
-		return -EFAULT;
+	if (ret)
 	return ret;
+	return putstat(statbuf, &s);
 }
 
 extern asmlinkage long sys_newlstat(char * filename, struct stat * statbuf);
@@ -140,9 +142,9 @@
 	set_fs (KERNEL_DS);
 	ret = sys_newlstat(filename, &s);
 	set_fs (old_fs);
-	if (putstat (statbuf, &s))
-		return -EFAULT;
+	if (ret) 
 	return ret;
+	return putstat(statbuf, &s);
 }
 
 extern asmlinkage long sys_newfstat(unsigned int fd, struct stat * statbuf);
@@ -157,9 +159,9 @@
 	set_fs (KERNEL_DS);
 	ret = sys_newfstat(fd, &s);
 	set_fs (old_fs);
-	if (putstat (statbuf, &s))
-		return -EFAULT;
+	if (ret)
 	return ret;
+	return putstat(statbuf, &s);
 }
 
 /* Another set for IA32/LFS -- x86_64 struct stat is different due to 
@@ -197,9 +199,9 @@
 	set_fs (KERNEL_DS);
 	ret = sys_newstat(filename, &s);
 	set_fs (old_fs);
-	if (putstat64 (statbuf, &s))
-		return -EFAULT;
+	if (ret)
 	return ret;
+	return putstat64(statbuf, &s);
 }
 
 asmlinkage long
@@ -212,9 +214,9 @@
 	set_fs (KERNEL_DS);
 	ret = sys_newlstat(filename, &s);
 	set_fs (old_fs);
-	if (putstat64 (statbuf, &s))
-		return -EFAULT;
+	if (ret)
 	return ret;
+	return putstat64(statbuf, &s);
 }
 
 asmlinkage long
@@ -227,9 +229,9 @@
 	set_fs (KERNEL_DS);
 	ret = sys_newfstat(fd, &s);
 	set_fs (old_fs);
-	if (putstat64 (statbuf, &s))
-		return -EFAULT;
+	if (ret)
 	return ret;
+	return putstat64(statbuf, &s);
 }
 
 /* Don't set O_LARGEFILE implicitely. */
@@ -1243,7 +1245,6 @@
 	return sys32_wait4(pid, stat_addr, options, NULL);
 }
 
-
 extern asmlinkage long
 sys_getrusage(int who, struct rusage *ru);
 
@@ -2996,7 +2997,7 @@
 
 static int __init ia32_init (void)
 {
-	printk("IA32 emulation $Id: sys_ia32.c,v 1.62 2003/09/22 04:25:53 ak Exp $\n");  
+	printk("IA32 emulation $Id: sys_ia32.c,v 1.65 2003/10/11 15:16:35 ak Exp $\n");  
 	ia32_exec_domain.signal_map = default_exec_domain.signal_map;
 	ia32_exec_domain.signal_invmap = default_exec_domain.signal_invmap;
 	register_exec_domain(&ia32_exec_domain);
diff -urN linux-2.4.23-pre9/arch/x86_64/kernel/acpi.c linux-2.4.23-rc1/arch/x86_64/kernel/acpi.c
--- linux-2.4.23-pre9/arch/x86_64/kernel/acpi.c	2003-11-10 11:26:21.000000000 -0800
+++ linux-2.4.23-rc1/arch/x86_64/kernel/acpi.c	2003-11-10 11:26:24.000000000 -0800
@@ -115,7 +115,6 @@
 #endif
 }
 
-
 #ifdef CONFIG_X86_LOCAL_APIC
 
 int acpi_lapic;
diff -urN linux-2.4.23-pre9/arch/x86_64/kernel/e820.c linux-2.4.23-rc1/arch/x86_64/kernel/e820.c
--- linux-2.4.23-pre9/arch/x86_64/kernel/e820.c	2003-11-10 11:26:21.000000000 -0800
+++ linux-2.4.23-rc1/arch/x86_64/kernel/e820.c	2003-11-10 11:26:24.000000000 -0800
@@ -1,7 +1,7 @@
 /* 
  * Handle the memory map.
  * The functions here do the job until bootmem takes over.
- * $Id: e820.c,v 1.10 2003/09/25 03:22:05 ak Exp $
+ * $Id: e820.c,v 1.11 2003/10/11 15:16:35 ak Exp $
  */
 #include <linux/config.h>
 #include <linux/kernel.h>
diff -urN linux-2.4.23-pre9/arch/x86_64/kernel/entry.S linux-2.4.23-rc1/arch/x86_64/kernel/entry.S
--- linux-2.4.23-pre9/arch/x86_64/kernel/entry.S	2003-06-13 07:51:32.000000000 -0700
+++ linux-2.4.23-rc1/arch/x86_64/kernel/entry.S	2003-11-10 11:26:24.000000000 -0800
@@ -5,7 +5,7 @@
  *  Copyright (C) 2000, 2001, 2002  Andi Kleen SuSE Labs
  *  Copyright (C) 2000  Pavel Machek <pavel@suse.cz>
  * 
- *  $Id: entry.S,v 1.98 2003/05/12 14:39:00 ak Exp $		
+ *  $Id: entry.S,v 1.99 2003/10/24 17:48:32 ak Exp $		
  */
 
 /*
@@ -351,6 +351,7 @@
 	.section .fixup,"ax"
 	/* force a signal here? this matches i386 behaviour */
 bad_iret:
+	/* runs with kernelgs again */	
 	movq $-9999,%rdi	/* better code? */
 	jmp do_exit			
 	.previous	
@@ -504,7 +505,12 @@
 	incl %r15d
 	/* There are two places in the kernel that can potentially fault with
 	   usergs. Handle them here. */	   
-	cmpq $iret_label,RIP(%rsp)
+	leaq iret_label(%rip),%rdx
+	cmpq %rdx,RIP(%rsp)
+	je 1f
+	/* check truncated address too. This works around a CPU issue */
+	movl %edx,%edx	/* zero extend */
+	cmpq %rdx,RIP(%rsp)
 	je   1f
 	cmpq $gs_change,RIP(%rsp)
 	jne  error_action
diff -urN linux-2.4.23-pre9/arch/x86_64/kernel/irq.c linux-2.4.23-rc1/arch/x86_64/kernel/irq.c
--- linux-2.4.23-pre9/arch/x86_64/kernel/irq.c	2003-11-10 11:26:21.000000000 -0800
+++ linux-2.4.23-rc1/arch/x86_64/kernel/irq.c	2003-11-10 11:26:24.000000000 -0800
@@ -1051,7 +1051,7 @@
 
 	if (!shared) {
 		desc->depth = 0;
-		desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING);
+		desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
 		desc->handler->startup(irq);
 	}
 	spin_unlock_irqrestore(&desc->lock,flags);
diff -urN linux-2.4.23-pre9/arch/x86_64/kernel/setup64.c linux-2.4.23-rc1/arch/x86_64/kernel/setup64.c
--- linux-2.4.23-pre9/arch/x86_64/kernel/setup64.c	2003-11-10 11:26:21.000000000 -0800
+++ linux-2.4.23-rc1/arch/x86_64/kernel/setup64.c	2003-11-10 11:26:24.000000000 -0800
@@ -3,7 +3,7 @@
  * Copyright (C) 1995  Linus Torvalds
  * Copyright 2001, 2002 SuSE Labs / Andi Kleen.
  * See setup.c for older changelog.
- * $Id: setup64.c,v 1.25 2003/07/11 15:58:47 ak Exp $
+ * $Id: setup64.c,v 1.26 2003/10/15 01:32:42 ak Exp $
  */ 
 #include <linux/config.h>
 #include <linux/init.h>
@@ -158,7 +158,6 @@
 #endif
 }
 
-#define EXCEPTION_STK_ORDER 0 /* >= N_EXCEPTION_STACKS*EXCEPTION_STKSZ */
 char boot_exception_stacks[N_EXCEPTION_STACKS*EXCEPTION_STKSZ];
 
 /*
@@ -177,16 +176,11 @@
 #endif
 	struct tss_struct * t = &init_tss[nr];
 	unsigned long v, efer; 	
-	char *estacks; 
+	unsigned long estack;
 
 	/* CPU 0 is initialised in head64.c */
-	if (nr != 0) {
+	if (nr != 0)
 		pda_init(nr);
-		estacks = (char *)__get_free_pages(GFP_ATOMIC, EXCEPTION_STK_ORDER); 
-		if (!estacks)
-			panic("Can't allocate exception stacks for CPU %d\n",nr);
-	} else 
-		estacks = boot_exception_stacks; 
 
 	if (test_and_set_bit(nr, &cpu_initialized))
 		panic("CPU#%d already initialized!\n", nr);
@@ -228,10 +222,17 @@
 	/*
 	 * set up and load the per-CPU TSS
 	 */
-	estacks += EXCEPTION_STKSZ;
+	estack = (unsigned long)boot_exception_stacks + EXCEPTION_STKSZ;
 	for (v = 0; v < N_EXCEPTION_STACKS; v++) {
-		t->ist[v] = (unsigned long)estacks;
-		estacks += EXCEPTION_STKSZ;
+		if (nr == 0) {
+			t->ist[v] = estack;
+			estack += EXCEPTION_STKSZ;
+		} else {
+			estack = __get_free_pages(GFP_ATOMIC, EXCEPTION_STK_ORDER);
+			if(!estack) 
+				panic("Can't allocate exception stack %lu for CPU %d\n", v, nr);
+			t->ist[v] = estack + EXCEPTION_STKSZ;		
+		}
 	}
 
 	atomic_inc(&init_mm.mm_count);
diff -urN linux-2.4.23-pre9/arch/x86_64/kernel/smp.c linux-2.4.23-rc1/arch/x86_64/kernel/smp.c
--- linux-2.4.23-pre9/arch/x86_64/kernel/smp.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.23-rc1/arch/x86_64/kernel/smp.c	2003-11-10 11:26:24.000000000 -0800
@@ -548,26 +548,3 @@
 		atomic_inc(&call_data->finished);
 	}
 }
-
-/* Slow. Should be only used for debugging. */
-int slow_smp_processor_id(void)
-{ 
-	int stack_location;
-	unsigned long sp = (unsigned long)&stack_location; 
-	int offset = 0, cpu;
-
-	for (offset = 0; (cpu_online_map >> offset); offset = cpu + 1) { 
-		cpu = ffz(~(cpu_online_map >> offset));
-
-		if (sp >= (u64)cpu_pda[cpu].irqstackptr - IRQSTACKSIZE && 
-		    sp <= (u64)cpu_pda[cpu].irqstackptr)
-			return cpu;
-
-		unsigned long estack = init_tss[cpu].ist[0] - EXCEPTION_STKSZ;
-		if (sp >= estack && sp <= estack+(1<<(PAGE_SHIFT+EXCEPTION_STK_ORDER)))
-			return cpu;			
-	}
-
-	return stack_smp_processor_id();
-} 
-
diff -urN linux-2.4.23-pre9/arch/x86_64/kernel/x8664_ksyms.c linux-2.4.23-rc1/arch/x86_64/kernel/x8664_ksyms.c
--- linux-2.4.23-pre9/arch/x86_64/kernel/x8664_ksyms.c	2003-11-10 11:26:21.000000000 -0800
+++ linux-2.4.23-rc1/arch/x86_64/kernel/x8664_ksyms.c	2003-11-10 11:26:24.000000000 -0800
@@ -95,6 +95,7 @@
 
 EXPORT_SYMBOL(pci_map_sg);
 EXPORT_SYMBOL(pci_unmap_sg);
+EXPORT_SYMBOL(bad_dma_address);
 
 #ifdef CONFIG_PCI
 EXPORT_SYMBOL(pcibios_penalize_isa_irq);
@@ -226,3 +227,5 @@
 EXPORT_SYMBOL_NOVERS(int_ret_from_sys_call); 
 
 EXPORT_SYMBOL(touch_nmi_watchdog);
+
+EXPORT_SYMBOL(do_fork);
diff -urN linux-2.4.23-pre9/arch/x86_64/mm/extable.c linux-2.4.23-rc1/arch/x86_64/mm/extable.c
--- linux-2.4.23-pre9/arch/x86_64/mm/extable.c	2002-11-28 15:53:12.000000000 -0800
+++ linux-2.4.23-rc1/arch/x86_64/mm/extable.c	2003-11-10 11:26:24.000000000 -0800
@@ -1,10 +1,11 @@
 /*
- * linux/arch/i386/mm/extable.c
+ * linux/arch/x86_64/mm/extable.c
  */
 
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/spinlock.h>
+#include <linux/init.h>
 #include <asm/uaccess.h>
 
 extern const struct exception_table_entry __start___ex_table[];
@@ -39,6 +40,10 @@
 	unsigned long ret = 0;
 	unsigned long flags;
 
+	/* Workaround for an Opteron issue */
+	if ((addr >> 32) == 0) 
+		addr |= 0xffffffffUL << 32; 
+
 #ifndef CONFIG_MODULES
 	/* There is only the kernel to search.  */
 	ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr);
diff -urN linux-2.4.23-pre9/drivers/char/agp/agpgart_be.c linux-2.4.23-rc1/drivers/char/agp/agpgart_be.c
--- linux-2.4.23-pre9/drivers/char/agp/agpgart_be.c	2003-11-10 11:26:21.000000000 -0800
+++ linux-2.4.23-rc1/drivers/char/agp/agpgart_be.c	2003-11-10 11:26:25.000000000 -0800
@@ -49,6 +49,7 @@
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/page.h>
+#include <asm/msr.h>
 
 #include <linux/agp_backend.h>
 #include "agp.h"
@@ -66,6 +67,7 @@
 EXPORT_SYMBOL(agp_backend_release);
 
 static void flush_cache(void);
+static int agp_init_one(struct pci_dev *dev);
 
 static struct agp_bridge_data agp_bridge;
 static int agp_try_unsupported __initdata = 0;
@@ -4811,7 +4813,7 @@
 
 static int nvidia_configure(void)
 {
-	int i, rc, num_dirs;
+	int i, num_dirs;
 	u32 apbase, aplimit;
 	aper_size_info_8 *current_size;
 	u32 temp;
@@ -6346,6 +6348,12 @@
 		"NVIDIA",
 		"nForce3/K8 On-CPU GART",
 		nvidia_x86_64_setup },
+	{ PCI_DEVICE_ID_NVIDIA_NFORCE3S,
+	  PCI_VENDOR_ID_NVIDIA,
+	  NVIDIA_NFORCE3,
+	  "NVIDIA",
+	  "nForce3S/K8 On-CPU GART",
+	  nvidia_x86_64_setup },
 #endif
 #ifdef CONFIG_AGP_NVIDIA
 	{ 0,
@@ -6489,15 +6497,24 @@
 static int __init agp_find_supported_device(void)
 {
 	struct pci_dev *dev = NULL;
-	u8 cap_ptr = 0x00;
+	int ret = -ENODEV;
 
 #ifdef CONFIG_AGP_HP_ZX1
 	if (hp_zx1_gart_init() == 0)
 		return 0;
 #endif
 
-	if ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) == NULL)
-		return -ENODEV;
+	while ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev)) != NULL) {
+		ret = agp_init_one(dev);
+		if (ret != -ENODEV)
+			break;
+	} 
+	return ret;
+}	
+
+static int __init agp_init_one(struct pci_dev *dev)
+{
+	u8 cap_ptr = 0x00;
 
 	agp_bridge.dev = dev;
 
diff -urN linux-2.4.23-pre9/drivers/hotplug/Config.in linux-2.4.23-rc1/drivers/hotplug/Config.in
--- linux-2.4.23-pre9/drivers/hotplug/Config.in	2003-08-25 04:44:41.000000000 -0700
+++ linux-2.4.23-rc1/drivers/hotplug/Config.in	2003-11-10 11:26:25.000000000 -0800
@@ -11,7 +11,7 @@
 if [ "$CONFIG_X86_IO_APIC" = "y" ]; then
    dep_tristate '  IBM PCI Hotplug driver' CONFIG_HOTPLUG_PCI_IBM $CONFIG_HOTPLUG_PCI $CONFIG_X86_IO_APIC $CONFIG_X86
 fi
-if [ "$CONFIG_ACPI_INTERPRETER" ]; then
+if [ "$CONFIG_ACPI_INTERPRETER" = "y" ]; then
    dep_tristate '  ACPI PCI Hotplug driver' CONFIG_HOTPLUG_PCI_ACPI $CONFIG_HOTPLUG_PCI
 fi
 endmenu
diff -urN linux-2.4.23-pre9/drivers/media/video/meye.c linux-2.4.23-rc1/drivers/media/video/meye.c
--- linux-2.4.23-pre9/drivers/media/video/meye.c	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/media/video/meye.c	2003-11-10 11:26:25.000000000 -0800
@@ -862,7 +862,7 @@
 /* Interrupt handling                                                       */
 /****************************************************************************/
 
-static void meye_irq(int irq, void *dev_id, struct pt_regs *regs) {
+static irqreturn_t meye_irq(int irq, void *dev_id, struct pt_regs *regs) {
 	u32 v;
 	int reqnr;
 	v = mchip_read(MCHIP_MM_INTA);
@@ -870,7 +870,7 @@
 	while (1) {
 		v = mchip_get_frame();
 		if (!(v & MCHIP_MM_FIR_RDY))
-			return;
+			return IRQ_NONE;
 		switch (meye.mchip_mode) {
 
 		case MCHIP_HIC_MODE_CONT_OUT:
@@ -903,11 +903,12 @@
 
 		default:
 			/* do not free frame, since it can be a snap */
-			return;
+			return IRQ_NONE;
 		} /* switch */
 
 		mchip_free_frame();
 	}
+	return IRQ_HANDLED;
 }
 
 /****************************************************************************/
@@ -1252,6 +1253,7 @@
 	.type		= VID_TYPE_CAPTURE,
 	.hardware	= VID_HARDWARE_MEYE,
 	.fops		= &meye_fops,
+	.release	= video_device_release,
 	.minor		= -1,
 };
 
@@ -1304,7 +1306,7 @@
 	}
 
 	meye.mchip_dev = pcidev;
-	meye.video_dev = kmalloc(sizeof(struct video_device), GFP_KERNEL);
+	meye.video_dev = video_device_alloc();
 	if (!meye.video_dev) {
 		printk(KERN_ERR "meye: video_device_alloc() failed!\n");
 		ret = -EBUSY;
@@ -1417,7 +1419,7 @@
 out3:
 	pci_disable_device(meye.mchip_dev);
 out2:
-	kfree(meye.video_dev);
+	video_device_release(meye.video_dev);
 	meye.video_dev = NULL;
 
 	sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0);
diff -urN linux-2.4.23-pre9/drivers/media/video/meye.h linux-2.4.23-rc1/drivers/media/video/meye.h
--- linux-2.4.23-pre9/drivers/media/video/meye.h	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/media/video/meye.h	2003-11-10 11:26:25.000000000 -0800
@@ -31,13 +31,11 @@
 #define _MEYE_PRIV_H_
 
 #define MEYE_DRIVER_MAJORVERSION	1
-#define MEYE_DRIVER_MINORVERSION	7
+#define MEYE_DRIVER_MINORVERSION	8
 
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/pci.h>
-#include <linux/sonypi.h>
-#include <linux/meye.h>
 
 /****************************************************************************/
 /* Motion JPEG chip registers                                               */
diff -urN linux-2.4.23-pre9/drivers/net/8139cp.c linux-2.4.23-rc1/drivers/net/8139cp.c
--- linux-2.4.23-pre9/drivers/net/8139cp.c	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/net/8139cp.c	2003-11-10 11:26:25.000000000 -0800
@@ -615,8 +615,8 @@
 		if (cpr16(IntrStatus) & cp_rx_intr_mask)
 			goto rx_status_loop;
 
-		cpw16_f(IntrMask, cp_intr_mask);
 		netif_rx_complete(dev);
+		cpw16_f(IntrMask, cp_intr_mask);
 
 		return 0;	/* done */
 	}
diff -urN linux-2.4.23-pre9/drivers/net/b44.c linux-2.4.23-rc1/drivers/net/b44.c
--- linux-2.4.23-pre9/drivers/net/b44.c	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/net/b44.c	2003-11-10 11:26:25.000000000 -0800
@@ -25,8 +25,8 @@
 
 #define DRV_MODULE_NAME		"b44"
 #define PFX DRV_MODULE_NAME	": "
-#define DRV_MODULE_VERSION	"0.91"
-#define DRV_MODULE_RELDATE	"Oct 3, 2003"
+#define DRV_MODULE_VERSION	"0.92"
+#define DRV_MODULE_RELDATE	"Nov 4, 2003"
 
 #define B44_DEF_MSG_ENABLE	  \
 	(NETIF_MSG_DRV		| \
@@ -942,6 +942,8 @@
 	b44_init_hw(bp);
 	spin_unlock_irq(&bp->lock);
 
+	b44_enable_ints(bp);
+	
 	return 0;
 }
 
@@ -1558,6 +1560,8 @@
 		netif_wake_queue(bp->dev);
 		spin_unlock_irq(&bp->lock);
 
+		b44_enable_ints(bp);
+		
 		return 0;
 	}
 	case ETHTOOL_GPAUSEPARAM: {
@@ -1601,6 +1605,8 @@
 		}
 		spin_unlock_irq(&bp->lock);
 
+		b44_enable_ints(bp);
+		
 		return 0;
 	}
 	};
@@ -1852,11 +1858,56 @@
 	}
 }
 
+static int b44_suspend(struct pci_dev *pdev, u32 state)
+{
+	struct net_device *dev = pci_get_drvdata(pdev);
+	struct b44 *bp = dev->priv;
+
+        if (!netif_running(dev))
+                 return 0;
+
+	del_timer_sync(&bp->timer);
+
+	spin_lock_irq(&bp->lock); 
+
+	b44_halt(bp);
+	netif_carrier_off(bp->dev); 
+	netif_device_detach(bp->dev);
+	b44_free_rings(bp);
+
+	spin_unlock_irq(&bp->lock);
+	return 0;
+}
+
+static int b44_resume(struct pci_dev *pdev)
+{
+	struct net_device *dev = pci_get_drvdata(pdev);
+	struct b44 *bp = dev->priv;
+
+	if (!netif_running(dev))
+		return 0;
+
+	spin_lock_irq(&bp->lock);
+
+	b44_init_rings(bp);
+	b44_init_hw(bp);
+	netif_device_attach(bp->dev);
+	spin_unlock_irq(&bp->lock);
+
+	bp->timer.expires = jiffies + HZ;
+	add_timer(&bp->timer);
+
+	b44_enable_ints(bp);
+	return 0;
+}
+
 static struct pci_driver b44_driver = {
 	.name		= DRV_MODULE_NAME,
 	.id_table	= b44_pci_tbl,
 	.probe		= b44_init_one,
 	.remove		= __devexit_p(b44_remove_one),
+        .suspend        = b44_suspend,
+        .resume         = b44_resume,
 };
 
 static int __init b44_init(void)
diff -urN linux-2.4.23-pre9/drivers/net/e100/e100_config.c linux-2.4.23-rc1/drivers/net/e100/e100_config.c
--- linux-2.4.23-pre9/drivers/net/e100/e100_config.c	2003-06-13 07:51:34.000000000 -0700
+++ linux-2.4.23-rc1/drivers/net/e100/e100_config.c	2003-11-10 11:26:25.000000000 -0800
@@ -60,7 +60,7 @@
  * All other init functions will only set values that are
  * different from the 82557 default.
  */
-static void __devinit
+void __devinit
 e100_config_init_82557(struct e100_private *bdp)
 {
 	/* initialize config block */
diff -urN linux-2.4.23-pre9/drivers/net/e100/e100_config.h linux-2.4.23-rc1/drivers/net/e100/e100_config.h
--- linux-2.4.23-pre9/drivers/net/e100/e100_config.h	2003-06-13 07:51:34.000000000 -0700
+++ linux-2.4.23-rc1/drivers/net/e100/e100_config.h	2003-11-10 11:26:25.000000000 -0800
@@ -151,6 +151,7 @@
 
 /* function prototypes */
 extern void e100_config_init(struct e100_private *bdp);
+extern void e100_config_init_82557(struct e100_private *bdp);
 extern unsigned char e100_force_config(struct e100_private *bdp);
 extern unsigned char e100_config(struct e100_private *bdp);
 extern void e100_config_fc(struct e100_private *bdp);
diff -urN linux-2.4.23-pre9/drivers/net/e100/e100_main.c linux-2.4.23-rc1/drivers/net/e100/e100_main.c
--- linux-2.4.23-pre9/drivers/net/e100/e100_main.c	2003-08-25 04:44:42.000000000 -0700
+++ linux-2.4.23-rc1/drivers/net/e100/e100_main.c	2003-11-10 11:26:25.000000000 -0800
@@ -46,7 +46,13 @@
 
 /* Change Log
  * 
- * 2.3.18       07/08/03
+ * 2.3.30       09/21/03
+ * o Bug fix (Bugzilla 97908): Loading e100 was causing crash on Itanium2
+ *   with HP chipset
+ * o Bug fix (Bugzilla 101583): e100 can't pass traffic with ipv6
+ * o Bug fix (Bugzilla 101360): PRO/10+ can't pass traffic
+ * 
+ * 2.3.27       08/08/03
  * o Bug fix: read skb->len after freeing skb
  *   [Andrew Morton] akpm@zip.com.au
  * o Bug fix: 82557 (with National PHY) timeout during init
@@ -54,24 +60,6 @@
  * o Feature add: allow to change Wake On LAN when EEPROM disabled
  * 
  * 2.3.13       05/08/03
- * o Feature remove: /proc/net/PRO_LAN_Adapters support gone completely
- * o Feature remove: IDIAG support (use ethtool -t instead)
- * o Cleanup: fixed spelling mistakes found by community
- * o Feature add: ethtool cable diag test
- * o Feature add: ethtool parameter support (ring size, xsum, flow ctrl)
- * o Cleanup: move e100_asf_enable under CONFIG_PM to avoid warning
- *   [Stephen Rothwell (sfr@canb.auug.org.au)]
- * o Bug fix: don't call any netif_carrier_* until netdev registered.
- *   [Andrew Morton (akpm@digeo.com)]
- * o Cleanup: replace (skb->len - skb->data_len) with skb_headlen(skb)
- *   [jmorris@intercode.com.au]
- * o Bug fix: cleanup of Tx skbs after running ethtool diags
- * o Bug fix: incorrect reporting of ethtool diag overall results
- * o Bug fix: must hold xmit_lock before stopping queue in ethtool
- *   operations that require reset h/w and driver structures.
- * o Bug fix: statistic command failure would stop statistic collection.
- * 
- * 2.2.21	02/11/03
  */
  
 #include <linux/config.h>
@@ -137,7 +125,7 @@
 static inline void e100_tx_skb_free(struct e100_private *bdp, tcb_t *tcb);
 /* Global Data structures and variables */
 char e100_copyright[] __devinitdata = "Copyright (c) 2003 Intel Corporation";
-char e100_driver_version[]="2.3.18-k1";
+char e100_driver_version[]="2.3.30-k1";
 const char *e100_full_driver_name = "Intel(R) PRO/100 Network Driver";
 char e100_short_driver_name[] = "e100";
 static int e100nics = 0;
@@ -184,7 +172,7 @@
 static int e100_set_mac(struct net_device *, void *);
 struct net_device_stats *e100_get_stats(struct net_device *);
 
-static void e100intr(int, void *, struct pt_regs *);
+static irqreturn_t e100intr(int, void *, struct pt_regs *);
 static void e100_print_brd_conf(struct e100_private *);
 static void e100_set_multi(struct net_device *);
 
@@ -583,10 +571,6 @@
 
 	pci_set_drvdata(pcid, dev);
 
-	if ((rc = e100_alloc_space(bdp)) != 0) {
-		goto err_dev;
-	}
-
 	bdp->flags = 0;
 	bdp->ifs_state = 0;
 	bdp->ifs_value = 0;
@@ -603,7 +587,11 @@
 	bdp->watchdog_timer.function = (void *) &e100_watchdog;
 
 	if ((rc = e100_pci_setup(pcid, bdp)) != 0) {
-		goto err_dealloc;
+		goto err_dev;
+	}
+
+	if ((rc = e100_alloc_space(bdp)) != 0) {
+		goto err_pci;
 	}
 
 	if (((bdp->pdev->device > 0x1030)
@@ -644,11 +632,11 @@
 	dev->do_ioctl = &e100_ioctl;
 
 	if (bdp->flags & USE_IPCB)
-	dev->features = NETIF_F_SG | NETIF_F_HW_CSUM |
+	dev->features = NETIF_F_SG | NETIF_F_IP_CSUM |
 			NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
 		
 	if ((rc = register_netdev(dev)) != 0) {
-		goto err_pci;
+		goto err_dealloc;
 	}
 
 	e100_check_options(e100nics, bdp);
@@ -699,12 +687,12 @@
 
 err_unregister_netdev:
 	unregister_netdev(dev);
+err_dealloc:
+	e100_dealloc_space(bdp);
 err_pci:
 	iounmap(bdp->scb);
 	pci_release_regions(pcid);
 	pci_disable_device(pcid);
-err_dealloc:
-	e100_dealloc_space(bdp);
 err_dev:
 	pci_set_drvdata(pcid, NULL);
 	kfree(dev);
@@ -1403,6 +1391,9 @@
 		bdp->flags |= DF_UCODE_LOADED;
 	}
 
+	if ((u8) bdp->rev_id < D101A4_REV_ID)
+		e100_config_init_82557(bdp);
+		
 	if (!e100_config(bdp))
 		goto err;
 
@@ -1845,7 +1836,7 @@
  * the RX & TX queues & starts the RU if it has stopped due
  * to no resources.
  */
-void
+irqreturn_t
 e100intr(int irq, void *dev_inst, struct pt_regs *regs)
 {
 	struct net_device *dev;
@@ -1858,7 +1849,7 @@
 	intr_status = readw(&bdp->scb->scb_status);
 	/* If not my interrupt, just return */
 	if (!(intr_status & SCB_STATUS_ACK_MASK) || (intr_status == 0xffff)) {
-		return;
+		return IRQ_NONE;
 	}
 
 	/* disable and ack intr */
@@ -1867,7 +1858,7 @@
 	/* the device is closed, don't continue or else bad things may happen. */
 	if (!netif_running(dev)) {
 		e100_set_intr_mask(bdp);
-		return;
+		return IRQ_NONE;
 	}
 
 	/* SWI intr (triggered by watchdog) is signal to allocate new skb buffers */
@@ -1885,6 +1876,7 @@
 		e100_tx_srv(bdp);
 
 	e100_set_intr_mask(bdp);
+	return IRQ_HANDLED;
 }
 
 /**
diff -urN linux-2.4.23-pre9/drivers/net/e1000/e1000.h linux-2.4.23-rc1/drivers/net/e1000/e1000.h
--- linux-2.4.23-pre9/drivers/net/e1000/e1000.h	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/net/e1000/e1000.h	2003-11-10 11:26:25.000000000 -0800
@@ -107,11 +107,11 @@
 #define E1000_TX_HEAD_ADDR_SHIFT 7
 #define E1000_PBA_TX_MASK 0xFFFF0000
 
-/* Flow Control High-Watermark: 43464 bytes */
-#define E1000_FC_HIGH_THRESH 0xA9C8
+/* Flow Control High-Watermark: 5688 bytes below Rx FIFO size */
+#define E1000_FC_HIGH_DIFF 0x1638
 
-/* Flow Control Low-Watermark: 43456 bytes */
-#define E1000_FC_LOW_THRESH 0xA9C0
+/* Flow Control Low-Watermark: 5696 bytes below Rx FIFO size */
+#define E1000_FC_LOW_DIFF 0x1640
 
 /* Flow Control Pause Time: 858 usec */
 #define E1000_FC_PAUSE_TIME 0x0680
diff -urN linux-2.4.23-pre9/drivers/net/e1000/e1000_ethtool.c linux-2.4.23-rc1/drivers/net/e1000/e1000_ethtool.c
--- linux-2.4.23-pre9/drivers/net/e1000/e1000_ethtool.c	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/net/e1000/e1000_ethtool.c	2003-11-10 11:26:26.000000000 -0800
@@ -230,11 +230,15 @@
 
 	hw->original_fc = hw->fc;
 
-	if(netif_running(adapter->netdev)) {
-		e1000_down(adapter);
-		e1000_up(adapter);
-	} else
-		e1000_reset(adapter);
+	if(adapter->fc_autoneg == AUTONEG_ENABLE) {
+		if(netif_running(adapter->netdev)) {
+			e1000_down(adapter);
+			e1000_up(adapter);
+		} else
+			e1000_reset(adapter);
+	}
+	else
+		return e1000_force_mac_fc(hw);
 	
 	return 0;
 }
diff -urN linux-2.4.23-pre9/drivers/net/e1000/e1000_hw.c linux-2.4.23-rc1/drivers/net/e1000/e1000_hw.c
--- linux-2.4.23-pre9/drivers/net/e1000/e1000_hw.c	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/net/e1000/e1000_hw.c	2003-11-10 11:26:26.000000000 -0800
@@ -66,7 +66,6 @@
 static int32_t e1000_id_led_init(struct e1000_hw * hw);
 static int32_t e1000_set_vco_speed(struct e1000_hw *hw);
 
-
 /* IGP cable length table */
 static const
 uint16_t e1000_igp_cable_length_table[IGP01E1000_AGC_LENGTH_TABLE_SIZE] =
@@ -79,6 +78,7 @@
       100, 100, 100, 100, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
       110, 110, 110, 110, 110, 110, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120};
 
+
 /******************************************************************************
  * Set the phy type member in the hw struct.
  *
@@ -836,18 +836,16 @@
         if(i == (LINK_UP_TIMEOUT / 10)) {
             DEBUGOUT("Never got a valid link from auto-neg!!!\n");
             hw->autoneg_failed = 1;
-            if(hw->media_type == e1000_media_type_fiber) {
-                /* AutoNeg failed to achieve a link, so we'll call
-                 * e1000_check_for_link. This routine will force the link up if
-                 * we detect a signal. This will allow us to communicate with
-                 * non-autonegotiating link partners.
-                 */
-                if((ret_val = e1000_check_for_link(hw))) {
-                    DEBUGOUT("Error while checking for link\n");
-                    return ret_val;
-                }
-                hw->autoneg_failed = 0;
+            /* AutoNeg failed to achieve a link, so we'll call
+             * e1000_check_for_link. This routine will force the link up if
+             * we detect a signal. This will allow us to communicate with
+             * non-autonegotiating link partners.
+             */
+            if((ret_val = e1000_check_for_link(hw))) {
+                DEBUGOUT("Error while checking for link\n");
+                return ret_val;
             }
+            hw->autoneg_failed = 0;
         } else {
             hw->autoneg_failed = 0;
             DEBUGOUT("Valid Link Found\n");
@@ -1456,10 +1454,10 @@
     }
 
     /* Write back the modified PHY MII control register. */
-    udelay(1);
     if((ret_val = e1000_write_phy_reg(hw, PHY_CTRL, mii_ctrl_reg)))
         return ret_val;
 
+    udelay(1);
 
     /* The wait_autoneg_complete flag may be a little misleading here.
      * Since we are forcing speed and duplex, Auto-Neg is not enabled.
@@ -1865,11 +1863,12 @@
              * be asked to delay transmission of packets than asking
              * our link partner to pause transmission of frames.
              */
-            else if(hw->original_fc == e1000_fc_none ||
-                    hw->original_fc == e1000_fc_tx_pause) {
+            else if((hw->original_fc == e1000_fc_none ||
+                     hw->original_fc == e1000_fc_tx_pause) ||
+                    hw->fc_strict_ieee) {
                 hw->fc = e1000_fc_none;
                 DEBUGOUT("Flow Control = NONE.\r\n");
-            } else if(!hw->fc_strict_ieee) {
+            } else {
                 hw->fc = e1000_fc_rx_pause;
                 DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n");
             }
@@ -2045,9 +2044,10 @@
      * auto-negotiation time to complete, in case the cable was just plugged
      * in. The autoneg_failed flag does this.
      */
-    else if((hw->media_type == e1000_media_type_fiber) &&
+    else if((((hw->media_type == e1000_media_type_fiber) &&
+            ((ctrl & E1000_CTRL_SWDPIN1) == signal)) ||
+            (hw->media_type == e1000_media_type_internal_serdes)) &&
             (!(status & E1000_STATUS_LU)) &&
-            ((ctrl & E1000_CTRL_SWDPIN1) == signal) &&
             (!(rxcw & E1000_RXCW_C))) {
         if(hw->autoneg_failed == 0) {
             hw->autoneg_failed = 1;
@@ -2074,7 +2074,8 @@
      * Device Control register in an attempt to auto-negotiate with our link
      * partner.
      */
-    else if((hw->media_type == e1000_media_type_fiber) &&
+    else if(((hw->media_type == e1000_media_type_fiber) ||
+             (hw->media_type == e1000_media_type_internal_serdes)) &&
               (ctrl & E1000_CTRL_SLU) &&
               (rxcw & E1000_RXCW_C)) {
         DEBUGOUT("RXing /C/, enable AutoNeg and stop forcing link.\r\n");
@@ -2480,8 +2481,8 @@
         E1000_WRITE_REG(hw, MDIC, mdic);
 
         /* Poll the ready bit to see if the MDI read completed */
-        for(i = 0; i < 64; i++) {
-            udelay(50);
+        for(i = 0; i < 640; i++) {
+            udelay(5);
             mdic = E1000_READ_REG(hw, MDIC);
             if(mdic & E1000_MDIC_READY) break;
         }
@@ -3497,10 +3498,12 @@
     if (e1000_acquire_eeprom(hw) != E1000_SUCCESS)
         return -E1000_ERR_EEPROM;
 
-    if(eeprom->type == e1000_eeprom_microwire)
+    if(eeprom->type == e1000_eeprom_microwire) {
         status = e1000_write_eeprom_microwire(hw, offset, words, data);
-    else
+    } else {
         status = e1000_write_eeprom_spi(hw, offset, words, data);
+        msec_delay(10);
+    }
 
     /* Done with writing */
     e1000_release_eeprom(hw);
@@ -3718,12 +3721,9 @@
         hw->perm_mac_addr[i+1] = (uint8_t) (eeprom_data >> 8);
     }
     if(((hw->mac_type == e1000_82546) || (hw->mac_type == e1000_82546_rev_3)) &&
-       (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) {
-        if(hw->perm_mac_addr[5] & 0x01)
-            hw->perm_mac_addr[5] &= ~(0x01);
-        else
-            hw->perm_mac_addr[5] |= 0x01;
-    }
+       (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1))
+            hw->perm_mac_addr[5] ^= 0x01;
+
     for(i = 0; i < NODE_ADDRESS_SIZE; i++)
         hw->mac_addr[i] = hw->perm_mac_addr[i];
     return E1000_SUCCESS;
diff -urN linux-2.4.23-pre9/drivers/net/e1000/e1000_hw.h linux-2.4.23-rc1/drivers/net/e1000/e1000_hw.h
--- linux-2.4.23-pre9/drivers/net/e1000/e1000_hw.h	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/net/e1000/e1000_hw.h	2003-11-10 11:26:26.000000000 -0800
@@ -995,7 +995,6 @@
     uint32_t ledctl_mode1;
     uint32_t ledctl_mode2;
     uint16_t phy_spd_default;
-    uint16_t dsp_reset_counter;
     uint16_t autoneg_advertised;
     uint16_t pci_cmd_word;
     uint16_t fc_high_water;
@@ -2109,5 +2108,4 @@
 #define AUTONEG_ADVERTISE_10_100_ALL    0x000F /* All 10/100 speeds*/
 #define AUTONEG_ADVERTISE_10_ALL        0x0003 /* 10Mbps Full & Half speeds*/
 
-
 #endif /* _E1000_HW_H_ */
diff -urN linux-2.4.23-pre9/drivers/net/e1000/e1000_main.c linux-2.4.23-rc1/drivers/net/e1000/e1000_main.c
--- linux-2.4.23-pre9/drivers/net/e1000/e1000_main.c	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/net/e1000/e1000_main.c	2003-11-10 11:26:26.000000000 -0800
@@ -30,6 +30,19 @@
 
 /* Change Log
  *
+ * 5.2.20	9/30/03
+ *   o Bug fix: SERDES devices might be connected to a back-plane
+ *     switch that doesn't support auto-neg, so add the capability
+ *     to force 1000/Full.
+ *   o Bug fix: Flow control settings for hi/lo watermark didn't
+ *     consider changes in the Rx FIFO size, which could occur with
+ *     Jumbo Frames or with the reduced FIFO in 82547.
+ *   o Better propagation of error codes. [Janice Girouard 
+ *     (janiceg@us.ibm.com)].
+ *   o Bug fix: hang under heavy Tx stress when running out of Tx
+ *     descriptors; wasn't clearing context descriptor when backing
+ *     out of send because of no-resource condition.
+ *
  * 5.2.16	8/8/03
  *   o Added support for new controllers: 82545GM, 82546GB, 82541/7_B1
  *   o Bug fix: reset h/w before first EEPROM read because we don't know
@@ -47,19 +60,11 @@
  *   o Feature: Increase default Tx Descriptor count to 1024 for >= 82544.
  *   
  * 5.1.13	5/28/03
- *   o Bug fix: request_irq() failure resulted in freeing resources twice!
- *     [Don Fry (brazilnut@us.ibm.com)]
- *   o Bug fix: fix VLAN support on ppc64 [Mark Rakes (mrakes@vivato.net)]
- *   o Bug fix: missing Tx cleanup opportunities during interrupt handling.
- *   o Bug fix: alloc_etherdev failure didn't cleanup regions in probe.
- *   o Cleanup: s/int/unsigned int/ for descriptor ring indexes.
- *   
- * 5.1.11	5/6/03
  */
 
 char e1000_driver_name[] = "e1000";
 char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
-char e1000_driver_version[] = "5.2.16-k2";
+char e1000_driver_version[] = "5.2.20-k1";
 char e1000_copyright[] = "Copyright (c) 1999-2003 Intel Corporation.";
 
 /* e1000_pci_tbl - PCI Device ID Table
@@ -250,6 +255,7 @@
 e1000_up(struct e1000_adapter *adapter)
 {
 	struct net_device *netdev = adapter->netdev;
+	int err;
 
 	/* hardware has been reset, we need to reload some things */
 
@@ -262,9 +268,10 @@
 	e1000_configure_rx(adapter);
 	e1000_alloc_rx_buffers(adapter);
 
-	if(request_irq(netdev->irq, &e1000_intr, SA_SHIRQ | SA_SAMPLE_RANDOM,
-		       netdev->name, netdev))
-		return -1;
+	if((err = request_irq(netdev->irq, &e1000_intr,
+		              SA_SHIRQ | SA_SAMPLE_RANDOM,
+		              netdev->name, netdev)))
+		return err;
 
 	mod_timer(&adapter->watchdog_timer, jiffies);
 	e1000_irq_enable(adapter);
@@ -318,7 +325,13 @@
 	}
 	E1000_WRITE_REG(&adapter->hw, PBA, pba);
 
+	/* flow control settings */
+	adapter->hw.fc_high_water = pba - E1000_FC_HIGH_DIFF;
+	adapter->hw.fc_low_water = pba - E1000_FC_LOW_DIFF;
+	adapter->hw.fc_pause_time = E1000_FC_PAUSE_TIME;
+	adapter->hw.fc_send_xon = 1;
 	adapter->hw.fc = adapter->hw.original_fc;
+
 	e1000_reset_hw(&adapter->hw);
 	if(adapter->hw.mac_type >= e1000_82544)
 		E1000_WRITE_REG(&adapter->hw, WUC, 0);
@@ -350,29 +363,32 @@
 	int mmio_len;
 	int pci_using_dac;
 	int i;
+	int err;
 	uint16_t eeprom_data;
 
-	if((i = pci_enable_device(pdev)))
-		return i;
+	if((err = pci_enable_device(pdev)))
+		return err;
 
-	if(!(i = pci_set_dma_mask(pdev, PCI_DMA_64BIT))) {
+	if(!(err = pci_set_dma_mask(pdev, PCI_DMA_64BIT))) {
 		pci_using_dac = 1;
 	} else {
-		if((i = pci_set_dma_mask(pdev, PCI_DMA_32BIT))) {
+		if((err = pci_set_dma_mask(pdev, PCI_DMA_32BIT))) {
 			E1000_ERR("No usable DMA configuration, aborting\n");
-			return i;
+			return err;
 		}
 		pci_using_dac = 0;
 	}
 
-	if((i = pci_request_regions(pdev, e1000_driver_name)))
-		return i;
+	if((err = pci_request_regions(pdev, e1000_driver_name)))
+		return err;
 
 	pci_set_master(pdev);
 
 	netdev = alloc_etherdev(sizeof(struct e1000_adapter));
-	if(!netdev)
+	if(!netdev) {
+		err = -ENOMEM;
 		goto err_alloc_etherdev;
+	}
 
 	SET_MODULE_OWNER(netdev);
 
@@ -386,8 +402,10 @@
 	mmio_len = pci_resource_len(pdev, BAR_0);
 
 	adapter->hw.hw_addr = ioremap(mmio_start, mmio_len);
-	if(!adapter->hw.hw_addr)
+	if(!adapter->hw.hw_addr) {
+		err = -EIO;
 		goto err_ioremap;
+	}
 
 	for(i = BAR_1; i <= BAR_5; i++) {
 		if(pci_resource_len(pdev, i) == 0)
@@ -425,7 +443,7 @@
 
 	/* setup the private structure */
 
-	if(e1000_sw_init(adapter))
+	if((err = e1000_sw_init(adapter)))
 		goto err_sw_init;
 
 	if(adapter->hw.mac_type >= e1000_82543) {
@@ -456,6 +474,7 @@
 
 	if(e1000_validate_eeprom_checksum(&adapter->hw) < 0) {
 		printk(KERN_ERR "The EEPROM Checksum Is Not Valid\n");
+		err = -EIO;
 		goto err_eeprom;
 	}
 
@@ -464,8 +483,10 @@
 	e1000_read_mac_addr(&adapter->hw);
 	memcpy(netdev->dev_addr, adapter->hw.mac_addr, netdev->addr_len);
 
-	if(!is_valid_ether_addr(netdev->dev_addr))
+	if(!is_valid_ether_addr(netdev->dev_addr)) {
+		err = -EIO;
 		goto err_eeprom;
+	}
 
 	e1000_read_part_num(&adapter->hw, &(adapter->part_num));
 
@@ -535,10 +556,10 @@
 err_eeprom:
 	iounmap(adapter->hw.hw_addr);
 err_ioremap:
-	kfree(netdev);
+	free_netdev(netdev);
 err_alloc_etherdev:
 	pci_release_regions(pdev);
-	return -ENOMEM;
+	return err;
 }
 
 /**
@@ -574,7 +595,7 @@
 	iounmap(adapter->hw.hw_addr);
 	pci_release_regions(pdev);
 
-	kfree(netdev);
+	free_netdev(netdev);
 }
 
 /**
@@ -613,20 +634,13 @@
 
 	if (e1000_set_mac_type(hw)) {
 		E1000_ERR("Unknown MAC Type\n");
-		return -1;
+		return -EIO;
 	}
 
 	/* initialize eeprom parameters */
 
 	e1000_init_eeprom_params(hw);
 
-	/* flow control settings */
-
-	hw->fc_high_water = E1000_FC_HIGH_THRESH;
-	hw->fc_low_water = E1000_FC_LOW_THRESH;
-	hw->fc_pause_time = E1000_FC_PAUSE_TIME;
-	hw->fc_send_xon = 1;
-
 	if((hw->mac_type == e1000_82541) ||
 	   (hw->mac_type == e1000_82547) ||
 	   (hw->mac_type == e1000_82541_rev_2) ||
@@ -675,18 +689,19 @@
 e1000_open(struct net_device *netdev)
 {
 	struct e1000_adapter *adapter = netdev->priv;
+	int err;
 
 	/* allocate transmit descriptors */
 
-	if(e1000_setup_tx_resources(adapter))
+	if((err = e1000_setup_tx_resources(adapter)))
 		goto err_setup_tx;
 
 	/* allocate receive descriptors */
 
-	if(e1000_setup_rx_resources(adapter))
+	if((err = e1000_setup_rx_resources(adapter)))
 		goto err_setup_rx;
 
-	if(e1000_up(adapter))
+	if((err = e1000_up(adapter)))
 		goto err_up;
 
 	return 0;
@@ -698,7 +713,7 @@
 err_setup_tx:
 	e1000_reset(adapter);
 
-	return -EBUSY;
+	return err;
 }
 
 /**
@@ -1536,19 +1551,24 @@
 	struct e1000_buffer *buffer_info;
 	unsigned int len = skb->len, max_per_txd = E1000_MAX_DATA_PER_TXD;
 	unsigned int offset = 0, size, count = 0, i;
+#ifdef NETIF_F_TSO
+	unsigned int mss;
+#endif
+	unsigned int nr_frags;
+	unsigned int f;
 
 #ifdef NETIF_F_TSO
-	unsigned int mss = skb_shinfo(skb)->tso_size;
+	mss = skb_shinfo(skb)->tso_size;
 	/* The controller does a simple calculation to 
 	 * make sure there is enough room in the FIFO before
 	 * initiating the DMA for each buffer.  The calc is:
 	 * 4 = ceil(buffer len/mss).  To make sure we don't
 	 * overrun the FIFO, adjust the max buffer len if mss
 	 * drops. */
-	if(mss) max_per_txd = min(mss << 2, max_per_txd);
+	if(mss)
+		max_per_txd = min(mss << 2, max_per_txd);
 #endif
-	unsigned int nr_frags = skb_shinfo(skb)->nr_frags;
-	unsigned int f;
+	nr_frags = skb_shinfo(skb)->nr_frags;
 	len -= skb->data_len;
 
 	i = tx_ring->next_to_use;
@@ -2333,7 +2353,7 @@
 
 /**
  * e1000_alloc_rx_buffers - Replace used receive buffers
- * @data: address of board private structure
+ * @adapter: address of board private structure
  **/
 
 static void
diff -urN linux-2.4.23-pre9/drivers/net/e1000/e1000_osdep.h linux-2.4.23-rc1/drivers/net/e1000/e1000_osdep.h
--- linux-2.4.23-pre9/drivers/net/e1000/e1000_osdep.h	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/net/e1000/e1000_osdep.h	2003-11-10 11:26:26.000000000 -0800
@@ -61,8 +61,6 @@
     TRUE = 1
 } boolean_t;
 
-#undef ASSERT
-#define ASSERT(x)	if(!(x)) BUG()
 #define MSGOUT(S, A, B)	printk(KERN_DEBUG S "\n", A, B)
 
 #if DBG
diff -urN linux-2.4.23-pre9/drivers/net/pcnet32.c linux-2.4.23-rc1/drivers/net/pcnet32.c
--- linux-2.4.23-pre9/drivers/net/pcnet32.c	2003-08-25 04:44:42.000000000 -0700
+++ linux-2.4.23-rc1/drivers/net/pcnet32.c	2003-11-10 11:26:26.000000000 -0800
@@ -1345,6 +1345,10 @@
 		if (!rx_in_place) {
 		    skb_reserve(skb,2); /* 16 byte align */
 		    skb_put(skb,pkt_len);	/* Make room */
+		    pci_dma_sync_single(lp->pci_dev,
+		                        lp->rx_dma_addr[entry],
+		                        PKT_BUF_SZ,
+		                        PCI_DMA_FROMDEVICE);
 		    eth_copy_and_sum(skb,
 				     (unsigned char *)(lp->rx_skbuff[entry]->tail),
 				     pkt_len,0);
diff -urN linux-2.4.23-pre9/drivers/net/tg3.c linux-2.4.23-rc1/drivers/net/tg3.c
--- linux-2.4.23-pre9/drivers/net/tg3.c	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/net/tg3.c	2003-11-10 11:26:26.000000000 -0800
@@ -55,8 +55,8 @@
 
 #define DRV_MODULE_NAME		"tg3"
 #define PFX DRV_MODULE_NAME	": "
-#define DRV_MODULE_VERSION	"2.2"
-#define DRV_MODULE_RELDATE	"August 24, 2003"
+#define DRV_MODULE_VERSION	"2.3"
+#define DRV_MODULE_RELDATE	"November 5, 2003"
 
 #define TG3_DEF_MAC_MODE	0
 #define TG3_DEF_RX_MODE		0
@@ -5934,6 +5934,10 @@
 					tp->link_config.phy_is_low_power)
 		return -EAGAIN;
 
+	spin_lock_irq(&tp->lock);
+	spin_lock(&tp->tx_lock);
+
+	tp->link_config.autoneg = cmd->autoneg;
 	if (cmd->autoneg == AUTONEG_ENABLE) {
 		tp->link_config.advertising = cmd->advertising;
 		tp->link_config.speed = SPEED_INVALID;
diff -urN linux-2.4.23-pre9/drivers/scsi/sg.c linux-2.4.23-rc1/drivers/scsi/sg.c
--- linux-2.4.23-pre9/drivers/scsi/sg.c	2003-06-13 07:51:36.000000000 -0700
+++ linux-2.4.23-rc1/drivers/scsi/sg.c	2003-11-10 11:26:27.000000000 -0800
@@ -871,6 +871,8 @@
     case SG_SET_RESERVED_SIZE:
         result = get_user(val, (int *)arg);
         if (result) return result;
+        if (val < 0)
+            return -EINVAL;
         if (val != sfp->reserve.bufflen) {
             if (sg_res_in_use(sfp) || sfp->mmap_called)
                 return -EBUSY;
diff -urN linux-2.4.23-pre9/drivers/usb/host/Config.in linux-2.4.23-rc1/drivers/usb/host/Config.in
--- linux-2.4.23-pre9/drivers/usb/host/Config.in	2003-11-10 11:26:22.000000000 -0800
+++ linux-2.4.23-rc1/drivers/usb/host/Config.in	2003-11-10 11:26:27.000000000 -0800
@@ -12,7 +12,7 @@
    define_bool CONFIG_USB_UHCI_ALT n
 fi
 dep_tristate '  OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support' CONFIG_USB_OHCI $CONFIG_USB
-if [ "$CONFIG_ARM" = "y" -o "$CONFIG_X86" = "y" ]; then
+if [ "$CONFIG_ARM" = "y" -o "$CONFIG_X86" = "y" -a "$CONFIG_X86_64" != "y" ]; then
    # Cypress embedded USB controller on StrongARM or on x86 in PC/104
    dep_tristate '  SL811HS Alternate (x86, StrongARM, isosynchronous mode)' CONFIG_USB_SL811HS_ALT $CONFIG_USB $CONFIG_EXPERIMENTAL
    dep_tristate '  SL811HS (x86, StrongARM) support, old driver' CONFIG_USB_SL811HS $CONFIG_USB $CONFIG_EXPERIMENTAL
diff -urN linux-2.4.23-pre9/fs/dquot.c linux-2.4.23-rc1/fs/dquot.c
--- linux-2.4.23-pre9/fs/dquot.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.23-rc1/fs/dquot.c	2003-11-10 11:26:27.000000000 -0800
@@ -392,6 +392,7 @@
 		 * is enough since if dquot is locked/modified it can't be
 		 * on the free list */
 		get_dquot_ref(dquot);
+		dqstats.lookups++;
 		if (dquot->dq_flags & DQ_LOCKED)
 			wait_on_dquot(dquot);
 		if (dquot_dirty(dquot))
@@ -622,7 +623,6 @@
 		dqput(dquot);
 		return NODQUOT;
 	}
-	++dquot->dq_referenced;
 	dqstats.lookups++;
 
 	return dquot;
@@ -642,7 +642,6 @@
 	if (dquot->dq_flags & DQ_LOCKED)
 		printk(KERN_ERR "VFS: dqduplicate(): Locked quota to be duplicated!\n");
 	get_dquot_dup_ref(dquot);
-	dquot->dq_referenced++;
 	dqstats.lookups++;
 
 	return dquot;
diff -urN linux-2.4.23-pre9/fs/inode.c linux-2.4.23-rc1/fs/inode.c
--- linux-2.4.23-pre9/fs/inode.c	2003-11-10 11:26:23.000000000 -0800
+++ linux-2.4.23-rc1/fs/inode.c	2003-11-10 11:26:27.000000000 -0800
@@ -947,6 +947,37 @@
 	
 }
 
+/**
+ *	ilookup - search for an inode in the inode cache
+ *	@sb:         super block of file system to search
+ *	@ino:        inode number to search for
+ *
+ *	If the inode is in the cache, the inode is returned with an
+ *	incremented reference count.
+ *
+ *	Otherwise, %NULL is returned.
+ *
+ *	This is almost certainly not the function you are looking for.
+ *	If you think you need to use this, consult an expert first.
+ */
+struct inode *ilookup(struct super_block *sb, unsigned long ino)
+{
+	struct list_head * head = inode_hashtable + hash(sb,ino);
+	struct inode * inode;
+
+	spin_lock(&inode_lock);
+	inode = find_inode(sb, ino, head, NULL, NULL);
+	if (inode) {
+		__iget(inode);
+		spin_unlock(&inode_lock);
+		wait_on_inode(inode);
+		return inode;
+	}
+	spin_unlock(&inode_lock);
+
+	return inode;
+}
+
 struct inode *igrab(struct inode *inode)
 {
 	spin_lock(&inode_lock);
diff -urN linux-2.4.23-pre9/fs/jffs2/dir.c linux-2.4.23-rc1/fs/jffs2/dir.c
--- linux-2.4.23-pre9/fs/jffs2/dir.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.23-rc1/fs/jffs2/dir.c	2003-11-10 11:26:27.000000000 -0800
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: dir.c,v 1.45.2.7 2002/08/26 15:30:18 dwmw2 Exp $
+ * $Id: dir.c,v 1.45.2.8 2003/11/02 13:51:17 dwmw2 Exp $
  *
  */
 
diff -urN linux-2.4.23-pre9/fs/jffs2/erase.c linux-2.4.23-rc1/fs/jffs2/erase.c
--- linux-2.4.23-pre9/fs/jffs2/erase.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.23-rc1/fs/jffs2/erase.c	2003-11-10 11:26:27.000000000 -0800
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: erase.c,v 1.24 2001/12/06 16:38:38 dwmw2 Exp $
+ * $Id: erase.c,v 1.24.2.1 2003/11/02 13:51:17 dwmw2 Exp $
  *
  */
 #include <linux/kernel.h>
diff -urN linux-2.4.23-pre9/fs/jffs2/file.c linux-2.4.23-rc1/fs/jffs2/file.c
--- linux-2.4.23-pre9/fs/jffs2/file.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.23-rc1/fs/jffs2/file.c	2003-11-10 11:26:27.000000000 -0800
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: file.c,v 1.58.2.6 2002/11/12 13:17:01 dwmw2 Exp $
+ * $Id: file.c,v 1.58.2.7 2003/11/02 13:51:17 dwmw2 Exp $
  *
  */
 
diff -urN linux-2.4.23-pre9/fs/jffs2/gc.c linux-2.4.23-rc1/fs/jffs2/gc.c
--- linux-2.4.23-pre9/fs/jffs2/gc.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.23-rc1/fs/jffs2/gc.c	2003-11-10 11:26:27.000000000 -0800
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: gc.c,v 1.52.2.5 2002/10/10 13:18:38 dwmw2 Exp $
+ * $Id: gc.c,v 1.52.2.7 2003/11/02 13:54:20 dwmw2 Exp $
  *
  */
 
@@ -109,8 +109,8 @@
 	struct jffs2_node_frag *frag;
 	struct jffs2_full_dnode *fn = NULL;
 	struct jffs2_full_dirent *fd;
+	struct jffs2_inode_cache *ic;
 	__u32 start = 0, end = 0, nrfrags = 0;
-	__u32 inum;
 	struct inode *inode;
 	int ret = 0;
 
@@ -162,16 +162,47 @@
 		goto eraseit_lock;
 	}
 						     
-	inum = jffs2_raw_ref_to_inum(raw);
-	D1(printk(KERN_DEBUG "Inode number is #%u\n", inum));
+	ic = jffs2_raw_ref_to_ic(raw);
+	D1(printk(KERN_DEBUG "Inode number is #%u\n", ic->ino));
 
 	spin_unlock_bh(&c->erase_completion_lock);
 
-	D1(printk(KERN_DEBUG "jffs2_garbage_collect_pass collecting from block @0x%08x. Node @0x%08x, ino #%u\n", jeb->offset, raw->flash_offset&~3, inum));
-
-	inode = iget(OFNI_BS_2SFFJ(c), inum);
+	D1(printk(KERN_DEBUG "jffs2_garbage_collect_pass collecting from block @0x%08x. Node @0x%08x, ino #%u\n", jeb->offset, raw->flash_offset&~3, ic->ino));
+	if (!ic->nlink) {
+		/* The inode has zero nlink but its nodes weren't yet marked
+		   obsolete. This has to be because we're still waiting for 
+		   the final (close() and) iput() to happen.
+
+		   There's a possibility that the final iput() could have 
+		   happened while we were contemplating. In order to ensure
+		   that we don't cause a new read_inode() (which would fail)
+		   for the inode in question, we use ilookup() in this case
+		   instead of iget().
+
+		   The nlink can't _become_ zero at this point because we're 
+		   holding the alloc_sem, and jffs2_do_unlink() would also
+		   need that while decrementing nlink on any inode.
+		*/
+		inode = ilookup(OFNI_BS_2SFFJ(c), ic->ino);
+		if (!inode) {
+			D1(printk(KERN_DEBUG "ilookup() failed for ino #%u; inode is probably deleted.\n",
+				  ic->ino));
+			up(&c->alloc_sem);
+			return 0;
+		}
+	} else {
+		/* Inode has links to it still; they're not going away because
+		   jffs2_do_unlink() would need the alloc_sem and we have it.
+		   Just iget() it, and if read_inode() is necessary that's OK.
+		*/
+		inode = iget(OFNI_BS_2SFFJ(c), ic->ino);
+		if (!inode) {
+			up(&c->alloc_sem);
+			return -ENOMEM;
+		}
+	}
 	if (is_bad_inode(inode)) {
-		printk(KERN_NOTICE "Eep. read_inode() failed for ino #%u\n", inum);
+		printk(KERN_NOTICE "Eep. read_inode() failed for ino #%u\n", ic->ino);
 		/* NB. This will happen again. We need to do something appropriate here. */
 		up(&c->alloc_sem);
 		iput(inode);
diff -urN linux-2.4.23-pre9/fs/jffs2/nodelist.h linux-2.4.23-rc1/fs/jffs2/nodelist.h
--- linux-2.4.23-pre9/fs/jffs2/nodelist.h	2003-06-13 07:51:37.000000000 -0700
+++ linux-2.4.23-rc1/fs/jffs2/nodelist.h	2003-11-10 11:26:27.000000000 -0800
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: nodelist.h,v 1.46.2.4 2003/02/24 21:49:33 dwmw2 Exp $
+ * $Id: nodelist.h,v 1.46.2.5 2003/11/02 13:54:20 dwmw2 Exp $
  *
  */
 
@@ -232,13 +232,13 @@
 
 #define PAD(x) (((x)+3)&~3)
 
-static inline int jffs2_raw_ref_to_inum(struct jffs2_raw_node_ref *raw)
+static inline struct jffs2_inode_cache *jffs2_raw_ref_to_ic(struct jffs2_raw_node_ref *raw)
 {
 	while(raw->next_in_ino) {
 		raw = raw->next_in_ino;
 	}
 
-	return ((struct jffs2_inode_cache *)raw)->ino;
+	return ((struct jffs2_inode_cache *)raw);
 }
 
 /* nodelist.c */
diff -urN linux-2.4.23-pre9/fs/jffs2/read.c linux-2.4.23-rc1/fs/jffs2/read.c
--- linux-2.4.23-pre9/fs/jffs2/read.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.23-rc1/fs/jffs2/read.c	2003-11-10 11:26:27.000000000 -0800
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: read.c,v 1.13.2.1 2002/02/01 23:32:33 dwmw2 Exp $
+ * $Id: read.c,v 1.13.2.2 2003/11/02 13:51:18 dwmw2 Exp $
  *
  */
 
diff -urN linux-2.4.23-pre9/fs/jffs2/readinode.c linux-2.4.23-rc1/fs/jffs2/readinode.c
--- linux-2.4.23-pre9/fs/jffs2/readinode.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.23-rc1/fs/jffs2/readinode.c	2003-11-10 11:26:27.000000000 -0800
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: readinode.c,v 1.58.2.6 2002/10/10 13:18:38 dwmw2 Exp $
+ * $Id: readinode.c,v 1.58.2.8 2003/11/02 13:54:20 dwmw2 Exp $
  *
  */
 
@@ -468,23 +468,12 @@
 	struct jffs2_node_frag *frag, *frags;
 	struct jffs2_full_dirent *fd, *fds;
 	struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
-        /* I don't think we care about the potential race due to reading this
-           without f->sem. It can never get undeleted. */
-        int deleted = f->inocache && !f->inocache->nlink;
+        int deleted;
 
 	D1(printk(KERN_DEBUG "jffs2_clear_inode(): ino #%lu mode %o\n", inode->i_ino, inode->i_mode));
 
-	/* If it's a deleted inode, grab the alloc_sem. This prevents
-	   jffs2_garbage_collect_pass() from deciding that it wants to
-	   garbage collect one of the nodes we're just about to mark 
-	   obsolete -- by the time we drop alloc_sem and return, all
-	   the nodes are marked obsolete, and jffs2_g_c_pass() won't
-	   call iget() for the inode in question.
-	*/
-	if (deleted)
-		down(&c->alloc_sem);
-
 	down(&f->sem);
+	deleted = f->inocache && !f->inocache->nlink;
 
 	frags = f->fraglist;
 	fds = f->dents;
@@ -515,8 +504,5 @@
 	}
 
 	up(&f->sem);
-
-	if(deleted)
-		up(&c->alloc_sem);
 };
 
diff -urN linux-2.4.23-pre9/fs/jffs2/scan.c linux-2.4.23-rc1/fs/jffs2/scan.c
--- linux-2.4.23-pre9/fs/jffs2/scan.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.23-rc1/fs/jffs2/scan.c	2003-11-10 11:26:27.000000000 -0800
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: scan.c,v 1.51.2.3 2002/07/25 20:49:06 dwmw2 Exp $
+ * $Id: scan.c,v 1.51.2.4 2003/11/02 13:51:18 dwmw2 Exp $
  *
  */
 #include <linux/kernel.h>
diff -urN linux-2.4.23-pre9/fs/jffs2/write.c linux-2.4.23-rc1/fs/jffs2/write.c
--- linux-2.4.23-pre9/fs/jffs2/write.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.23-rc1/fs/jffs2/write.c	2003-11-10 11:26:27.000000000 -0800
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: write.c,v 1.30.2.1 2002/08/08 08:36:31 dwmw2 Exp $
+ * $Id: write.c,v 1.30.2.2 2003/11/02 13:51:18 dwmw2 Exp $
  *
  */
 
diff -urN linux-2.4.23-pre9/fs/jfs/namei.c linux-2.4.23-rc1/fs/jfs/namei.c
--- linux-2.4.23-pre9/fs/jfs/namei.c	2003-11-10 11:26:23.000000000 -0800
+++ linux-2.4.23-rc1/fs/jfs/namei.c	2003-11-10 11:26:27.000000000 -0800
@@ -772,6 +772,11 @@
 		goto out;
 	}
 
+	if (ip->i_nlink == 0) {
+		rc = -ENOENT;
+		goto out;
+	}
+
 	/*
 	 * scan parent directory for entry/freespace
 	 */
diff -urN linux-2.4.23-pre9/fs/minix/inode.c linux-2.4.23-rc1/fs/minix/inode.c
--- linux-2.4.23-pre9/fs/minix/inode.c	2002-02-25 11:38:09.000000000 -0800
+++ linux-2.4.23-rc1/fs/minix/inode.c	2003-11-10 11:26:27.000000000 -0800
@@ -511,6 +511,8 @@
  */
 void minix_truncate(struct inode * inode)
 {
+	if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)))
+		return;
 	if (INODE_VERSION(inode) == MINIX_V1)
 		V1_minix_truncate(inode);
 	else
diff -urN linux-2.4.23-pre9/fs/proc/array.c linux-2.4.23-rc1/fs/proc/array.c
--- linux-2.4.23-pre9/fs/proc/array.c	2003-11-10 11:26:23.000000000 -0800
+++ linux-2.4.23-rc1/fs/proc/array.c	2003-11-10 11:26:27.000000000 -0800
@@ -542,7 +542,7 @@
 		if (len < 1)
 			len = 1;
 		seq_printf(m, "%*c", len, ' ');
-		seq_path(m, file->f_vfsmnt, file->f_dentry, " \t\n\\");
+		seq_path(m, file->f_vfsmnt, file->f_dentry, "");
 	}
 	seq_putc(m, '\n');
 	return 0;
diff -urN linux-2.4.23-pre9/include/asm-sparc/ioctl.h linux-2.4.23-rc1/include/asm-sparc/ioctl.h
--- linux-2.4.23-pre9/include/asm-sparc/ioctl.h	2003-06-13 07:51:38.000000000 -0700
+++ linux-2.4.23-rc1/include/asm-sparc/ioctl.h	2003-11-10 11:26:28.000000000 -0800
@@ -54,7 +54,9 @@
                             (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) )
 #define _IOC_TYPE(nr)       (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
 #define _IOC_NR(nr)         (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
-#define _IOC_SIZE(nr)       (((nr) >> _IOC_SIZESHIFT) & _IOC_XSIZEMASK)
+#define _IOC_SIZE(nr)   \
+ ((((((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) & (_IOC_WRITE|_IOC_READ)) == 0)?    \
+                         0: (((nr) >> _IOC_SIZESHIFT) & _IOC_XSIZEMASK))
 
 /* ...and for the PCMCIA and sound. */
 #define IOC_IN          (_IOC_WRITE << _IOC_DIRSHIFT)
diff -urN linux-2.4.23-pre9/include/asm-sparc64/ioctl.h linux-2.4.23-rc1/include/asm-sparc64/ioctl.h
--- linux-2.4.23-pre9/include/asm-sparc64/ioctl.h	2003-06-13 07:51:38.000000000 -0700
+++ linux-2.4.23-rc1/include/asm-sparc64/ioctl.h	2003-11-10 11:26:28.000000000 -0800
@@ -54,7 +54,9 @@
                             (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) )
 #define _IOC_TYPE(nr)       (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
 #define _IOC_NR(nr)         (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
-#define _IOC_SIZE(nr)       (((nr) >> _IOC_SIZESHIFT) & _IOC_XSIZEMASK)
+#define _IOC_SIZE(nr)   \
+ ((((((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) & (_IOC_WRITE|_IOC_READ)) == 0)?    \
+                         0: (((nr) >> _IOC_SIZESHIFT) & _IOC_XSIZEMASK))
 
 /* ...and for the PCMCIA and sound. */
 #define IOC_IN          (_IOC_WRITE << _IOC_DIRSHIFT)
diff -urN linux-2.4.23-pre9/include/asm-x86_64/desc.h linux-2.4.23-rc1/include/asm-x86_64/desc.h
--- linux-2.4.23-pre9/include/asm-x86_64/desc.h	2003-08-25 04:44:44.000000000 -0700
+++ linux-2.4.23-rc1/include/asm-x86_64/desc.h	2003-11-10 11:26:28.000000000 -0800
@@ -121,7 +121,7 @@
 	dst->base1 = PTR_MIDDLE(ptr) & 0xFF; 
 	dst->type = type;
 	dst->p = 1; 
-	dst->limit1 = 0xF;
+	dst->limit1 = (size >> 16) & 0xF;
 	dst->base2 = (PTR_MIDDLE(ptr) >> 8) & 0xFF; 
 	dst->base3 = PTR_HIGH(ptr); 
 }
diff -urN linux-2.4.23-pre9/include/asm-x86_64/processor.h linux-2.4.23-rc1/include/asm-x86_64/processor.h
--- linux-2.4.23-pre9/include/asm-x86_64/processor.h	2003-11-10 11:26:23.000000000 -0800
+++ linux-2.4.23-rc1/include/asm-x86_64/processor.h	2003-11-10 11:26:28.000000000 -0800
@@ -329,7 +329,7 @@
 #define DOUBLEFAULT_STACK 2 
 #define NMI_STACK 3 
 #define N_EXCEPTION_STACKS 3  /* hw limit: 7 */
-#define EXCEPTION_STKSZ 1024
+#define EXCEPTION_STKSZ PAGE_SIZE
 #define EXCEPTION_STK_ORDER 0
 
 extern void load_gs_index(unsigned);
diff -urN linux-2.4.23-pre9/include/asm-x86_64/smp.h linux-2.4.23-rc1/include/asm-x86_64/smp.h
--- linux-2.4.23-pre9/include/asm-x86_64/smp.h	2003-08-25 04:44:44.000000000 -0700
+++ linux-2.4.23-rc1/include/asm-x86_64/smp.h	2003-11-10 11:26:28.000000000 -0800
@@ -89,10 +89,8 @@
 	return GET_APIC_ID(*(unsigned *)(APIC_BASE+APIC_ID));
 }
 
-extern int apic_disabled;
-extern int slow_smp_processor_id(void);
-#define safe_smp_processor_id() \
-	(!apic_disabled ? hard_smp_processor_id() : slow_smp_processor_id())
+/* Assume apicid == cpuid */
+#define safe_smp_processor_id() (cpuid_ebx(1) >> 24) 
 
 #endif /* !ASSEMBLY */
 
diff -urN linux-2.4.23-pre9/include/linux/fs.h linux-2.4.23-rc1/include/linux/fs.h
--- linux-2.4.23-pre9/include/linux/fs.h	2003-11-10 11:26:23.000000000 -0800
+++ linux-2.4.23-rc1/include/linux/fs.h	2003-11-10 11:26:28.000000000 -0800
@@ -1395,6 +1395,7 @@
 extern void iput(struct inode *);
 extern void force_delete(struct inode *);
 extern struct inode * igrab(struct inode *);
+extern struct inode * ilookup(struct super_block *, unsigned long);
 extern ino_t iunique(struct super_block *, ino_t);
 
 typedef int (*find_inode_t)(struct inode *, unsigned long, void *);
diff -urN linux-2.4.23-pre9/include/linux/pci_ids.h linux-2.4.23-rc1/include/linux/pci_ids.h
--- linux-2.4.23-pre9/include/linux/pci_ids.h	2003-11-10 11:26:23.000000000 -0800
+++ linux-2.4.23-rc1/include/linux/pci_ids.h	2003-11-10 11:26:28.000000000 -0800
@@ -969,6 +969,7 @@
 #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE	0x0065
 #define PCI_DEVICE_ID_NVIDIA_ITNT2		0x00A0
 #define PCI_DEVICE_ID_NVIDIA_NFORCE3		0x00d1
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S		0x00e1
 #define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR	0x0100
 #define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR	0x0101
 #define PCI_DEVICE_ID_NVIDIA_QUADRO		0x0103
diff -urN linux-2.4.23-pre9/include/linux/quota.h linux-2.4.23-rc1/include/linux/quota.h
--- linux-2.4.23-pre9/include/linux/quota.h	2003-08-25 04:44:44.000000000 -0700
+++ linux-2.4.23-rc1/include/linux/quota.h	2003-11-10 11:26:28.000000000 -0800
@@ -222,8 +222,6 @@
 	loff_t dq_off;			/* Offset of dquot on disk */
 	short dq_type;			/* Type of quota */
 	short dq_flags;			/* See DQ_* */
-	unsigned long dq_referenced;	/* Number of times this dquot was 
-					   referenced during its lifetime */
 	struct mem_dqblk dq_dqb;	/* Diskquota usage */
 };
 
diff -urN linux-2.4.23-pre9/include/linux/sysctl.h linux-2.4.23-rc1/include/linux/sysctl.h
--- linux-2.4.23-pre9/include/linux/sysctl.h	2003-11-10 11:26:23.000000000 -0800
+++ linux-2.4.23-rc1/include/linux/sysctl.h	2003-11-10 11:26:28.000000000 -0800
@@ -69,7 +69,7 @@
 /* CTL_BUS names: */
 enum
 {
-	BUS_ISA=1		/* ISA */
+	CTL_BUS_ISA=1		/* ISA */
 };
 
 /* CTL_KERN names: */
diff -urN linux-2.4.23-pre9/kernel/ksyms.c linux-2.4.23-rc1/kernel/ksyms.c
--- linux-2.4.23-pre9/kernel/ksyms.c	2003-11-10 11:26:23.000000000 -0800
+++ linux-2.4.23-rc1/kernel/ksyms.c	2003-11-10 11:26:28.000000000 -0800
@@ -49,6 +49,7 @@
 #include <linux/seq_file.h>
 #include <linux/dnotify.h>
 #include <linux/crc32.h>
+#include <linux/firmware.h>
 #include <asm/checksum.h>
 
 #if defined(CONFIG_PROC_FS)
@@ -143,6 +144,7 @@
 EXPORT_SYMBOL(fget);
 EXPORT_SYMBOL(igrab);
 EXPORT_SYMBOL(iunique);
+EXPORT_SYMBOL(ilookup);
 EXPORT_SYMBOL(iget4);
 EXPORT_SYMBOL(iput);
 EXPORT_SYMBOL(inode_init_once);
@@ -574,6 +576,13 @@
 EXPORT_SYMBOL(bitreverse);
 #endif
 
+#ifdef CONFIG_FW_LOADER
+EXPORT_SYMBOL(release_firmware);
+EXPORT_SYMBOL(request_firmware);
+EXPORT_SYMBOL(request_firmware_nowait);
+EXPORT_SYMBOL(register_firmware);
+#endif
+
 /* software interrupts */
 EXPORT_SYMBOL(tasklet_hi_vec);
 EXPORT_SYMBOL(tasklet_vec);
diff -urN linux-2.4.23-pre9/lib/firmware_class.c linux-2.4.23-rc1/lib/firmware_class.c
--- linux-2.4.23-pre9/lib/firmware_class.c	2003-11-10 11:26:23.000000000 -0800
+++ linux-2.4.23-rc1/lib/firmware_class.c	2003-11-10 11:26:28.000000000 -0800
@@ -565,7 +565,9 @@
 module_init(firmware_class_init);
 module_exit(firmware_class_exit);
 
+#ifndef CONFIG_FW_LOADER
 EXPORT_SYMBOL(release_firmware);
 EXPORT_SYMBOL(request_firmware);
 EXPORT_SYMBOL(request_firmware_nowait);
 EXPORT_SYMBOL(register_firmware);
+#endif
