## Automatically generated incremental diff
## From:   linux-2.2.20-pre1
## To:     linux-2.2.20-pre2
## Robot:  $Id: make-incremental-diff,v 1.8 2001/12/04 06:05:04 hpa Exp $

diff -urN linux-2.2.20-pre1/Makefile linux/Makefile
--- linux-2.2.20-pre1/Makefile	Mon Dec  3 22:17:35 2001
+++ linux/Makefile	Mon Dec  3 22:17:46 2001
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 20
-EXTRAVERSION = pre1
+EXTRAVERSION = pre2
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
diff -urN linux-2.2.20-pre1/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c
--- linux-2.2.20-pre1/arch/i386/kernel/io_apic.c	Mon Dec  3 22:17:35 2001
+++ linux/arch/i386/kernel/io_apic.c	Sun Mar 25 08:31:45 2001
@@ -200,6 +200,8 @@
  * We disable IO-APIC IRQs by setting their 'destination CPU mask' to
  * zero. Trick by Ramesh Nalluri.
  */
+DO_ACTION( disable, 1, &= 0x00ffffff, io_apic_sync(entry->apic))/* destination = 0x00 */
+DO_ACTION( enable,  1, |= 0xff000000, )				/* destination = 0xff */
 DO_ACTION( mask,    0, |= 0x00010000, io_apic_sync(entry->apic))/* mask = 1 */
 DO_ACTION( unmask,  0, &= 0xfffeffff, )				/* mask = 0 */
 
@@ -610,7 +612,7 @@
 		entry.delivery_mode = dest_LowestPrio;
 		entry.dest_mode = 1;			/* logical delivery */
 		entry.mask = 0;				/* enable IRQ */
-		entry.dest.logical.logical_dest = 0xff;	/* but no route */
+		entry.dest.logical.logical_dest = 0;	/* but no route */
 
 		idx = find_irq_entry(apic,pin,mp_INT);
 		if (idx == -1) {
@@ -1015,10 +1017,13 @@
 static void enable_edge_ioapic_irq(unsigned int irq)
 {
 	self_IPI(irq);
-	unmask_IO_APIC_irq(irq);
+	enable_IO_APIC_irq(irq);
 }
 
-static void disable_edge_ioapic_irq(unsigned int irq) { /* nothing */ }
+static void disable_edge_ioapic_irq(unsigned int irq)
+{
+	disable_IO_APIC_irq(irq);
+}
 
 /*
  * Starting up a edge-triggered IO-APIC interrupt is
@@ -1234,7 +1239,7 @@
 
 	pin1 = find_timer_pin(mp_INT);
 	pin2 = find_timer_pin(mp_ExtINT);
-	unmask_IO_APIC_irq(0);
+	enable_IO_APIC_irq(0);
 	if (!timer_irq_works()) {
 
 		if (pin1 != -1)
diff -urN linux-2.2.20-pre1/arch/sparc64/kernel/devices.c linux/arch/sparc64/kernel/devices.c
--- linux-2.2.20-pre1/arch/sparc64/kernel/devices.c	Sun Mar 25 08:31:53 2001
+++ linux/arch/sparc64/kernel/devices.c	Mon Dec  3 22:17:46 2001
@@ -73,6 +73,15 @@
 	
 	prom_cpu_nodes[0] = prom_node_cpu;
 
+#ifndef __SMP__
+	{
+		extern unsigned int up_clock_tick;
+		up_clock_tick = prom_getintdefault(prom_node_cpu,
+						   "clock-frequency",
+						   0);
+	}
+#endif
+
 	mem_start = central_probe(mem_start);
 
 	cpu_probe();
diff -urN linux-2.2.20-pre1/arch/sparc64/kernel/setup.c linux/arch/sparc64/kernel/setup.c
--- linux-2.2.20-pre1/arch/sparc64/kernel/setup.c	Sun Mar 25 08:31:53 2001
+++ linux/arch/sparc64/kernel/setup.c	Mon Dec  3 22:17:46 2001
@@ -1,4 +1,4 @@
-/*  $Id: setup.c,v 1.43.2.5 2000/10/02 02:05:37 anton Exp $
+/*  $Id: setup.c,v 1.43.2.6 2001/04/24 21:58:20 davem Exp $
  *  linux/arch/sparc64/kernel/setup.c
  *
  *  Copyright (C) 1995,1996  David S. Miller (davem@caip.rutgers.edu)
@@ -620,6 +620,10 @@
 extern int smp_bogo(char *);
 extern int mmu_info(char *);
 
+#ifndef __SMP__
+unsigned int up_clock_tick;
+#endif
+
 int get_cpuinfo(char *buffer)
 {
 	int cpuid=smp_processor_id();
@@ -634,7 +638,8 @@
 	    "ncpus probed\t: %d\n"
 	    "ncpus active\t: %d\n"
 #ifndef __SMP__
-            "BogoMips\t: %lu.%02lu\n"
+            "Cpu0Bogo\t: %lu.%02lu\n"
+	    "Cpu0ClkTck\t: %016lx\n"
 #endif
 	    ,
             sparc_cpu_type[cpuid],
@@ -642,7 +647,8 @@
             prom_rev, prom_prev >> 16, (prom_prev >> 8) & 0xff, prom_prev & 0xff,
 	    linux_num_cpus, smp_num_cpus
 #ifndef __SMP__
-            , loops_per_jiffy/(500000/HZ), (loops_per_jiffy/(5000/HZ)) % 100
+	    , loops_per_jiffy/(500000/HZ), (loops_per_jiffy/(5000/HZ)) % 100,
+	    (unsigned long) up_clock_tick
 #endif
 	    );
 #ifdef __SMP__
diff -urN linux-2.2.20-pre1/arch/sparc64/kernel/smp.c linux/arch/sparc64/kernel/smp.c
--- linux-2.2.20-pre1/arch/sparc64/kernel/smp.c	Sun Mar 25 08:31:53 2001
+++ linux/arch/sparc64/kernel/smp.c	Mon Dec  3 22:17:46 2001
@@ -77,15 +77,17 @@
 	for (i = 0; i < NR_CPUS; i++)
 		if(cpu_present_map & (1UL << i))
 			len += sprintf(buf + len,
-				       "Cpu%dBogo\t: %lu.%02lu\n",
+				       "Cpu%dBogo\t: %lu.%02lu\n"
+				       "Cpu%dClkTck\t: %016lx\n",
 				       i, cpu_data[i].udelay_val / (500000/HZ),
-				       (cpu_data[i].udelay_val / (5000/HZ)) % 100);
+				       (cpu_data[i].udelay_val / (5000/HZ)) % 100,
+				       i, (unsigned long) cpu_data[i].clock_tick);
 	return len;
 }
 
 __initfunc(void smp_store_cpu_info(int id))
 {
-	int i;
+	int i, no;
 
 	cpu_data[id].irq_count			= 0;
 	cpu_data[id].bh_count			= 0;
@@ -93,6 +95,13 @@
 	   smp_setup_percpu_timer()  */
 	cpu_data[id].udelay_val			= loops_per_jiffy;
 
+
+	for (no = 0; no < linux_num_cpus; no++)
+		if (linux_cpus[no].mid == id)
+			break;
+
+	cpu_data[id].clock_tick = prom_getintdefault(linux_cpus[no].prom_node,
+						     "clock-frequency", 0);
 	cpu_data[id].pgcache_size		= 0;
 	cpu_data[id].pte_cache[0]		= NULL;
 	cpu_data[id].pte_cache[1]		= NULL;
diff -urN linux-2.2.20-pre1/arch/sparc64/kernel/sparc64_ksyms.c linux/arch/sparc64/kernel/sparc64_ksyms.c
--- linux-2.2.20-pre1/arch/sparc64/kernel/sparc64_ksyms.c	Sun Mar 25 08:37:30 2001
+++ linux/arch/sparc64/kernel/sparc64_ksyms.c	Mon Dec  3 22:17:46 2001
@@ -1,4 +1,4 @@
-/* $Id: sparc64_ksyms.c,v 1.58.2.13 2001/01/03 22:05:54 anton Exp $
+/* $Id: sparc64_ksyms.c,v 1.58.2.14 2001/03/01 00:48:59 davem Exp $
  * arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff -urN linux-2.2.20-pre1/drivers/char/misc.c linux/drivers/char/misc.c
--- linux-2.2.20-pre1/drivers/char/misc.c	Sun Mar 25 08:37:31 2001
+++ linux/drivers/char/misc.c	Mon Dec  3 22:17:46 2001
@@ -84,7 +84,6 @@
 extern int pc110pad_init(void);
 extern int pmu_device_init(void);
 extern int tosh_init(void);
-extern int rng_init(void);
 
 static int misc_read_proc(char *buf, char **start, off_t offset,
 			  int len, int *eof, void *private)
@@ -286,9 +285,6 @@
 #endif
 #ifdef CONFIG_SGI
 	streamable_init ();
-#endif
-#ifdef CONFIG_INTEL_RNG
-	rng_init ();
 #endif
 #ifdef CONFIG_TOSHIBA
 	tosh_init();
diff -urN linux-2.2.20-pre1/drivers/char/rio/riodrvr.h linux/drivers/char/rio/riodrvr.h
--- linux-2.2.20-pre1/drivers/char/rio/riodrvr.h	Sun Mar 25 08:31:28 2001
+++ linux/drivers/char/rio/riodrvr.h	Mon Dec  3 22:17:46 2001
@@ -33,12 +33,13 @@
 #ifndef __riodrvr_h
 #define __riodrvr_h
 
+#include <asm/param.h> /* for HZ */
+
 #ifdef SCCS_LABELS
 static char *_riodrvr_h_sccs_ = "@(#)riodrvr.h	1.3";
 #endif
 
 #define MEMDUMP_SIZE	32
-#define HZ				100
 #define	MOD_DISABLE	(RIO_NOREAD|RIO_NOWRITE|RIO_NOXPRINT)
 
 
diff -urN linux-2.2.20-pre1/drivers/net/3c509.c linux/drivers/net/3c509.c
--- linux-2.2.20-pre1/drivers/net/3c509.c	Sun Mar 25 08:31:15 2001
+++ linux/drivers/net/3c509.c	Mon Dec  3 22:17:46 2001
@@ -180,12 +180,20 @@
 	if (EISA_bus) {
 		static int eisa_addr = 0x1000;
 		while (eisa_addr < 0x9000) {
+			int device_id;
+
 			ioaddr = eisa_addr;
 			eisa_addr += 0x1000;
 
 			/* Check the standard EISA ID register for an encoded '3Com'. */
 			if (inw(ioaddr + 0xC80) != 0x6d50)
 				continue;
+
+			/* Avoid conflict with 3c590, 3c592, 3c597, etc */
+			device_id = (inb(ioaddr + 0xC82)<<8) + inb(ioaddr + 0xC83);
+			if ((device_id & 0xFF00) == 0x5900) {
+				continue;
+			}
 
 			/* Change the register set to the configuration window 0. */
 			outw(SelectWindow | 0, ioaddr + 0xC80 + EL3_CMD);
diff -urN linux-2.2.20-pre1/drivers/net/sunhme.c linux/drivers/net/sunhme.c
--- linux-2.2.20-pre1/drivers/net/sunhme.c	Sun Mar 25 08:37:35 2001
+++ linux/drivers/net/sunhme.c	Mon Dec  3 22:17:46 2001
@@ -3019,27 +3019,23 @@
 	struct linux_sbus *sbus;
 	struct linux_sbus_device *sdev;
 	struct quattro *qp;
+	int i;
 
 	if(qfe_sbus_list == NULL)
 		goto found;
 
 	for(qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
-		for(sdev = qp->quattro_sbus_dev;
-		    sdev != NULL;
-		    sdev = sdev->next) {
+		for(i = 0, sdev = qp->quattro_sbus_dev;
+		    (sdev != NULL) && (i < 4);
+		    sdev = sdev->next, i++) {
 			if(sdev == goal_sdev)
 				return qp;
 		}
 	}
 	for_each_sbus(sbus) {
 		for_each_sbusdev(sdev, sbus) {
-			if(sdev->child != NULL) {
-				struct linux_sbus_device *p;
-
-				for(p = sdev->child; p != NULL; p = p->next)
-					if(p == goal_sdev)
-						goto found;
-			}
+			if (sdev == goal_sdev)
+				goto found;
 		}
 	}
 
diff -urN linux-2.2.20-pre1/drivers/sbus/char/zs.c linux/drivers/sbus/char/zs.c
--- linux-2.2.20-pre1/drivers/sbus/char/zs.c	Sun Mar 25 08:37:35 2001
+++ linux/drivers/sbus/char/zs.c	Mon Dec  3 22:17:46 2001
@@ -1,4 +1,4 @@
-/* $Id: zs.c,v 1.41.2.7 2001/01/03 08:07:04 ecd Exp $
+/* $Id: zs.c,v 1.41.2.8 2001/04/17 07:14:47 davem Exp $
  * zs.c: Zilog serial port driver for the Sparc.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -173,7 +173,7 @@
  * buffer across all the serial ports, since it significantly saves
  * memory if large numbers of serial ports are open.
  */
-static unsigned char tmp_buf[4096]; /* This is cheating */
+static unsigned char tmp_buf[SERIAL_XMIT_SIZE]; /* This is cheating */
 static struct semaphore tmp_buf_sem = MUTEX;
 
 static inline int serial_paranoia_check(struct sun_serial *info,
@@ -1856,7 +1856,7 @@
 
 static void show_serial_version(void)
 {
-	char *revision = "$Revision: 1.41.2.7 $";
+	char *revision = "$Revision: 1.41.2.8 $";
 	char *version, *p;
 
 	version = strchr(revision, ' ');
diff -urN linux-2.2.20-pre1/drivers/video/fbmem.c linux/drivers/video/fbmem.c
--- linux-2.2.20-pre1/drivers/video/fbmem.c	Sun Mar 25 08:31:40 2001
+++ linux/drivers/video/fbmem.c	Mon Dec  3 22:17:47 2001
@@ -251,14 +251,16 @@
 {
 	struct fb_info **fi;
 
-	len = 0;
+	int buflen = 0;
 	for (fi = registered_fb; fi < &registered_fb[FB_MAX] && len < 4000; fi++)
 		if (*fi)
-			len += sprintf(buf + len, "%d %s\n",
+			buflen += sprintf(buf + buflen, "%d %s\n",
 				       GET_FB_IDX((*fi)->node),
 				       (*fi)->modename);
 	*start = buf + offset;
-	return len > offset ? len - offset : 0;
+
+	buflen = buflen > offset ? buflen - offset : 0;
+	return len < buflen ? len : buflen;
 }
 
 static ssize_t
diff -urN linux-2.2.20-pre1/drivers/video/offb.c linux/drivers/video/offb.c
--- linux-2.2.20-pre1/drivers/video/offb.c	Sun Mar 25 08:31:40 2001
+++ linux/drivers/video/offb.c	Mon Dec  3 22:17:47 2001
@@ -733,7 +733,7 @@
     disp->scrollmode = SCROLL_YREDRAW;
 
     strcpy(info->info.modename, "OFfb ");
-    strncat(info->info.modename, full_name, sizeof(info->info.modename));
+    strncat(info->info.modename, full_name, sizeof(info->info.modename)-6);
     info->info.node = -1;
     info->info.fbops = &offb_ops;
     info->info.disp = disp;
diff -urN linux-2.2.20-pre1/include/asm-sparc64/smp.h linux/include/asm-sparc64/smp.h
--- linux-2.2.20-pre1/include/asm-sparc64/smp.h	Sun Mar 25 08:31:09 2001
+++ linux/include/asm-sparc64/smp.h	Mon Dec  3 22:17:47 2001
@@ -38,7 +38,7 @@
 	unsigned int	multiplier;
 	unsigned int	counter;
 	unsigned int	idle_volume;
-	unsigned int	__pad;
+	unsigned int	clock_tick;	/* %tick's per second */
 	unsigned long	udelay_val;
 
 	/* Dcache line 2 */
diff -urN linux-2.2.20-pre1/include/asm-sparc64/ttable.h linux/include/asm-sparc64/ttable.h
--- linux-2.2.20-pre1/include/asm-sparc64/ttable.h	Sun Mar 25 08:31:09 2001
+++ linux/include/asm-sparc64/ttable.h	Mon Dec  3 22:17:47 2001
@@ -1,4 +1,4 @@
-/* $Id: ttable.h,v 1.11.2.3 1999/10/07 20:48:25 davem Exp $ */
+/* $Id: ttable.h,v 1.11.2.5 2001/03/28 11:24:15 davem Exp $ */
 #ifndef _SPARC64_TTABLE_H
 #define _SPARC64_TTABLE_H
 
@@ -54,12 +54,22 @@
 	 clr	%l6;					\
 	nop;
 	
+	/* The grotty trick to save %g1 into current->thread.kernel_cntd0
+	 * is because when we take this trap we could be interrupting trap
+	 * code already using the trap alternate global registers.  It is
+	 * better to corrupt a performance counter than corrupt trap register
+	 * state.  We cross our fingers and pray that this store/load does
+	 * not cause yet another CEE trap.
+	 */
 #define TRAPTL1_CEE			\
+	membar	#Sync;			\
+	stx	%g1, [%g6 + AOFF_task_tss + AOFF_thread_kernel_cntd0]; \
 	ldxa	[%g0] ASI_AFSR, %g1;	\
 	membar	#Sync;			\
 	stxa	%g1, [%g0] ASI_AFSR;	\
 	membar	#Sync;			\
-	retry; nop; nop; nop;
+	ldx	[%g6 + AOFF_task_tss + AOFF_thread_kernel_cntd0], %g1; \
+	retry;
 
 #define TRAP_ARG(routine, arg)				\
 	sethi	%hi(109f), %g7;				\
diff -urN linux-2.2.20-pre1/include/net/ip.h linux/include/net/ip.h
--- linux-2.2.20-pre1/include/net/ip.h	Sun Mar 25 08:37:40 2001
+++ linux/include/net/ip.h	Mon Dec  3 22:17:47 2001
@@ -170,7 +170,7 @@
 extern __inline__
 int ip_decrease_ttl(struct iphdr *iph)
 {
-	u16 check = iph->check;
+	u32 check = iph->check;
 	check += __constant_htons(0x0100);
 	iph->check = check + ((check>=0xFFFF) ? 1 : 0);
 	return --iph->ttl;
diff -urN linux-2.2.20-pre1/init/main.c linux/init/main.c
--- linux-2.2.20-pre1/init/main.c	Sun Mar 25 08:37:40 2001
+++ linux/init/main.c	Mon Dec  3 22:17:47 2001
@@ -462,13 +462,8 @@
 	const char *name;
 	const int num;
 } root_dev_names[] __initdata = {
-#ifdef CONFIG_ROOT_NFS
 	{ "nfs",     0x00ff },
-#endif
-#ifdef CONFIG_BLK_DEV_LOOP
 	{ "loop",    0x0700 },
-#endif
-#ifdef CONFIG_BLK_DEV_IDE
 	{ "hda",     0x0300 },
 	{ "hdb",     0x0340 },
 	{ "hdc",     0x1600 },
@@ -481,8 +476,6 @@
 	{ "hdj",     0x3840 },
 	{ "hdk",     0x3900 },
 	{ "hdl",     0x3940 },
-#endif
-#ifdef CONFIG_BLK_DEV_SD
 	{ "sda",     0x0800 },
 	{ "sdb",     0x0810 },
 	{ "sdc",     0x0820 },
@@ -499,8 +492,6 @@
 	{ "sdn",     0x08d0 },
 	{ "sdo",     0x08e0 },
 	{ "sdp",     0x08f0 },
-#endif
-#ifdef CONFIG_BLK_DEV_DAC960
 	{ "rd/c0d0p",0x3000 },
 	{ "rd/c0d1p",0x3008 },
 	{ "rd/c0d2p",0x3010 },
@@ -517,8 +508,6 @@
 	{ "rd/c0d13p",0x3068 },
 	{ "rd/c0d14p",0x3070 },
 	{ "rd/c0d15p",0x3078 },
-#endif
-#if defined(CONFIG_BLK_CPQ_DA) || defined(CONFIG_BLK_CPQ_DA_MODULE)
 	{ "ida/c0d0p",0x4800 },
 	{ "ida/c0d1p",0x4810 },
 	{ "ida/c0d2p",0x4820 },
@@ -535,71 +524,34 @@
 	{ "ida/c0d13p",0x48D0 },
 	{ "ida/c0d14p",0x48E0 },
 	{ "ida/c0d15p",0x48F0 },
-#endif
-#ifdef CONFIG_ATARI_ACSI
 	{ "ada",     0x1c00 },
 	{ "adb",     0x1c10 },
 	{ "adc",     0x1c20 },
 	{ "add",     0x1c30 },
 	{ "ade",     0x1c40 },
-#endif
-#ifdef CONFIG_BLK_DEV_FD
 	{ "fd",      0x0200 },
-#endif
-#ifdef CONFIG_MD_BOOT
 	{ "md",      0x0900 },	     
-#endif     
-#ifdef CONFIG_BLK_DEV_XD
 	{ "xda",     0x0d00 },
 	{ "xdb",     0x0d40 },
-#endif
-#ifdef CONFIG_BLK_DEV_RAM
 	{ "ram",     0x0100 },
-#endif
-#ifdef CONFIG_BLK_DEV_SR
 	{ "scd",     0x0b00 },
-#endif
-#ifdef CONFIG_MCD
 	{ "mcd",     0x1700 },
-#endif
-#ifdef CONFIG_CDU535
 	{ "cdu535",  0x1800 },
 	{ "sonycd",  0x1800 },
-#endif
-#ifdef CONFIG_AZTCD
 	{ "aztcd",   0x1d00 },
-#endif
-#ifdef CONFIG_CM206
 	{ "cm206cd", 0x2000 },
-#endif
-#ifdef CONFIG_GSCD
 	{ "gscd",    0x1000 },
-#endif
-#ifdef CONFIG_SBPCD
 	{ "sbpcd",   0x1900 },
-#endif
-#ifdef CONFIG_BLK_DEV_PS2
 	{ "eda",     0x2400 },
 	{ "edb",     0x2440 },
-#endif
-#ifdef CONFIG_PARIDE_PD
 	{ "pda",	0x2d00 },
 	{ "pdb",	0x2d10 },
 	{ "pdc",	0x2d20 },
 	{ "pdd",	0x2d30 },
-#endif
-#ifdef CONFIG_PARIDE_PCD
 	{ "pcd",	0x2e00 },
-#endif
-#ifdef CONFIG_PARIDE_PF
 	{ "pf",		0x2f00 },
-#endif
-#if CONFIG_APBLOCK
 	{ "apblock", APBLOCK_MAJOR << 8},
-#endif
-#if CONFIG_DDV
 	{ "ddv", DDV_MAJOR << 8},
-#endif
 #ifdef CONFIG_MDISK
         { "mnda", (MDISK_MAJOR << MINORBITS)},
         { "mndb", (MDISK_MAJOR << MINORBITS) + 1},
diff -urN linux-2.2.20-pre1/net/core/sock.c linux/net/core/sock.c
--- linux-2.2.20-pre1/net/core/sock.c	Sun Mar 25 08:37:41 2001
+++ linux/net/core/sock.c	Mon Dec  3 22:17:47 2001
@@ -7,7 +7,7 @@
  *		handler for protocols to use and generic option handler.
  *
  *
- * Version:	$Id: sock.c,v 1.80.2.3 2000/08/10 00:37:05 davem Exp $
+ * Version:	$Id: sock.c,v 1.80.2.4 2001/02/20 04:21:46 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
diff -urN linux-2.2.20-pre1/net/ipv4/ip_sockglue.c linux/net/ipv4/ip_sockglue.c
--- linux-2.2.20-pre1/net/ipv4/ip_sockglue.c	Sun Mar 25 08:37:41 2001
+++ linux/net/ipv4/ip_sockglue.c	Mon Dec  3 22:17:47 2001
@@ -5,7 +5,7 @@
  *
  *		The IP to API glue.
  *		
- * Version:	$Id: ip_sockglue.c,v 1.42 1999/04/22 10:07:34 davem Exp $
+ * Version:	$Id: ip_sockglue.c,v 1.42.2.1 2001/02/20 04:21:46 davem Exp $
  *
  * Authors:	see ip.c
  *
diff -urN linux-2.2.20-pre1/net/ipv4/ipmr.c linux/net/ipv4/ipmr.c
--- linux-2.2.20-pre1/net/ipv4/ipmr.c	Sun Mar 25 08:37:41 2001
+++ linux/net/ipv4/ipmr.c	Mon Dec  3 22:17:47 2001
@@ -9,7 +9,7 @@
  *	as published by the Free Software Foundation; either version
  *	2 of the License, or (at your option) any later version.
  *
- *	Version: $Id: ipmr.c,v 1.40.2.2 1999/06/20 21:27:44 davem Exp $
+ *	Version: $Id: ipmr.c,v 1.40.2.3 2001/02/20 04:21:46 davem Exp $
  *
  *	Fixes:
  *	Michael Chastain	:	Incorrect size of copying.
diff -urN linux-2.2.20-pre1/net/ipv4/raw.c linux/net/ipv4/raw.c
--- linux-2.2.20-pre1/net/ipv4/raw.c	Sun Mar 25 08:37:41 2001
+++ linux/net/ipv4/raw.c	Mon Dec  3 22:17:47 2001
@@ -5,7 +5,7 @@
  *
  *		RAW - implementation of IP "raw" sockets.
  *
- * Version:	$Id: raw.c,v 1.39.2.1 1999/06/20 20:14:50 davem Exp $
+ * Version:	$Id: raw.c,v 1.39.2.2 2001/02/20 04:21:46 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
diff -urN linux-2.2.20-pre1/net/ipv4/route.c linux/net/ipv4/route.c
--- linux-2.2.20-pre1/net/ipv4/route.c	Sun Mar 25 08:37:41 2001
+++ linux/net/ipv4/route.c	Mon Dec  3 22:17:47 2001
@@ -5,7 +5,7 @@
  *
  *		ROUTE - implementation of the IP router.
  *
- * Version:	$Id: route.c,v 1.67.2.5 2000/09/01 23:19:46 davem Exp $
+ * Version:	$Id: route.c,v 1.67.2.6 2001/02/09 08:43:58 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
diff -urN linux-2.2.20-pre1/net/ipv4/sysctl_net_ipv4.c linux/net/ipv4/sysctl_net_ipv4.c
--- linux-2.2.20-pre1/net/ipv4/sysctl_net_ipv4.c	Sun Mar 25 08:37:41 2001
+++ linux/net/ipv4/sysctl_net_ipv4.c	Mon Dec  3 22:17:47 2001
@@ -1,7 +1,7 @@
 /*
  * sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem.
  *
- * $Id: sysctl_net_ipv4.c,v 1.38.2.4 2000/09/16 09:40:00 davem Exp $
+ * $Id: sysctl_net_ipv4.c,v 1.38.2.5 2001/02/09 08:43:58 davem Exp $
  *
  * Begun April 1, 1996, Mike Shaver.
  * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS]
diff -urN linux-2.2.20-pre1/net/ipv4/tcp.c linux/net/ipv4/tcp.c
--- linux-2.2.20-pre1/net/ipv4/tcp.c	Sun Mar 25 08:37:41 2001
+++ linux/net/ipv4/tcp.c	Mon Dec  3 22:17:47 2001
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp.c,v 1.140.2.16 2001/01/04 05:28:46 davem Exp $
+ * Version:	$Id: tcp.c,v 1.140.2.17 2001/02/20 04:21:46 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
diff -urN linux-2.2.20-pre1/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
--- linux-2.2.20-pre1/net/ipv4/tcp_input.c	Sun Mar 25 08:37:41 2001
+++ linux/net/ipv4/tcp_input.c	Mon Dec  3 22:17:47 2001
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_input.c,v 1.164.2.21 2001/03/06 05:39:39 davem Exp $
+ * Version:	$Id: tcp_input.c,v 1.164.2.22 2001/04/10 19:58:43 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -734,8 +734,6 @@
 	if (tp->retransmits) {
 		if (tp->packets_out == 0) {
 			tp->retransmits = 0;
-			tp->fackets_out = 0;
-			tp->retrans_out = 0;
 			tp->backoff = 0;
 			tcp_set_rto(tp);
 		} else {
@@ -782,8 +780,10 @@
 	if(sk->zapped)
 		return(1);	/* Dead, can't ack any more so why bother */
 
-	if (tp->pending == TIME_KEEPOPEN)
+	if (tp->pending == TIME_KEEPOPEN) {
 	  	tp->probes_out = 0;
+		tp->pending = 0;
+	}
 
 	tp->rcv_tstamp = tcp_time_stamp;
 
@@ -851,8 +851,6 @@
 		if (tp->retransmits) {
 			if (tp->packets_out == 0) {
 				tp->retransmits = 0;
-				tp->fackets_out = 0;
-				tp->retrans_out = 0;
 			}
 		} else {
 			/* We don't have a timestamp. Can only use
@@ -879,6 +877,8 @@
 			tcp_ack_packets_out(sk, tp);
 	} else {
 		tcp_clear_xmit_timer(sk, TIME_RETRANS);
+		tp->fackets_out = 0;
+		tp->retrans_out = 0;
 	}
 
 	flag &= (FLAG_DATA | FLAG_WIN_UPDATE);
diff -urN linux-2.2.20-pre1/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
--- linux-2.2.20-pre1/net/ipv4/tcp_output.c	Sun Mar 25 08:31:12 2001
+++ linux/net/ipv4/tcp_output.c	Mon Dec  3 22:17:47 2001
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_output.c,v 1.108.2.11 2000/11/10 12:43:29 davem Exp $
+ * Version:	$Id: tcp_output.c,v 1.108.2.12 2001/04/10 19:58:44 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -547,6 +547,8 @@
 		 */
 		kfree_skb(next_skb);
 		sk->tp_pinfo.af_tcp.packets_out--;
+		if (sk->tp_pinfo.af_tcp.fackets_out)
+			sk->tp_pinfo.af_tcp.fackets_out--;
 	}
 }
 
diff -urN linux-2.2.20-pre1/net/ipv6/ipv6_sockglue.c linux/net/ipv6/ipv6_sockglue.c
--- linux-2.2.20-pre1/net/ipv6/ipv6_sockglue.c	Sun Mar 25 08:37:41 2001
+++ linux/net/ipv6/ipv6_sockglue.c	Mon Dec  3 22:17:47 2001
@@ -7,7 +7,7 @@
  *
  *	Based on linux/net/ipv4/ip_sockglue.c
  *
- *	$Id: ipv6_sockglue.c,v 1.27 1999/04/22 10:07:43 davem Exp $
+ *	$Id: ipv6_sockglue.c,v 1.27.2.2 2001/02/21 01:08:55 davem Exp $
  *
  *	This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
diff -urN linux-2.2.20-pre1/net/ipv6/raw.c linux/net/ipv6/raw.c
--- linux-2.2.20-pre1/net/ipv6/raw.c	Sun Mar 25 08:37:41 2001
+++ linux/net/ipv6/raw.c	Mon Dec  3 22:17:47 2001
@@ -7,7 +7,7 @@
  *
  *	Adapted from linux/net/ipv4/raw.c
  *
- *	$Id: raw.c,v 1.24.2.1 1999/06/20 20:14:58 davem Exp $
+ *	$Id: raw.c,v 1.24.2.2 2001/02/20 04:21:47 davem Exp $
  *
  *	This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
