## Automatically generated incremental diff
## From:   linux-2.4.18-pre9
## To:     linux-2.4.18-rc1
## Robot:  $Id: make-incremental-diff,v 1.9 2001/12/10 00:06:56 hpa Exp $

diff -urN linux-2.4.18-pre9/Documentation/Configure.help linux/Documentation/Configure.help
--- linux-2.4.18-pre9/Documentation/Configure.help	Wed Feb 13 12:43:29 2002
+++ linux/Documentation/Configure.help	Wed Feb 13 12:43:35 2002
@@ -10864,6 +10864,15 @@
   More specific information and updates are available from
   <http://www.scyld.com/network/natsemi.html>.
 
+NatSemi workaround for high errors
+CONFIG_NATSEMI_CABLE_MAGIC
+  Some systems see lots of errors with NatSemi ethernet controllers
+  on certain cables.  If you are seeing lots of errors, try turning
+  this option on.  Some boards have incorrect values for supporting
+  resistors that can cause this change to break.  If you turn this
+  option on and your network suddenly stops working, turn this
+  option off.
+
 SK_G16 support
 CONFIG_SK_G16
   If you have a network (Ethernet) card of this type, say Y and read
diff -urN linux-2.4.18-pre9/Makefile linux/Makefile
--- linux-2.4.18-pre9/Makefile	Wed Feb 13 12:43:29 2002
+++ linux/Makefile	Wed Feb 13 12:43:35 2002
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 18
-EXTRAVERSION = -pre9
+EXTRAVERSION = -rc1
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.18-pre9/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
--- linux-2.4.18-pre9/arch/i386/kernel/process.c	Wed Feb 13 12:43:29 2002
+++ linux/arch/i386/kernel/process.c	Wed Feb 13 12:43:43 2002
@@ -41,6 +41,7 @@
 #include <asm/ldt.h>
 #include <asm/processor.h>
 #include <asm/i387.h>
+#include <asm/irq.h>
 #include <asm/desc.h>
 #include <asm/mmu_context.h>
 #ifdef CONFIG_MATH_EMULATION
@@ -542,6 +543,8 @@
 			BUG();
 		}
 	}
+
+	release_x86_irqs(dead_task);
 }
 
 /*
diff -urN linux-2.4.18-pre9/arch/i386/kernel/vm86.c linux/arch/i386/kernel/vm86.c
--- linux-2.4.18-pre9/arch/i386/kernel/vm86.c	Wed Feb 13 12:43:29 2002
+++ linux/arch/i386/kernel/vm86.c	Wed Feb 13 12:43:43 2002
@@ -16,6 +16,7 @@
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
 #include <asm/io.h>
+#include <asm/irq.h>
 
 /*
  * Known problems:
@@ -610,6 +611,14 @@
 	}
 	read_unlock(&tasklist_lock);
 	return ret;
+}
+
+void release_x86_irqs(struct task_struct *task)
+{
+	int i;
+	for (i=3; i<16; i++)
+	    if (vm86_irqs[i].tsk == task)
+		free_vm86_irq(i);
 }
 
 static inline void handle_irq_zombies(void)
diff -urN linux-2.4.18-pre9/arch/ppc/kernel/ppc8260_pic.c linux/arch/ppc/kernel/ppc8260_pic.c
--- linux-2.4.18-pre9/arch/ppc/kernel/ppc8260_pic.c	Mon May 21 17:04:47 2001
+++ linux/arch/ppc/kernel/ppc8260_pic.c	Wed Feb 13 12:43:46 2002
@@ -85,6 +85,22 @@
 	sipnr[word] = 1 << (31 - bit);
 }
 
+static void m8260_end_irq(unsigned int irq_nr)
+{
+	int	bit, word;
+	volatile uint	*simr;
+
+	if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))) {
+
+		bit = irq_to_siubit[irq_nr];
+		word = irq_to_siureg[irq_nr];
+
+		simr = &(immr->im_intctl.ic_simrh);
+		ppc_cached_irq_mask[word] |= (1 << (31 - bit));
+		simr[word] = ppc_cached_irq_mask[word];
+	}
+}
+
 struct hw_interrupt_type ppc8260_pic = {
 	" 8260 SIU  ",
 	NULL,
@@ -92,6 +108,7 @@
 	m8260_unmask_irq,
 	m8260_mask_irq,
 	m8260_mask_and_ack,
+	m8260_end_irq,
 	0
 };
 
@@ -106,6 +123,9 @@
          * to get the irq number.         */
         bits = immr->im_intctl.ic_sivec;
         irq = bits >> 26;
+
+	if (irq == 0)
+		return(-1);
 #if 0
         irq += ppc8260_pic.irq_offset;
 #endif
diff -urN linux-2.4.18-pre9/drivers/atm/firestream.c linux/drivers/atm/firestream.c
--- linux-2.4.18-pre9/drivers/atm/firestream.c	Fri Dec 21 09:41:53 2001
+++ linux/drivers/atm/firestream.c	Wed Feb 13 12:43:48 2002
@@ -1530,7 +1530,7 @@
 	fs_dprintk (FS_DEBUG_QUEUE, "Added %d entries. \n", n);
 }
 
-static void __exit free_queue (struct fs_dev *dev, struct queue *txq)
+static void __devexit free_queue (struct fs_dev *dev, struct queue *txq)
 {
 	func_enter ();
 
@@ -1546,7 +1546,7 @@
 	func_exit ();
 }
 
-static void __exit free_freepool (struct fs_dev *dev, struct freepool *fp)
+static void __devexit free_freepool (struct fs_dev *dev, struct freepool *fp)
 {
 	func_enter ();
 
@@ -2088,7 +2088,7 @@
 #endif 
 */
 
-const static struct pci_device_id firestream_pci_tbl[] __devinitdata = {
+static struct pci_device_id firestream_pci_tbl[] __devinitdata = {
 	{ PCI_VENDOR_ID_FUJITSU_ME, PCI_DEVICE_ID_FUJITSU_FS50, 
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, FS_IS50},
 	{ PCI_VENDOR_ID_FUJITSU_ME, PCI_DEVICE_ID_FUJITSU_FS155, 
diff -urN linux-2.4.18-pre9/drivers/char/mwave/mwavedd.c linux/drivers/char/mwave/mwavedd.c
--- linux-2.4.18-pre9/drivers/char/mwave/mwavedd.c	Thu Oct 11 09:14:32 2001
+++ linux/drivers/char/mwave/mwavedd.c	Wed Feb 13 12:43:48 2002
@@ -462,7 +462,7 @@
 * mwave_exit is called on module unload
 * mwave_exit is also used to clean up after an aborted mwave_init
 */
-static void __exit mwave_exit(void)
+static void mwave_exit(void)
 {
 	pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd;
 
diff -urN linux-2.4.18-pre9/drivers/char/synclink.c linux/drivers/char/synclink.c
--- linux-2.4.18-pre9/drivers/char/synclink.c	Fri Dec 21 09:41:54 2001
+++ linux/drivers/char/synclink.c	Wed Feb 13 12:43:48 2002
@@ -940,7 +940,7 @@
 	name:		"synclink",
 	id_table:	synclink_pci_tbl,
 	probe:		synclink_init_one,
-	remove:		synclink_remove_one,
+	remove:		__devexit_p(synclink_remove_one),
 };
 
 static struct tty_driver serial_driver, callout_driver;
@@ -8219,7 +8219,7 @@
 	return 0;
 }
 
-static void __exit synclink_remove_one (struct pci_dev *dev)
+static void __devexit synclink_remove_one (struct pci_dev *dev)
 {
 }
 
diff -urN linux-2.4.18-pre9/drivers/isdn/avmb1/capi.c linux/drivers/isdn/avmb1/capi.c
--- linux-2.4.18-pre9/drivers/isdn/avmb1/capi.c	Wed Feb 13 12:43:31 2002
+++ linux/drivers/isdn/avmb1/capi.c	Wed Feb 13 12:43:49 2002
@@ -1772,7 +1772,7 @@
 /* -------- init function and module interface ---------------------- */
 
 
-static void __exit alloc_exit(void)
+static void alloc_exit(void)
 {
 	if (capidev_cachep) {
 		(void)kmem_cache_destroy(capidev_cachep);
diff -urN linux-2.4.18-pre9/drivers/media/video/bttv-driver.c linux/drivers/media/video/bttv-driver.c
--- linux-2.4.18-pre9/drivers/media/video/bttv-driver.c	Fri Dec 21 09:41:54 2001
+++ linux/drivers/media/video/bttv-driver.c	Wed Feb 13 12:43:49 2002
@@ -2820,7 +2820,7 @@
  *	Scan for a Bt848 card, request the irq and map the io memory 
  */
 
-static void __devexit bttv_remove(struct pci_dev *pci_dev)
+static void bttv_remove(struct pci_dev *pci_dev)
 {
         u8 command;
         int j;
@@ -3025,7 +3025,7 @@
         name:     "bttv",
         id_table: bttv_pci_tbl,
         probe:    bttv_probe,
-        remove:   __devexit_p(bttv_remove),
+        remove:   bttv_remove,
 };
 
 int bttv_init_module(void)
diff -urN linux-2.4.18-pre9/drivers/media/video/zr36120.c linux/drivers/media/video/zr36120.c
--- linux-2.4.18-pre9/drivers/media/video/zr36120.c	Fri Nov  9 14:01:22 2001
+++ linux/drivers/media/video/zr36120.c	Wed Feb 13 12:43:49 2002
@@ -2025,7 +2025,7 @@
 }
 
 static
-void __exit release_zoran(int max)
+void release_zoran(int max)
 {
 	struct zoran *ztv;
 	int i;
diff -urN linux-2.4.18-pre9/drivers/message/i2o/i2o_block.c linux/drivers/message/i2o/i2o_block.c
--- linux-2.4.18-pre9/drivers/message/i2o/i2o_block.c	Thu Oct 25 13:58:35 2001
+++ linux/drivers/message/i2o/i2o_block.c	Wed Feb 13 12:43:49 2002
@@ -282,6 +282,7 @@
 	
 	if(req->cmd == READ)
 	{
+		DEBUG("READ\n");
 		__raw_writel(I2O_CMD_BLOCK_READ<<24|HOST_TID<<12|tid, msg+4);
 		while(bh!=NULL)
 		{
@@ -321,6 +322,7 @@
 	}
 	else if(req->cmd == WRITE)
 	{
+		DEBUG("WRITE\n");
 		__raw_writel(I2O_CMD_BLOCK_WRITE<<24|HOST_TID<<12|tid, msg+4);
 		while(bh!=NULL)
 		{
@@ -415,6 +417,7 @@
 	 * It is now ok to complete the request.
 	 */
 	end_that_request_last( req );
+	DEBUG("IO COMPLETED\n");
 }
 
 /*
@@ -493,7 +496,7 @@
 	__raw_writel(i2ob_context|(unit<<8), msg+8);
 	__raw_writel(0, msg+12);
 	__raw_writel(60<<16, msg+16);
-	
+	DEBUG("FLUSH");
 	i2o_post_message(c,m);
 	return 0;
 }
@@ -522,6 +525,7 @@
 	 */
 	if(m[0] & (1<<13))
 	{
+		DEBUG("FAIL");
 		/*
 		 * FAILed message from controller
 		 * We increment the error count and abort it
@@ -561,7 +565,7 @@
 	{
 		spin_lock_irqsave(&io_request_lock, flags);
 		dev->constipated=0;
-		DEBUG(("unconstipated\n"));
+		DEBUG("unconstipated\n");
 		if(i2ob_backlog_request(c, dev)==0)
 			i2ob_request(dev->req_queue);
 		spin_unlock_irqrestore(&io_request_lock, flags);
@@ -861,7 +865,7 @@
 			 * and tell them to fix their firmware :)
 			 */
 			default:
-				printk(KERN_INFO "%s: Received event %d we didn't register for\n"
+				printk(KERN_INFO "%s: Received event 0x%X we didn't register for\n"
 					KERN_INFO "   Blame the I2O card manufacturer 8)\n", 
 					i2ob_dev[unit].i2odev->dev_name, evt);
 				break;
@@ -1205,9 +1209,6 @@
 	if(!dev->i2odev)
 		return 0;
 
-	/* Sync the device so we don't get errors */
-	fsync_dev(inode->i_rdev);
-
 	if (dev->refcnt <= 0)
 		printk(KERN_ALERT "i2ob_release: refcount(%d) <= 0\n", dev->refcnt);
 	dev->refcnt--;
@@ -1470,19 +1471,16 @@
 {
 	int i;
 
-	i2ob_queues[unit] = (struct i2ob_iop_queue*)
-		kmalloc(sizeof(struct i2ob_iop_queue), GFP_ATOMIC);
+	i2ob_queues[unit] = (struct i2ob_iop_queue*) kmalloc(sizeof(struct i2ob_iop_queue), GFP_ATOMIC);
 	if(!i2ob_queues[unit])
 	{
-		printk(KERN_WARNING
-			"Could not allocate request queue for I2O block device!\n");
+		printk(KERN_WARNING "Could not allocate request queue for I2O block device!\n");
 		return -1;
 	}
 
 	for(i = 0; i< MAX_I2OB_DEPTH; i++)
 	{
-		i2ob_queues[unit]->request_queue[i].next = 
-			&i2ob_queues[unit]->request_queue[i+1];
+		i2ob_queues[unit]->request_queue[i].next =  &i2ob_queues[unit]->request_queue[i+1];
 		i2ob_queues[unit]->request_queue[i].num = i;
 	}
 	
@@ -1507,7 +1505,6 @@
 static request_queue_t* i2ob_get_queue(kdev_t dev)
 {
 	int unit = MINOR(dev)&0xF0;
-
 	return i2ob_dev[unit].req_queue;
 }
 
@@ -1530,34 +1527,34 @@
 		if(c==NULL)
 			continue;
 
-	/*
-	 *    The device list connected to the I2O Controller is doubly linked
-	 * Here we traverse the end of the list , and start claiming devices
-	 * from that end. This assures that within an I2O controller atleast
-	 * the newly created volumes get claimed after the older ones, thus
-	 * mapping to same major/minor (and hence device file name) after 
-	 * every reboot.
-	 * The exception being: 
-	 * 1. If there was a TID reuse.
-	 * 2. There was more than one I2O controller. 
-	 */
-
-	if(!bios)
-	{
-		for (d=c->devices;d!=NULL;d=d->next)
-		if(d->next == NULL)
-			b = d;
-	}
-	else
-		b = c->devices;
+		/*
+		 *    The device list connected to the I2O Controller is doubly linked
+		 * Here we traverse the end of the list , and start claiming devices
+		 * from that end. This assures that within an I2O controller atleast
+		 * the newly created volumes get claimed after the older ones, thus
+		 * mapping to same major/minor (and hence device file name) after 
+		 * every reboot.
+		 * The exception being: 
+		 * 1. If there was a TID reuse.
+		 * 2. There was more than one I2O controller. 
+		 */
 
-	while(b != NULL)
-	{
-		d=b;
-		if(bios)
-			b = b->next;
+		if(!bios)
+		{
+			for (d=c->devices;d!=NULL;d=d->next)
+			if(d->next == NULL)
+				b = d;
+		}
 		else
-			b = b->prev;
+			b = c->devices;
+
+		while(b != NULL)
+		{
+			d=b;
+			if(bios)
+				b = b->next;
+			else
+				b = b->prev;
 
 			if(d->lct_data.class_id!=I2O_CLASS_RANDOM_BLOCK_STORAGE)
 				continue;
diff -urN linux-2.4.18-pre9/drivers/message/i2o/i2o_config.c linux/drivers/message/i2o/i2o_config.c
--- linux-2.4.18-pre9/drivers/message/i2o/i2o_config.c	Mon Oct 22 08:39:56 2001
+++ linux/drivers/message/i2o/i2o_config.c	Wed Feb 13 12:43:49 2002
@@ -45,7 +45,7 @@
 static spinlock_t i2o_config_lock = SPIN_LOCK_UNLOCKED;
 struct wait_queue *i2o_wait_queue;
 
-#define MODINC(x,y) (x = x++ % y)
+#define MODINC(x,y) ((x) = ((x) + 1) % (y))
 
 struct i2o_cfg_info
 {
diff -urN linux-2.4.18-pre9/drivers/message/i2o/i2o_core.c linux/drivers/message/i2o/i2o_core.c
--- linux-2.4.18-pre9/drivers/message/i2o/i2o_core.c	Wed Feb 13 12:43:31 2002
+++ linux/drivers/message/i2o/i2o_core.c	Wed Feb 13 12:43:49 2002
@@ -208,7 +208,7 @@
  
 static DECLARE_MUTEX(evt_sem);
 static DECLARE_COMPLETION(evt_dead);
-DECLARE_WAIT_QUEUE_HEAD(evt_wait);
+static DECLARE_WAIT_QUEUE_HEAD(evt_wait);
 
 static struct notifier_block i2o_reboot_notifier =
 {
@@ -2559,6 +2559,7 @@
 int i2o_post_wait_mem(struct i2o_controller *c, u32 *msg, int len, int timeout, void *mem1, void *mem2)
 {
 	DECLARE_WAIT_QUEUE_HEAD(wq_i2o_post);
+	DECLARE_WAITQUEUE(wait, current);
 	int complete = 0;
 	int status;
 	unsigned long flags = 0;
@@ -2599,12 +2600,19 @@
 	 *	complete will be zero.  From the point post_this returns
 	 *	the wait_data may have been deleted.
 	 */
+
+	add_wait_queue(&wq_i2o_post, &wait);
+	set_current_state(TASK_INTERRUPTIBLE);
 	if ((status = i2o_post_this(c, msg, len))==0) {
-		sleep_on_timeout(&wq_i2o_post, HZ * timeout);
+		schedule_timeout(HZ * timeout);
 	}  
 	else
+	{
+		remove_wait_queue(&wq_i2o_post, &wait);
 		return -EIO;
-		
+	}
+	remove_wait_queue(&wq_i2o_post, &wait);
+
 	if(signal_pending(current))
 		status = -EINTR;
 		
diff -urN linux-2.4.18-pre9/drivers/mtd/maps/elan-104nc.c linux/drivers/mtd/maps/elan-104nc.c
--- linux-2.4.18-pre9/drivers/mtd/maps/elan-104nc.c	Thu Oct  4 15:14:59 2001
+++ linux/drivers/mtd/maps/elan-104nc.c	Wed Feb 13 12:43:49 2002
@@ -213,7 +213,7 @@
 /* MTD device for all of the flash. */
 static struct mtd_info *all_mtd;
 
-static void __exit cleanup_elan_104nc(void)
+static void cleanup_elan_104nc(void)
 {
 	if( all_mtd ) {
 		del_mtd_partitions( all_mtd );
diff -urN linux-2.4.18-pre9/drivers/mtd/maps/sbc_gxx.c linux/drivers/mtd/maps/sbc_gxx.c
--- linux-2.4.18-pre9/drivers/mtd/maps/sbc_gxx.c	Thu Oct  4 15:14:59 2001
+++ linux/drivers/mtd/maps/sbc_gxx.c	Wed Feb 13 12:43:50 2002
@@ -221,7 +221,7 @@
 /* MTD device for all of the flash. */
 static struct mtd_info *all_mtd;
 
-static void __exit cleanup_sbc_gxx(void)
+static void cleanup_sbc_gxx(void)
 {
 	if( all_mtd ) {
 		del_mtd_partitions( all_mtd );
diff -urN linux-2.4.18-pre9/drivers/net/8139too.c linux/drivers/net/8139too.c
--- linux-2.4.18-pre9/drivers/net/8139too.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/net/8139too.c	Wed Feb 13 12:43:50 2002
@@ -216,6 +216,7 @@
 	DFE538TX,
 	DFE690TXD,
 	FE2000VX,
+	ALLIED8139,
 	RTL8129,
 } board_t;
 
@@ -234,6 +235,7 @@
 	{ "D-Link DFE-538TX (RealTek RTL8139)", RTL8139_CAPS },
 	{ "D-Link DFE-690TXD (RealTek RTL8139)", RTL8139_CAPS },
 	{ "AboCom FE2000VX (RealTek RTL8139)", RTL8139_CAPS },
+	{ "Allied Telesyn 8139 CardBus", RTL8139_CAPS },
 	{ "RealTek RTL8129", RTL8129_CAPS },
 };
 
@@ -248,6 +250,7 @@
 	{0x1186, 0x1300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DFE538TX },
 	{0x1186, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DFE690TXD },
 	{0x13d1, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, FE2000VX },
+	{0x1259, 0xa117, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ALLIED8139 },
 
 #ifdef CONFIG_8139TOO_8129
 	{0x10ec, 0x8129, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8129 },
diff -urN linux-2.4.18-pre9/drivers/net/Config.in linux/drivers/net/Config.in
--- linux-2.4.18-pre9/drivers/net/Config.in	Wed Feb 13 12:43:32 2002
+++ linux/drivers/net/Config.in	Wed Feb 13 12:43:50 2002
@@ -174,6 +174,9 @@
       dep_tristate '    Mylex EISA LNE390A/B support (EXPERIMENTAL)' CONFIG_LNE390 $CONFIG_EISA $CONFIG_EXPERIMENTAL
       dep_tristate '    Myson MTD-8xx PCI Ethernet support' CONFIG_FEALNX $CONFIG_PCI
       dep_tristate '    National Semiconductor DP8381x series PCI Ethernet support' CONFIG_NATSEMI $CONFIG_PCI
+      if [ "$CONFIG_NATSEMI" = "y" -o "$CONFIG_NATSEMI" = "m" ]; then
+        bool       '      NatSemi workaround for high errors' CONFIG_NATSEMI_CABLE_MAGIC
+      fi
       dep_tristate '    PCI NE2000 and clones support (see help)' CONFIG_NE2K_PCI $CONFIG_PCI
       dep_tristate '    Novell/Eagle/Microdyne NE3210 EISA support (EXPERIMENTAL)' CONFIG_NE3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL
       dep_tristate '    Racal-Interlan EISA ES3210 support (EXPERIMENTAL)' CONFIG_ES3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL
diff -urN linux-2.4.18-pre9/drivers/net/eepro100.c linux/drivers/net/eepro100.c
--- linux-2.4.18-pre9/drivers/net/eepro100.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/net/eepro100.c	Wed Feb 13 12:43:50 2002
@@ -168,6 +168,9 @@
 #ifndef PCI_DEVICE_ID_INTEL_ID1030
 #define PCI_DEVICE_ID_INTEL_ID1030 0x1030
 #endif
+#ifndef PCI_DEVICE_ID_INTEL_ID1031          /* support for Intel Pro/100 VE */
+#define PCI_DEVICE_ID_INTEL_ID1031 0x1031
+#endif
 
 
 static int speedo_debug = 1;
@@ -833,6 +836,10 @@
 	sp->phy[0] = eeprom[6];
 	sp->phy[1] = eeprom[7];
 	sp->rx_bug = (eeprom[3] & 0x03) == 3 ? 0 : 1;
+	if (((pdev->device > 0x1030 && (pdev->device < 0x1039))) 
+	    || (pdev->device == 0x2449)) {
+	    	sp->chip_id = 1;
+	}
 
 	if (sp->rx_bug)
 		printk(KERN_INFO "  Receiver lock-up workaround activated.\n");
@@ -1099,9 +1106,9 @@
 			mdio_read(ioaddr, phy_num, 1);
 			/* If link beat has returned... */
 			if (mdio_read(ioaddr, phy_num, 1) & 0x0004)
-				dev->flags |= IFF_RUNNING;
+				netif_carrier_on(dev);
 			else
-				dev->flags &= ~IFF_RUNNING;
+				netif_carrier_off(dev);
 		}
 	}
 	if (speedo_debug > 3) {
@@ -1375,7 +1382,7 @@
 
 	/* workaround for hardware bug on 10 mbit half duplex */
 
-	if ((sp->partner==0) && (sp->chip_id==1)) {
+	if ((sp->partner == 0) || (sp->chip_id == 1)) {
 		wait_for_cmd_done(ioaddr + SCBCmd);
 		outb(0 , ioaddr + SCBCmd);
 	}
@@ -2270,6 +2277,8 @@
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1029,
 		PCI_ANY_ID, PCI_ANY_ID, },
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1030,
+		PCI_ANY_ID, PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1031,     /* support for Intel Pro/100 VE */
 		PCI_ANY_ID, PCI_ANY_ID, },
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_7,
 		PCI_ANY_ID, PCI_ANY_ID, },
diff -urN linux-2.4.18-pre9/drivers/net/eexpress.c linux/drivers/net/eexpress.c
--- linux-2.4.18-pre9/drivers/net/eexpress.c	Sun Sep 30 12:26:06 2001
+++ linux/drivers/net/eexpress.c	Wed Feb 13 12:43:50 2002
@@ -1674,7 +1674,6 @@
 			unregister_netdev(dev);
 			kfree(dev->priv);
 			dev->priv = NULL;
-			release_region(dev->base_addr, EEXP_IO_EXTENT);
 		}
 	}
 }
diff -urN linux-2.4.18-pre9/drivers/net/hamachi.c linux/drivers/net/hamachi.c
--- linux-2.4.18-pre9/drivers/net/hamachi.c	Tue Oct  9 15:13:03 2001
+++ linux/drivers/net/hamachi.c	Wed Feb 13 12:43:50 2002
@@ -1981,7 +1981,7 @@
 }
 
 
-static void __exit hamachi_remove_one (struct pci_dev *pdev)
+static void __devexit hamachi_remove_one (struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 
@@ -2011,7 +2011,7 @@
 	name:		DRV_NAME,
 	id_table:	hamachi_pci_tbl,
 	probe:		hamachi_init_one,
-	remove:		hamachi_remove_one,
+	remove:		__devexit_p(hamachi_remove_one),
 };
 
 static int __init hamachi_init (void)
diff -urN linux-2.4.18-pre9/drivers/net/hamradio/6pack.c linux/drivers/net/hamradio/6pack.c
--- linux-2.4.18-pre9/drivers/net/hamradio/6pack.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/net/hamradio/6pack.c	Wed Feb 13 12:43:50 2002
@@ -1062,6 +1062,7 @@
 
 MODULE_AUTHOR("Andreas Könsgen <ajk@ccac.rwth-aachen.de>");
 MODULE_DESCRIPTION("6pack driver for AX.25");
+MODULE_LICENSE("GPL");
 
 module_init(sixpack_init_driver);
 module_exit(sixpack_exit_driver);
diff -urN linux-2.4.18-pre9/drivers/net/hamradio/baycom_epp.c linux/drivers/net/hamradio/baycom_epp.c
--- linux-2.4.18-pre9/drivers/net/hamradio/baycom_epp.c	Mon Sep 10 09:04:53 2001
+++ linux/drivers/net/hamradio/baycom_epp.c	Wed Feb 13 12:43:50 2002
@@ -1414,6 +1414,7 @@
 
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
 MODULE_DESCRIPTION("Baycom epp amateur radio modem driver");
+MODULE_LICENSE("GPL");
 
 /* --------------------------------------------------------------------- */
 
diff -urN linux-2.4.18-pre9/drivers/net/hamradio/baycom_par.c linux/drivers/net/hamradio/baycom_par.c
--- linux-2.4.18-pre9/drivers/net/hamradio/baycom_par.c	Wed Aug 15 01:22:15 2001
+++ linux/drivers/net/hamradio/baycom_par.c	Wed Feb 13 12:43:50 2002
@@ -493,6 +493,7 @@
 
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
 MODULE_DESCRIPTION("Baycom par96 and picpar amateur radio modem driver");
+MODULE_LICENSE("GPL");
 
 /* --------------------------------------------------------------------- */
 
diff -urN linux-2.4.18-pre9/drivers/net/hamradio/baycom_ser_fdx.c linux/drivers/net/hamradio/baycom_ser_fdx.c
--- linux-2.4.18-pre9/drivers/net/hamradio/baycom_ser_fdx.c	Wed Aug 15 01:22:15 2001
+++ linux/drivers/net/hamradio/baycom_ser_fdx.c	Wed Feb 13 12:43:50 2002
@@ -609,6 +609,7 @@
 
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
 MODULE_DESCRIPTION("Baycom ser12 full duplex amateur radio modem driver");
+MODULE_LICENSE("GPL");
 
 /* --------------------------------------------------------------------- */
 
diff -urN linux-2.4.18-pre9/drivers/net/hamradio/baycom_ser_hdx.c linux/drivers/net/hamradio/baycom_ser_hdx.c
--- linux-2.4.18-pre9/drivers/net/hamradio/baycom_ser_hdx.c	Wed Aug 15 01:22:15 2001
+++ linux/drivers/net/hamradio/baycom_ser_hdx.c	Wed Feb 13 12:43:50 2002
@@ -649,6 +649,7 @@
 
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
 MODULE_DESCRIPTION("Baycom ser12 half duplex amateur radio modem driver");
+MODULE_LICENSE("GPL");
 
 /* --------------------------------------------------------------------- */
 
diff -urN linux-2.4.18-pre9/drivers/net/hamradio/bpqether.c linux/drivers/net/hamradio/bpqether.c
--- linux-2.4.18-pre9/drivers/net/hamradio/bpqether.c	Thu Sep 13 16:04:43 2001
+++ linux/drivers/net/hamradio/bpqether.c	Wed Feb 13 12:43:50 2002
@@ -645,5 +645,6 @@
 
 MODULE_AUTHOR("Joerg Reuter DL1BKE <jreuter@yaina.de>");
 MODULE_DESCRIPTION("Transmit and receive AX.25 packets over Ethernet");
+MODULE_LICENSE("GPL");
 module_init(bpq_init_driver);
 module_exit(bpq_cleanup_driver);
diff -urN linux-2.4.18-pre9/drivers/net/hamradio/dmascc.c linux/drivers/net/hamradio/dmascc.c
--- linux-2.4.18-pre9/drivers/net/hamradio/dmascc.c	Wed Apr 18 14:40:06 2001
+++ linux/drivers/net/hamradio/dmascc.c	Wed Feb 13 12:43:50 2002
@@ -306,6 +306,7 @@
 MODULE_AUTHOR("Klaus Kudielka");
 MODULE_DESCRIPTION("Driver for high-speed SCC boards");
 MODULE_PARM(io, "1-" __MODULE_STRING(MAX_NUM_DEVS) "i");
+MODULE_LICENSE("GPL");
 
 
 int init_module(void) {
diff -urN linux-2.4.18-pre9/drivers/net/hamradio/hdlcdrv.c linux/drivers/net/hamradio/hdlcdrv.c
--- linux-2.4.18-pre9/drivers/net/hamradio/hdlcdrv.c	Wed Aug 15 01:22:15 2001
+++ linux/drivers/net/hamradio/hdlcdrv.c	Wed Feb 13 12:43:50 2002
@@ -901,6 +901,7 @@
 
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
 MODULE_DESCRIPTION("Packet Radio network interface HDLC encoder/decoder");
+MODULE_LICENSE("GPL");
 module_init(hdlcdrv_init_driver);
 module_exit(hdlcdrv_cleanup_driver);
 
diff -urN linux-2.4.18-pre9/drivers/net/hamradio/mkiss.c linux/drivers/net/hamradio/mkiss.c
--- linux-2.4.18-pre9/drivers/net/hamradio/mkiss.c	Thu Sep 13 16:04:43 2001
+++ linux/drivers/net/hamradio/mkiss.c	Wed Feb 13 12:43:50 2002
@@ -1008,6 +1008,7 @@
 MODULE_DESCRIPTION("KISS driver for AX.25 over TTYs");
 MODULE_PARM(ax25_maxdev, "i");
 MODULE_PARM_DESC(ax25_maxdev, "number of MKISS devices");
+MODULE_LICENSE("GPL");
 
 module_init(mkiss_init_driver);
 module_exit(mkiss_exit_driver);
diff -urN linux-2.4.18-pre9/drivers/net/hamradio/scc.c linux/drivers/net/hamradio/scc.c
--- linux-2.4.18-pre9/drivers/net/hamradio/scc.c	Thu Oct 25 13:58:15 2001
+++ linux/drivers/net/hamradio/scc.c	Wed Feb 13 12:43:50 2002
@@ -2179,5 +2179,6 @@
 MODULE_AUTHOR("Joerg Reuter <jreuter@yaina.de>");
 MODULE_DESCRIPTION("AX.25 Device Driver for Z8530 based HDLC cards");
 MODULE_SUPPORTED_DEVICE("Z8530 based SCC cards for Amateur Radio");
+MODULE_LICENSE("GPL");
 module_init(scc_init_driver);
 module_exit(scc_cleanup_driver);
diff -urN linux-2.4.18-pre9/drivers/net/hamradio/yam.c linux/drivers/net/hamradio/yam.c
--- linux-2.4.18-pre9/drivers/net/hamradio/yam.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/net/hamradio/yam.c	Wed Feb 13 12:43:50 2002
@@ -308,7 +308,8 @@
 static void delay(int ms)
 {
 	unsigned long timeout = jiffies + ((ms * HZ) / 1000);
-	while (time_before(jiffies, timeout));
+	while (time_before(jiffies, timeout))
+		cpu_relax();
 }
 
 /*
@@ -1177,6 +1178,7 @@
 
 MODULE_AUTHOR("Frederic Rible F1OAT frible@teaser.fr");
 MODULE_DESCRIPTION("Yam amateur radio modem driver");
+MODULE_LICENSE("GPL");
 
 module_init(yam_init_driver);
 module_exit(yam_cleanup_driver);
diff -urN linux-2.4.18-pre9/drivers/net/natsemi.c linux/drivers/net/natsemi.c
--- linux-2.4.18-pre9/drivers/net/natsemi.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/net/natsemi.c	Wed Feb 13 12:43:50 2002
@@ -399,7 +399,11 @@
 	SDCFG			= 0xF8
 };
 /* the values for the 'magic' registers above (PGSEL=1) */
+#ifdef CONFIG_NATSEMI_CABLE_MAGIC
+#define PMDCSR_VAL	0x1898
+#else
 #define PMDCSR_VAL	0x189C
+#endif
 #define TSTDAT_VAL	0x0
 #define DSPCFG_VAL	0x5040
 #define SDCFG_VAL	0x008c
@@ -1465,12 +1469,8 @@
 
 	for (; np->cur_tx - np->dirty_tx > 0; np->dirty_tx++) {
 		int entry = np->dirty_tx % TX_RING_SIZE;
-		if (np->tx_ring[entry].cmd_status & cpu_to_le32(DescOwn)) {
-			if (netif_msg_tx_err(np))
-				printk(KERN_DEBUG "%s: tx frame #%d is busy.\n",
-						dev->name, np->dirty_tx);
+		if (np->tx_ring[entry].cmd_status & cpu_to_le32(DescOwn))
 			break;
-		}
 		if (netif_msg_tx_done(np))
 			printk(KERN_DEBUG 
 				"%s: tx frame #%d finished, status %#08x.\n",
@@ -1581,11 +1581,7 @@
 						np->cur_rx, desc_status);
 				np->stats.rx_length_errors++;
 			} else {
-				/* There was a error. */
-				if (netif_msg_rx_err(np))
-					printk(KERN_DEBUG 
-						"  netdev_rx() Rx error was "
-						"%#08x.\n", desc_status);
+				/* There was an error. */
 				np->stats.rx_errors++;
 				if (desc_status & (DescRxAbort|DescRxOver)) 
 					np->stats.rx_over_errors++;
diff -urN linux-2.4.18-pre9/drivers/net/rcpci45.c linux/drivers/net/rcpci45.c
--- linux-2.4.18-pre9/drivers/net/rcpci45.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/net/rcpci45.c	Wed Feb 13 12:43:50 2002
@@ -124,7 +124,7 @@
 MODULE_DEVICE_TABLE (pci, rcpci45_pci_table);
 MODULE_LICENSE("GPL");
 
-static void __exit
+static void __devexit
 rcpci45_remove_one (struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata (pdev);
@@ -267,7 +267,7 @@
 	name:		"rcpci45",
 	id_table:	rcpci45_pci_table,
 	probe:		rcpci45_init_one,
-	remove:		rcpci45_remove_one,
+	remove:		__devexit_p(rcpci45_remove_one),
 };
 
 static int __init
diff -urN linux-2.4.18-pre9/drivers/net/tokenring/abyss.c linux/drivers/net/tokenring/abyss.c
--- linux-2.4.18-pre9/drivers/net/tokenring/abyss.c	Thu Sep 13 16:04:43 2001
+++ linux/drivers/net/tokenring/abyss.c	Wed Feb 13 12:43:50 2002
@@ -433,7 +433,7 @@
 	return 0;
 }
 
-static void __exit abyss_detach (struct pci_dev *pdev)
+static void __devexit abyss_detach (struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	
@@ -451,7 +451,7 @@
 	name:		"abyss",
 	id_table:	abyss_pci_tbl,
 	probe:		abyss_attach,
-	remove:		abyss_detach,
+	remove:		__devexit_p(abyss_detach),
 };
 
 static int __init abyss_init (void)
diff -urN linux-2.4.18-pre9/drivers/net/tokenring/tmspci.c linux/drivers/net/tokenring/tmspci.c
--- linux-2.4.18-pre9/drivers/net/tokenring/tmspci.c	Thu Sep 13 16:04:43 2001
+++ linux/drivers/net/tokenring/tmspci.c	Wed Feb 13 12:43:50 2002
@@ -220,7 +220,7 @@
 	return val;
 }
 
-static void __exit tms_pci_detach (struct pci_dev *pdev)
+static void __devexit tms_pci_detach (struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 
@@ -238,7 +238,7 @@
 	name:		"tmspci",
 	id_table:	tmspci_pci_tbl,
 	probe:		tms_pci_attach,
-	remove:		tms_pci_detach,
+	remove:		__devexit_p(tms_pci_detach),
 };
 
 static int __init tms_pci_init (void)
diff -urN linux-2.4.18-pre9/drivers/net/tulip/ChangeLog linux/drivers/net/tulip/ChangeLog
--- linux-2.4.18-pre9/drivers/net/tulip/ChangeLog	Wed Feb 13 12:43:32 2002
+++ linux/drivers/net/tulip/ChangeLog	Wed Feb 13 12:43:50 2002
@@ -1,3 +1,8 @@
+2002-02-07  Uwe Bonnes  <bon@elektron.ikp.physik.tu-darmstadt.de>
+
+	* tulip_core (tulip_pci_tbl[]):
+	Add PCI id for comet tulip clone.
+
 2001-12-19  John Zielinski
 
 	* tulip_core.c (tulip_up, tulip_init_one):
diff -urN linux-2.4.18-pre9/drivers/net/tulip/tulip_core.c linux/drivers/net/tulip/tulip_core.c
--- linux-2.4.18-pre9/drivers/net/tulip/tulip_core.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/net/tulip/tulip_core.c	Wed Feb 13 12:43:50 2002
@@ -207,6 +207,7 @@
 	{ 0x1317, 0x1985, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x13D1, 0xAB02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x13D1, 0xAB03, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
+	{ 0x13D1, 0xAB08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x104A, 0x0981, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x104A, 0x2774, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x11F6, 0x9881, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMPEX9881 },
diff -urN linux-2.4.18-pre9/drivers/net/winbond-840.c linux/drivers/net/winbond-840.c
--- linux-2.4.18-pre9/drivers/net/winbond-840.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/net/winbond-840.c	Wed Feb 13 12:43:50 2002
@@ -346,7 +346,7 @@
 	struct w840_rx_desc *rx_ring;
 	dma_addr_t	rx_addr[RX_RING_SIZE];
 	struct w840_tx_desc *tx_ring;
-	dma_addr_t	tx_addr[RX_RING_SIZE];
+	dma_addr_t	tx_addr[TX_RING_SIZE];
 	dma_addr_t ring_dma_addr;
 	/* The addresses of receive-in-place skbuffs. */
 	struct sk_buff* rx_skbuff[RX_RING_SIZE];
diff -urN linux-2.4.18-pre9/drivers/net/wireless/orinoco_plx.c linux/drivers/net/wireless/orinoco_plx.c
--- linux-2.4.18-pre9/drivers/net/wireless/orinoco_plx.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/net/wireless/orinoco_plx.c	Wed Feb 13 12:43:50 2002
@@ -394,7 +394,7 @@
 	name:"orinoco_plx",
 	id_table:orinoco_plx_pci_id_table,
 	probe:orinoco_plx_init_one,
-	remove:orinoco_plx_remove_one,
+	remove:__devexit_p(orinoco_plx_remove_one),
 	suspend:0,
 	resume:0
 };
diff -urN linux-2.4.18-pre9/drivers/pci/quirks.c linux/drivers/pci/quirks.c
--- linux-2.4.18-pre9/drivers/pci/quirks.c	Sun Nov 11 10:09:33 2001
+++ linux/drivers/pci/quirks.c	Wed Feb 13 12:43:51 2002
@@ -444,13 +444,15 @@
 static void __init quirk_amd_ordering(struct pci_dev *dev)
 {
 	u32 pcic;
-	
-	pci_read_config_dword(dev, 0x42, &pcic);
-	if((pcic&2)==0)
+	pci_read_config_dword(dev, 0x4C, &pcic);
+	if((pcic&6)!=6)
 	{
-		pcic |= 2;
-		printk(KERN_WARNING "BIOS disabled PCI ordering compliance, so we enabled it again.\n");
-		pci_write_config_dword(dev, 0x42, pcic);		
+		pcic |= 6;
+		printk(KERN_WARNING "BIOS failed to enable PCI standards compliance, fixing this error.\n");
+		pci_write_config_dword(dev, 0x4C, pcic);
+		pci_read_config_dword(dev, 0x84, &pcic);
+		pcic |= (1<<23);	/* Required in this mode */
+		pci_write_config_dword(dev, 0x84, pcic);
 	}
 }
 
diff -urN linux-2.4.18-pre9/drivers/sound/cs4232.c linux/drivers/sound/cs4232.c
--- linux-2.4.18-pre9/drivers/sound/cs4232.c	Sun Sep 30 12:26:08 2001
+++ linux/drivers/sound/cs4232.c	Wed Feb 13 12:43:51 2002
@@ -277,7 +277,7 @@
 	}
 }
 
-void __exit unload_cs4232(struct address_info *hw_config)
+void unload_cs4232(struct address_info *hw_config)
 {
 	int base = hw_config->io_base, irq = hw_config->irq;
 	int dma1 = hw_config->dma, dma2 = hw_config->dma2;
diff -urN linux-2.4.18-pre9/drivers/sound/i810_audio.c linux/drivers/sound/i810_audio.c
--- linux-2.4.18-pre9/drivers/sound/i810_audio.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/sound/i810_audio.c	Wed Feb 13 12:43:51 2002
@@ -2938,7 +2938,7 @@
 	return 0;
 }
 
-static void __exit i810_remove(struct pci_dev *pci_dev)
+static void __devexit i810_remove(struct pci_dev *pci_dev)
 {
 	int i;
 	struct i810_card *card = pci_get_drvdata(pci_dev);
@@ -3098,7 +3098,7 @@
 	name:		I810_MODULE_NAME,
 	id_table:	i810_pci_tbl,
 	probe:		i810_probe,
-	remove:		i810_remove,
+	remove:		__devexit_p(i810_remove),
 #ifdef CONFIG_PM
 	suspend:	i810_pm_suspend,
 	resume:		i810_pm_resume,
diff -urN linux-2.4.18-pre9/drivers/sound/mpu401.c linux/drivers/sound/mpu401.c
--- linux-2.4.18-pre9/drivers/sound/mpu401.c	Sun Sep 30 12:26:08 2001
+++ linux/drivers/sound/mpu401.c	Wed Feb 13 12:43:51 2002
@@ -1227,7 +1227,7 @@
 	return ok;
 }
 
-void __exit unload_mpu401(struct address_info *hw_config)
+void unload_mpu401(struct address_info *hw_config)
 {
 	void *p;
 	int n=hw_config->slots[1];
diff -urN linux-2.4.18-pre9/drivers/sound/trident.c linux/drivers/sound/trident.c
--- linux-2.4.18-pre9/drivers/sound/trident.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/sound/trident.c	Wed Feb 13 12:43:51 2002
@@ -4149,7 +4149,7 @@
 	goto out;
 }
 
-static void __exit trident_remove(struct pci_dev *pci_dev)
+static void __devexit trident_remove(struct pci_dev *pci_dev)
 {
 	int i;
 	struct trident_card *card = pci_get_drvdata(pci_dev);
@@ -4202,7 +4202,7 @@
 	name:		TRIDENT_MODULE_NAME,
 	id_table:	trident_pci_tbl,
 	probe:		trident_probe,
-	remove:		trident_remove,
+	remove:		__devexit_p(trident_remove),
 	suspend:	trident_suspend,
 	resume:		trident_resume
 };
diff -urN linux-2.4.18-pre9/drivers/sound/via82cxxx_audio.c linux/drivers/sound/via82cxxx_audio.c
--- linux-2.4.18-pre9/drivers/sound/via82cxxx_audio.c	Fri Dec 21 09:41:55 2001
+++ linux/drivers/sound/via82cxxx_audio.c	Wed Feb 13 12:43:51 2002
@@ -311,7 +311,7 @@
  */
 
 static int via_init_one (struct pci_dev *dev, const struct pci_device_id *id);
-static void via_remove_one (struct pci_dev *pdev);
+static void __devexit via_remove_one (struct pci_dev *pdev);
 
 static ssize_t via_dsp_read(struct file *file, char *buffer, size_t count, loff_t *ppos);
 static ssize_t via_dsp_write(struct file *file, const char *buffer, size_t count, loff_t *ppos);
@@ -365,7 +365,7 @@
 	name:		VIA_MODULE_NAME,
 	id_table:	via_pci_tbl,
 	probe:		via_init_one,
-	remove:		via_remove_one,
+	remove:		__devexit_p(via_remove_one),
 };
 
 
@@ -3271,7 +3271,7 @@
 }
 
 
-static void __exit via_remove_one (struct pci_dev *pdev)
+static void __devexit via_remove_one (struct pci_dev *pdev)
 {
 	struct via_info *card;
 
diff -urN linux-2.4.18-pre9/drivers/video/fbmem.c linux/drivers/video/fbmem.c
--- linux-2.4.18-pre9/drivers/video/fbmem.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/video/fbmem.c	Wed Feb 13 12:43:52 2002
@@ -207,6 +207,9 @@
 #ifdef CONFIG_FB_SIS
 	{ "sisfb", sisfb_init, sisfb_setup },
 #endif
+#ifdef CONFIG_FB_TRIDENT
+	{ "trident", tridentfb_init, tridentfb_setup },
+#endif
 
 	/*
 	 * Generic drivers that are used as fallbacks
@@ -229,9 +232,6 @@
 
 #ifdef CONFIG_FB_3DFX
 	{ "tdfx", tdfxfb_init, tdfxfb_setup },
-#endif
-#ifdef CONFIG_FB_TRIDENT
-	{ "trident", tridentfb_init, tridentfb_setup },
 #endif
 #ifdef CONFIG_FB_SGIVW
 	{ "sgivw", sgivwfb_init, sgivwfb_setup },
diff -urN linux-2.4.18-pre9/drivers/video/radeonfb.c linux/drivers/video/radeonfb.c
--- linux-2.4.18-pre9/drivers/video/radeonfb.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/video/radeonfb.c	Wed Feb 13 12:43:52 2002
@@ -690,7 +690,7 @@
 	name:		"radeonfb",
 	id_table:	radeonfb_pci_table,
 	probe:		radeonfb_pci_register,
-	remove:		radeonfb_pci_unregister,
+	remove:		__devexit_p(radeonfb_pci_unregister),
 };
 
 
diff -urN linux-2.4.18-pre9/drivers/video/tridentfb.c linux/drivers/video/tridentfb.c
--- linux-2.4.18-pre9/drivers/video/tridentfb.c	Wed Feb 13 12:43:32 2002
+++ linux/drivers/video/tridentfb.c	Wed Feb 13 12:43:52 2002
@@ -3,7 +3,7 @@
  *
  * Copyright 2001,2002 - Jani Monoses   <jani@astechnix.ro>
  *
- * $Id: tridentfb.c,v 1.1 2002/02/07 18:20:18 marcelo Exp $
+ * $Id: tridentfb.c,v 1.2 2002/02/13 17:44:14 marcelo Exp $
  *
  * CREDITS:(in order of appearance)
  * 	skeletonfb.c by Geert Uytterhoeven and other fb code in drivers/video
@@ -521,6 +521,7 @@
 }
 
 
+#error "Floating point maths. This needs fixing before the driver is safe"
 #define calc_freq(n,m,k) ((NTSC * (n+8))/((m+2)*(1<<k)))
 
 /* Set dotclock frequency */
diff -urN linux-2.4.18-pre9/fs/proc/base.c linux/fs/proc/base.c
--- linux-2.4.18-pre9/fs/proc/base.c	Wed Oct 10 23:42:47 2001
+++ linux/fs/proc/base.c	Wed Feb 13 12:43:52 2002
@@ -553,6 +553,7 @@
 			task_unlock(p);
 			if (!files)
 				goto out;
+			read_lock(&files->file_lock);
 			for (fd = filp->f_pos-2;
 			     fd < files->max_fds;
 			     fd++, filp->f_pos++) {
@@ -560,6 +561,7 @@
 
 				if (!fcheck_files(files, fd))
 					continue;
+				read_unlock(&files->file_lock);
 
 				j = NUMBUF;
 				i = fd;
@@ -570,9 +572,13 @@
 				} while (i);
 
 				ino = fake_ino(pid, PROC_PID_FD_DIR + fd);
-				if (filldir(dirent, buf+j, NUMBUF-j, fd+2, ino, DT_LNK) < 0)
+				if (filldir(dirent, buf+j, NUMBUF-j, fd+2, ino, DT_LNK) < 0) {
+					read_lock(&files->file_lock);
 					break;
+				}
+				read_lock(&files->file_lock);
 			}
+			read_unlock(&files->file_lock);
 			put_files_struct(files);
 	}
 out:
diff -urN linux-2.4.18-pre9/fs/reiserfs/inode.c linux/fs/reiserfs/inode.c
--- linux-2.4.18-pre9/fs/reiserfs/inode.c	Wed Feb 13 12:43:33 2002
+++ linux/fs/reiserfs/inode.c	Wed Feb 13 12:43:52 2002
@@ -931,9 +931,6 @@
 	// (directories and symlinks)
 	struct stat_data * sd = (struct stat_data *)B_I_PITEM (bh, ih);
 
-	/* both old and new directories have old keys */
-	//version = (S_ISDIR (sd->sd_mode) ? ITEM_VERSION_1 : ITEM_VERSION_2);
-
 	inode->i_mode   = sd_v2_mode(sd);
 	inode->i_nlink  = sd_v2_nlink(sd);
 	inode->i_uid    = sd_v2_uid(sd);
@@ -953,6 +950,8 @@
 	    set_inode_item_key_version (inode, KEY_FORMAT_3_5);
 	else
             set_inode_item_key_version (inode, KEY_FORMAT_3_6);
+
+        set_inode_sd_version (inode, STAT_DATA_V2);
     }
 
     /* nopack = 0, by default */
diff -urN linux-2.4.18-pre9/fs/reiserfs/journal.c linux/fs/reiserfs/journal.c
--- linux-2.4.18-pre9/fs/reiserfs/journal.c	Wed Feb 13 12:43:33 2002
+++ linux/fs/reiserfs/journal.c	Wed Feb 13 12:43:52 2002
@@ -793,7 +793,7 @@
   while(cn) {
     if (cn->blocknr != 0) {
       if (debug) {
-        printk("block %lu, bh is %d, state %d\n", cn->blocknr, cn->bh ? 1: 0, 
+        printk("block %lu, bh is %d, state %ld\n", cn->blocknr, cn->bh ? 1: 0, 
 	        cn->state) ;
       }
       fake_bh.b_blocknr = cn->blocknr ;
diff -urN linux-2.4.18-pre9/fs/reiserfs/procfs.c linux/fs/reiserfs/procfs.c
--- linux-2.4.18-pre9/fs/reiserfs/procfs.c	Fri Dec 21 09:42:03 2001
+++ linux/fs/reiserfs/procfs.c	Wed Feb 13 12:43:52 2002
@@ -79,7 +79,7 @@
 	struct super_block *sb;
 	char *format;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( ( kdev_t ) ( long ) data );
 	if( sb == NULL )
 		return -ENOENT;
 	if ( sb->u.reiserfs_sb.s_properties & (1 << REISERFS_3_6) ) {
@@ -143,7 +143,7 @@
 	struct reiserfs_sb_info *r;
 	int len = 0;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( ( kdev_t ) ( long ) data );
 	if( sb == NULL )
 		return -ENOENT;
 	r = &sb->u.reiserfs_sb;
@@ -223,7 +223,7 @@
 	int len = 0;
 	int level;
 	
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( ( kdev_t ) ( long ) data );
 	if( sb == NULL )
 		return -ENOENT;
 	r = &sb->u.reiserfs_sb;
@@ -302,7 +302,7 @@
 	struct reiserfs_sb_info *r = &sb->u.reiserfs_sb;
 	int len = 0;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( ( kdev_t ) ( long ) data );
 	if( sb == NULL )
 		return -ENOENT;
 	r = &sb->u.reiserfs_sb;
@@ -343,7 +343,7 @@
 	int hash_code;
 	int len = 0;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( ( kdev_t ) ( long ) data );
 	if( sb == NULL )
 		return -ENOENT;
 	sb_info = &sb->u.reiserfs_sb;
@@ -396,7 +396,7 @@
 	int len = 0;
 	int exact;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( ( kdev_t ) ( long ) data );
 	if( sb == NULL )
 		return -ENOENT;
 	sb_info = &sb->u.reiserfs_sb;
@@ -447,7 +447,7 @@
 	struct reiserfs_super_block *rs;
 	int len = 0;
     
-	sb = procinfo_prologue( ( kdev_t ) ( int ) data );
+	sb = procinfo_prologue( ( kdev_t ) ( long ) data );
 	if( sb == NULL )
 		return -ENOENT;
 	r = &sb->u.reiserfs_sb;
@@ -464,7 +464,7 @@
 			"s_journal_max_commit_age: \t%i\n"
 			"s_journal_max_trans_age: \t%i\n"
 			/* incore fields */
-			"j_state: \t%i\n"			
+			"j_state: \t%li\n"			
 			"j_trans_id: \t%lu\n"
 			"j_mount_id: \t%lu\n"
 			"j_start: \t%lu\n"
@@ -588,7 +588,7 @@
 {
 	return ( sb->u.reiserfs_sb.procdir ) ? create_proc_read_entry
 		( name, 0, sb->u.reiserfs_sb.procdir, func, 
-		  ( void * ) ( int ) sb -> s_dev ) : NULL;
+		  ( void * ) ( long ) sb -> s_dev ) : NULL;
 }
 
 void reiserfs_proc_unregister( struct super_block *sb, const char *name )
diff -urN linux-2.4.18-pre9/fs/reiserfs/stree.c linux/fs/reiserfs/stree.c
--- linux-2.4.18-pre9/fs/reiserfs/stree.c	Wed Feb 13 12:43:33 2002
+++ linux/fs/reiserfs/stree.c	Wed Feb 13 12:43:52 2002
@@ -1700,8 +1700,7 @@
     }
 
     if ( n_file_size == 0 || n_file_size < n_new_file_size ) {
-	pathrelse(&s_search_path);
-	return;
+	goto update_and_out ;
     }
 
     /* Update key to search for the last file item. */
@@ -1754,6 +1753,7 @@
 	    "PAP-5680: truncate did not finish: new_file_size %Ld, current %Ld, oid %d\n",
 	    n_new_file_size, n_file_size, s_item_key.on_disk_key.k_objectid);
 
+update_and_out:
     if (update_timestamps) {
 	// this is truncate, not file closing
 	p_s_inode->i_mtime = p_s_inode->i_ctime = CURRENT_TIME;
diff -urN linux-2.4.18-pre9/fs/reiserfs/super.c linux/fs/reiserfs/super.c
--- linux-2.4.18-pre9/fs/reiserfs/super.c	Fri Dec 21 09:42:03 2001
+++ linux/fs/reiserfs/super.c	Wed Feb 13 12:43:52 2002
@@ -86,7 +86,7 @@
    protecting unlink is bigger that a key lf "save link" which
    protects truncate), so there left no items to make truncate
    completion on */
-static void remove_save_link_only (struct super_block * s, struct key * key)
+static void remove_save_link_only (struct super_block * s, struct key * key, int oid_free)
 {
     struct reiserfs_transaction_handle th;
 
@@ -94,7 +94,7 @@
      journal_begin (&th, s, JOURNAL_PER_BALANCE_CNT);
  
      reiserfs_delete_solid_item (&th, key);
-     if (is_direct_le_key (KEY_FORMAT_3_5, key))
+     if (oid_free)
         /* removals are protected by direct items */
         reiserfs_release_objectid (&th, le32_to_cpu (key->k_objectid));
 
@@ -167,7 +167,7 @@
 	       "save" link and release objectid */
             reiserfs_warning ("vs-2180: finish_unfinished: iget failed for %K\n",
                               &obj_key);
-            remove_save_link_only (s, &save_link_key);
+            remove_save_link_only (s, &save_link_key, 1);
             continue;
         }
 
@@ -175,9 +175,21 @@
 	    /* file is not unlinked */
             reiserfs_warning ("vs-2185: finish_unfinished: file %K is not unlinked\n",
                               &obj_key);
-            remove_save_link_only (s, &save_link_key);
+            remove_save_link_only (s, &save_link_key, 0);
             continue;
 	}
+
+	if (truncate && S_ISDIR (inode->i_mode) ) {
+	    /* We got a truncate request for a dir which is impossible.
+	       The only imaginable way is to execute unfinished truncate request
+	       then boot into old kernel, remove the file and create dir with
+	       the same key. */
+	    reiserfs_warning("green-2101: impossible truncate on a directory %k. Please report\n", INODE_PKEY (inode));
+	    remove_save_link_only (s, &save_link_key, 0);
+	    truncate = 0;
+	    iput (inode); 
+	    continue;
+	}
  
         if (truncate) {
             inode -> u.reiserfs_i.i_flags |= i_link_saved_truncate_mask;
@@ -243,6 +255,8 @@
 			   4/*length*/, 0xffff/*free space*/);
     } else {
 	/* truncate */
+	if (S_ISDIR (inode->i_mode))
+	    reiserfs_warning("green-2102: Adding a truncate savelink for a directory %k! Please report\n", INODE_PKEY(inode));
 	set_cpu_key_k_offset (&key, 1);
 	set_cpu_key_k_type (&key, TYPE_INDIRECT);
 
diff -urN linux-2.4.18-pre9/include/asm-i386/io_apic.h linux/include/asm-i386/io_apic.h
--- linux-2.4.18-pre9/include/asm-i386/io_apic.h	Thu Nov 22 11:46:18 2001
+++ linux/include/asm-i386/io_apic.h	Wed Feb 13 12:43:52 2002
@@ -15,7 +15,8 @@
 #define APIC_MISMATCH_DEBUG
 
 #define IO_APIC_BASE(idx) \
-		((volatile int *)__fix_to_virt(FIX_IO_APIC_BASE_0 + idx))
+		((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \
+		+ (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
 
 /*
  * The structure of the IO-APIC:
diff -urN linux-2.4.18-pre9/include/asm-i386/irq.h linux/include/asm-i386/irq.h
--- linux-2.4.18-pre9/include/asm-i386/irq.h	Thu Nov 22 11:46:18 2001
+++ linux/include/asm-i386/irq.h	Wed Feb 13 12:43:52 2002
@@ -33,6 +33,7 @@
 extern void disable_irq(unsigned int);
 extern void disable_irq_nosync(unsigned int);
 extern void enable_irq(unsigned int);
+extern void release_x86_irqs(struct task_struct *);
 
 #ifdef CONFIG_X86_LOCAL_APIC
 #define ARCH_HAS_NMI_WATCHDOG		/* See include/linux/nmi.h */
diff -urN linux-2.4.18-pre9/include/linux/i2o.h linux/include/linux/i2o.h
--- linux-2.4.18-pre9/include/linux/i2o.h	Fri Nov  9 14:11:15 2001
+++ linux/include/linux/i2o.h	Wed Feb 13 12:43:52 2002
@@ -252,34 +252,34 @@
  */
 static inline u32 I2O_POST_READ32(struct i2o_controller *c)
 {
-	return *c->post_port;
+	return readl(c->post_port);
 }
 
-static inline void I2O_POST_WRITE32(struct i2o_controller *c, u32 Val)
+static inline void I2O_POST_WRITE32(struct i2o_controller *c, u32 val)
 {
-	*c->post_port = Val;
+	writel(val, c->post_port);
 }
 
 
 static inline u32 I2O_REPLY_READ32(struct i2o_controller *c)
 {
-	return *c->reply_port;
+	return readl(c->reply_port);
 }
 
-static inline void I2O_REPLY_WRITE32(struct i2o_controller *c, u32 Val)
+static inline void I2O_REPLY_WRITE32(struct i2o_controller *c, u32 val)
 {
-	*c->reply_port = Val;
+	writel(val, c->reply_port);
 }
 
 
 static inline u32 I2O_IRQ_READ32(struct i2o_controller *c)
 {
-	return *c->irq_mask;
+	return readl(c->irq_mask);
 }
 
-static inline void I2O_IRQ_WRITE32(struct i2o_controller *c, u32 Val)
+static inline void I2O_IRQ_WRITE32(struct i2o_controller *c, u32 val)
 {
-	*c->irq_mask = Val;
+	writel(val, c->irq_mask);
 }
 
 
diff -urN linux-2.4.18-pre9/include/linux/pci_ids.h linux/include/linux/pci_ids.h
--- linux-2.4.18-pre9/include/linux/pci_ids.h	Wed Feb 13 12:43:33 2002
+++ linux/include/linux/pci_ids.h	Wed Feb 13 12:43:52 2002
@@ -1500,6 +1500,9 @@
 #define PCI_DEVICE_ID_PANACOM_QUADMODEM	0x0400
 #define PCI_DEVICE_ID_PANACOM_DUALMODEM	0x0402
 
+#define PCI_VENDOR_ID_AFAVLAB		0x14db
+#define PCI_DEVICE_ID_AFAVLAB_P028	0x2180
+
 #define PCI_VENDOR_ID_BROADCOM		0x14e4
 #define PCI_DEVICE_ID_TIGON3_5700	0x1644
 #define PCI_DEVICE_ID_TIGON3_5701	0x1645
diff -urN linux-2.4.18-pre9/include/linux/reiserfs_fs.h linux/include/linux/reiserfs_fs.h
--- linux-2.4.18-pre9/include/linux/reiserfs_fs.h	Fri Dec 21 09:42:03 2001
+++ linux/include/linux/reiserfs_fs.h	Wed Feb 13 12:43:52 2002
@@ -236,9 +236,9 @@
     __u64 linear;
 } __attribute__ ((__packed__)) offset_v2_esafe_overlay;
 
-static inline __u16 offset_v2_k_type( struct offset_v2 *v2 )
+static inline __u16 offset_v2_k_type( const struct offset_v2 *v2 )
 {
-    offset_v2_esafe_overlay tmp = *(offset_v2_esafe_overlay *)v2;
+    offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2;
     tmp.linear = le64_to_cpu( tmp.linear );
     return tmp.offset_v2.k_type;
 }
@@ -248,12 +248,12 @@
     offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2;
     tmp->linear = le64_to_cpu(tmp->linear);
     tmp->offset_v2.k_type = type;
-    tmp->linear = le64_to_cpu(tmp->linear);
+    tmp->linear = cpu_to_le64(tmp->linear);
 }
  
-static inline loff_t offset_v2_k_offset( struct offset_v2 *v2 )
+static inline loff_t offset_v2_k_offset( const struct offset_v2 *v2 )
 {
-    offset_v2_esafe_overlay tmp = *(offset_v2_esafe_overlay *)v2;
+    offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2;
     tmp.linear = le64_to_cpu( tmp.linear );
     return tmp.offset_v2.k_offset;
 }
@@ -262,7 +262,7 @@
     offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2;
     tmp->linear = le64_to_cpu(tmp->linear);
     tmp->offset_v2.k_offset = offset;
-    tmp->linear = le64_to_cpu(tmp->linear);
+    tmp->linear = cpu_to_le64(tmp->linear);
 }
 #else
 # define offset_v2_k_type(v2)           ((v2)->k_type)
diff -urN linux-2.4.18-pre9/include/linux/reiserfs_fs_sb.h linux/include/linux/reiserfs_fs_sb.h
--- linux-2.4.18-pre9/include/linux/reiserfs_fs_sb.h	Wed Feb 13 12:43:33 2002
+++ linux/include/linux/reiserfs_fs_sb.h	Wed Feb 13 12:43:52 2002
@@ -201,7 +201,7 @@
   struct buffer_head *bh ;		 /* real buffer head */
   kdev_t dev ;				 /* dev of real buffer head */
   unsigned long blocknr ;		 /* block number of real buffer head, == 0 when buffer on disk */		 
-  int state ;
+  long state ;
   struct reiserfs_journal_list *jlist ;  /* journal list this cnode lives in */
   struct reiserfs_journal_cnode *next ;  /* next in transaction list */
   struct reiserfs_journal_cnode *prev ;  /* prev in transaction list */
@@ -264,7 +264,7 @@
   struct reiserfs_journal_cnode *j_last ; /* newest journal block */
   struct reiserfs_journal_cnode *j_first ; /*  oldest journal block.  start here for traverse */
 				
-  int j_state ;			
+  long j_state ;			
   unsigned long j_trans_id ;
   unsigned long j_mount_id ;
   unsigned long j_start ;             /* start of current waiting commit (index into j_ap_blocks) */
diff -urN linux-2.4.18-pre9/mm/mmap.c linux/mm/mmap.c
--- linux-2.4.18-pre9/mm/mmap.c	Sun Nov  4 10:17:20 2001
+++ linux/mm/mmap.c	Wed Feb 13 12:43:52 2002
@@ -620,7 +620,7 @@
 {
 	if (flags & MAP_FIXED) {
 		if (addr > TASK_SIZE - len)
-			return -EINVAL;
+			return -ENOMEM;
 		if (addr & ~PAGE_MASK)
 			return -EINVAL;
 		return addr;
