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

diff -urN linux-2.2.18-pre21/Documentation/fb/matroxfb.txt linux/Documentation/fb/matroxfb.txt
--- linux-2.2.18-pre21/Documentation/fb/matroxfb.txt	Mon Dec  3 20:41:25 2001
+++ linux/Documentation/fb/matroxfb.txt	Mon Dec  3 20:42:17 2001
@@ -228,7 +228,7 @@
            `vesa'.
 
 If you know capabilities of your monitor, you can specify some (or all) of
-`pixclk', `fh' and `fv'. In this case, `pixclock' is computed so that
+`maxclk', `fh' and `fv'. In this case, `pixclock' is computed so that
 pixclock <= maxclk, real_fh <= fh and real_fv <= fv.
 
 maxclk:X - maximum dotclock. X can be specified in MHz, kHz or Hz. Default is
diff -urN linux-2.2.18-pre21/Documentation/isdn/INTERFACE.fax linux/Documentation/isdn/INTERFACE.fax
--- linux-2.2.18-pre21/Documentation/isdn/INTERFACE.fax	Mon Dec  3 20:41:25 2001
+++ linux/Documentation/isdn/INTERFACE.fax	Mon Dec  3 20:42:17 2001
@@ -1,10 +1,10 @@
-$Id: INTERFACE.fax,v 1.1 1999/08/11 20:30:28 armin Exp $
+$Id: INTERFACE.fax,v 1.2 2000/08/06 09:22:50 armin Exp $
 
 
 Description of the fax-subinterface between linklevel and hardwarelevel of 
   isdn4linux. 
 
-  The communication between link level (LL) and hardware level (HL) for fax
+  The communication between linklevel (LL) and hardwarelevel (HL) for fax
   is based on the struct T30_s (defined in isdnif.h).
   This struct is allocated in the LL.  
   In order to use fax, the LL provides the pointer to this struct with the 
diff -urN linux-2.2.18-pre21/Documentation/isdn/README linux/Documentation/isdn/README
--- linux-2.2.18-pre21/Documentation/isdn/README	Mon Dec  3 20:41:25 2001
+++ linux/Documentation/isdn/README	Mon Dec  3 20:42:17 2001
@@ -242,7 +242,7 @@
                                       0 = transparent
                                       1 = transparent with audio features (e.g. DSP)
                                       2 = Fax G3 Class 2 commands (S14 has to be set to 11)
-                                      2 = Fax G3 Class 1 commands (S14 has to be set to 11)
+                                      3 = Fax G3 Class 1 commands (S14 has to be set to 11)
              16   250       Send-Packet-size/16
              17   8         Window-size (not yet implemented)
              18   4         Bit coded register, Service-Octet-1 to accept,
diff -urN linux-2.2.18-pre21/MAINTAINERS linux/MAINTAINERS
--- linux-2.2.18-pre21/MAINTAINERS	Mon Dec  3 20:41:25 2001
+++ linux/MAINTAINERS	Mon Dec  3 20:42:17 2001
@@ -968,20 +968,114 @@
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
-USB HUB AND UHCI DRIVERS
+USB SUBSYSTEM
+P:	Johannes Erdfelt
+M	jerdfelt@valinux.com
+M:	johannes@erdfelt.com
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+W:	http://www.linux-usb.org
+S:	Supported
+
+USB ACM DRIVER
+P:	Vojtech Pavlik
+M:	vojtech@suse.cz
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+S:	Supported
+
+USB BLUETOOTH DRIVER
+P:	Greg Kroah-Hartman
+M:	greg@kroah.com
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+S:	Maintained
+W:	http://www.kroah.com/linux-usb/
+
+USB HID/HIDBP/INPUT DRIVERS
+P:	Vojtech Pavlik
+M:	vojtech@suse.cz
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+W:	http://www.suse.cz/development/input/
+S:	Supported
+
+USB HUB
 P:	Johannes Erdfelt
 M:	jerdfelt@sventech.com
-L:	linux-usb@suse.com
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
 S:	Maintained
 
 USB OHCI DRIVER
-P:	Gregory P. Smith
-M:	greg@electricrain.com
-M:	greg@suitenine.com
-L:	linux-usb@suse.com
-S:	Maintained (not yet usable)
-W:	http://suitenine.com/usb/
+P:	Roman Weissgaerber
+M:	weissg@vienna.at
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+S:	Maintained
+
+USB OV511 DRIVER
+P:     Mark McClelland
+M:     mmcclelland@delphi.com
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+W:     http://alpha.dyndns.org/ov511/
+S:     Maintained
+
+USB PEGASUS DRIVER
+P:	Petko Manolov
+M:	petkan@dce.bg
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+S:	Maintained
 
+USB PRINTER DRIVER
+P:	Vojtech Pavlik
+M:	vojtech@suse.cz
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+S:	Supported
+
+USB SERIAL DIGI ACCELEPORT DRIVER
+P:	Peter Berger and Al Borchers
+M:	pberger@brimson.com
+M:	alborchers@steinerpoint.com
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+S:	Supported
+
+USB SERIAL KEYSPAN DRIVER
+P:	Hugh Blemings
+M:	hugh@linuxcare.com
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+S:	Maintained
+W:	http://www.linuxcare.com.au/hugh/keyspan.html
+
+USB SERIAL DRIVER
+P:	Greg Kroah-Hartman
+M:	greg@kroah.com
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+S:	Maintained
+W:	http://www.kroah.com/linux-usb/
+
+USB MASS STORAGE DRIVER
+P:	Matthew Dharm
+M:	mdharm-usb@one-eyed-alien.net
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+S:	Maintained
+W:	http://www.one-eyed-alien.net/~mdharm/linux-usb/
+
+USB UHCI DRIVER
+P:	Georg Acher
+M:	usb@in.tum.de
+L:	linux-usb-users@lists.sourceforge.net
+L:	linux-usb-devel@lists.sourceforge.net
+W:	http://usb.in.tum.de
+S:	Maintained
+	
 VFAT FILESYSTEM:
 P:	Gordon Chaffee
 M:	chaffee@cs.berkeley.edu
diff -urN linux-2.2.18-pre21/Makefile linux/Makefile
--- linux-2.2.18-pre21/Makefile	Mon Dec  3 20:41:25 2001
+++ linux/Makefile	Mon Dec  3 20:42:17 2001
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 18
-EXTRAVERSION = pre21
+EXTRAVERSION = pre22
 
 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-pre21/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
--- linux-2.2.18-pre21/arch/i386/kernel/smp.c	Mon Dec  3 20:41:26 2001
+++ linux/arch/i386/kernel/smp.c	Mon Dec  3 20:42:17 2001
@@ -220,6 +220,8 @@
 		return("Pentium(tm)");
 	if (family==0x0F && model==0x0F)
 		return("Special controller");
+	if (family==0x0F && model==0x00)
+		return("Pentium 4(tm)");
 	if (family==0x04 && model<9)
 		return model_defs[model];
 	sprintf(n,"Unknown CPU [%d:%d]",family, model);
@@ -1120,7 +1122,8 @@
 	 */
 	smp_callin();
 	while (!atomic_read(&smp_commenced))
-		/* nothing */ ;
+		rep_nop() /* bus friendly nothing */ ;
+		
 	return cpu_idle(NULL);
 }
 
diff -urN linux-2.2.18-pre21/arch/sparc/defconfig linux/arch/sparc/defconfig
--- linux-2.2.18-pre21/arch/sparc/defconfig	Mon Dec  3 20:41:26 2001
+++ linux/arch/sparc/defconfig	Mon Dec  3 20:42:17 2001
@@ -19,6 +19,7 @@
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
+CONFIG_SPARC32=y
 # CONFIG_AP1000 is not set
 # CONFIG_SMP is not set
 # CONFIG_SUN4 is not set
@@ -69,8 +70,8 @@
 #
 # CONFIG_SPARCAUDIO is not set
 # CONFIG_SPARCAUDIO_AMD7930 is not set
-# CONFIG_SPARCAUDIO_CS4231 is not set
 # CONFIG_SPARCAUDIO_DBRI is not set
+# CONFIG_SPARCAUDIO_CS4231 is not set
 # CONFIG_SPARCAUDIO_DUMMY is not set
 CONFIG_SUN_OPENPROMFS=m
 CONFIG_NET=y
@@ -260,11 +261,12 @@
 #
 CONFIG_CODA_FS=m
 CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
 CONFIG_NFSD=m
-# CONFIG_NFSD_SUN is not set
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
-CONFIG_NFS_V3=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 CONFIG_NCP_FS=m
diff -urN linux-2.2.18-pre21/arch/sparc64/defconfig linux/arch/sparc64/defconfig
--- linux-2.2.18-pre21/arch/sparc64/defconfig	Mon Dec  3 20:41:26 2001
+++ linux/arch/sparc64/defconfig	Mon Dec  3 20:42:17 2001
@@ -319,6 +319,7 @@
 CONFIG_NFS_V3=y
 CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
+# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_SMB_FS=m
diff -urN linux-2.2.18-pre21/drivers/block/cciss.c linux/drivers/block/cciss.c
--- linux-2.2.18-pre21/drivers/block/cciss.c	Mon Dec  3 20:41:35 2001
+++ linux/drivers/block/cciss.c	Mon Dec  3 20:42:17 2001
@@ -1799,7 +1799,9 @@
 		}
 		/* make sure the board interrupts are off */
 		hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_OFF);
-		if( request_irq(hba[i]->intr, do_cciss_intr, SA_INTERRUPT|SA_SHIRQ, hba[i]->devname, hba[i]))
+		if( request_irq(hba[i]->intr, do_cciss_intr,
+				SA_INTERRUPT|SA_SHIRQ|SA_SAMPLE_RANDOM,
+				hba[i]->devname, hba[i]))
 		{
 			printk(KERN_ERR "ciss: Unable to get irq %d for %s\n",
 				hba[i]->intr, hba[i]->devname);
diff -urN linux-2.2.18-pre21/drivers/block/cpqarray.c linux/drivers/block/cpqarray.c
--- linux-2.2.18-pre21/drivers/block/cpqarray.c	Mon Dec  3 20:41:35 2001
+++ linux/drivers/block/cpqarray.c	Mon Dec  3 20:42:17 2001
@@ -455,7 +455,8 @@
 
 		hba[i]->access.set_intr_mask(hba[i], 0);
 		if (request_irq(hba[i]->intr, do_ida_intr,
-			SA_INTERRUPT|SA_SHIRQ, hba[i]->devname, hba[i])) {
+				SA_INTERRUPT|SA_SHIRQ|SA_SAMPLE_RANDOM,
+				hba[i]->devname, hba[i])) {
 
 			printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n", 
 				hba[i]->intr, hba[i]->devname);
diff -urN linux-2.2.18-pre21/drivers/block/ide-cd.c linux/drivers/block/ide-cd.c
--- linux-2.2.18-pre21/drivers/block/ide-cd.c	Mon Dec  3 20:41:35 2001
+++ linux/drivers/block/ide-cd.c	Mon Dec  3 20:42:18 2001
@@ -324,41 +324,50 @@
 	info->nsectors_buffered = 0;
 }
 
+static int cdrom_log_sense(ide_drive_t *drive, struct packet_command *pc,
+			   struct request_sense *sense)
+{
+	int log = 0;
+
+	if (sense == NULL)
+		return 0;
+
+	switch (sense->sense_key) {
+		case NO_SENSE: case RECOVERED_ERROR:
+			break;
+		case NOT_READY:
+			/*
+			 * don't care about tray state messages for
+			 * e.g. capacity commands or in-progress or
+			 * becoming ready
+			 */
+			if (sense->asc == 0x3a || sense->asc == 0x04)
+				break;
+			log = 1;
+			break;
+		case UNIT_ATTENTION:
+			/*
+			 * Make good and sure we've seen this potential media
+			 * change. Some drives (i.e. Creative) fail to present
+			 * the correct sense key in the error register.
+			 */
+			cdrom_saw_media_change(drive);
+			break;
+		default:
+			log = 1;
+			break;
+	}
+	return log;
+}
 
 static
 void cdrom_analyze_sense_data(ide_drive_t *drive,
 			      struct packet_command *failed_command,
 			      struct request_sense *sense)
 {
-	if (sense->sense_key == NOT_READY ||
-	    sense->sense_key == UNIT_ATTENTION) {
-		/* Make good and sure we've seen this potential media change.
-		   Some drives (i.e. Creative) fail to present the correct
-		   sense key in the error register. */
-		cdrom_saw_media_change (drive);
-
-
-		/* Don't print not ready or unit attention errors for
-		   READ_SUBCHANNEL.  Workman (and probably other programs)
-		   uses this command to poll the drive, and we don't want
-		   to fill the syslog with useless errors. */
-		if (failed_command &&
-		    (failed_command->c[0] == GPCMD_READ_SUBCHANNEL ||
-		     failed_command->c[0] == GPCMD_TEST_UNIT_READY))
-			return;
-	}
-
-	if (sense->error_code == 0x70 && sense->sense_key  == 0x02
-	 && ((sense->asc      == 0x3a && sense->ascq       == 0x00) ||
-	     (sense->asc      == 0x04 && sense->ascq       == 0x01)))
-	{
-		/*
-		 * Suppress the following errors:
-		 * "Medium not present", "in progress of becoming ready",
-		 * and "writing" to keep the noise level down to a dull roar.
-		 */
+
+	if (!cdrom_log_sense(drive, failed_command, sense))
 		return;
-	}
 
 #if VERBOSE_IDE_CD_ERRORS
 	{
@@ -1105,7 +1114,13 @@
 
 	if (retry && jiffies - info->start_seek > IDECD_SEEK_TIMER) {
 		if (--retry == 0) {
+			/*
+			 * this condition is far too common, to bother
+			 * users about it
+			 */
+#if 0
 			printk("%s: disabled DSC seek overlap\n", drive->name);
+#endif
 			drive->dsc_overlap = 0;
 		}
 	}
@@ -1329,8 +1344,12 @@
 static
 void cdrom_sleep (int time)
 {
-	current->state = TASK_INTERRUPTIBLE;
-	schedule_timeout(time);
+	int sleep = time;
+
+	do {
+		set_current_state(TASK_INTERRUPTIBLE);
+		sleep = schedule_timeout(sleep);
+	} while (sleep);
 }
 
 static
@@ -1848,6 +1867,9 @@
 	struct cdrom_info *info = drive->driver_data;
 	struct atapi_toc *toc = info->toc;
 	int ntracks;
+
+	if (!CDROM_STATE_FLAGS(drive)->toc_valid)
+		return -EINVAL;
 
 	/* Check validity of requested track number. */
 	ntracks = toc->hdr.last_track - toc->hdr.first_track + 1;
diff -urN linux-2.2.18-pre21/drivers/char/README.computone linux/drivers/char/README.computone
--- linux-2.2.18-pre21/drivers/char/README.computone	Wed Jun  7 14:26:42 2000
+++ linux/drivers/char/README.computone	Mon Dec  3 20:42:18 2001
@@ -92,7 +92,7 @@
 to update the character drivers' makefile and configuration file, and other 
 kernel source files. A build script (ip2build) was included which applies 
 the patches if needed, and build any utilities needed.
-What you recieve may be a single patch file in conventional kernel
+What you receive may be a single patch file in conventional kernel
 patch format build script. That form can also be applied by
 running patch -p1 < ThePatchFile.  Otherwise the drivers source may be
 a tar file, then untar and run ip2build if a new installation.
diff -urN linux-2.2.18-pre21/drivers/char/bw-qcam.c linux/drivers/char/bw-qcam.c
--- linux-2.2.18-pre21/drivers/char/bw-qcam.c	Mon Aug  9 12:04:39 1999
+++ linux/drivers/char/bw-qcam.c	Mon Dec  3 20:42:18 2001
@@ -867,12 +867,9 @@
 		case VIDIOCGWIN:
 		{
 			struct video_window vw;
-			vw.x=0;
-			vw.y=0;
+			memset(&vw, 0, sizeof(vw));
 			vw.width=qcam->width/qcam->transfer_scale;
 			vw.height=qcam->height/qcam->transfer_scale;
-			vw.chromakey=0;
-			vw.flags=0;
 			if(copy_to_user(arg, &vw, sizeof(vw)))
 				return -EFAULT;
 			return 0;
diff -urN linux-2.2.18-pre21/drivers/char/c-qcam.c linux/drivers/char/c-qcam.c
--- linux-2.2.18-pre21/drivers/char/c-qcam.c	Wed May  3 17:16:33 2000
+++ linux/drivers/char/c-qcam.c	Mon Dec  3 20:42:18 2001
@@ -612,12 +612,9 @@
 		case VIDIOCGWIN:
 		{
 			struct video_window vw;
-			vw.x=0;
-			vw.y=0;
+			memset(&vw, 0, sizeof(vw));
 			vw.width=qcam->width;
 			vw.height=qcam->height;
-			vw.chromakey=0;
-			vw.flags=0;
 			if(copy_to_user(arg, &vw, sizeof(vw)))
 				return -EFAULT;
 			return 0;
diff -urN linux-2.2.18-pre21/drivers/isdn/divert/divert_init.c linux/drivers/isdn/divert/divert_init.c
--- linux-2.2.18-pre21/drivers/isdn/divert/divert_init.c	Tue Oct 26 17:53:40 1999
+++ linux/drivers/isdn/divert/divert_init.c	Mon Dec  3 20:42:18 2001
@@ -1,5 +1,5 @@
 /* 
- * $Id: divert_init.c,v 1.4 1999/08/22 20:26:32 calle Exp $
+ * $Id: divert_init.c,v 1.5 2000/11/13 22:51:47 kai Exp $
  *
  * Module init for DSS1 diversion services for i4l.
  *
@@ -18,22 +18,6 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
- *
- * $Log: divert_init.c,v $
- * Revision 1.4  1999/08/22 20:26:32  calle
- * backported changes from kernel 2.3.14:
- * - several #include "config.h" gone, others come.
- * - "struct device" changed to "struct net_device" in 2.3.14, added a
- *   define in isdn_compat.h for older kernel versions.
- *
- * Revision 1.3  1999/07/05 20:21:39  werner
- * changes to use diversion sources for all kernel versions.
- * removed static device, only proc filesystem used
- *
- * Revision 1.2  1999/07/04 21:37:30  werner
- * Ported from kernel version 2.0
- *
- *
  *
  */
 
diff -urN linux-2.2.18-pre21/drivers/isdn/divert/divert_procfs.c linux/drivers/isdn/divert/divert_procfs.c
--- linux-2.2.18-pre21/drivers/isdn/divert/divert_procfs.c	Mon Dec  3 20:41:39 2001
+++ linux/drivers/isdn/divert/divert_procfs.c	Mon Dec  3 20:42:18 2001
@@ -1,5 +1,5 @@
 /*
- * $Id: divert_procfs.c,v 1.9 2000/08/20 07:40:14 keil Exp $
+ * $Id: divert_procfs.c,v 1.10 2000/11/13 22:51:47 kai Exp $
  *
  * Filesystem handling for the diversion supplementary services.
  *
@@ -18,38 +18,6 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Log: divert_procfs.c,v $
- * Revision 1.9  2000/08/20 07:40:14  keil
- * changes from 2.4
- *
- * Revision 1.8  2000/03/03 16:37:11  kai
- * incorporated some cosmetic changes from the official kernel tree back
- * into CVS
- *
- * Revision 1.7  2000/03/02 00:11:06  werner
- *
- * Changes related to procfs for 2.3.48
- *
- * Revision 1.6  2000/02/14 19:23:03  werner
- *
- * Changed handling of proc filesystem tables to a more portable version
- *
- * Revision 1.5  1999/09/14 20:31:01  werner
- *
- * Removed obsoleted functions for proc fs and synced with new ones.
- *
- * Revision 1.4  1999/08/06 07:42:48  calle
- * Added COMPAT_HAS_NEW_WAITQ for rd_queue for newer kernels.
- *
- * Revision 1.3  1999/07/05 20:21:41  werner
- * changes to use diversion sources for all kernel versions.
- * removed static device, only proc filesystem used
- *
- * Revision 1.2  1999/07/04 21:37:31  werner
- * Ported from kernel version 2.0
- *
- *
  *
  */
 
diff -urN linux-2.2.18-pre21/drivers/isdn/hisax/config.c linux/drivers/isdn/hisax/config.c
--- linux-2.2.18-pre21/drivers/isdn/hisax/config.c	Wed May  3 17:16:39 2000
+++ linux/drivers/isdn/hisax/config.c	Mon Dec  3 20:42:18 2001
@@ -619,7 +619,7 @@
 		}
 		i++;
 	}
-	if (strlen(str)) {
+	if (str && *str) {
 		strcpy(HiSaxID, str);
 		HiSax_id = HiSaxID;
 	} else {
diff -urN linux-2.2.18-pre21/drivers/isdn/icn/icn.c linux/drivers/isdn/icn/icn.c
--- linux-2.2.18-pre21/drivers/isdn/icn/icn.c	Mon Dec  3 20:41:39 2001
+++ linux/drivers/isdn/icn/icn.c	Mon Dec  3 20:42:18 2001
@@ -1,4 +1,4 @@
-/* $Id: icn.c,v 1.62 1999/09/06 07:29:35 fritz Exp $
+/* $Id: icn.c,v 1.65 2000/11/13 22:51:48 kai Exp $
 
  * ISDN low-level module for the ICN active ISDN-Card.
  *
@@ -18,220 +18,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: icn.c,v $
- * Revision 1.62  1999/09/06 07:29:35  fritz
- * Changed my mail-address.
- *
- * Revision 1.61  1999/09/03 14:06:58  fritz
- * Fixed a memory leak.
- *
- * Revision 1.60  1999/08/31 11:20:32  paul
- * various spelling corrections (new checksums may be needed, Karsten!)
- *
- * Revision 1.59  1999/08/28 22:10:55  keil
- * __setup function should be static
- *
- * Revision 1.58  1999/08/25 16:44:17  keil
- * Support for new __setup function
- *
- * Revision 1.57  1999/07/06 16:15:30  detabc
- * remove unused messages
- *
- * Revision 1.56  1999/04/12 13:15:07  fritz
- * Fixed a cast.
- *
- * Revision 1.55  1999/04/12 12:34:02  fritz
- * Changes from 2.0 tree.
- *
- * Revision 1.54  1999/01/05 18:29:39  he
- * merged remaining schedule_timeout() changes from 2.1.127
- *
- * Revision 1.53  1998/06/17 19:51:28  he
- * merged with 2.1.10[34] (cosmetics and udelay() -> mdelay())
- * brute force fix to avoid Ugh's in isdn_tty_write()
- * cleaned up some dead code
- *
- * Revision 1.52  1998/05/20 19:29:58  tsbogend
- * fixed bug introduced by changes for new BSENT callback
- *
- * Revision 1.51  1998/03/07 22:29:55  fritz
- * Adapted Detlef's chenges for 2.1.
- *
- * Revision 1.49  1998/02/13 11:14:15  keil
- * change for 2.1.86 (removing FREE_READ/FREE_WRITE from [dev]_kfree_skb()
- *
- * Revision 1.48  1997/10/10 15:56:14  fritz
- * New HL<->LL interface:
- *   New BSENT callback with nr. of bytes included.
- *   Sending without ACK.
- *
- * Revision 1.47  1997/10/01 09:21:51  fritz
- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.
- *
- * Revision 1.46  1997/08/21 22:38:33  fritz
- * Fixed a typo.
- *
- * Revision 1.45  1997/06/21 10:42:06  fritz
- * Added availability to select leased mode on only one channel.
- *
- * Revision 1.44  1997/03/30 16:51:26  calle
- * changed calls to copy_from_user/copy_to_user and removed verify_area
- * were possible.
- *
- * Revision 1.43  1997/03/21 18:27:04  fritz
- * Corrected parsing of incoming setup.
- *
- * Revision 1.42  1997/03/05 21:13:18  fritz
- * Bugfix: sndcount was not reset on hangup.
- *
- * Revision 1.41  1997/02/24 23:34:29  fritz
- * Bugfix in Layer1 error-recovery.
- *
- * Revision 1.40  1997/02/23 23:34:45  fritz
- * Minor bugfixes in debugging code.
- *
- * Revision 1.39  1997/02/23 16:21:56  fritz
- * Bugfix: Check for NULL pointer in icn_parse_status().
- *
- * Revision 1.38  1997/02/11 18:29:31  fritz
- * Bugfix in D64S initialization.
- *
- * Revision 1.37  1997/02/10 22:43:20  fritz
- * Added plan and screen elements on ISDN_STAT_ICALL
- *
- * Revision 1.36  1997/02/10 21:31:20  fritz
- * Changed setup-interface (incoming and outgoing).
- *
- * Revision 1.35  1997/02/10 10:10:28  fritz
- * Changes for Kernel 2.1.X compatibility.
- * Enhanced initialization, can recover from
- * misconfiguration by other autoprobing drivers.
- *
- * Revision 1.34  1997/01/29 22:34:44  fritz
- * Cleanup, Corrected D64S setup of 2nd channel.
- *
- * Revision 1.33  1996/12/05 20:31:48  tsbogend
- * added handling of L2: DATA LINK LOST messages
- *
- * Revision 1.32  1996/11/14 23:49:18  fritz
- * Bugfix: copy_to_user/copy_from_user mismatch in debugging-ioctl.
- *
- * Revision 1.31  1996/11/13 02:36:25  fritz
- * Fixed a race condition in writecmd.
- * Some optimizations and cleanup.
- *
- * Revision 1.30  1996/10/22 23:14:09  fritz
- * Changes for compatibility to 2.0.X and 2.1.X kernels.
- *
- * Revision 1.29  1996/08/29 20:34:54  fritz
- * Bugfix in send queue management:
- * sndcount was not updated correctly.
- * Minor Bugfixes.
- *
- * Revision 1.28  1996/06/28 17:02:53  fritz
- * replaced memcpy_fromfs_toio.
- *
- * Revision 1.27  1996/06/25 18:38:59  fritz
- * Fixed function name in error message.
- *
- * Revision 1.26  1996/06/24 17:20:35  fritz
- * Bugfixes in pollbchan_send():
- *   - Using lock field of skbuff breaks networking.
- *   - Added channel locking
- *   - changed dequeuing scheme.
- * Eliminated misc. compiler warnings.
- *
- * Revision 1.25  1996/06/11 22:53:35  tsbogend
- * fixed problem with large array on stack
- * made the driver working on Linux/alpha
- *
- * Revision 1.24  1996/06/06 13:58:33  fritz
- * Changed code to be architecture independent
- *
- * Revision 1.23  1996/06/03 19:59:00  fritz
- * Fixed typos.
- *
- * Revision 1.22  1996/05/17 15:46:41  fritz
- * Removed own queue management.
- * Changed queue management to use sk_buffs.
- *
- * Revision 1.21  1996/05/02 04:01:20  fritz
- * Bugfix:
- *  - icn_addcard() evaluated wrong driverId.
- *
- * Revision 1.20  1996/05/02 00:40:27  fritz
- * Major rewrite to support more than one card
- * with a single module.
- * Support for new firmware.
- *
- * Revision 1.19  1996/04/21 17:43:32  fritz
- * Changes for Support of new Firmware BRV3.02
- *
- * Revision 1.18  1996/04/20 16:50:26  fritz
- * Fixed status-buffer overrun.
- * Misc. typos
- *
- * Revision 1.17  1996/02/11 02:39:04  fritz
- * Increased Buffer for status-messages.
- * Removed conditionals for HDLC-firmware.
- *
- * Revision 1.16  1996/01/22 05:01:55  fritz
- * Revert to GPL.
- *
- * Revision 1.15  1996/01/10 20:57:39  fritz
- * Bugfix: Loading firmware twice caused the device stop working.
- *
- * Revision 1.14  1995/12/18  18:23:37  fritz
- * Support for ICN-2B Cards.
- * Change for supporting user-settable service-octet.
- *
- * Revision 1.13  1995/10/29  21:41:07  fritz
- * Added support for DriverId's, added Jan's patches for Kernel versions.
- *
- * Revision 1.12  1995/04/29  13:07:35  fritz
- * Added support for new Euro-ISDN-firmware
- *
- * Revision 1.11  1995/04/23  13:40:45  fritz
- * Added support for SPV's.
- * Changed Dial-Command to support MSN's on DSS1-Lines.
- *
- * Revision 1.10  1995/03/25  23:23:24  fritz
- * Changed configurable Ports, to allow settings for DIP-Switch Cardversions.
- *
- * Revision 1.9  1995/03/25  23:17:30  fritz
- * Fixed race-condition in pollbchan_send
- *
- * Revision 1.8  1995/03/15  12:49:44  fritz
- * Added support for SPV's
- * Split pollbchan_work for calling send-routine directly
- *
- * Revision 1.7  1995/02/20  03:48:03  fritz
- * Added support of new request_region-function.
- * Minor bugfixes.
- *
- * Revision 1.6  1995/01/31  15:48:45  fritz
- * Added Cause-Messages to be signaled to upper layers.
- * Added Revision-Info on load.
- *
- * Revision 1.5  1995/01/29  23:34:59  fritz
- * Added stopdriver() and appropriate calls.
- * Changed printk-statements to support loglevels.
- *
- * Revision 1.4  1995/01/09  07:40:46  fritz
- * Added GPL-Notice
- *
- * Revision 1.3  1995/01/04  05:15:18  fritz
- * Added undocumented "bootload-finished"-command in download-code
- * to satisfy some brain-damaged icn card-versions.
- *
- * Revision 1.2  1995/01/02  02:14:45  fritz
- * Misc Bugfixes
- *
- * Revision 1.1  1994/12/14  17:56:06  fritz
- * Initial revision
- *
  */
 
 #include "icn.h"
@@ -247,7 +33,7 @@
 #undef MAP_DEBUG
 
 static char
-*revision = "$Revision: 1.62 $";
+*revision = "$Revision: 1.65 $";
 
 static int icn_addcard(int, char *, char *);
 
@@ -1865,7 +1651,7 @@
 		portbase = ints[1];
 	if (ints[0] > 1)
 		membase = ints[2];
-	if (strlen(str)) {
+	if (str && *str) {
 		strcpy(sid, str);
 		icn_id = sid;
 		if ((p = strchr(sid, ','))) {
diff -urN linux-2.2.18-pre21/drivers/isdn/icn/icn.h linux/drivers/isdn/icn/icn.h
--- linux-2.2.18-pre21/drivers/isdn/icn/icn.h	Tue Oct 26 17:53:40 1999
+++ linux/drivers/isdn/icn/icn.h	Mon Dec  3 20:42:18 2001
@@ -1,4 +1,4 @@
-/* $Id: icn.h,v 1.29 1999/09/06 07:29:35 fritz Exp $
+/* $Id: icn.h,v 1.30 2000/11/13 22:51:48 kai Exp $
 
  * ISDN lowlevel-module for the ICN active ISDN-Card.
  *
@@ -17,110 +17,6 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Log: icn.h,v $
- * Revision 1.29  1999/09/06 07:29:35  fritz
- * Changed my mail-address.
- *
- * Revision 1.28  1997/10/10 15:56:18  fritz
- * New HL<->LL interface:
- *   New BSENT callback with nr. of bytes included.
- *   Sending without ACK.
- *
- * Revision 1.27  1997/10/01 09:21:56  fritz
- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.
- *
- * Revision 1.26  1997/02/14 12:23:16  fritz
- * Added support for new insmod parameter handling.
- *
- * Revision 1.25  1997/02/10 10:10:31  fritz
- * Changes for Kernel 2.1.X compatibility.
- * Enhanced initialization, can recover from
- * misconfiguration by other autoprobing drivers.
- *
- * Revision 1.24  1997/01/29 22:34:46  fritz
- * Cleanup, Corrected D64S setup of 2nd channel.
- *
- * Revision 1.23  1996/12/17 18:47:55  tsbogend
- * changed timeouts from absolute numbers to HZ based values
- *
- * Revision 1.22  1996/11/13 02:37:33  fritz
- * Added delay include.
- *
- * Revision 1.21  1996/08/29 20:35:57  fritz
- * Speed up B-Channel polling interval.
- *
- * Revision 1.20  1996/06/24 17:20:37  fritz
- * Bugfixes in pollbchan_send():
- *   - Using lock field of skbuff breaks networking.
- *   - Added channel locking
- *   - changed dequeuing scheme.
- * Eliminated misc. compiler warnings.
- *
- * Revision 1.19  1996/06/06 13:58:35  fritz
- * Changed code to be architecture independent
- *
- * Revision 1.18  1996/06/03 19:59:30  fritz
- * Removed include of config.h
- *
- * Revision 1.17  1996/05/18 00:47:04  fritz
- * Removed callback debug code.
- *
- * Revision 1.16  1996/05/17 15:46:43  fritz
- * Removed own queue management.
- * Changed queue management to use sk_buffs.
- *
- * Revision 1.15  1996/05/02 04:01:57  fritz
- * Removed ICN_MAXCARDS
- *
- * Revision 1.14  1996/05/02 00:40:29  fritz
- * Major rewrite to support more than one card
- * with a single module.
- * Support for new firmware.
- *
- * Revision 1.13  1996/04/20 16:51:41  fritz
- * Increased status buffer.
- * Misc. typos
- *
- * Revision 1.12  1996/01/22 05:01:22  fritz
- * Revert to GPL.
- *
- * Revision 1.11  1995/12/18  18:25:00  fritz
- * Support for ICN-2B Cards.
- * Change for supporting user-settable service-octet.
- *
- * Revision 1.10  1995/10/29  21:43:10  fritz
- * Added support for leased lines.
- *
- * Revision 1.9  1995/04/23  13:42:10  fritz
- * Added some constants for distinguishing 1TR6 and DSS1
- *
- * Revision 1.8  1995/03/25  23:18:55  fritz
- * Changed ICN_PORTLEN to reflect correct number of ports.
- *
- * Revision 1.7  1995/03/15  12:52:06  fritz
- * Some cleanup
- *
- * Revision 1.6  1995/02/20  03:49:22  fritz
- * Fixed ICN_MAX_SQUEUE to correctly reflect outstanding bytes, not number
- * of buffers.
- *
- * Revision 1.5  1995/01/29  23:36:50  fritz
- * Minor cleanup.
- *
- * Revision 1.4  1995/01/09  07:41:20  fritz
- * Added GPL-Notice
- *
- * Revision 1.3  1995/01/04  05:14:20  fritz
- * removed include of linux/asm/string.h for compiling with Linux 1.1.76
- *
- * Revision 1.2  1995/01/02  02:15:57  fritz
- * Misc. Bugfixes
- *
- * Revision 1.1  1994/12/14  18:02:38  fritz
- * Initial revision
  *
  */
 
diff -urN linux-2.2.18-pre21/drivers/isdn/isdn_cards.c linux/drivers/isdn/isdn_cards.c
--- linux-2.2.18-pre21/drivers/isdn/isdn_cards.c	Mon Dec  3 20:41:39 2001
+++ linux/drivers/isdn/isdn_cards.c	Mon Dec  3 20:42:18 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_cards.c,v 1.11 2000/05/11 22:29:20 kai Exp $
+/* $Id: isdn_cards.c,v 1.13 2000/10/28 23:03:38 kai Exp $
 
  * Linux ISDN subsystem, initialization for non-modularized drivers.
  *
@@ -43,7 +43,9 @@
 extern void capi_init(void);
 extern void capidrv_init(void);
 #endif
+#if CONFIG_ISDN_DRV_ACT2000
 extern void act2000_init(void);
+#endif
 
 void
 isdn_cards_init(void)
diff -urN linux-2.2.18-pre21/drivers/isdn/isdn_common.c linux/drivers/isdn/isdn_common.c
--- linux-2.2.18-pre21/drivers/isdn/isdn_common.c	Mon Dec  3 20:41:39 2001
+++ linux/drivers/isdn/isdn_common.c	Mon Dec  3 20:42:18 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_common.c,v 1.111 2000/08/20 07:40:14 keil Exp $
+/* $Id: isdn_common.c,v 1.113 2000/11/01 17:54:00 detabc Exp $
 
  * Linux ISDN subsystem, common used functions (linklevel).
  *
@@ -44,9 +44,9 @@
 /* Debugflags */
 #undef ISDN_DEBUG_STATCALLB
 
-isdn_dev *dev = (isdn_dev *) 0;
+isdn_dev *dev;
 
-static char *isdn_revision = "$Revision: 1.111 $";
+static char *isdn_revision = "$Revision: 1.113 $";
 
 extern char *isdn_net_revision;
 extern char *isdn_tty_revision;
@@ -63,7 +63,7 @@
 extern char *isdn_v110_revision;
 
 #ifdef CONFIG_ISDN_DIVERSION
-isdn_divert_if *divert_if = NULL; /* interface to diversion module */
+isdn_divert_if *divert_if; /* interface to diversion module */
 #endif CONFIG_ISDN_DIVERSION
 
 
diff -urN linux-2.2.18-pre21/drivers/isdn/isdnloop/isdnloop.c linux/drivers/isdn/isdnloop/isdnloop.c
--- linux-2.2.18-pre21/drivers/isdn/isdnloop/isdnloop.c	Tue Oct 26 17:53:40 1999
+++ linux/drivers/isdn/isdnloop/isdnloop.c	Mon Dec  3 20:42:18 2001
@@ -1,4 +1,4 @@
-/* $Id: isdnloop.c,v 1.9 1999/09/06 07:29:36 fritz Exp $
+/* $Id: isdnloop.c,v 1.11 2000/11/13 22:51:50 kai Exp $
 
  * ISDN low-level module implementing a dummy loop driver.
  *
@@ -18,48 +18,13 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: isdnloop.c,v $
- * Revision 1.9  1999/09/06 07:29:36  fritz
- * Changed my mail-address.
- *
- * Revision 1.8  1998/11/18 18:59:43  armin
- * changes for 2.1.127
- *
- * Revision 1.7  1998/10/30 18:58:03  he
- * typecast to suppress a compiler warning
- *
- * Revision 1.6  1998/06/17 19:51:37  he
- * merged with 2.1.10[34] (cosmetics and udelay() -> mdelay())
- * brute force fix to avoid Ugh's in isdn_tty_write()
- * cleaned up some dead code
- *
- * Revision 1.5  1998/04/14 20:59:32  he
- * merged 2.1.94 changes
- *
- * Revision 1.4  1998/02/24 21:39:05  he
- * L2_PROT_X25DTE / DCE
- * additional state 17 and new internal signal messages "BCON_I"
- * (for reliable connect confirmation primitive as needed by x.25 upper layer)
- * Changes for new LL-HL interface
- *
- * Revision 1.3  1998/02/20 17:33:30  fritz
- * Changes for recent kernels.
- *
- * Revision 1.2  1997/10/01 09:22:03  fritz
- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.
- *
- * Revision 1.1  1997/03/24 23:02:04  fritz
- * Added isdnloop driver.
- *
  */
 
 #include <linux/config.h>
 #include "isdnloop.h"
 
 static char
-*revision = "$Revision: 1.9 $";
+*revision = "$Revision: 1.11 $";
 
 static int isdnloop_addcard(char *);
 
@@ -865,6 +830,7 @@
 			if (card->rcard[ch - 1]) {
 				isdnloop_fake(card->rcard[ch - 1], "BCON_I",
 					      card->rch[ch - 1] + 1);
+				isdnloop_fake(card, "BCON_C", ch);
 			}
 			break;
 		case 17:
diff -urN linux-2.2.18-pre21/drivers/isdn/isdnloop/isdnloop.h linux/drivers/isdn/isdnloop/isdnloop.h
--- linux-2.2.18-pre21/drivers/isdn/isdnloop/isdnloop.h	Tue Oct 26 17:53:40 1999
+++ linux/drivers/isdn/isdnloop/isdnloop.h	Mon Dec  3 20:42:18 2001
@@ -1,4 +1,4 @@
-/* $Id: isdnloop.h,v 1.4 1999/09/06 07:29:36 fritz Exp $
+/* $Id: isdnloop.h,v 1.5 2000/11/13 22:51:50 kai Exp $
 
  * Loopback lowlevel module for testing of linklevel.
  *
@@ -17,21 +17,6 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Log: isdnloop.h,v $
- * Revision 1.4  1999/09/06 07:29:36  fritz
- * Changed my mail-address.
- *
- * Revision 1.3  1998/04/14 20:59:35  he
- * merged 2.1.94 changes
- *
- * Revision 1.2  1997/10/01 09:22:07  fritz
- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.
- *
- * Revision 1.1  1997/03/24 23:02:05  fritz
- * Added isdnloop driver.
  *
  */
 
diff -urN linux-2.2.18-pre21/drivers/net/3c59x.c linux/drivers/net/3c59x.c
--- linux-2.2.18-pre21/drivers/net/3c59x.c	Mon Sep  4 10:39:18 2000
+++ linux/drivers/net/3c59x.c	Mon Dec  3 20:42:18 2001
@@ -1245,7 +1245,7 @@
 			vp->tx_skbuff[i] = 0;
 		outl(0, ioaddr + DownListPtr);
 	}
-	/* Set reciever mode: presumably accept b-case and phys addr only. */
+	/* Set receiver mode: presumably accept b-case and phys addr only. */
 	set_rx_mode(dev);
 	outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */
 
diff -urN linux-2.2.18-pre21/drivers/net/82596.c linux/drivers/net/82596.c
--- linux-2.2.18-pre21/drivers/net/82596.c	Wed Jun  7 14:26:43 2000
+++ linux/drivers/net/82596.c	Mon Dec  3 20:42:18 2001
@@ -27,6 +27,9 @@
    should be stored as 0x56781234.  This is a real pain, when
    you have linked lists which are shared by the 680x0 and the
    i596.
+   NOTE: This was fixed in Stepping C of the chip. That again
+   means that big-endian should not be used at all: Steppings
+   A1, B and C of the 82596 each have a different big-endian behaviour.
 
    Driver skeleton
    Written 1993 by Donald Becker.
diff -urN linux-2.2.18-pre21/drivers/net/acenic.c linux/drivers/net/acenic.c
--- linux-2.2.18-pre21/drivers/net/acenic.c	Mon Dec  3 20:41:42 2001
+++ linux/drivers/net/acenic.c	Mon Dec  3 20:42:18 2001
@@ -2,7 +2,7 @@
  * acenic.c: Linux driver for the Alteon AceNIC Gigabit Ethernet card
  *           and other Tigon based cards.
  *
- * Copyright 1998-2000 by Jes Sorensen, <Jes.Sorensen@cern.ch>.
+ * Copyright 1998-2000 by Jes Sorensen, <jes@linuxcare.com>.
  *
  * Thanks to Alteon and 3Com for providing hardware and documentation
  * enabling me to write this driver.
@@ -35,6 +35,11 @@
  *   Ken Aaker <kdaaker@rchland.vnet.ibm.com>: Correct check for whether
  *                                       memory mapped IO is enabled to
  *                                       make the driver work on RS/6000.
+ *   Stephen Hack <stephen_hack@hp.com>: Fixed ace_set_mac_addr for little
+ *                                       endian systems.
+ *   Val Hensson <vhenson@esscom.com>:   Reset Jumbo skb producer and
+ *                                       rx producer index when
+ *                                       flushing the Jumbo ring.
  */
 
 #include <linux/config.h>
@@ -607,7 +612,7 @@
 }
 
 
-MODULE_AUTHOR("Jes Sorensen <Jes.Sorensen@cern.ch>");
+MODULE_AUTHOR("Jes Sorensen <Jes.Sorensen@linuxcare.com>");
 MODULE_DESCRIPTION("AceNIC/3C985/GA620 Gigabit Ethernet driver");
 MODULE_PARM(link, "1-" __MODULE_STRING(8) "i");
 MODULE_PARM(trace, "1-" __MODULE_STRING(8) "i");
@@ -1073,7 +1078,7 @@
 			default:
 				printk(KERN_INFO "  Cache line size %i not "
 				       "supported, PCI write and invalidate "
-				       "disabled\n", L1_CACHE_BYTES);
+				       "disabled\n", SMP_CACHE_BYTES);
 				ap->pci_command &= ~PCI_COMMAND_INVALIDATE;
 				pci_write_config_word(ap->pdev, PCI_COMMAND,
 						      ap->pci_command);
@@ -1827,7 +1832,20 @@
 					ap->skb->rx_jumbo_skbuff[i].skb = NULL;
 				}
 			}
+
+ 			if (ACE_IS_TIGON_I(ap)) {
+ 				struct cmd cmd;
+ 				cmd.evt = C_SET_RX_JUMBO_PRD_IDX;
+ 				cmd.code = 0;
+ 				cmd.idx = 0;
+ 				ace_issue_cmd(ap->regs, &cmd);
+ 			} else {
+ 				writel(0, &((ap->regs)->RxJumboPrd));
+ 				wmb();
+ 			}
+
 			ap->jumbo = 0;
+			ap->rx_jumbo_skbprd = 0;
 			printk(KERN_INFO "%s: Jumbo ring flushed\n",
 			       dev->name);
 			if (!ap->tx_full)
@@ -2553,7 +2571,7 @@
 {
 	struct sockaddr *addr=p;
 	struct ace_regs *regs;
-	u16 *da;
+	u8 *da;
 	struct cmd cmd;
 
 	if(netif_running(dev))
@@ -2561,11 +2579,11 @@
 
 	memcpy(dev->dev_addr, addr->sa_data,dev->addr_len);
 
-	da = (u16 *)dev->dev_addr;
+	da = (u8 *)dev->dev_addr;
 
 	regs = ((struct ace_private *)dev->priv)->regs;
-	writel(da[0], &regs->MacAddrHi);
-	writel((da[1] << 16) | da[2], &regs->MacAddrLo);
+	writel(da[0] << 8 | da[1], &regs->MacAddrHi);
+	writel((da[2] << 24) | (da[3] << 16) | (da[4] << 8) | da[5] , &regs->MacAddrLo);
 
 	cmd.evt = C_SET_MAC_ADDR;
 	cmd.code = 0;
diff -urN linux-2.2.18-pre21/drivers/net/arlan.c linux/drivers/net/arlan.c
--- linux-2.2.18-pre21/drivers/net/arlan.c	Mon Dec  3 20:41:42 2001
+++ linux/drivers/net/arlan.c	Mon Dec  3 20:42:18 2001
@@ -1784,7 +1784,7 @@
 		break;
 		
 		default:
-			printk(KERN_ERR "arlan intr: recieved unknown status\n");
+			printk(KERN_ERR "arlan intr: received unknown status\n");
 			priv->stats.rx_crc_errors++;
 			break;
 	}
diff -urN linux-2.2.18-pre21/drivers/net/dmfe.c linux/drivers/net/dmfe.c
--- linux-2.2.18-pre21/drivers/net/dmfe.c	Mon Sep  4 10:39:19 2000
+++ linux/drivers/net/dmfe.c	Mon Dec  3 20:42:18 2001
@@ -183,7 +183,7 @@
 	u8 link_failed;		/* Ever link failed */
 	u8 wait_reset;		/* Hardware failed, need to reset */
 	u8 in_reset_state;	/* Now driver in reset routine */
-	u8 rx_error_cnt;	/* recievd abnormal case count */
+	u8 rx_error_cnt;	/* received abnormal case count */
 	u8 dm910x_chk_mode;	/* Operating mode check */
 	struct timer_list timer;
 	struct enet_statistics stats;	/* statistic counter */
diff -urN linux-2.2.18-pre21/drivers/net/eepro100.c linux/drivers/net/eepro100.c
--- linux-2.2.18-pre21/drivers/net/eepro100.c	Mon Dec  3 20:41:43 2001
+++ linux/drivers/net/eepro100.c	Mon Dec  3 20:42:18 2001
@@ -1,5 +1,3 @@
-#define USE_IO
-
 /* drivers/net/eepro100.c: An Intel i82557-559 Ethernet driver for Linux. */
 /*
    NOTICE: this version of the driver is supposed to work with 2.2 kernels.
@@ -37,18 +35,28 @@
 	2000 May 30  Dragan Stancevic <visitor@valinux.com> and
 				 Andrey Moruga <moruga@sw.com.sg>
 		Honor PortReset timing specification.
+	2000 Jul 25  Dragan Stancevic <visitor@valinux.com>
+		Changed to MMIO, resized FIFOs, resized rings, changed ISR timeout
+		Problem reported by:
+		Marc MERLIN <merlin@valinux.com>
+	2000 Nov 15  Dragan Stancevic <visitor@valinux.com>
+		Changed command completion time and added debug info as to which
+		CMD timed out. Problem reported by:
+		"Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de>
 */
 
+/*#define USE_IO*/
 static const char *version =
 "eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html\n"
-"eepro100.c: $Revision: 1.20.2.10 $ 2000/05/31 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n";
+"eepro100.c: $Revision: 1.20.2.10 $ 2000/05/31 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n"
+"eepro100.c: VA Linux custom, Dragan Stancevic <visitor@valinux.com> 2000/11/15\n";
 
 /* A few user-configurable values that apply to all boards.
    First set is undocumented and spelled per Intel recommendations. */
 
 static int congenb = 0;		/* Enable congestion control in the DP83840. */
-static int txfifo = 8;		/* Tx FIFO threshold in 4 byte units, 0-15 */
-static int rxfifo = 8;		/* Rx FIFO threshold, default 32 bytes. */
+static int txfifo = 0;		/* Tx FIFO threshold in 4 byte units, 0-15 */
+static int rxfifo = 0xF;		/* Rx FIFO threshold, default 32 bytes. */
 /* Tx/Rx DMA burst length, 0-127, 0 == no preemption, tx==128 -> disabled. */
 static int txdmacount = 128;
 static int rxdmacount = 0;
@@ -63,7 +71,7 @@
 #endif
 
 /* Maximum events (Rx packets, etc.) to handle at each interrupt. */
-static int max_interrupt_work = 20;
+static int max_interrupt_work = 200;
 
 /* Maximum number of multicast addresses to filter (vs. rx-all-multicast) */
 static int multicast_filter_limit = 64;
@@ -78,8 +86,8 @@
 
 /* A few values that may be tweaked. */
 /* The ring sizes should be a power of two for efficiency. */
-#define TX_RING_SIZE	32
-#define RX_RING_SIZE	32
+#define TX_RING_SIZE	64
+#define RX_RING_SIZE	64
 /* How much slots multicast filter setup may take.
    Do not descrease without changing set_rx_mode() implementaion. */
 #define TX_MULTICAST_SIZE   2
@@ -364,13 +372,21 @@
    Typically this takes 0 ticks. */
 static inline void wait_for_cmd_done(long cmd_ioaddr)
 {
-	int wait = 1000;
+	int wait = 20000;
+	char cmd_reg1, cmd_reg2;
 	do   ;
-	while(inb(cmd_ioaddr) && --wait >= 0);
-#ifndef final_version
-	if (wait < 0)
-		printk(KERN_ALERT "eepro100: wait_for_cmd_done timeout!\n");
-#endif
+	while((cmd_reg1 = inb(cmd_ioaddr)) && (--wait >= 0));
+
+	/* Last chance to change your mind --Dragan*/
+	if (wait < 0){
+		cmd_reg2 = inb(cmd_ioaddr);
+		if(cmd_reg2){
+			printk(KERN_ALERT "eepro100: cmd_wait for(%#2.2x) timedout with(%#2.2x)!\n",
+				cmd_reg1, cmd_reg2);
+		
+		}
+	}
+
 }
 
 /* Offsets to the various registers.
@@ -1147,8 +1163,10 @@
 static void speedo_show_state(struct net_device *dev)
 {
 	struct speedo_private *sp = (struct speedo_private *)dev->priv;
+#if 0
 	long ioaddr = dev->base_addr;
 	int phy_num = sp->phy[0] & 0x1f;
+#endif
 	int i;
 
 	/* Print a few items for debugging. */
@@ -1508,7 +1526,7 @@
 		   FCP and ER interrupts --Dragan */
 		outw(status & 0xfc00, ioaddr + SCBStatus);
 
-		if (speedo_debug > 4)
+		if (speedo_debug > 3)
 			printk(KERN_DEBUG "%s: interrupt  status=%#4.4x.\n",
 				   dev->name, status);
 
diff -urN linux-2.2.18-pre21/drivers/net/lmc/lmc_main.c linux/drivers/net/lmc/lmc_main.c
--- linux-2.2.18-pre21/drivers/net/lmc/lmc_main.c	Mon Sep  4 10:39:19 2000
+++ linux/drivers/net/lmc/lmc_main.c	Mon Dec  3 20:42:18 2001
@@ -640,7 +640,7 @@
 
 
     /* Make sure the tx jabber and rx watchdog are off,
-     * and the transmit and recieve processes are running.
+     * and the transmit and receive processes are running.
      */
 
     LMC_CSR_WRITE (sc, csr_15, cpu_to_le32(0x00000011));
@@ -2139,7 +2139,7 @@
 
     lmc_trace(sc->lmc_device, "lmc_softreset in");
 
-    /* Initialize the recieve rings and buffers. */
+    /* Initialize the receive rings and buffers. */
     sc->lmc_txfull = 0;
     sc->lmc_next_rx = 0;
     sc->lmc_next_tx = 0;
diff -urN linux-2.2.18-pre21/drivers/net/ncr885e.h linux/drivers/net/ncr885e.h
--- linux-2.2.18-pre21/drivers/net/ncr885e.h	Tue Jan  4 10:12:17 2000
+++ linux/drivers/net/ncr885e.h	Mon Dec  3 20:42:18 2001
@@ -177,7 +177,7 @@
 /*  bits for the above three interrupt registers */
 #define  INTERRUPT_INTE        1<<15   /* interrupt enable */
 #define  INTERRUPT_WI          1<<9    /* wakeup interrupt */
-#define  INTERRUPT_ERI         1<<8    /* early recieve interrupt */
+#define  INTERRUPT_ERI         1<<8    /* early receive interrupt */
 #define  INTERRUPT_PPET        1<<7    /* PCI Tx parity error */
 #define  INTERRUPT_PBFT        1<<6    /* PCI Tx bus fault */
 #define  INTERRUPT_IIDT        1<<5    /* illegal instruction Tx */
diff -urN linux-2.2.18-pre21/drivers/net/rclanmtl.h linux/drivers/net/rclanmtl.h
--- linux-2.2.18-pre21/drivers/net/rclanmtl.h	Mon Dec  3 20:41:43 2001
+++ linux/drivers/net/rclanmtl.h	Mon Dec  3 20:42:18 2001
@@ -346,7 +346,7 @@
  /*
  ** Disable and Enable I2O interrupts.  I2O interrupts are enabled at Init time
  ** but can be disabled and re-enabled through these two function calls.
- ** Packets will still be put into any posted recieved buffers and packets will
+ ** Packets will still be put into any posted received buffers and packets will
  ** be sent through RCI2OSendPacket() functions.  Disabling I2O interrupts
  ** will prevent hardware interrupt to host even though the outbound I2O msg
  ** queue is not emtpy.
diff -urN linux-2.2.18-pre21/drivers/net/tulip.c linux/drivers/net/tulip.c
--- linux-2.2.18-pre21/drivers/net/tulip.c	Mon Dec  3 20:41:43 2001
+++ linux/drivers/net/tulip.c	Mon Dec  3 20:42:18 2001
@@ -345,7 +345,7 @@
   { "ADMtek AN981 Comet",
 	0x1317, 0x0981, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
   { "ADMtek AN985 Comet",
-	0x1317, 0x0981, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
+	0x1317, 0x0985, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
   { "Compex RL100-TX",
 	0x11F6, 0x9881, 0xffff, PCI_ADDR0_IO, 128, 32, tulip_probe1 },
   { "Intel 21145 Tulip",
diff -urN linux-2.2.18-pre21/drivers/scsi/megaraid.c linux/drivers/scsi/megaraid.c
--- linux-2.2.18-pre21/drivers/scsi/megaraid.c	Mon Dec  3 20:41:44 2001
+++ linux/drivers/scsi/megaraid.c	Mon Dec  3 20:42:19 2001
@@ -1902,21 +1902,8 @@
 	    PCI_FUNC (pciDevFun));
 
     /* Read the base port and IRQ from PCI */
-#if LINUX_VERSION_CODE < 0x20100
-    pcibios_read_config_dword (pciBus, pciDevFun,
-			       PCI_BASE_ADDRESS_0,
-			       (u_int *) & megaBase);
-    pcibios_read_config_byte (pciBus, pciDevFun,
-			      PCI_INTERRUPT_LINE,
-			      &megaIrq);
-#elif LINUX_VERSION_CODE < 0x20300
-    megaBase = pdev->base_address[0];
-    megaIrq  = pdev->irq;
-#else
-
     megaBase = pci_resource_start (pdev, 0);
     megaIrq  = pdev->irq;
-#endif
 
     pciIdx++;
 
diff -urN linux-2.2.18-pre21/drivers/scsi/pci2000.c linux/drivers/scsi/pci2000.c
--- linux-2.2.18-pre21/drivers/scsi/pci2000.c	Wed May  3 17:16:45 2000
+++ linux/drivers/scsi/pci2000.c	Mon Dec  3 20:42:19 2001
@@ -280,7 +280,7 @@
     spin_lock_irqsave (&io_request_lock, flags);
 #endif /* version >= v2.1.95 */
 
-	DEB(printk ("\npci2000 recieved interrupt "));
+	DEB(printk ("\npci2000 received interrupt "));
 	for ( z = 0; z < NumAdapters;  z++ )										// scan for interrupt to process
 		{
 		if ( PsiHost[z]->irq == (UCHAR)(irq & 0xFF) )
diff -urN linux-2.2.18-pre21/drivers/scsi/pci2220i.c linux/drivers/scsi/pci2220i.c
--- linux-2.2.18-pre21/drivers/scsi/pci2220i.c	Mon Dec  3 20:41:44 2001
+++ linux/drivers/scsi/pci2220i.c	Mon Dec  3 20:42:19 2001
@@ -1655,7 +1655,7 @@
     spin_lock_irqsave (&io_request_lock, flags);
 #endif /* version >= v2.1.95 */
 
-//	DEB (printk ("\npci2220i recieved interrupt\n"));
+//	DEB (printk ("\npci2220i received interrupt\n"));
 
 	for ( z = 0; z < NumAdapters;  z++ )								// scan for interrupt to process
 		{
diff -urN linux-2.2.18-pre21/drivers/scsi/sd.c linux/drivers/scsi/sd.c
--- linux-2.2.18-pre21/drivers/scsi/sd.c	Mon Dec  3 20:41:44 2001
+++ linux/drivers/scsi/sd.c	Mon Dec  3 20:42:19 2001
@@ -1775,6 +1775,8 @@
 	    dpnt->device = NULL;
 	    dpnt->capacity = 0;
 	    SDp->attached--;
+            if (SDp->scsi_request_fn == do_sd_request)
+         	SDp->scsi_request_fn = NULL;
 	    sd_template.dev_noticed--;
 	    sd_template.nr_dev--;
 	    SD_GENDISK(i).nr_real--;
diff -urN linux-2.2.18-pre21/drivers/scsi/sg.c linux/drivers/scsi/sg.c
--- linux-2.2.18-pre21/drivers/scsi/sg.c	Mon Sep  4 10:39:21 2000
+++ linux/drivers/scsi/sg.c	Mon Dec  3 20:42:19 2001
@@ -68,7 +68,7 @@
 
 int sg_big_buff = SG_DEF_RESERVED_SIZE; /* sg_big_buff is ro through sysctl */
 /* N.B. This global is here to keep existing software happy. It now holds
-   the size of the reserve buffer of the most recent sucessful sg_open(). 
+   the size of the reserve buffer of the most recent successful sg_open(). 
    Only available when 'sg' compiled into kernel (rather than a module). 
    This is deprecated (use SG_GET_RESERVED_SIZE ioctl() instead). */
 
diff -urN linux-2.2.18-pre21/drivers/scsi/sr.c linux/drivers/scsi/sr.c
--- linux-2.2.18-pre21/drivers/scsi/sr.c	Mon Dec  3 20:41:44 2001
+++ linux/drivers/scsi/sr.c	Mon Dec  3 20:42:19 2001
@@ -1213,6 +1213,8 @@
 			cpnt->device = NULL;
 			cpnt->capacity = 0;
 			SDp->attached--;
+                        if (SDp->scsi_request_fn == do_sr_request)
+                                SDp->scsi_request_fn = NULL;
 			sr_template.nr_dev--;
 			sr_template.dev_noticed--;
 			sr_sizes[i] = 0;
diff -urN linux-2.2.18-pre21/drivers/scsi/st.c linux/drivers/scsi/st.c
--- linux-2.2.18-pre21/drivers/scsi/st.c	Mon Dec  3 20:41:44 2001
+++ linux/drivers/scsi/st.c	Mon Dec  3 20:42:19 2001
@@ -957,7 +957,7 @@
 	   ((SCpnt->sense_buffer[0] & 0x80) != 0 &&
 	    (SCpnt->sense_buffer[3] | SCpnt->sense_buffer[4] |
 	     SCpnt->sense_buffer[5] |
-	     SCpnt->sense_buffer[6]) == 0))) {
+	     SCpnt->sense_buffer[6]) != 0))) {
 	  /* Filter out successful write at EOM */
 	  scsi_release_command(SCpnt);
 	  SCpnt = NULL;
@@ -2460,7 +2460,7 @@
        STps->eof = ST_NOEOF;
      }
      else if ( (cmd_in == MTBSF) || (cmd_in == MTBSFM) ) {
-       if (fileno >= 0)
+       if (STps->drv_file >= 0)
          STps->drv_file = fileno + undone ;
        else
 	 STps->drv_file = fileno;
@@ -2488,7 +2488,7 @@
 	 STps->drv_block = (-1);
        }
        else {
-	 if (blkno >= 0)
+	 if (STps->drv_block >= 0)
 	   STps->drv_block = blkno + undone;
 	 else
 	   STps->drv_block = (-1);
diff -urN linux-2.2.18-pre21/drivers/sound/wf_midi.c linux/drivers/sound/wf_midi.c
--- linux-2.2.18-pre21/drivers/sound/wf_midi.c	Thu Jan 14 22:59:47 1999
+++ linux/drivers/sound/wf_midi.c	Mon Dec  3 20:42:21 2001
@@ -803,7 +803,7 @@
 	return 0;
 }
 
-__initfunc (static int detect_wf_mpu (int irq, int io_base))
+__initfunc (int detect_wf_mpu (int irq, int io_base))
 
 {
 	if (check_region (io_base, 2)) {
diff -urN linux-2.2.18-pre21/drivers/telephony/ixj.c linux/drivers/telephony/ixj.c
--- linux-2.2.18-pre21/drivers/telephony/ixj.c	Mon Dec  3 20:41:44 2001
+++ linux/drivers/telephony/ixj.c	Mon Dec  3 20:42:25 2001
@@ -732,7 +732,7 @@
 						if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.Caller_ID) {
 							if (j->daa_mode == SOP_PU_RINGING && j->flags.pstn_ringing) {
 								j->pstn_cid_intr = 1;
-								j->pstn_cid_recieved = jiffies;
+								j->pstn_cid_received = jiffies;
 							}
 						}
 					} else {
@@ -740,7 +740,7 @@
 							daa_int_read(board);
 						}
 						j->ex.bits.pstn_ring = 0;
-						if (j->pstn_cid_intr && jiffies > j->pstn_cid_recieved + (hertz * 3)) {
+						if (j->pstn_cid_intr && jiffies > j->pstn_cid_received + (hertz * 3)) {
 							if (j->daa_mode == SOP_PU_RINGING) {
 								ixj_daa_cid_read(board);
 								j->ex.bits.caller_id = 1;
diff -urN linux-2.2.18-pre21/drivers/telephony/ixj.h linux/drivers/telephony/ixj.h
--- linux-2.2.18-pre21/drivers/telephony/ixj.h	Mon Sep  4 10:39:22 2000
+++ linux/drivers/telephony/ixj.h	Mon Dec  3 20:42:25 2001
@@ -1250,7 +1250,7 @@
 	unsigned char fskz;
 	unsigned char fskphase;
 	unsigned char fskcnt;
-	unsigned pstn_cid_recieved;
+	unsigned pstn_cid_received;
 	PHONE_CID cid;
 	PHONE_CID cid_send;
 	unsigned long pstn_ring_start;
diff -urN linux-2.2.18-pre21/drivers/usb/hub.c linux/drivers/usb/hub.c
--- linux-2.2.18-pre21/drivers/usb/hub.c	Mon Dec  3 20:41:44 2001
+++ linux/drivers/usb/hub.c	Mon Dec  3 20:42:25 2001
@@ -648,7 +648,7 @@
 	ret = kill_proc(khubd_pid, SIGTERM, 1);
 	if (!ret) {
 		/* Wait 10 seconds */
-		int count = 10 * 100;
+		int count = 10 * HZ;
 
 		while (khubd_running && --count) {
 			current->state = TASK_INTERRUPTIBLE;
diff -urN linux-2.2.18-pre21/drivers/usb/kaweth.c linux/drivers/usb/kaweth.c
--- linux-2.2.18-pre21/drivers/usb/kaweth.c	Mon Dec  3 20:41:44 2001
+++ linux/drivers/usb/kaweth.c	Mon Dec  3 20:42:25 2001
@@ -380,19 +380,19 @@
 }
 
 /****************************************************************
- *     kaweth_set_recieve_filter
+ *     kaweth_set_receive_filter
  ****************************************************************/
-static int kaweth_set_recieve_filter(struct kaweth_device *kaweth, __u16 recieve_filter)
+static int kaweth_set_receive_filter(struct kaweth_device *kaweth, __u16 receive_filter)
 {
 	int retval;
 
-	printk("Set recieve filter to %d\n", (unsigned)recieve_filter);
+	printk("Set receive filter to %d\n", (unsigned)receive_filter);
 
 	retval = kaweth_control(kaweth,
 									usb_sndctrlpipe(kaweth->dev, 0),
 									KAWETH_COMMAND_SET_PACKET_FILTER,
 									USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
-									recieve_filter,
+									receive_filter,
 									0,
 									(void *)&kaweth->firmware_buf,
 									0,
@@ -480,7 +480,7 @@
 	return result;
 }
 
-static void kaweth_usb_recieve(struct urb *);
+static void kaweth_usb_receive(struct urb *);
 
 /****************************************************************
  *     kaweth_resubmit_rx_urb
@@ -498,7 +498,7 @@
 								usb_rcvbulkpipe(kaweth->dev, 1),
 								kaweth->rx_buf,
 								KAWETH_BUF_SIZE,
-								kaweth_usb_recieve,
+								kaweth_usb_receive,
 								kaweth);
 
 //	kaweth->rx_urb->transfer_flags = USB_DISABLE_SPD | USB_URB_EARLY_COMPLETE;
@@ -510,9 +510,9 @@
 }
 
 /****************************************************************
- *     kaweth_usb_recieve
+ *     kaweth_usb_receive
  ****************************************************************/
-static void kaweth_usb_recieve(struct urb *urb)
+static void kaweth_usb_receive(struct urb *urb)
 {
 	struct kaweth_device *kaweth = urb->context;
 	struct net_device *net = kaweth->net;
@@ -927,13 +927,13 @@
 		return kaweth;
 	}
 
-	result = kaweth_set_recieve_filter(kaweth, KAWETH_PACKET_FILTER_DIRECTED |
+	result = kaweth_set_receive_filter(kaweth, KAWETH_PACKET_FILTER_DIRECTED |
 															 KAWETH_PACKET_FILTER_BROADCAST |
 															 KAWETH_PACKET_FILTER_MULTICAST);
 
 	if(result < 0)
 	{
-		printk("Error setting recieve filter\n");
+		printk("Error setting receive filter\n");
 
 		return kaweth;
 	}
diff -urN linux-2.2.18-pre21/drivers/usb/scanner.c linux/drivers/usb/scanner.c
--- linux-2.2.18-pre21/drivers/usb/scanner.c	Mon Dec  3 20:41:44 2001
+++ linux/drivers/usb/scanner.c	Mon Dec  3 20:42:26 2001
@@ -378,7 +378,7 @@
 		dbg("write stats(%d): result:%d this_write:%d partial:%d", scn_minor, result, this_write, partial);
 
 		if (result == USB_ST_TIMEOUT) {	/* NAK -- shouldn't happen */
-			warn("write_scanner: NAK recieved.");
+			warn("write_scanner: NAK received.");
 			ret = -ETIME;
 			break;
 		} else if (result < 0) { /* We should not get any I/O errors */
diff -urN linux-2.2.18-pre21/drivers/usb/usb-storage.c linux/drivers/usb/usb-storage.c
--- linux-2.2.18-pre21/drivers/usb/usb-storage.c	Mon Dec  3 20:41:44 2001
+++ linux/drivers/usb/usb-storage.c	Mon Dec  3 20:42:26 2001
@@ -458,7 +458,7 @@
 /* Invoke the transport and basic error-handling/recovery methods
  *
  * This is used by the protocol layers to actually send the message to
- * the device and recieve the response.
+ * the device and receive the response.
  */
 static void invoke_transport(Scsi_Cmnd *srb, struct us_data *us)
 {
@@ -611,7 +611,7 @@
 {
 	struct us_data *us = (struct us_data *)urb->context;
 
-	US_DEBUGP("USB IRQ recieved for device on host %d\n", us->host_no);
+	US_DEBUGP("USB IRQ received for device on host %d\n", us->host_no);
 	US_DEBUGP("-- IRQ data length is %d\n", urb->actual_length);
 	US_DEBUGP("-- IRQ state is %d\n", urb->status);
 
@@ -1615,7 +1615,7 @@
 
 		/* exit if we get a signal to exit */
 		if (action == US_ACT_EXIT) {
-			US_DEBUGP("-- US_ACT_EXIT command recieved\n");
+			US_DEBUGP("-- US_ACT_EXIT command received\n");
 			break;
 		}
 	} /* for (;;) */
diff -urN linux-2.2.18-pre21/fs/lockd/clntproc.c linux/fs/lockd/clntproc.c
--- linux-2.2.18-pre21/fs/lockd/clntproc.c	Mon Dec  3 20:41:47 2001
+++ linux/fs/lockd/clntproc.c	Mon Dec  3 20:42:27 2001
@@ -309,16 +309,14 @@
 /*
  * Generic NLM call, async version.
  */
-static int
-_nlmclnt_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback,
-		    struct rpc_cred *cred)
+int
+nlmsvc_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback)
 {
 	struct nlm_host	*host = req->a_host;
 	struct rpc_clnt	*clnt;
 	struct nlm_args	*argp = &req->a_args;
 	struct nlm_res	*resp = &req->a_res;
 	struct rpc_message msg;
-	int		status;
 
 	dprintk("lockd: call procedure %s on %s (async)\n",
 			nlm_procname(proc), host->h_name);
@@ -327,41 +325,47 @@
 	if ((clnt = nlm_bind_host(host)) == NULL)
 		return -ENOLCK;
 
-	/* Increment host refcount */
-        nlm_get_host(host);
-
-        /* bootstrap and kick off the async RPC call */
+	/* bootstrap and kick off the async RPC call */
 	msg.rpc_proc = proc;
 	msg.rpc_argp = argp;
 	msg.rpc_resp =resp;
-	msg.rpc_cred = cred;
-        status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, callback, req);
-
-	if (status < 0)
-		nlm_release_host(host);
-	return status;
+	msg.rpc_cred = NULL;	
+	return rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, callback, req);
 }
 
-
 int
 nlmclnt_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback)
 {
+	struct nlm_host	*host = req->a_host;
+	struct rpc_clnt	*clnt;
 	struct nlm_args	*argp = &req->a_args;
-	struct file	*filp = argp->lock.fl.fl_file;
-	struct rpc_cred *cred = NULL;
+	struct nlm_res	*resp = &req->a_res;
+	struct file	*file = argp->lock.fl.fl_file;
+	struct rpc_message msg;
+	int		status;
 
-	if (filp)
-		cred = nfs_file_cred(filp);
+	dprintk("lockd: call procedure %s on %s (async)\n",
+			nlm_procname(proc), host->h_name);
 
-	return _nlmclnt_async_call(req, proc, callback, cred);
-}
+	/* If we have no RPC client yet, create one. */
+	if ((clnt = nlm_bind_host(host)) == NULL)
+		return -ENOLCK;
 
-int
-nlmsvc_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback)
-{
-	return _nlmclnt_async_call(req, proc, callback, NULL);
+	/* bootstrap and kick off the async RPC call */
+	msg.rpc_proc = proc;
+	msg.rpc_argp = argp;
+	msg.rpc_resp =resp;
+	if (file)
+		msg.rpc_cred = nfs_file_cred(file);
+	else
+		msg.rpc_cred = NULL;
+	/* Increment host refcount */
+	nlm_get_host(host);
+	status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, callback, req);
+	if (status < 0)
+		nlm_release_host(host);
+	return status;
 }
-
 
 /*
  * TEST for the presence of a conflicting lock
diff -urN linux-2.2.18-pre21/fs/lockd/svc4proc.c linux/fs/lockd/svc4proc.c
--- linux-2.2.18-pre21/fs/lockd/svc4proc.c	Mon Dec  3 20:41:47 2001
+++ linux/fs/lockd/svc4proc.c	Mon Dec  3 20:42:27 2001
@@ -450,8 +450,8 @@
 		if ((clnt = nlmsvc_ops->exp_getclient(&saddr)) != NULL 
 		 && (host = nlm_lookup_host(clnt, &saddr, 0, 0)) != NULL) {
 			nlmsvc_free_host_resources(host);
+			nlm_release_host(host);
 		}
-		nlm_release_host(host);
 	}
 
 	return rpc_success;
@@ -472,7 +472,7 @@
 	host = nlmclnt_lookup_host(&rqstp->rq_addr,
 				rqstp->rq_prot, rqstp->rq_vers);
 	if (!host) {
-		rpc_free(call);
+		kfree(call);
 		return rpc_system_err;
 	}
 
@@ -481,9 +481,13 @@
 	memcpy(&call->a_args, resp, sizeof(*resp));
 
 	if (nlmsvc_async_call(call, proc, nlm4svc_callback_exit) < 0)
-		return rpc_system_err;
+		goto error;
 
 	return rpc_success;
+ error:
+	kfree(call);
+	nlm_release_host(host);
+	return rpc_system_err;
 }
 
 static void
@@ -496,7 +500,7 @@
 					task->tk_pid, -task->tk_status);
 	}
 	nlm_release_host(call->a_host);
-	rpc_free(call);
+	kfree(call);
 }
 
 /*
diff -urN linux-2.2.18-pre21/fs/lockd/svclock.c linux/fs/lockd/svclock.c
--- linux-2.2.18-pre21/fs/lockd/svclock.c	Mon Dec  3 20:41:47 2001
+++ linux/fs/lockd/svclock.c	Mon Dec  3 20:42:27 2001
@@ -531,8 +531,10 @@
 	nlmsvc_insert_block(block, jiffies + 30 * HZ);
 
 	/* Call the client */
-	nlmsvc_async_call(&block->b_call, NLMPROC_GRANTED_MSG,
-						nlmsvc_grant_callback);
+	nlm_get_host(block->b_call.a_host);
+	if (nlmsvc_async_call(&block->b_call, NLMPROC_GRANTED_MSG,
+						nlmsvc_grant_callback) < 0)
+		nlm_release_host(block->b_call.a_host);
 	up(&file->f_sema);
 }
 
diff -urN linux-2.2.18-pre21/fs/lockd/svcproc.c linux/fs/lockd/svcproc.c
--- linux-2.2.18-pre21/fs/lockd/svcproc.c	Mon Dec  3 20:41:47 2001
+++ linux/fs/lockd/svcproc.c	Mon Dec  3 20:42:27 2001
@@ -463,8 +463,8 @@
 		if ((clnt = nlmsvc_ops->exp_getclient(&saddr)) != NULL 
 		 && (host = nlm_lookup_host(clnt, &saddr, 0, 0)) != NULL) {
 			nlmsvc_free_host_resources(host);
+			nlm_release_host(host);
 		}
-		nlm_release_host(host);
 	}
 
 	return rpc_success;
@@ -494,9 +494,13 @@
 	memcpy(&call->a_args, resp, sizeof(*resp));
 
 	if (nlmsvc_async_call(call, proc, nlmsvc_callback_exit) < 0)
-		return rpc_system_err;
+		goto error;
 
 	return rpc_success;
+ error:
+	nlm_release_host(host);
+	kfree(call);
+	return rpc_system_err;
 }
 
 static void
diff -urN linux-2.2.18-pre21/fs/lockd/svcshare.c linux/fs/lockd/svcshare.c
--- linux-2.2.18-pre21/fs/lockd/svcshare.c	Mon Dec  3 20:41:47 2001
+++ linux/fs/lockd/svcshare.c	Mon Dec  3 20:42:27 2001
@@ -54,7 +54,6 @@
 	share->s_owner.len  = oh->len;
 	share->s_next       = file->f_shares;
 	file->f_shares      = share;
-	file->f_count	   += 1;
 
 update:
 	share->s_access = argp->fsm_access;
diff -urN linux-2.2.18-pre21/fs/smbfs/proc.c linux/fs/smbfs/proc.c
--- linux-2.2.18-pre21/fs/smbfs/proc.c	Mon Dec  3 20:41:48 2001
+++ linux/fs/smbfs/proc.c	Mon Dec  3 20:42:27 2001
@@ -589,7 +589,7 @@
 #else
 	/*
 	 * We don't want to be interrupted. For example, what if 'current'
-	 * already has recieved a signal? sleep_on would terminate immediately
+	 * already has received a signal? sleep_on would terminate immediately
 	 * and smbmount would not be able to re-establish connection.
 	 *
 	 * smbmount should be able to reconnect later, but it can't because
diff -urN linux-2.2.18-pre21/include/asm-i386/elf.h linux/include/asm-i386/elf.h
--- linux-2.2.18-pre21/include/asm-i386/elf.h	Mon Aug  9 12:05:02 1999
+++ linux/include/asm-i386/elf.h	Mon Dec  3 20:42:27 2001
@@ -7,6 +7,7 @@
 
 #include <asm/ptrace.h>
 #include <asm/user.h>
+#include <linux/utsname.h>
 
 typedef unsigned long elf_greg_t;
 
@@ -93,7 +94,7 @@
    For the moment, we have only optimizations for the Intel generations,
    but that could change... */
 
-#define ELF_PLATFORM  ("i386\0i486\0i586\0i686"+((boot_cpu_data.x86-3)*5))
+#define ELF_PLATFORM (system_utsname.machine)
 
 #ifdef __KERNEL__
 #define SET_PERSONALITY(ex, ibcs2) \
diff -urN linux-2.2.18-pre21/include/asm-i386/processor.h linux/include/asm-i386/processor.h
--- linux-2.2.18-pre21/include/asm-i386/processor.h	Mon Dec  3 20:41:48 2001
+++ linux/include/asm-i386/processor.h	Mon Dec  3 20:42:27 2001
@@ -327,4 +327,10 @@
 #define init_task	(init_task_union.task)
 #define init_stack	(init_task_union.stack)
 
+/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
+extern inline void rep_nop(void)
+{
+	__asm__ __volatile__("rep;nop");
+}
+
 #endif /* __ASM_I386_PROCESSOR_H */
diff -urN linux-2.2.18-pre21/include/asm-i386/spinlock.h linux/include/asm-i386/spinlock.h
--- linux-2.2.18-pre21/include/asm-i386/spinlock.h	Mon Dec  3 20:41:48 2001
+++ linux/include/asm-i386/spinlock.h	Mon Dec  3 20:42:27 2001
@@ -153,6 +153,7 @@
 	"jc 2f\n" \
 	".section .text.lock,\"ax\"\n" \
 	"2:\t" \
+	"rep; nop\n\t" \
 	"testb $1,%0\n\t" \
 	"jne 2b\n\t" \
 	"jmp 1b\n" \
@@ -214,7 +215,8 @@
 		     "js 2f\n" \
 		     ".section .text.lock,\"ax\"\n" \
 		     "2:\tlock ; decl %0\n" \
-		     "3:\tcmpl $0,%0\n\t" \
+		     "3:\trep; nop\n\t" \
+		     "cmpl $0,%0\n\t" \
 		     "js 3b\n\t" \
 		     "jmp 1b\n" \
 		     ".previous" \
@@ -232,7 +234,8 @@
 		     "jne 3f\n" \
 		     ".section .text.lock,\"ax\"\n" \
 		     "3:\tlock ; btrl $31,%0\n" \
-		     "4:\tcmp $0,%0\n\t" \
+		     "4:\trep; nop\n\t" \
+		     "cmp $0,%0\n\t" \
 		     "jne 4b\n\t" \
 		     "jmp 1b\n" \
 		     ".previous" \
diff -urN linux-2.2.18-pre21/include/asm-sparc64/socket.h linux/include/asm-sparc64/socket.h
--- linux-2.2.18-pre21/include/asm-sparc64/socket.h	Mon Aug  9 12:05:10 1999
+++ linux/include/asm-sparc64/socket.h	Mon Dec  3 20:42:29 2001
@@ -1,4 +1,4 @@
-/* $Id: socket.h,v 1.5.2.1 1999/08/07 10:52:59 davem Exp $ */
+/* $Id: socket.h,v 1.5.2.2 2000/11/12 13:16:14 davem Exp $ */
 #ifndef _ASM_SOCKET_H
 #define _ASM_SOCKET_H
 
@@ -46,6 +46,7 @@
 #define SO_SECURITY_ENCRYPTION_NETWORK		0x5004
 
 /* Socket types. */
+#if defined(__KERNEL__)
 #define SOCK_STREAM	1		/* stream (connection) socket	*/
 #define SOCK_DGRAM	2		/* datagram (conn.less) socket	*/
 #define SOCK_RAW	3		/* raw socket			*/
@@ -56,5 +57,6 @@
 					/* level.  For writing rarp and	*/
 					/* other similar things on the	*/
 					/* user level.			*/
+#endif
 
 #endif /* _ASM_SOCKET_H */
diff -urN linux-2.2.18-pre21/include/linux/ixjuser.h linux/include/linux/ixjuser.h
--- linux-2.2.18-pre21/include/linux/ixjuser.h	Mon Sep  4 10:39:28 2000
+++ linux/include/linux/ixjuser.h	Mon Dec  3 20:42:29 2001
@@ -568,16 +568,16 @@
 
 /******************************************************************************
 * 
-* The DAA Analog GAIN sets 2 parameters at one time, the recieve gain (AGRR), 
+* The DAA Analog GAIN sets 2 parameters at one time, the receive gain (AGRR), 
 * and the transmit gain (AGX).  OR together the components and pass them
 * as the parameter to IXJCTL_DAA_AGAIN.  The default setting is both at 0dB.
 * 
 ******************************************************************************/
 #define IXJCTL_DAA_AGAIN		_IOW ('q', 0xD2, int)
 
-#define AGRR00DB	0x00	// Analog gain in recieve direction 0dB
-#define AGRR3_5DB	0x10	// Analog gain in recieve direction 3.5dB
-#define AGRR06DB	0x30	// Analog gain in recieve direction 6dB
+#define AGRR00DB	0x00	// Analog gain in receive direction 0dB
+#define AGRR3_5DB	0x10	// Analog gain in receive direction 3.5dB
+#define AGRR06DB	0x30	// Analog gain in receive direction 6dB
 
 #define AGX00DB		0x00	// Analog gain in transmit direction 0dB
 #define AGX_6DB		0x04	// Analog gain in transmit direction -6dB
diff -urN linux-2.2.18-pre21/include/linux/telephony.h linux/include/linux/telephony.h
--- linux-2.2.18-pre21/include/linux/telephony.h	Mon Sep  4 10:39:28 2000
+++ linux/include/linux/telephony.h	Mon Dec  3 20:42:29 2001
@@ -207,8 +207,8 @@
 * indicate the current state of the hookswitch.  The pstn_ring bit
 * indicates that the DAA on a LineJACK card has detected ring voltage on
 * the PSTN port.  The caller_id bit indicates that caller_id data has been
-* recieved and is available.  The pstn_wink bit indicates that the DAA on
-* the LineJACK has recieved a wink from the telco switch.  The f0, f1, f2
+* received and is available.  The pstn_wink bit indicates that the DAA on
+* the LineJACK has received a wink from the telco switch.  The f0, f1, f2
 * and f3 bits indicate that the filter has been triggered by detecting the
 * frequency programmed into that filter.
 *
diff -urN linux-2.2.18-pre21/kernel/sched.c linux/kernel/sched.c
--- linux-2.2.18-pre21/kernel/sched.c	Mon Dec  3 20:41:48 2001
+++ linux/kernel/sched.c	Mon Dec  3 20:42:29 2001
@@ -1744,8 +1744,8 @@
 	/*
 	 * We play safe to avoid deadlocks.
 	 */
-	spin_lock_irq(&runqueue_lock);
-	read_lock(&tasklist_lock);
+	read_lock_irq(&tasklist_lock);
+	spin_lock(&runqueue_lock);
 
 	p = find_process_by_pid(pid);
 
@@ -1789,8 +1789,8 @@
 	current->need_resched = 1;
 
 out_unlock:
-	read_unlock(&tasklist_lock);
-	spin_unlock_irq(&runqueue_lock);
+	spin_unlock(&runqueue_lock);
+	read_unlock_irq(&tasklist_lock);
 
 out_nounlock:
 	return retval;
diff -urN linux-2.2.18-pre21/mm/vmalloc.c linux/mm/vmalloc.c
--- linux-2.2.18-pre21/mm/vmalloc.c	Mon Dec  3 20:41:48 2001
+++ linux/mm/vmalloc.c	Mon Dec  3 20:42:29 2001
@@ -70,11 +70,12 @@
 void vmfree_area_pages(unsigned long address, unsigned long size)
 {
 	pgd_t * dir;
+	unsigned long start = address;
 	unsigned long end = address + size;
 
 	dir = pgd_offset_k(address);
 	flush_cache_all();
-	while (address < end) {
+	while (address >= start && address < end) {
 		free_area_pmd(dir, address, end - address);
 		address = (address + PGDIR_SIZE) & PGDIR_MASK;
 		dir++;
@@ -127,11 +128,12 @@
 int vmalloc_area_pages(unsigned long address, unsigned long size)
 {
 	pgd_t * dir;
+	unsigned long start = address;
 	unsigned long end = address + size;
 
 	dir = pgd_offset_k(address);
 	flush_cache_all();
-	while (address < end) {
+	while (address >= start && address < end) {
 		pmd_t *pmd;
 		pgd_t olddir = *dir;
 		
diff -urN linux-2.2.18-pre21/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
--- linux-2.2.18-pre21/net/ipv4/tcp_output.c	Mon Dec  3 20:41:48 2001
+++ linux/net/ipv4/tcp_output.c	Mon Dec  3 20:42:29 2001
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_output.c,v 1.108.2.10 2000/10/29 01:52:21 davem Exp $
+ * Version:	$Id: tcp_output.c,v 1.108.2.11 2000/11/10 12:43:29 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -104,7 +104,7 @@
 	if(skb != NULL) {
 		struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
 		struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);
-		int tcp_header_size = tp->tcp_header_len;
+		int tcp_header_size = sizeof(struct tcphdr);
 		struct tcphdr *th;
 		int sysctl_flags;
 
@@ -128,12 +128,17 @@
 				if(!(sysctl_flags & SYSCTL_FLAG_TSTAMPS))
 					tcp_header_size += TCPOLEN_SACKPERM_ALIGNED;
 			}
-		} else if(tp->sack_ok && tp->num_sacks) {
-			/* A SACK is 2 pad bytes, a 2 byte header, plus
-			 * 2 32-bit sequence numbers for each SACK block.
-			 */
-			tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED +
-					    (tp->num_sacks * TCPOLEN_SACK_PERBLOCK));
+		} else {
+			if(tp->tstamp_ok)
+				tcp_header_size += TCPOLEN_TSTAMP_ALIGNED;
+
+			if(tp->sack_ok && tp->num_sacks) {
+				/* A SACK is 2 pad bytes, a 2 byte header, plus
+				 * 2 32-bit sequence numbers for each SACK block.
+				 */
+				tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED +
+						    (tp->num_sacks * TCPOLEN_SACK_PERBLOCK));
+			}
 		}
 		th = (struct tcphdr *) skb_push(skb, tcp_header_size);
 		skb->h.th = th;
diff -urN linux-2.2.18-pre21/net/ipv6/ndisc.c linux/net/ipv6/ndisc.c
--- linux-2.2.18-pre21/net/ipv6/ndisc.c	Thu Apr 22 19:45:20 1999
+++ linux/net/ipv6/ndisc.c	Mon Dec  3 20:42:29 2001
@@ -630,7 +630,8 @@
 		if (ra_msg->reachable_time) {
 			__u32 rtime = (ntohl(ra_msg->reachable_time)*HZ)/1000;
 
-			if (rtime != in6_dev->nd_parms->base_reachable_time) {
+			if (rtime &&
+			    rtime != in6_dev->nd_parms->base_reachable_time) {
 				in6_dev->nd_parms->base_reachable_time = rtime;
 				in6_dev->nd_parms->gc_staletime = 3 * rtime;
 				in6_dev->nd_parms->reachable_time = neigh_rand_reach_time(rtime);
