## Automatically generated incremental diff
## From:   linux-2.2.18-pre18
## To:     linux-2.2.18-pre19
## Robot:  $Id: make-incremental-diff,v 1.5 2001/12/01 08:32:36 hpa Exp $

diff -urN linux-2.2.18-pre18/CREDITS linux/CREDITS
--- linux-2.2.18-pre18/CREDITS	Mon Dec  3 20:37:33 2001
+++ linux/CREDITS	Mon Dec  3 20:38:20 2001
@@ -317,6 +317,11 @@
 S: Lancaster, LA1 4DN
 S: UK, England
 
+N: Paul Bristow
+E: paul@paulbristow.net
+W: http://paulbristow.net/linux
+D: ide-floppy maintainer
+
 N: Andries Brouwer
 E: aeb@cwi.nl
 D: random Linux hacker
diff -urN linux-2.2.18-pre18/Documentation/fb/matroxfb.txt linux/Documentation/fb/matroxfb.txt
--- linux-2.2.18-pre18/Documentation/fb/matroxfb.txt	Thu Apr 29 11:53:41 1999
+++ linux/Documentation/fb/matroxfb.txt	Mon Dec  3 20:38:20 2001
@@ -105,7 +105,7 @@
 Configuration
 =============
 
-You can pass kernel command line options to vesafb with
+You can pass kernel command line options to matroxfb with
 `video=matrox:option1,option2:value2,option3' (multiple options should be 
 separated by comma, values are separated from options by `:'). 
 Accepted options:
diff -urN linux-2.2.18-pre18/MAINTAINERS linux/MAINTAINERS
--- linux-2.2.18-pre18/MAINTAINERS	Mon Dec  3 20:37:37 2001
+++ linux/MAINTAINERS	Mon Dec  3 20:38:20 2001
@@ -478,9 +478,16 @@
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
-IDE/ATAPI TAPE/FLOPPY DRIVERS
+IDE/ATAPI TAPE DRIVERS
 P:	Gadi Oxman
 M:	Gadi Oxman <gadio@netvision.net.il>
+L:	linux-kernel@vger.kernel.org
+S:	Maintained
+
+IDE/ATAPI FLOPPY DRIVERS
+P:	Paul Bristow
+M:	Paul Bristow <paul@paulbristow.net>
+W:      http://paulbristow.net/linux
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
diff -urN linux-2.2.18-pre18/Makefile linux/Makefile
--- linux-2.2.18-pre18/Makefile	Mon Dec  3 20:37:37 2001
+++ linux/Makefile	Mon Dec  3 20:38:20 2001
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 18
-EXTRAVERSION = pre18
+EXTRAVERSION = pre19
 
 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.18-pre18/drivers/char/nvram.c linux/drivers/char/nvram.c
--- linux-2.2.18-pre18/drivers/char/nvram.c	Wed Jun  7 14:26:42 2000
+++ linux/drivers/char/nvram.c	Mon Dec  3 20:38:24 2001
@@ -25,9 +25,10 @@
  * the kernel and is not a module. Since the functions are used by some Atari
  * drivers, this is the case on the Atari.
  *
+ * 1.0a		Paul Gortmaker: use rtc_lock, fix get/put_user in cli bugs.
  */
 
-#define NVRAM_VERSION		"1.0"
+#define NVRAM_VERSION		"1.0a"
 
 #include <linux/module.h>
 #include <linux/config.h>
@@ -78,10 +79,12 @@
 #define	mach_set_checksum	atari_set_checksum
 #define	mach_proc_infos		atari_proc_infos
 
+static spinlock_t rtc_lock;	/* optimized away; no SMP m68K */
+
 #endif
 
 /* Note that *all* calls to CMOS_READ and CMOS_WRITE must be done with
- * interrupts disabled. Due to the index-port/data-port design of the RTC, we
+ * rtc_lock held. Due to the index-port/data-port design of the RTC, we
  * don't want two different things trying to get to it at once. (e.g. the
  * periodic 11 min sync from time.c vs. this driver.)
  */
@@ -233,23 +236,28 @@
 	unsigned long flags;
 	unsigned i = *ppos;
 	char *tmp = buf;
+	int checksum;
 	
 	if (i != *ppos)
 		return -EINVAL;
 
-	save_flags(flags);
-	cli();
-	
-	if (!nvram_check_checksum_int()) {
-		restore_flags(flags);
+	spin_lock_irqsave(&rtc_lock, flags);
+	checksum = nvram_check_checksum_int();
+	spin_unlock_irqrestore(&rtc_lock, flags);
+
+	if (!checksum)
 		return( -EIO );
-	}
 
 	for( ; count-- > 0 && i < NVRAM_BYTES; ++i, ++tmp )
-		put_user( nvram_read_int(i), tmp );
+	{
+		int val;
+		spin_lock_irqsave(&rtc_lock, flags);
+		val = nvram_read_int(i);
+		spin_unlock_irqrestore(&rtc_lock, flags);
+		put_user( val, tmp );
+	}
 	*ppos = i;
 
-	restore_flags(flags);
 	return( tmp - buf );
 }
 
@@ -260,26 +268,31 @@
 	unsigned i = *ppos;
 	const char *tmp = buf;
 	char c;
+	int checksum;
 	
 	if (i != *ppos)
 		return -EINVAL;
 
-	save_flags(flags);
-	cli();
-	
-	if (!nvram_check_checksum_int()) {
-		restore_flags(flags);
+	spin_lock_irqsave(&rtc_lock, flags);
+	checksum = nvram_check_checksum_int();
+	spin_unlock_irqrestore(&rtc_lock, flags);
+
+	if (!checksum)
 		return( -EIO );
-	}
 
 	for( ; count-- > 0 && i < NVRAM_BYTES; ++i, ++tmp ) {
 		get_user( c, tmp );
+		spin_lock_irqsave(&rtc_lock, flags);
 		nvram_write_int( c, i );
+		spin_unlock_irqrestore(&rtc_lock, flags);
 	}
+
+	spin_lock_irqsave(&rtc_lock, flags);
 	nvram_set_checksum_int();
+	spin_unlock_irqrestore(&rtc_lock, flags);
+
 	*ppos = i;
 
-	restore_flags(flags);
 	return( tmp - buf );
 }
 
@@ -295,14 +308,13 @@
 		if (!capable(CAP_SYS_ADMIN))
 			return( -EACCES );
 
-		save_flags(flags);
-		cli();
+		spin_lock_irqsave(&rtc_lock, flags);
 
 		for( i = 0; i < NVRAM_BYTES; ++i )
 			nvram_write_int( 0, i );
 		nvram_set_checksum_int();
 		
-		restore_flags(flags);
+		spin_unlock_irqrestore(&rtc_lock, flags);
 		return( 0 );
 	  
 	  case NVRAM_SETCKS:		/* just set checksum, contents unchanged
@@ -311,10 +323,9 @@
 		if (!capable(CAP_SYS_ADMIN))
 			return( -EACCES );
 
-		save_flags(flags);
-		cli();
+		spin_lock_irqsave(&rtc_lock, flags);
 		nvram_set_checksum_int();
-		restore_flags(flags);
+		spin_unlock_irqrestore(&rtc_lock, flags);
 		return( 0 );
 
 	  default:
@@ -363,11 +374,10 @@
     int i, len = 0;
     off_t begin = 0;
 	
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&rtc_lock, flags);
 	for( i = 0; i < NVRAM_BYTES; ++i )
 		contents[i] = nvram_read_int( i );
-	restore_flags(flags);
+	spin_unlock_irqrestore(&rtc_lock, flags);
 	
 	*eof = mach_proc_infos( contents, buffer, &len, &begin, offset, size );
 
diff -urN linux-2.2.18-pre18/drivers/isdn/isdn_ppp.c linux/drivers/isdn/isdn_ppp.c
--- linux-2.2.18-pre18/drivers/isdn/isdn_ppp.c	Mon Dec  3 20:37:40 2001
+++ linux/drivers/isdn/isdn_ppp.c	Mon Dec  3 20:38:24 2001
@@ -958,12 +958,18 @@
 				if(is->debug & 0x10)
 					printk(KERN_DEBUG "received single link compressed frame\n");
 				skb = isdn_ppp_decompress(skb,is,NULL,proto);
-				if(!skb)
+				if(!skb) {
+					printk(KERN_DEBUG "ippp: dropping LINK_COMP frame!\n");
 					return;
+				}
 				proto = isdn_ppp_strip_proto(skb);
+			} else {
+				skb = isdn_ppp_decompress(skb,is,NULL,proto);
+				if(!skb) {
+					printk(KERN_DEBUG "ippp: dropping uncompressed frame!\n");
+					return;
+				}
 			}
-			else
-				isdn_ppp_decompress(skb,is,NULL,proto);
 		}
 
 		if (proto == PPP_MP) {
@@ -1001,11 +1007,11 @@
 	}
 
 	if(proto == PPP_COMP) {
-		if(!lp->master)
+		if(!lp->master) {
 			skb = isdn_ppp_decompress(skb,is,is,proto);
-		else
+		} else {
 			skb = isdn_ppp_decompress(skb,is,ippp_table[((isdn_net_local *) (lp->master->priv))->ppp_slot],proto);
-
+		}
 		if(!skb) {
 			printk(KERN_DEBUG "ippp: compressed frame discarded!\n");
 			return;
@@ -1017,11 +1023,17 @@
 			isdn_ppp_frame_log("R-Decomp", skb->data, skb->len, 32,is->unit,lp->ppp_slot);
 		}
 	}
-	else if(is->compflags & SC_DECOMP_ON)  { /* If decomp is ON */
-		if(!lp->master)
-			isdn_ppp_decompress(skb,is,is,proto);
-		else
-			isdn_ppp_decompress(skb,is,ippp_table[((isdn_net_local *) (lp->master->priv))->ppp_slot],proto);
+	else if (is->compflags & SC_DECOMP_ON)  { /* If decomp is ON */
+		if(!lp->master) {
+			skb = isdn_ppp_decompress(skb,is,is,proto);
+		} else {
+			skb = isdn_ppp_decompress(skb,is,ippp_table[((isdn_net_local *) (lp->master->priv))->ppp_slot],proto);
+		}
+
+		if(!skb) {
+			printk(KERN_DEBUG "ippp: compressed frame discarded!\n");
+			return;
+		}
 	}
 
 	switch (proto) {
@@ -2371,14 +2383,12 @@
 		 * single link decompression 
 		 */
 		if(!is->link_decompressor) {
-			printk(KERN_ERR "ippp: no link decompressor defined!\n");
-			dev_kfree_skb(skb);
-			return NULL;
+			printk(KERN_DEBUG "ippp: no link decompressor defined!\n");
+			return skb;
 		}
 		if(!is->link_decomp_stat) {
 			printk(KERN_DEBUG "ippp: no link decompressor data allocated\n");
-			dev_kfree_skb(skb);
-			return NULL;
+			return skb;
 		}
 		stat = is->link_decomp_stat;
 		ipc = is->link_decompressor;
@@ -2389,14 +2399,12 @@
 		 * 'normal' or bundle-compression 
 		 */
 		if(!master->decompressor) {
-			printk(KERN_ERR "ippp: no decompressor defined!\n");
-			dev_kfree_skb(skb);
-			return NULL;
+			printk(KERN_DEBUG "ippp: no decompressor defined!\n");
+			return skb;
 		}
 		if(!master->decomp_stat) {
 			printk(KERN_DEBUG "ippp: no decompressor data allocated\n");
-			dev_kfree_skb(skb);
-			return NULL;
+			return skb;
 		}
 		stat = master->decomp_stat;
 		ipc = master->decompressor;
diff -urN linux-2.2.18-pre18/drivers/net/Space.c linux/drivers/net/Space.c
--- linux-2.2.18-pre18/drivers/net/Space.c	Mon Dec  3 20:37:41 2001
+++ linux/drivers/net/Space.c	Mon Dec  3 20:38:24 2001
@@ -31,7 +31,7 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/netlink.h>
-#include <net/divert.h>
+#include <linux/divert.h>
 
 #define	NEXT_DEV	NULL
 
diff -urN linux-2.2.18-pre18/drivers/sound/ymfpci.c linux/drivers/sound/ymfpci.c
--- linux-2.2.18-pre18/drivers/sound/ymfpci.c	Mon Dec  3 20:37:43 2001
+++ linux/drivers/sound/ymfpci.c	Mon Dec  3 20:38:25 2001
@@ -2289,6 +2289,7 @@
 	/* register /dev/dsp */
 	if ((codec->dev_audio = register_sound_dsp(&ymf_fops, -1)) < 0) {
 		printk(KERN_ERR "ymfpci%d: unable to register dsp\n", codec->inst);
+		free_irq(codec->irq, codec);
 		ymfpci_free(codec);
 		return -ENODEV;
 	}
@@ -2298,6 +2299,7 @@
 	 */
 	if ((err = ymf_ac97_init(codec, 0)) != 0) {
 		unregister_sound_dsp(codec->dev_audio);
+		free_irq(codec->irq, codec);
 		ymfpci_free(codec);
 		return err;
 	}
@@ -2333,6 +2335,10 @@
 		iounmap((void *)codec->reg_area_virt);
 	if (codec->work_ptr)
 		kfree(codec->work_ptr);
+	if (codec->ac97_codec[0]) {
+		unregister_sound_mixer(codec->ac97_codec[0]->dev_mixer);
+		kfree(codec->ac97_codec[0]);
+	}
 	kfree(codec);
 }
 
@@ -2386,6 +2392,7 @@
 
 	while (ymf_devs){
 		next = ymf_devs->next;
+		free_irq(ymf_devs->irq, ymf_devs);
 		ymfpci_free(ymf_devs);
 		ymf_devs = next;
 	}
diff -urN linux-2.2.18-pre18/drivers/usb/pegasus.c linux/drivers/usb/pegasus.c
--- linux-2.2.18-pre18/drivers/usb/pegasus.c	Mon Dec  3 20:37:43 2001
+++ linux/drivers/usb/pegasus.c	Mon Dec  3 20:38:26 2001
@@ -19,6 +19,8 @@
 **			interrupt context used. Please let me know how it
 **			behaves. Pegasus II support added since this version.
 **			TODO: suppressing HCD warnings spewage on disconnect.
+**		v0.4.13	Ethernet address is now set at probe(), not at open()
+**			time as this seems to break dhcpd. 
 */
 
 /*
@@ -48,7 +50,7 @@
 #include <linux/usb.h>
 
 
-static const char *version = __FILE__ ": v0.4.10 2000/09/25 (C) 1999-2000 Petko Manolov (petkan@dce.bg)";
+static const char *version = __FILE__ ": v0.4.13 2000/10/13 (C) 1999-2000 Petko Manolov (petkan@dce.bg)";
 
 
 #define	PEGASUS_USE_INTR
@@ -87,6 +89,7 @@
 #define	PEGASUS_RX_BUSY		0x00000008
 #define	CTRL_URB_RUNNING	0x00000010
 #define	CTRL_URB_SLEEP		0x00000020
+#define	PEGASUS_UNPLUG		0x00000040
 #define	ETH_REGS_CHANGE		0x40000000
 #define	ETH_REGS_CHANGED	0x80000000
 
@@ -96,12 +99,6 @@
 #define	REG_TIMEOUT		(HZ)
 #define	PEGASUS_TX_TIMEOUT	(HZ*10)
 
-#ifdef	PEGASUS_USE_INTR
-#	define	INTR_IVAL	0x80
-#else
-#	define	INTR_IVAL	0
-#endif
-
 #define	TX_UNDERRUN		0x80
 #define	EXCESSIVE_COL		0x40
 #define	LATE_COL		0x20
@@ -146,6 +143,7 @@
 	struct net_device_stats	stats;
 	unsigned		flags;
 	unsigned		features;
+	int			intr_interval;
 	struct urb		ctrl_urb, rx_urb, tx_urb, intr_urb;
 	devrequest		dr;
 	wait_queue_head_t	ctrl_wait;
@@ -185,13 +183,14 @@
 	{"MELCO/BUFFALO LUA-TX", 0x0411, 0x0001, DEFAULT_GPIO_RESET},
 	{"D-Link DSB-650TX", 0x2001, 0x4001, LINKSYS_GPIO_RESET},
 	{"D-Link DSB-650TX", 0x2001, 0x4002, LINKSYS_GPIO_RESET},
-	{"D-Link DSB-650TX(PNA)", 0x2001, 0x4003, DEFAULT_GPIO_RESET},
+	{"D-Link DSB-650TX(PNA)", 0x2001, 0x4003,
+		HAS_HOME_PNA | DEFAULT_GPIO_RESET},
 	{"D-Link DSB-650", 0x2001, 0xabc1, DEFAULT_GPIO_RESET},
 	{"D-Link DU-E10", 0x07b8, 0xabc1, DEFAULT_GPIO_RESET},
 	{"D-Link DU-E100", 0x07b8, 0x4002, DEFAULT_GPIO_RESET},
 	{"Linksys USB10TX", 0x066b, 0x2202, LINKSYS_GPIO_RESET},
 	{"Linksys USB100TX", 0x066b, 0x2203, LINKSYS_GPIO_RESET},
-	{"Linksys USB100TX", 0x066b, 0x2204, LINKSYS_GPIO_RESET},
+	{"Linksys USB100TX", 0x066b, 0x2204, HAS_HOME_PNA | LINKSYS_GPIO_RESET},
 	{"Linksys USB Ethernet Adapter", 0x066b, 0x2206, LINKSYS_GPIO_RESET},
 	{"SMC 202 USB Ethernet", 0x0707, 0x0200, DEFAULT_GPIO_RESET},
 	{"ADMtek AN986 \"Pegasus\" USB Ethernet (eval board)", 0x07a6, 0x0986, 
@@ -211,7 +210,7 @@
 /* Aargh!!! I _really_ hate such tweaks */
 static void ctrl_callback( urb_t *urb )
 {
-	pegasus_t		*pegasus = urb->context;
+	pegasus_t	*pegasus = urb->context;
 
 	if ( !pegasus )
 		return;
@@ -262,11 +261,11 @@
 
 	if ( (ret = usb_submit_urb( &pegasus->ctrl_urb )) ) {
 		err( __FUNCTION__ " BAD CTRLs %d", ret);
-		return	ret;
+		goto out;
 	}
 	pegasus->flags |= CTRL_URB_SLEEP;
 	interruptible_sleep_on( &pegasus->ctrl_wait );
-
+out:
 	return	ret;
 }
 
@@ -421,7 +420,7 @@
 	return -1;
 }
 
-
+#ifdef	PEGASUS_WRITE_EEPROM
 static inline void enable_eprom_write( pegasus_t *pegasus )
 {
 	__u8	tmp;
@@ -463,40 +462,24 @@
 	warn( __FUNCTION__ " failed" );
 	return	-1;
 }
+#endif	/* PEGASUS_WRITE_EEPROM */
 
-
-static void set_intr_interval( pegasus_t *pegasus )
+static inline void get_node_id( pegasus_t *pegasus, __u8 *id )
 {
-	__u16	d;
-	__u8	tmp;
+	int	i;
 
-	read_eprom_word( pegasus, 4, &d );
-	((__u8 *)&d)[1] = INTR_IVAL;
-	write_eprom_word( pegasus, 4, d );
-	get_registers( pegasus, EthCtrl2, 1, &tmp );
-	set_register( pegasus, EthCtrl2, tmp | EPROM_LOAD );
-	udelay( 10000 );
-	set_register( pegasus, EthCtrl2, tmp );
-#ifdef	PEGASUS_DUMP_EEPROM  
-	{ int	i;
-	for ( i=0; i < 0x40; i++ ) {
-		read_eprom_word( pegasus, i, &d );
-		printk( "eepromword %02x-%04x, ", i, d );
-	}
-	printk( "\n" );
-	}
-#endif
+	for (i = 0; i < 3; i++)
+		read_eprom_word( pegasus, i, (__u16 *)&id[i*2]);
 }
 
 
-static inline int get_node_id( pegasus_t *pegasus, __u8 *id )
+static void set_ethernet_addr( pegasus_t *pegasus )
 {
-	int i;
+	__u8	node_id[6];
 
-	for (i = 0; i < 3; i++)
-		if ( read_eprom_word( pegasus, i, (__u16 *)&id[i*2]) )
-			return 1;
-	return 0;
+	get_node_id(pegasus, node_id);
+	set_registers( pegasus, EthID, sizeof(node_id), node_id );
+	memcpy( pegasus->net->dev_addr, node_id, sizeof(node_id) );
 }
 
 
@@ -529,15 +512,10 @@
 static int enable_net_traffic( struct net_device *dev, struct usb_device *usb )
 {
 	__u16	linkpart, bmsr;
-	__u8	node_id[6];
 	__u8	data[4];
 	pegasus_t *pegasus = dev->priv;
 
-	if ( get_node_id(pegasus, node_id) ) 
-		return 1;
 
-	set_registers( pegasus, EthID, sizeof(node_id), node_id );
-	memcpy( dev->dev_addr, node_id, sizeof(node_id) );
 	if ( read_phy_word(pegasus, pegasus->phy, MII_BMSR, &bmsr) ) 
 		return 2;
 	if ( !(bmsr & 0x20) && !loopback ) 
@@ -654,7 +632,7 @@
 	netif_wake_queue( pegasus->net );
 }
 
-
+#ifdef	PEGASUS_USE_INTR
 static void intr_callback( struct urb *urb )
 {
 	pegasus_t *pegasus = urb->context;
@@ -685,7 +663,7 @@
 			info("intr status %d", urb->status);
 	}
 }
-
+#endif
 
 static void pegasus_tx_timeout( struct net_device *net )
 {
@@ -710,8 +688,6 @@
 	int 	res;
 
 	netif_stop_queue( net );
-	if ( !(pegasus->flags & PEGASUS_RUNNING) )
-		return	0;
 		
 	((__u16 *)pegasus->tx_buff)[0] = skb->len;
 	memcpy(pegasus->tx_buff+2, skb->data, skb->len);
@@ -751,26 +727,44 @@
 }
 
 
+static inline void get_interrupt_interval( pegasus_t *pegasus )
+{
+	__u8	data[2];
+
+	read_eprom_word( pegasus, 4, (__u16 *)data );
+	pegasus->intr_interval = data[1];
+}
+
+
 static int pegasus_open(struct net_device *net)
 {
 	pegasus_t *pegasus = (pegasus_t *)net->priv;
 	int	res;
 
+	MOD_INC_USE_COUNT;
 	if ( (res = enable_net_traffic(net, pegasus->usb)) ) {
 		err("can't enable_net_traffic() - %d", res);
+		MOD_DEC_USE_COUNT;
 		return -EIO;
 	}
+	FILL_BULK_URB( &pegasus->rx_urb, pegasus->usb,
+			usb_rcvbulkpipe(pegasus->usb, 1),
+			pegasus->rx_buff, PEGASUS_MAX_MTU, 
+			read_bulk_callback, pegasus );
 	if ( (res = usb_submit_urb(&pegasus->rx_urb)) )
 		warn( __FUNCTION__ " failed rx_urb %d", res );
 #ifdef	PEGASUS_USE_INTR
+	get_interrupt_interval( pegasus );
+	FILL_INT_URB( &pegasus->intr_urb, pegasus->usb,
+			usb_rcvintpipe(pegasus->usb, 3),
+			pegasus->intr_buff, sizeof(pegasus->intr_buff),
+			intr_callback, pegasus, pegasus->intr_interval );
 	if ( (res = usb_submit_urb(&pegasus->intr_urb)) )
 		warn( __FUNCTION__ " failed intr_urb %d", res);
-#endif		
+#endif
 	netif_start_queue( net );
 	pegasus->flags |= PEGASUS_RUNNING;
 
-	MOD_INC_USE_COUNT;
-
 	return 0;
 }
 
@@ -779,9 +773,10 @@
 {
 	pegasus_t	*pegasus = net->priv;
 
-	netif_stop_queue( net );
 	pegasus->flags &= ~PEGASUS_RUNNING;
-	disable_net_traffic( pegasus );
+	netif_stop_queue( net );
+	if ( !(pegasus->flags & PEGASUS_UNPLUG) )
+		disable_net_traffic( pegasus );
 
 	usb_unlink_urb( &pegasus->rx_urb );
 	usb_unlink_urb( &pegasus->tx_urb );
@@ -904,13 +899,24 @@
 		err("out of memory allocating device structure");
 		return NULL;
 	}
+
+	usb_inc_dev_use( dev );
 	memset(pegasus, 0, sizeof(struct pegasus));
+	init_MUTEX( &pegasus-> ctrl_sem );
+	init_waitqueue_head( &pegasus->ctrl_wait );
 
-	net = init_etherdev(0, 0);
+	net = init_etherdev( NULL, 0 );
+	if ( !net ) {
+		kfree( pegasus );
+		return	NULL;
+	}
+	
+	pegasus->usb = dev;
+	pegasus->net = net;
 	net->priv = pegasus;
 	net->open = pegasus_open;
 	net->stop = pegasus_close;
-#if 0
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,48)
 	net->watchdog_timeo = PEGASUS_TX_TIMEOUT;
 	net->tx_timeout = pegasus_tx_timeout;
 #endif
@@ -920,22 +926,6 @@
 	net->get_stats = pegasus_netdev_stats;
 	net->mtu = PEGASUS_MTU;
 
-	init_MUTEX( &pegasus-> ctrl_sem );
-	init_waitqueue_head( &pegasus->ctrl_wait );
-
-	pegasus->usb = dev;
-	pegasus->net = net;
-
-	FILL_BULK_URB( &pegasus->rx_urb, dev, usb_rcvbulkpipe(dev, 1),
-			pegasus->rx_buff, PEGASUS_MAX_MTU, 
-			read_bulk_callback, pegasus );
-	FILL_BULK_URB( &pegasus->tx_urb, dev, usb_sndbulkpipe(dev, 2),
-			pegasus->tx_buff, PEGASUS_MAX_MTU, 
-			write_bulk_callback, pegasus );
-	FILL_INT_URB( &pegasus->intr_urb, dev, usb_rcvintpipe(dev, 3),
-			pegasus->intr_buff, 8, intr_callback,
-			pegasus, INTR_IVAL );
-
 	pegasus->features = usb_dev_id[dev_indx].private;
 	if ( reset_mac(pegasus) ) {
 		err("can't reset MAC");
@@ -945,19 +935,19 @@
 		return NULL;
 	}
 
+	set_ethernet_addr( pegasus );
+	
 	if ( pegasus->features & PEGASUS_II ) {
 		info( "setup Pegasus II specific registers" );
 		setup_pegasus_II( pegasus );
 	}
-
+	
 	pegasus->phy = mii_phy_probe( pegasus );
 	if ( !pegasus->phy ) {
 		warn( "can't locate MII phy, using default" );
 		pegasus->phy = 1;
 	}
 
-	set_intr_interval( pegasus );
-
 	info( "%s: %s", net->name, usb_dev_id[dev_indx].name );
 
 	return pegasus;
@@ -973,15 +963,9 @@
 		return;
 	}
 
-	netif_stop_queue( pegasus->net );
-	if ( pegasus->flags & PEGASUS_RUNNING ) {
-		pegasus->flags &= ~PEGASUS_RUNNING;
-		usb_unlink_urb( &pegasus->rx_urb );
-		usb_unlink_urb( &pegasus->tx_urb );
-		usb_unlink_urb( &pegasus->ctrl_urb );
-		usb_unlink_urb( &pegasus->intr_urb );
-	}
+	pegasus->flags |= PEGASUS_UNPLUG;
 	unregister_netdev( pegasus->net );
+	usb_dec_dev_use( dev );
 	kfree( pegasus );
 	pegasus = NULL;
 }
diff -urN linux-2.2.18-pre18/include/asm-i386/floppy.h linux/include/asm-i386/floppy.h
--- linux-2.2.18-pre18/include/asm-i386/floppy.h	Tue May 11 10:35:48 1999
+++ linux/include/asm-i386/floppy.h	Mon Dec  3 20:38:33 2001
@@ -285,8 +285,23 @@
 static int FDC1 = 0x3f0;
 static int FDC2 = -1;
 
-#define FLOPPY0_TYPE	((CMOS_READ(0x10) >> 4) & 15)
-#define FLOPPY1_TYPE	(CMOS_READ(0x10) & 15)
+#define FLOPPY0_TYPE	({				\
+	unsigned long flags;				\
+	unsigned char val;				\
+	spin_lock_irqsave(&rtc_lock, flags);		\
+	val = (CMOS_READ(0x10) >> 4) & 15;		\
+	spin_unlock_irqrestore(&rtc_lock, flags);	\
+	val;						\
+})
+
+#define FLOPPY1_TYPE	({				\
+	unsigned long flags;				\
+	unsigned char val;				\
+	spin_lock_irqsave(&rtc_lock, flags);		\
+	val = CMOS_READ(0x10) & 15;			\
+	spin_unlock_irqrestore(&rtc_lock, flags);	\
+	val;						\
+})
 
 #define N_FDC 2
 #define N_DRIVE 8
diff -urN linux-2.2.18-pre18/include/linux/divert.h linux/include/linux/divert.h
--- linux-2.2.18-pre18/include/linux/divert.h	Wed Dec 31 16:00:00 1969
+++ linux/include/linux/divert.h	Mon Dec  3 20:38:33 2001
@@ -0,0 +1,118 @@
+/*
+ * Frame Diversion, Benoit Locher <Benoit.Locher@skf.com>
+ *
+ * Changes:
+ * 		06/09/2000	BL:	initial version
+ * 
+ */
+ 
+#ifndef _LINUX_DIVERT_H
+#define _LINUX_DIVERT_H
+
+#include <asm/types.h>
+
+#define	MAX_DIVERT_PORTS	8	/* Max number of ports to divert (tcp, udp) */
+
+/* Divertable protocols */
+#define	DIVERT_PROTO_NONE	0x0000
+#define	DIVERT_PROTO_IP		0x0001
+#define	DIVERT_PROTO_ICMP	0x0002
+#define	DIVERT_PROTO_TCP	0x0004
+#define	DIVERT_PROTO_UDP	0x0008
+
+/*
+ *	This is an Ethernet Frame Diverter option block
+ */
+struct divert_blk
+{
+	int		divert;  /* are we active */
+	unsigned int protos;	/* protocols */
+	u16		tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */
+	u16		tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */
+	u16		udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */
+	u16		udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */
+};
+
+/*
+ * Diversion control block, for configuration with the userspace tool
+ * divert
+ */
+
+typedef union _divert_cf_arg
+{
+	s16		int16;
+	u16		uint16;
+	s32		int32;
+	u32		uint32;
+	s64		int64;
+	u64		uint64;
+	void	*ptr;
+} divert_cf_arg;
+
+
+struct divert_cf
+{
+	int	cmd;				/* Command */
+	divert_cf_arg 	arg1,
+					arg2,
+					arg3;
+	int	dev_index;	/* device index (eth0=0, etc...) */
+};
+
+
+/* Diversion commands */
+#define	DIVCMD_DIVERT			1 /* ENABLE/DISABLE diversion */
+#define	DIVCMD_IP				2 /* ENABLE/DISABLE whold IP diversion */
+#define	DIVCMD_TCP				3 /* ENABLE/DISABLE whold TCP diversion */
+#define	DIVCMD_TCPDST			4 /* ADD/REMOVE TCP DST port for diversion */
+#define	DIVCMD_TCPSRC			5 /* ADD/REMOVE TCP SRC port for diversion */
+#define	DIVCMD_UDP				6 /* ENABLE/DISABLE whole UDP diversion */
+#define	DIVCMD_UDPDST			7 /* ADD/REMOVE UDP DST port for diversion */
+#define	DIVCMD_UDPSRC			8 /* ADD/REMOVE UDP SRC port for diversion */
+#define	DIVCMD_ICMP				9 /* ENABLE/DISABLE whole ICMP diversion */
+#define	DIVCMD_GETSTATUS		10 /* GET the status of the diverter */
+#define	DIVCMD_RESET			11 /* Reset the diverter on the specified dev */
+#define DIVCMD_GETVERSION		12 /* Retrieve the diverter code version (char[32]) */
+
+/* General syntax of the commands:
+ * 
+ * DIVCMD_xxxxxx(arg1, arg2, arg3, dev_index)
+ * 
+ * SIOCSIFDIVERT:
+ *   DIVCMD_DIVERT(DIVARG1_ENABLE|DIVARG1_DISABLE, , ,ifindex)
+ *   DIVCMD_IP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
+ *   DIVCMD_TCP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
+ *   DIVCMD_TCPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
+ *   DIVCMD_TCPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
+ *   DIVCMD_UDP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
+ *   DIVCMD_UDPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
+ *   DIVCMD_UDPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
+ *   DIVCMD_ICMP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
+ *   DIVCMD_RESET(, , , ifindex)
+ *   
+ * SIOGIFDIVERT:
+ *   DIVCMD_GETSTATUS(divert_blk, , , ifindex)
+ *   DIVCMD_GETVERSION(string[3])
+ */
+
+
+/* Possible values for arg1 */
+#define	DIVARG1_ENABLE			0 /* ENABLE something */
+#define	DIVARG1_DISABLE			1 /* DISABLE something */
+#define DIVARG1_ADD				2 /* ADD something */
+#define DIVARG1_REMOVE			3 /* REMOVE something */
+
+
+#ifdef __KERNEL__
+
+/* diverter functions */
+#include <linux/skbuff.h>
+void dv_init(void);
+int alloc_divert_blk(struct device *);
+void free_divert_blk(struct device *);
+int divert_ioctl(unsigned int cmd, struct divert_cf *arg);
+void divert_frame(struct sk_buff *skb);
+
+#endif __KERNEL__
+
+#endif	/* _LINUX_DIVERT_H */
diff -urN linux-2.2.18-pre18/include/linux/if_ether.h linux/include/linux/if_ether.h
--- linux-2.2.18-pre18/include/linux/if_ether.h	Wed Jun  2 11:29:28 1999
+++ linux/include/linux/if_ether.h	Mon Dec  3 20:38:34 2001
@@ -56,6 +56,10 @@
 #define ETH_P_AARP	0x80F3		/* Appletalk AARP		*/
 #define ETH_P_IPX	0x8137		/* IPX over DIX			*/
 #define ETH_P_IPV6	0x86DD		/* IPv6 over bluebook		*/
+#define ETH_P_ATMMPOA	0x884c		/* MultiProtocol Over ATM	*/
+#define ETH_P_ATMFATE	0x8884		/* Frame-based ATM Transport
+					 * over Ethernet
+					 */
 
 /*
  *	Non DIX types. Won't clash for 1500 types.
diff -urN linux-2.2.18-pre18/include/linux/netdevice.h linux/include/linux/netdevice.h
--- linux-2.2.18-pre18/include/linux/netdevice.h	Mon Dec  3 20:37:51 2001
+++ linux/include/linux/netdevice.h	Mon Dec  3 20:38:34 2001
@@ -30,9 +30,6 @@
 #include <linux/if.h>
 #include <linux/if_ether.h>
 #include <linux/if_packet.h>
-#ifdef __KERNEL__
-#include <net/divert.h>
-#endif
 
 #include <asm/atomic.h>
 
@@ -41,6 +38,8 @@
 #include <net/profile.h>
 #endif
 #endif
+
+struct divert_blk;
 
 /*
  *	For future expansion when we will have different priorities. 
diff -urN linux-2.2.18-pre18/include/linux/soundcard.h linux/include/linux/soundcard.h
--- linux-2.2.18-pre18/include/linux/soundcard.h	Mon Aug  9 12:04:41 1999
+++ linux/include/linux/soundcard.h	Mon Dec  3 20:38:34 2001
@@ -76,8 +76,8 @@
  */
 
 #ifndef _SIOWR
-#if defined(_IOWR) && (defined(_AIX) || (!defined(sun) && !defined(sparc) && !defined(__INCioctlh) && !defined(__Lynx__)))
-/* Use already defined ioctl defines if they exist (except with Sun) */
+#if defined(_IOWR) && (defined(_AIX) || (!defined(sun) && !defined(sparc) && !defined(__sparc__) && !defined(__INCioctlh) && !defined(__Lynx__)))
+/* Use already defined ioctl defines if they exist (except with Sun or Sparc) */
 #define	SIOCPARM_MASK	IOCPARM_MASK
 #define	SIOC_VOID	IOC_VOID
 #define	SIOC_OUT	IOC_OUT
@@ -179,7 +179,7 @@
  * Some big endian/little endian handling macros
  */
 
-#if defined(_AIX) || defined(AIX) || defined(sparc) || defined(HPPA) || defined(PPC)
+#if defined(_AIX) || defined(AIX) || defined(sparc) || defined(__sparc__) || defined(HPPA) || defined(PPC)
 /* Big endian machines */
 #  define _PATCHKEY(id) (0xfd00|id)
 #  define AFMT_S16_NE AFMT_S16_BE
diff -urN linux-2.2.18-pre18/include/net/divert.h linux/include/net/divert.h
--- linux-2.2.18-pre18/include/net/divert.h	Mon Dec  3 20:37:51 2001
+++ linux/include/net/divert.h	Wed Dec 31 16:00:00 1969
@@ -1,118 +0,0 @@
-/*
- * Frame Diversion, Benoit Locher <Benoit.Locher@skf.com>
- *
- * Changes:
- * 		06/09/2000	BL:	initial version
- * 
- */
- 
-#ifndef _LINUX_DIVERT_H
-#define _LINUX_DIVERT_H
-
-#include <asm/types.h>
-
-#define	MAX_DIVERT_PORTS	8	/* Max number of ports to divert (tcp, udp) */
-
-/* Divertable protocols */
-#define	DIVERT_PROTO_NONE	0x0000
-#define	DIVERT_PROTO_IP		0x0001
-#define	DIVERT_PROTO_ICMP	0x0002
-#define	DIVERT_PROTO_TCP	0x0004
-#define	DIVERT_PROTO_UDP	0x0008
-
-/*
- *	This is an Ethernet Frame Diverter option block
- */
-struct divert_blk
-{
-	int		divert;  /* are we active */
-	unsigned int protos;	/* protocols */
-	u16		tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */
-	u16		tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */
-	u16		udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */
-	u16		udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */
-};
-
-/*
- * Diversion control block, for configuration with the userspace tool
- * divert
- */
-
-typedef union _divert_cf_arg
-{
-	s16		int16;
-	u16		uint16;
-	s32		int32;
-	u32		uint32;
-	s64		int64;
-	u64		uint64;
-	void	*ptr;
-} divert_cf_arg;
-
-
-struct divert_cf
-{
-	int	cmd;				/* Command */
-	divert_cf_arg 	arg1,
-					arg2,
-					arg3;
-	int	dev_index;	/* device index (eth0=0, etc...) */
-};
-
-
-/* Diversion commands */
-#define	DIVCMD_DIVERT			1 /* ENABLE/DISABLE diversion */
-#define	DIVCMD_IP				2 /* ENABLE/DISABLE whold IP diversion */
-#define	DIVCMD_TCP				3 /* ENABLE/DISABLE whold TCP diversion */
-#define	DIVCMD_TCPDST			4 /* ADD/REMOVE TCP DST port for diversion */
-#define	DIVCMD_TCPSRC			5 /* ADD/REMOVE TCP SRC port for diversion */
-#define	DIVCMD_UDP				6 /* ENABLE/DISABLE whole UDP diversion */
-#define	DIVCMD_UDPDST			7 /* ADD/REMOVE UDP DST port for diversion */
-#define	DIVCMD_UDPSRC			8 /* ADD/REMOVE UDP SRC port for diversion */
-#define	DIVCMD_ICMP				9 /* ENABLE/DISABLE whole ICMP diversion */
-#define	DIVCMD_GETSTATUS		10 /* GET the status of the diverter */
-#define	DIVCMD_RESET			11 /* Reset the diverter on the specified dev */
-#define DIVCMD_GETVERSION		12 /* Retrieve the diverter code version (char[32]) */
-
-/* General syntax of the commands:
- * 
- * DIVCMD_xxxxxx(arg1, arg2, arg3, dev_index)
- * 
- * SIOCSIFDIVERT:
- *   DIVCMD_DIVERT(DIVARG1_ENABLE|DIVARG1_DISABLE, , ,ifindex)
- *   DIVCMD_IP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
- *   DIVCMD_TCP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
- *   DIVCMD_TCPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
- *   DIVCMD_TCPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
- *   DIVCMD_UDP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
- *   DIVCMD_UDPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
- *   DIVCMD_UDPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
- *   DIVCMD_ICMP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
- *   DIVCMD_RESET(, , , ifindex)
- *   
- * SIOGIFDIVERT:
- *   DIVCMD_GETSTATUS(divert_blk, , , ifindex)
- *   DIVCMD_GETVERSION(string[3])
- */
-
-
-/* Possible values for arg1 */
-#define	DIVARG1_ENABLE			0 /* ENABLE something */
-#define	DIVARG1_DISABLE			1 /* DISABLE something */
-#define DIVARG1_ADD				2 /* ADD something */
-#define DIVARG1_REMOVE			3 /* REMOVE something */
-
-
-#ifdef __KERNEL__
-
-/* diverter functions */
-#include <linux/skbuff.h>
-void dv_init(void);
-int alloc_divert_blk(struct device *);
-void free_divert_blk(struct device *);
-int divert_ioctl(unsigned int cmd, struct divert_cf *arg);
-void divert_frame(struct sk_buff *skb);
-
-#endif __KERNEL__
-
-#endif	/* _LINUX_DIVERT_H */
diff -urN linux-2.2.18-pre18/net/core/dev.c linux/net/core/dev.c
--- linux-2.2.18-pre18/net/core/dev.c	Mon Dec  3 20:37:51 2001
+++ linux/net/core/dev.c	Mon Dec  3 20:38:34 2001
@@ -85,7 +85,7 @@
 #include <linux/proc_fs.h>
 #include <linux/stat.h>
 #include <net/br.h>
-#include <net/divert.h>
+#include <linux/divert.h>
 #include <net/dst.h>
 #include <net/pkt_sched.h>
 #include <net/profile.h>
diff -urN linux-2.2.18-pre18/net/core/dv.c linux/net/core/dv.c
--- linux-2.2.18-pre18/net/core/dv.c	Mon Dec  3 20:37:51 2001
+++ linux/net/core/dv.c	Mon Dec  3 20:38:34 2001
@@ -36,7 +36,7 @@
 #include <asm/uaccess.h>
 #include <asm/system.h>
 #include <asm/checksum.h>
-#include <net/divert.h>
+#include <linux/divert.h>
 #include <linux/sockios.h>
 
 const char sysctl_divert_version[32]="0.461";	/* Current version */
diff -urN linux-2.2.18-pre18/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
--- linux-2.2.18-pre18/net/ipv4/af_inet.c	Mon Dec  3 20:37:51 2001
+++ linux/net/ipv4/af_inet.c	Mon Dec  3 20:38:34 2001
@@ -5,7 +5,7 @@
  *
  *		PF_INET protocol family socket handler.
  *
- * Version:	$Id: af_inet.c,v 1.87.2.10 2000/09/20 01:47:40 davem Exp $
+ * Version:	$Id: af_inet.c,v 1.87.2.11 2000/10/24 21:28:46 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -111,7 +111,7 @@
 #endif
  
 #ifdef CONFIG_NET_DIVERT
-#include <net/divert.h>
+#include <linux/divert.h>
 #endif /* CONFIG_NET_DIVERT */
  
 #ifdef CONFIG_KMOD
diff -urN linux-2.2.18-pre18/net/ipv4/arp.c linux/net/ipv4/arp.c
--- linux-2.2.18-pre18/net/ipv4/arp.c	Mon Dec  3 20:37:51 2001
+++ linux/net/ipv4/arp.c	Mon Dec  3 20:38:34 2001
@@ -1,6 +1,6 @@
 /* linux/net/inet/arp.c
  *
- * Version:	$Id: arp.c,v 1.77.2.6 2000/05/27 04:46:43 davem Exp $
+ * Version:	$Id: arp.c,v 1.77.2.7 2000/10/29 11:41:15 davem Exp $
  *
  * Copyright (C) 1994 by Florian  La Roche
  *
diff -urN linux-2.2.18-pre18/net/ipv4/devinet.c linux/net/ipv4/devinet.c
--- linux-2.2.18-pre18/net/ipv4/devinet.c	Mon Dec  3 20:37:51 2001
+++ linux/net/ipv4/devinet.c	Mon Dec  3 20:38:34 2001
@@ -1,7 +1,7 @@
 /*
  *	NET3	IP device support routines.
  *
- *	Version: $Id: devinet.c,v 1.28.2.3 1999/12/14 10:32:42 davem Exp $
+ *	Version: $Id: devinet.c,v 1.28.2.4 2000/10/29 11:41:15 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.18-pre18/net/ipv4/ipconfig.c linux/net/ipv4/ipconfig.c
--- linux-2.2.18-pre18/net/ipv4/ipconfig.c	Mon Dec  3 20:37:51 2001
+++ linux/net/ipv4/ipconfig.c	Mon Dec  3 20:38:34 2001
@@ -1,5 +1,5 @@
 /*
- *  $Id: ipconfig.c,v 1.20.2.1 1999/06/28 11:33:27 davem Exp $
+ *  $Id: ipconfig.c,v 1.20.2.3 2000/09/07 03:55:40 davem Exp $
  *
  *  Automatic Configuration of IP -- use DHCP, BOOTP, RARP, or
  *  user-supplied information to configure own IP address and routes.
diff -urN linux-2.2.18-pre18/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
--- linux-2.2.18-pre18/net/ipv4/tcp_ipv4.c	Mon Dec  3 20:37:51 2001
+++ linux/net/ipv4/tcp_ipv4.c	Mon Dec  3 20:38:34 2001
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_ipv4.c,v 1.175.2.16 2000/06/28 04:54:17 davem Exp $
+ * Version:	$Id: tcp_ipv4.c,v 1.175.2.17 2000/10/31 22:42:58 davem Exp $
  *
  *		IPv4 specific functions
  *
@@ -1909,8 +1909,17 @@
 
 static struct sock * tcp_v4_get_sock(struct sk_buff *skb, struct tcphdr *th)
 {
-	return tcp_v4_lookup(skb->nh.iph->saddr, th->source,
-			     skb->nh.iph->daddr, th->dest, skb->dev->ifindex);
+#ifdef CONFIG_IP_TRANSPARENT_PROXY
+	if (IPCB(skb)->redirport)
+		return tcp_v4_proxy_lookup(th->dest, skb->nh.iph->saddr,
+					   th->source,  skb->nh.iph->daddr,
+					   skb->dev, IPCB(skb)->redirport,
+					   skb->dev->ifindex);
+	else
+#endif
+		return tcp_v4_lookup(skb->nh.iph->saddr, th->source,
+				     skb->nh.iph->daddr, th->dest,
+				     skb->dev->ifindex);
 }
 
 static void v4_addr2sockaddr(struct sock *sk, struct sockaddr * uaddr)
diff -urN linux-2.2.18-pre18/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
--- linux-2.2.18-pre18/net/ipv4/tcp_output.c	Mon Dec  3 20:37:51 2001
+++ linux/net/ipv4/tcp_output.c	Mon Dec  3 20:38:34 2001
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_output.c,v 1.108.2.9 2000/09/02 01:27:51 davem Exp $
+ * Version:	$Id: tcp_output.c,v 1.108.2.10 2000/10/29 01:52:21 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -195,7 +195,7 @@
 		TCP_SKB_CB(skb)->when = tcp_time_stamp;
 		tp->snd_nxt = TCP_SKB_CB(skb)->end_seq;
 		tp->packets_out++;
-		tcp_transmit_skb(sk, skb_clone(skb, GFP_KERNEL));
+		tcp_transmit_skb(sk, skb_clone(skb, sk->allocation));
 		if(!tcp_timer_is_set(sk, TIME_RETRANS))
 			tcp_reset_xmit_timer(sk, TIME_RETRANS, tp->rto);
 	} else {
diff -urN linux-2.2.18-pre18/net/netsyms.c linux/net/netsyms.c
--- linux-2.2.18-pre18/net/netsyms.c	Mon Dec  3 20:37:51 2001
+++ linux/net/netsyms.c	Mon Dec  3 20:38:34 2001
@@ -34,7 +34,7 @@
 #endif
 
 #ifdef CONFIG_NET_DIVERT
-#include <net/divert.h>
+#include <linux/divert.h>
 #endif /* CONFIG_NET_DIVERT */
 
 #ifdef CONFIG_INET
diff -urN linux-2.2.18-pre18/net/packet/af_packet.c linux/net/packet/af_packet.c
--- linux-2.2.18-pre18/net/packet/af_packet.c	Mon Dec  3 20:37:51 2001
+++ linux/net/packet/af_packet.c	Mon Dec  3 20:38:34 2001
@@ -5,7 +5,7 @@
  *
  *		PACKET - implements raw packet sockets.
  *
- * Version:	$Id: af_packet.c,v 1.19.2.2 2000/09/20 01:47:40 davem Exp $
+ * Version:	$Id: af_packet.c,v 1.19.2.3 2000/10/24 21:28:47 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -73,7 +73,7 @@
 #endif
 
 #ifdef CONFIG_NET_DIVERT
-#include <net/divert.h>
+#include <linux/divert.h>
 #endif /* CONFIG_NET_DIVERT */
 
 #ifdef CONFIG_DLCI
