diff -u --recursive --new-file v2.1.49/linux/Documentation/Configure.help linux/Documentation/Configure.help
--- v2.1.49/linux/Documentation/Configure.help	Mon Aug 11 14:47:04 1997
+++ linux/Documentation/Configure.help	Mon Aug 11 16:57:59 1997
@@ -4399,12 +4399,37 @@
   host.  One DMA channel is shared between all the ESP ports.  Valid
   values are 1 and 3.
 
-Hayes ESP serial port trigger level
-CONFIG_ESPSERIAL_TRIGGER_LEVEL
-  This is the trigger level (in bytes) of the transmit FIFO and the
-  receive FIFO.  Larger values may result in fewer interrupts;
-  however, a value too high could result in data loss.  Valid values
-  are 1 through 1015.
+Hayes ESP serial port receive trigger level
+CONFIG_ESPSERIAL_RX_TRIGGER
+  This is the trigger level (in bytes) of the receive FIFO.  Larger values
+  may result in fewer interrupts; however, a value too high could result in
+  data loss.  Valid values are 1 through 1023.
+
+Hayes ESP serial port transmit trigger level
+CONFIG_ESPSERIAL_TX_TRIGGER
+  This is the trigger level (in bytes) of the transmit FIFO.  Larger values
+  may result in fewer interrupts; however, a value too high could result in
+  degraded trasmit performance.  Valid values are 1 through 1023.
+
+Hayes ESP serial port flow off level
+CONFIG_ESPSERIAL_FLOW_OFF
+  This is the level (in bytes) at which the ESP port will flow off the remote
+  transmitter.  Valid values are 1 through 1023.  This value should be greater
+  than the receive trigger level and the flow on level.
+
+Hayes ESP serial port flow on level
+CONFIG_ESPSERIAL_FLOW_ON
+  This is the level (in bytes) at which the ESP port will flow on the remote
+  transmitter after having flowed it off.  Valid values are 1 through 1023.
+  This value should be less than the flow off level, but greater than the
+  receive trigger level.
+
+Hayes ESP serial port receiver timeout
+CONFIG_ESPSERIAL_RX_TMOUT
+  This is the amount of time that the ESP port will wait after receiving the
+  final character before signalling an interrupt.  Valid values are 0 through
+  255.  A value too high will increase latency, and a value too low will cause
+  unnecessary interrupts.
 
 Parallel printer support
 CONFIG_PRINTER
diff -u --recursive --new-file v2.1.49/linux/Documentation/devices.tex linux/Documentation/devices.tex
--- v2.1.49/linux/Documentation/devices.tex	Sat May 24 09:10:22 1997
+++ linux/Documentation/devices.tex	Mon Aug 11 17:28:19 1997
@@ -47,7 +47,7 @@
 %
 \title{{\bf Linux Allocated Devices}}
 \author{Maintained by H. Peter Anvin $<$hpa@zytor.com$>$}
-\date{Last revised: May 20, 1997}
+\date{Last revised: July 28, 1997}
 \maketitle
 %
 \noindent
@@ -213,7 +213,10 @@
 \major{82}{}{char }{WiNRADiO communications receiver card}
 \major{83}{}{char }{Teletext/videotext interfaces}
 \major{84}{}{char }{Ikon 1011[57] Versatec Greensheet Interface}
-\major{85}{--119}{}{Unallocated}
+\major{85}{}{char }{Linux/SGI shared memory input queue}
+\major{86}{}{char }{SCSI media changer}
+\major{87}{}{char }{Sony Control-A1 stereo control bus}
+\major{88}{--119}{}{Unallocated}
 \major{120}{--127}{}{Local/experimental use}
 \major{128}{--239}{}{Unallocated}
 \major{240}{--254}{}{Local/experimental use}
@@ -356,7 +359,7 @@
 
 \begin{devicelist}
 \major{ 4}{}{char }{TTY devices}
-	\minor{0}{/dev/console}{Console device}
+	\minor{0}{/dev/tty0}{Current virtual console}
 	\minor{1}{/dev/tty1}{First virtual console}
 	\minordots
 	\minor{63}{/dev/tty63}{63rd virtual console}
@@ -380,11 +383,16 @@
 \begin{devicelist}
 \major{ 5}{}{char }{Alternate TTY devices}
 	\minor{0}{/dev/tty}{Current TTY device}
+	\minor{1}{}{Reserved for console device}
 	\minor{64}{/dev/cua0}{Callout device corresponding to {\file ttyS0}}
 	\minordots
 	\minor{127}{/dev/cua63}{Callout device corresponding to {\file ttyS63}}
 \end{devicelist}
 
+\noindent
+Minor number 1 is reserved for a kernel-managed
+{\file /dev/console} in a future version of Linux.
+
 \begin{devicelist}
 \major{ 6}{}{char }{Parallel printer devices}
 	\minor{0}{/dev/lp0}{First parallel printer ({\hex 0x3bc})}
@@ -511,6 +519,12 @@
 	\minor{142}{/dev/msr}{x86 model specific registers}
 	\minor{143}{/dev/pciconf}{PCI configuration space}
 	\minor{144}{/dev/nvram}{Non-volatile configuration RAM}
+	\minor{145}{/dev/hfmodem}{Soundcard shortwave modem control}
+	\minor{146}{/dev/graphics}{Linux/SGI graphics device}
+	\minor{147}{/dev/opengl}{Linux/SGI OpenGL pipe}
+	\minor{148}{/dev/gfx}{Linux/SGI graphics effects device}
+	\minor{149}{/dev/input/mouse}{Linux/SGI Irix emulation mouse}
+	\minor{150}{/dev/input/keyboard}{Linux/SGI Irix emulation keyboard}
 \end{devicelist}
 
 \begin{devicelist}
@@ -1050,6 +1064,9 @@
 driver with this number should not cause ill effects to the system
 (bugs excepted.)
 
+IN PARTICULAR, ANY DISTRIBUTION WHICH CONTAINS A DEVICE DRIVER USING
+MAJOR NUMBER 42 IS NONCOMPLIANT.
+
 \begin{devicelist}
 \major{43}{}{char }{isdn4linux virtual modem}
 	\minor{0}{/dev/ttyI0}{First virtual modem}
@@ -1426,7 +1443,29 @@
 \end{devicelist}
 
 \begin{devicelist}
-\major{85}{--119}{}{Unallocated}
+\major{85}{}{char }{Linux/SGI shared memory input queue}
+	\minor{0}{/dev/shmiq}{Master shared input queue}
+	\minor{1}{/dev/qcntl0}{First device pushed}
+	\minor{2}{/dev/qcntl1}{Second device pushed}
+	\minordots
+\end{devicelist}
+
+\begin{devicelist}
+\major{86}{}{char }{SCSI media changer}
+	\minor{0}{/dev/sch0}{First SCSI media changer}
+	\minor{1}{/dev/sch1}{Second SCSI media changer}
+	\minordots
+\end{devicelist}
+
+\begin{devicelist}
+\major{87}{}{char }{Sony Control-A1 stereo control bus}
+	\minor{0}{/dev/controla0}{First device on chain}
+	\minor{1}{/dev/controla1}{Second device on chain}
+	\minordots
+\end{devicelist}
+
+\begin{devicelist}
+\major{88}{--119}{}{Unallocated}
 \end{devicelist}
 
 \begin{devicelist}
diff -u --recursive --new-file v2.1.49/linux/Documentation/devices.txt linux/Documentation/devices.txt
--- v2.1.49/linux/Documentation/devices.txt	Sat May 24 09:10:22 1997
+++ linux/Documentation/devices.txt	Mon Aug 11 17:28:19 1997
@@ -1,7 +1,7 @@
 		       LINUX ALLOCATED DEVICES
 	     Maintained by H. Peter Anvin <hpa@zytor.com>
 
-		      Last revised: May 20, 1997
+		     Last revised: July 28, 1997
 
 This list is the successor to Rick Miller's Linux Device List, which
 he stopped maintaining when he got busy with other things in 1993.  It
@@ -154,7 +154,7 @@
 		appropriate to their respective architectures.
 		
   4 char	TTY devices
-    		  0 = /dev/console	Console device
+    		  0 = /dev/tty0		Current virtual console
 
 		  1 = /dev/tty1		First virtual console
 		      ...
@@ -178,10 +178,14 @@
 
   5 char	Alternate TTY devices
     		  0 = /dev/tty		Current TTY device
+		  1			Reserved for console device
 		 64 = /dev/cua0		Callout device corresponding to ttyS0
 		      ...
 		127 = /dev/cua63	Callout device corresponding to ttyS63
 
+		Minor number 1 is reserved for a kernel-managed
+		/dev/console in a future version of Linux.
+
   6 char	Parallel printer devices
     		  0 = /dev/lp0		First parallel printer (0x3bc)
 		  1 = /dev/lp1		Second parallel printer (0x378)
@@ -291,6 +295,12 @@
 		142 = /dev/msr		x86 model-specific registers
 		143 = /dev/pciconf	PCI configuration space
 		144 = /dev/nvram	Non-volatile configuration RAM
+		145 = /dev/hfmodem	Soundcard shortwave modem control
+		146 = /dev/graphics	Linux/SGI graphics device
+		147 = /dev/opengl	Linux/SGI OpenGL pipe
+		148 = /dev/gfx		Linux/SGI graphics effects device
+		149 = /dev/input/mouse	Linux/SGI Irix emulation mouse
+		150 = /dev/input/keyboard Linux/SGI Irix emulation keyboard
 
  11 char	Raw keyboard device
 		  0 = /dev/kbd		Raw keyboard device
@@ -714,6 +724,9 @@
 		removal of a driver with this number should not cause
 		ill effects to the system (bugs excepted.)
 
+		IN PARTICULAR, ANY DISTRIBUTION WHICH CONTAINS A
+		DEVICE DRIVER USING MAJOR NUMBER 42 IS NONCOMPLIANT.
+
  43 char	isdn4linux virtual modem
 		  0 = /dev/ttyI0	First virtual modem
 		      ...
@@ -1002,7 +1015,23 @@
                   0 = /dev/ihcp0        First Greensheet port
                   1 = /dev/ihcp1        Second Greensheet port
 
- 85-119		UNALLOCATED
+ 85 char	Linux/SGI shared memory input queue
+		  0 = /dev/shmiq	Master shared input queue
+		  1 = /dev/qcntl0	First device pushed
+		  2 = /dev/qcntl1	Second device pushed
+		    ...
+
+ 86 char	SCSI media changer
+		  0 = /dev/sch0		First SCSI media changer
+		  1 = /dev/sch1		Second SCSI media changer
+		    ...
+
+ 87 char	Sony Control-A1 stereo control bus
+		  0 = /dev/controla0	First device on chain
+		  1 = /dev/controla1	Second device on chain
+		    ...
+
+ 88-119		UNALLOCATED
 
 120-127		LOCAL/EXPERIMENTAL USE
 
diff -u --recursive --new-file v2.1.49/linux/Documentation/hayes-esp.txt linux/Documentation/hayes-esp.txt
--- v2.1.49/linux/Documentation/hayes-esp.txt	Wed Dec 31 16:00:00 1969
+++ linux/Documentation/hayes-esp.txt	Mon Aug 11 16:57:59 1997
@@ -0,0 +1,129 @@
+HAYES ESP DRIVER VERSION 1.6
+
+Features:
+
+- Uses the enhanced mode of the ESP card, allowing a wider range of
+  interrupts and features than compatibilty mode
+- Uses DMA to transfer data to and from the ESP's FIFOs, reducing CPU load
+- Supports primary and secondary ports
+- Special version of setserial can be used to view/change the enhanced mode
+  configuration.  The setserial patch is distributed with the standalone
+  driver distribution.  See http://www.nyx.net/~arobinso for more information.
+
+To compile/install:
+
+Examine the first section of esp.h to verify that the definitions are
+acceptable.  If they are not, change them.
+DMA_CHANNEL must be either 1 or 3.
+ESP_BH should be set to a value not in use by the system.  If the system
+is not configured with RISCOM8 support, the default should be fine.
+
+Examine the Makefile, and make any appropriate changes.
+
+Type 'make' to compile the module.  The module will be called 'esp.o'.  Typing
+'make install' will install the module in /lib/modules/misc.  The module can
+be inserted and removed as usual (insmod, rmmod, etc.).  The IRQs to use can
+be specified by using the irq= option.  The format is:
+
+irq=[0x100],[0x140],[0x180],[0x200],[0x240],[0x280],[0x300],[0x380]
+
+The address in brackets is the base address of the card.  The IRQ of
+nonexistant cards can be set to 0.  If and IRQ of a card that does exist is set
+to 0, the driver will attempt to guess at the correct IRQ.  For example, to set
+the IRQ of the card at address 0x300 to 12, the insmod command would be:
+
+insmod esp irq=0,0,0,0,0,0,12,0
+
+The custom divisor can be set by using the divisor= option.  The format is the
+same as for the irq= option.  Each divisor value is a series of hex digits,
+with each digit representing the divisor to use for a corresponding port.  The
+divisor value is constructed RIGHT TO LEFT.  Specifying a nonzero divisor value
+will automatically set the spd_cust flag.  To calculate the divisor to use for
+a certain baud rate, divide the port's base baud (generally 921600) by the
+desired rate.  For example, to set the divisor of the primary port at 0x300 to
+4 and the divisor of the secondary port at 0x308 to 8, the insmod command would
+be:
+
+insmod esp divisor=0,0,0,0,0,0,0x84,0
+
+The dma= option can be used to set the DMA channel.  The channel can be either
+1 or 3.  For example, to set the dma channel to 3, the insmod command would be:
+
+insmod esp dma=3
+
+The rx_trigger= and tx_trigger= options can be used to set the FIFO trigger
+levels.  They specifie when the ESP card should send an interrupt.  Larger
+values will decrease the number of interrupts; however, a value too high may
+result in data loss.  Valid values are 1 through 1023, with 768 being the
+default.  For example, to set the receive trigger level to 512 bytes and the
+transmit trigger level to 700 bytes, the insmod command would be:
+
+insmod esp rx_trigger=512 tx_trigger=700
+
+The flow_off= and flow_on= options can be used to set the hardware flow off/
+flow on levels.  The flow on level must be lower than the flow off level, and
+the flow off level should be higher than rx_trigger.  Valid values are 1
+through 1023, with 1016 being the default flow off level and 944 being the
+default flow on level.  For example, to set the flow off level to 1000 bytes
+and the flow on level to 935 bytes, the insmod command would be:
+
+insmod esp flow_off=1000 flow_on=935
+
+The rx_timeout= option can be used to set the receive timeout value.  This
+value indicates how long after receiving the last character that the ESP card
+should wait before signalling an interrupt.  Valid values are 0 though 255,
+with 128 being the default.  A value too high will increase latency, and a
+value too low will cause unnecessary interrupts.  For example, to set the
+receive timeout to 255, the insmod command would be:
+
+insmod esp rx_timeout=255
+
+Multiple options can be listed on the insmod command line by separating each
+option with a space.  For example:
+
+insmod esp dma=3 trigger=512
+
+The esp module can be automatically loaded when needed.  To cause this to
+happen, add the following lines to /etc/conf.modules (replacing the last line
+with options for your configuration):
+
+alias char-major-57 esp
+alias char-major-58 esp
+options esp irq=0,0,0,0,0,0,3,0 divisor=0,0,0,0,0,0,0x4,0
+
+You may also need to run 'depmod -a'.
+
+Devices must be created manually.  To create the devices, note the output from
+the module after it is inserted.  The output will appear in the location where
+kernel messages usually appear (usually /var/adm/messages).  Create two devices
+for each 'tty' mentioned, one with major of 57 and the other with major of 58.
+The minor number should be the same as the tty number reported.  The commands
+would be (replace ? with the tty number):
+
+mknod /dev/ttyP? c 57 ?
+mknod /dev/cup? c 58 ?
+
+For example, if the following line appears:
+
+Oct 24 18:17:23 techno kernel: ttyP8 at 0x0140 (irq = 3) is an ESP primary port
+
+...two devices should be created:
+
+mknod /dev/ttyP8 c 57 8
+mknod /dev/cup8 c 58 8
+
+You may need to set the permissions on the devices:
+
+chmod 666 /dev/ttyP*
+chmod 666 /dev/cup*
+
+The ESP module and the serial module should not conflict (they can be used at
+the same time).  After the ESP module has been loaded the ports on the ESP card
+will no longer be accessable by the serial driver.
+
+If I/O errors are experienced when accessing the port, check for IRQ and DMA
+conflicts ('cat /proc/interrupts' and 'cat /proc/dma' for a list of IRQs and
+DMAs currently in use).
+
+Enjoy!
+Andrew J. Robinson <arobinso@nyx.net>
diff -u --recursive --new-file v2.1.49/linux/Makefile linux/Makefile
--- v2.1.49/linux/Makefile	Mon Aug 11 14:47:04 1997
+++ linux/Makefile	Mon Aug 11 17:28:41 1997
@@ -1,6 +1,6 @@
 VERSION = 2
 PATCHLEVEL = 1
-SUBLEVEL = 49
+SUBLEVEL = 50
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
 
@@ -198,6 +198,7 @@
 	fi
 
 oldconfig: symlinks
+	$(MAKE) -C drivers/sound mkscript
 	$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
 
 xconfig: symlinks
@@ -329,13 +330,13 @@
 	rm -f core `find . -type f -name 'core' -print`
 	rm -f vmlinux System.map
 	rm -f .tmp* drivers/sound/configure
+	rm -f drivers/char/consolemap_deftbl.c drivers/char/conmakehash
 	rm -f `find modules/ -type f -print`
 	rm -f submenu*
 
 mrproper: clean
 	rm -f include/linux/autoconf.h include/linux/version.h
 	rm -f drivers/sound/local.h drivers/sound/.defines
-	rm -f drivers/char/uni_hash.tbl drivers/char/conmakehash
 	rm -f drivers/net/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h
 	rm -f drivers/net/soundmodem/sm_tbl_{hapn4800,psk4800}.h
 	rm -f drivers/net/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h
@@ -351,7 +352,6 @@
 	rm -f $(TOPDIR)/include/linux/modversions.h
 	rm -rf $(TOPDIR)/include/linux/modules
 	rm -rf modules
-
 
 distclean: mrproper
 	rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
diff -u --recursive --new-file v2.1.49/linux/arch/i386/lib/checksum.c linux/arch/i386/lib/checksum.c
--- v2.1.49/linux/arch/i386/lib/checksum.c	Fri Feb  7 05:54:54 1997
+++ linux/arch/i386/lib/checksum.c	Thu Aug 14 14:41:08 1997
@@ -111,13 +111,13 @@
 #define SRC(y...)			\
 "	9999: "#y";			\n \
 	.section __ex_table, \"a\";	\n \
-	.long 9999b, src_access_fault	\n \
+	.long 9999b, 6001f		\n \
 	.previous"
 
 #define DST(y...)			\
 "	9999: "#y";			\n \
 	.section __ex_table, \"a\";	\n \
-	.long 9999b, dst_access_fault	\n \
+	.long 9999b, 6002f		\n \
 	.previous"
 
 unsigned int csum_partial_copy_generic (const char *src, char *dst,
@@ -203,28 +203,28 @@
 		adcl $0, %%eax
 	7:
 
-end_of_body:
+5000:
 
 # Exception handler:
 ################################################
 						#
 .section .fixup, \"a\"				#
 						#
-common_fixup:					#
+6000:						#
 						#
 	movl	%7, (%%ebx)			#
 						#
 # FIXME: do zeroing of rest of the buffer here. #
 						#
-	jmp	end_of_body			#
+	jmp	5000b				#
 						#
-src_access_fault:				#
+6001:						#
 	movl    %1, %%ebx			#
-	jmp	common_fixup			#
+	jmp	6000b				#
 						#
-dst_access_fault:				#
+6002:						#
 	movl    %2, %%ebx			#
-	jmp	common_fixup			#
+	jmp	6000b				#
 						#
 .previous					#
 						#
diff -u --recursive --new-file v2.1.49/linux/drivers/block/ide.c linux/drivers/block/ide.c
--- v2.1.49/linux/drivers/block/ide.c	Thu Jun 26 12:33:38 1997
+++ linux/drivers/block/ide.c	Tue Aug 12 18:21:15 1997
@@ -1611,8 +1611,10 @@
 	for (p = 0; p < (1<<PARTN_BITS); ++p) {
 		if (drive->part[p].nr_sects > 0) {
 			kdev_t devp = MKDEV(major, minor+p);
+			struct super_block * sb = get_super(devp);
 			fsync_dev          (devp);
-			invalidate_inodes  (devp);
+			if (sb)
+				invalidate_inodes(sb);
 			invalidate_buffers (devp);
 		}
 		drive->part[p].start_sect = 0;
diff -u --recursive --new-file v2.1.49/linux/drivers/char/Config.in linux/drivers/char/Config.in
--- v2.1.49/linux/drivers/char/Config.in	Mon Aug  4 16:25:37 1997
+++ linux/drivers/char/Config.in	Mon Aug 11 16:57:59 1997
@@ -34,7 +34,11 @@
    tristate 'Hayes ESP serial port support' CONFIG_ESPSERIAL
    if [ "$CONFIG_ESPSERIAL" = "y" -o "$CONFIG_ESPSERIAL" = "m" ]; then
      int '  DMA channel' CONFIG_ESPSERIAL_DMA_CHANNEL 1
-     int '  FIFO trigger level' CONFIG_ESPSERIAL_TRIGGER_LEVEL 768
+     int '  Receive FIFO trigger level' CONFIG_ESPSERIAL_RX_TRIGGER 768
+     int '  Transmit FIFO trigger level' CONFIG_ESPSERIAL_TX_TRIGGER 768
+     int '  Hardware flow off level' CONFIG_ESPSERIAL_FLOW_OFF 1016
+     int '  Hardware flow on level' CONFIG_ESPSERIAL_FLOW_ON 944
+     int '  Receiver timeout' CONFIG_ESPSERIAL_RX_TMOUT 128
    fi
 fi
 if [ "$CONFIG_PARPORT" != "n" ]; then
diff -u --recursive --new-file v2.1.49/linux/drivers/char/Makefile linux/drivers/char/Makefile
--- v2.1.49/linux/drivers/char/Makefile	Mon Aug 11 14:47:04 1997
+++ linux/drivers/char/Makefile	Mon Aug 11 17:28:19 1997
@@ -23,7 +23,7 @@
 L_OBJS   := tty_io.o n_tty.o tty_ioctl.o pty.o mem.o random.o
 
 ifdef CONFIG_VT
-L_OBJS += console.o vt.o vc_screen.o consolemap.o
+L_OBJS += console.o vt.o vc_screen.o consolemap.o consolemap_deftbl.o
 LX_OBJS += selection.o
 endif
 
@@ -324,15 +324,16 @@
 
 include $(TOPDIR)/Rules.make
 
-fastdep: uni_hash.tbl
-
-consolemap.o:
+fastdep:
 
 conmakehash: conmakehash.c
 	$(HOSTCC) -o conmakehash conmakehash.c
 
-uni_hash.tbl: $(FONTMAPFILE) conmakehash
-	./conmakehash $(FONTMAPFILE) > uni_hash.tbl
+consolemap_deftbl.c: $(FONTMAPFILE) conmakehash
+	./conmakehash $(FONTMAPFILE) > consolemap_deftbl.c
+
+consolemap_deftbl.o: consolemap_deftbl.c $(TOPDIR)/include/linux/types.h
 
 defkeymap.c: defkeymap.map
 	loadkeys --mktable defkeymap.map > defkeymap.c
+
diff -u --recursive --new-file v2.1.49/linux/drivers/char/README.esp linux/drivers/char/README.esp
--- v2.1.49/linux/drivers/char/README.esp	Wed Dec 11 07:16:07 1996
+++ linux/drivers/char/README.esp	Mon Aug 11 16:57:59 1997
@@ -1,94 +0,0 @@
-HAYES ESP DRIVERS VERSION 1.0
-
-Features:
-
-- Uses the enhanced mode of the ESP card, allowing a wider range of
-  interrupts and features than compatibilty mode
-- Uses DMA to transfer data to and from the ESP's FIFOs, reducing CPU load
-- Supports primary and secondary ports
-
-The driver can be compiled as a module.  The module will be called 'esp.o'.
-The IRQs to use can be specified by using the irq= option.  The format is:
-
-irq=[0x100],[0x140],[0x180],[0x200],[0x240],[0x280],[0x300],[0x380]
-
-The address in brackets is the base address of the card.  The IRQ of
-nonexistant cards can be set to 0.  If and IRQ of a card that does exist is set
-to 0, the driver will attempt to guess at the correct IRQ.  For example, to set
-the IRQ of the card at address 0x300 to 12, the insmod command would be:
-
-insmod esp irq=0,0,0,0,0,0,12,0
-
-The custom divisor can be set by using the divisor= option.  The format is the
-same as for the irq= option.  Each divisor value is a series of hex digits,
-with each digit representing the divisor to use for a corresponding port.  The
-divisor value is constructed RIGHT TO LEFT.  Specifying a nonzero divisor value
-will automatically set the spd_cust flag.  To calculate the divisor to use for
-a certain baud rate, divide the port's base baud (921600) by the desired rate.
-For example, to set the divisor of the primary port at 0x300 to 4 and the
-divisor of the secondary port at 0x308 to 8, the insmod command would be:
-
-insmod esp divisor=0,0,0,0,0,0,0x84,0
-
-The dma= option can be used to set the DMA channel.  The channel can be either
-1 or 3.  For example, to set the dma channel to 3, the insmod command would be:
-
-insmod esp dma=3
-
-The trigger= option can be used to set the FIFO trigger levels.  This specifies
-when the ESP card should send an interrupt.  Larger values will decrease the
-number of interrupts; however, a value too high may result in data loss.
-Valid values are 1 through 1015, with 768 being the default.  For example, to
-set the trigger levels to 512 bytes, the insmod command would be:
-
-insmod esp trigger=512
-
-Multiple options can be listed on the insmod command line by separating each
-option with a space.  For example:
-
-insmod esp dma=3 trigger=512
-
-The esp module can be automatically loaded when needed.  To cause this to
-happen, add the following lines to /etc/conf.modules (replacing the last line
-with options for your configuration):
-
-alias char-major-57 esp
-alias char-major-58 esp
-options esp irq=0,0,0,0,0,0,3,0 divisor=0,0,0,0,0,0,0x4,0
-
-You may also need to run 'depmod -a'.
-
-Devices must be created manually.  To create the devices, note the output from
-the module after it is inserted.  The output will appear in the location where
-kernel messages usually appear (usually /var/adm/messages).  Create two devices
-for each 'tty' mentioned, one with major of 57 and the other with major of 58.
-The minor number should be the same as the tty number reported.  The commands
-would be (replace ? with the tty number):
-
-mknod /dev/ttyP? c 57 ?
-mknod /dev/cup? c 58 ?
-
-For example, if the following line appears:
-
-Oct 24 18:17:23 techno kernel: ttyP8 at 0x0140 (irq = 3) is an ESP primary port
-
-...two devices should be created:
-
-mknod /dev/ttyP8 c 57 8
-mknod /dev/cup8 c 58 8
-
-You may need to set the permissions on the devices:
-
-chmod 666 /dev/ttyP*
-chmod 666 /dev/cup*
-
-The ESP module and the serial module should not conflict (they can be used at
-the same time).  After the ESP module has been loaded the ports on the ESP card
-will no longer be accessable by the serial driver.
-
-If I/O errors are experienced when accessing the port, check for IRQ and DMA
-conflicts ('cat /proc/interrupts' and 'cat /proc/dma' for a list of IRQs and
-DMAs currently in use).
-
-Enjoy!
-Andrew J. Robinson <arobinso@nyx.net>
diff -u --recursive --new-file v2.1.49/linux/drivers/char/conmakehash.c linux/drivers/char/conmakehash.c
--- v2.1.49/linux/drivers/char/conmakehash.c	Sun Sep 17 21:42:45 1995
+++ linux/drivers/char/conmakehash.c	Mon Aug 11 17:28:19 1997
@@ -7,7 +7,7 @@
  * memory not allocated by kmalloc(), and doing our own memory management
  * just for this seems like massive overkill.
  *
- * Copyright (C) 1995 H. Peter Anvin
+ * Copyright (C) 1995-1997 H. Peter Anvin
  *
  * This program is a part of the Linux kernel, and may be freely
  * copied under the terms of the GNU General Public License (GPL),
@@ -248,18 +248,15 @@
   
   printf("\
 /*\n\
- * uni_hash.tbl\n\
- *\n\
  * Do not edit this file; it was automatically generated by\n\
  *\n\
- * conmakehash %s > uni_hash.tbl\n\
+ * conmakehash %s > [this file]\n\
  *\n\
  */\n\
 \n\
 #include <linux/types.h>\n\
-#include <linux/kd.h>\n\
 \n\
-static u8 dfont_unicount[%d] = \n\
+u8 dfont_unicount[%d] = \n\
 {\n\t", argv[1], fontlen);
 
   for ( i = 0 ; i < fontlen ; i++ )
@@ -272,20 +269,20 @@
       else
         printf(", ");
     }
-
-  printf("\nstatic u16 dfont_unitable[%d] = \n{\n\t", nuni);
-
+  
+  printf("\nu16 dfont_unitable[%d] = \n{\n\t", nuni);
+  
   fp0 = 0;
   nent = 0;
   for ( i = 0 ; i < nuni ; i++ )
     {
-       while ( nent >= unicount[fp0] )
-         {
-            fp0++;
-            nent = 0;
-         }
-       printf("0x%04x", unitable[fp0][nent++]);
-       if ( i == nuni-1 )
+      while ( nent >= unicount[fp0] )
+	{
+	  fp0++;
+	  nent = 0;
+	}
+      printf("0x%04x", unitable[fp0][nent++]);
+      if ( i == nuni-1 )
          printf("\n};");
        else if ( i % 8 == 7 )
          printf(",\n\t");
diff -u --recursive --new-file v2.1.49/linux/drivers/char/consolemap.c linux/drivers/char/consolemap.c
--- v2.1.49/linux/drivers/char/consolemap.c	Mon Jun 16 16:35:55 1997
+++ linux/drivers/char/consolemap.c	Mon Aug 11 17:28:19 1997
@@ -307,9 +307,10 @@
  * this 3-level paged table scheme to be comparable to a hash table.
  */
 
-#include "uni_hash.tbl"		/* Include hash tables & parameters */
+extern u8 dfont_unicount[];	/* Defined in console_defmap.c */
+extern u16 dfont_unitable[];
 
-int hashtable_contents_valid = 0; /* Use ASCII-only mode for bootup*/
+int hashtable_contents_valid = 0; /* Use ASCII-only mode for bootup */
 
 static u16 **uni_pagedir[32] =
 {
diff -u --recursive --new-file v2.1.49/linux/drivers/char/esp.c linux/drivers/char/esp.c
--- v2.1.49/linux/drivers/char/esp.c	Tue May 13 22:41:07 1997
+++ linux/drivers/char/esp.c	Mon Aug 11 16:57:59 1997
@@ -29,10 +29,9 @@
  *     by Chris Faylor.
  *
  * Most recent changes: (Andrew J. Robinson)
- *     Don't cause a kernel panic if memory could not be allocated or if the
- *     device couldn't be registered.
- *     Always set RTS when transitioning away from B0 status (since the
- *     flow is really being handled by the ESP card).
+ *   Added rx_trigger, tx_trigger, flow_off, flow_on, and rx_timeout options.
+ *   ESP enhanced mode configuration can be viewed/changed by a patched
+ *   version of setserial. 
  *
  * This module exports the following rs232 io functions:
  *
@@ -76,13 +75,20 @@
 static unsigned int divisor[NR_PRIMARY] = {0,0,0,0,0,0,0,0};
 	/* custom divisor for each port */
 static unsigned int dma = CONFIG_ESPSERIAL_DMA_CHANNEL; /* DMA channel */
-static unsigned int trigger = CONFIG_ESPSERIAL_TRIGGER_LEVEL;
-	/* FIFO trigger level */
+static unsigned int rx_trigger = CONFIG_ESPSERIAL_RX_TRIGGER;
+static unsigned int tx_trigger = CONFIG_ESPSERIAL_TX_TRIGGER;
+static unsigned int flow_off = CONFIG_ESPSERIAL_FLOW_OFF;
+static unsigned int flow_on = CONFIG_ESPSERIAL_FLOW_ON;
+static unsigned int rx_timeout = CONFIG_ESPSERIAL_RX_TMOUT;
 
 MODULE_PARM(irq, "1-8i");
 MODULE_PARM(divisor, "1-8i");
 MODULE_PARM(dma, "i");
-MODULE_PARM(trigger, "i");
+MODULE_PARM(rx_trigger, "i");
+MODULE_PARM(tx_trigger, "i");
+MODULE_PARM(flow_off, "i");
+MODULE_PARM(flow_on, "i");
+MODULE_PARM(rx_timeout, "i");
 /* END */
 
 static char *dma_buffer;
@@ -93,9 +99,9 @@
 #define WAKEUP_CHARS 1024
 
 static char *serial_name = "ESP serial driver";
-static char *serial_version = "1.5";
+static char *serial_version = "1.6";
 
-DECLARE_TASK_QUEUE(tq_esp);
+static DECLARE_TASK_QUEUE(tq_esp);
 
 static struct tty_driver esp_driver, esp_callout_driver;
 static int serial_refcount;
@@ -200,7 +206,8 @@
 	return inb(info->port + offset);
 }
 
-static inline void serial_out(struct esp_struct *info, int offset, int value)
+static inline void serial_out(struct esp_struct *info, int offset,
+			      unsigned char value)
 {
 	outb(value, info->port+offset);
 }
@@ -382,6 +389,7 @@
 
 	info->stat_flags &= ~ESP_STAT_DMA_RX;
 	bytes_left = num_bytes = dma_bytes - get_dma_residue(dma);
+	info->icount.rx += num_bytes;
 	buffer = &(tty->flip);
 
 	if (info->tty_buf->count && (tty->flip.count < TTY_FLIPBUF_SIZE))
@@ -420,13 +428,18 @@
 			buffer->flag_buf_ptr--;
 		} else if (status & 0x10) {
 			*buffer->flag_buf_ptr = TTY_BREAK;
+			(info->icount.brk)++;
 			if (info->flags & ASYNC_SAK)
 				do_SAK(tty);
-		} else if (status & 0x08)
+		} else if (status & 0x08) {
 			*buffer->flag_buf_ptr = TTY_FRAME;
-		else if (status & 0x04)
+			(info->icount.frame)++;
+		}
+		else if (status & 0x04) {
 			*buffer->flag_buf_ptr = TTY_PARITY;
-	
+			(info->icount.parity)++;
+		}
+
 		buffer->flag_buf_ptr++;
 		
 		if (buffer == info->tty_buf)
@@ -512,6 +525,7 @@
 	clear_dma_ff(dma);
 
 	num_bytes = dma_bytes - get_dma_residue(dma);
+	info->icount.tx += dma_bytes;
 
 	if (dma_bytes != num_bytes) {
 		dma_bytes -= num_bytes;
@@ -759,10 +773,10 @@
 
 	/* set FIFO trigger levels */
 	serial_out(info, UART_ESI_CMD1, ESI_SET_TRIGGER);
-	serial_out(info, UART_ESI_CMD2, trigger / 256);
-	serial_out(info, UART_ESI_CMD2, trigger % 256);
-	serial_out(info, UART_ESI_CMD2, trigger / 256);
-	serial_out(info, UART_ESI_CMD2, trigger % 256);
+	serial_out(info, UART_ESI_CMD2, rx_trigger >> 8);
+	serial_out(info, UART_ESI_CMD2, rx_trigger);
+	serial_out(info, UART_ESI_CMD2, tx_trigger >> 8);
+	serial_out(info, UART_ESI_CMD2, tx_trigger);
 
 	/* Set clock scaling */
 	serial_out(info, UART_ESI_CMD1, ESI_SET_PRESCALAR);
@@ -776,23 +790,21 @@
 static int startup(struct esp_struct * info)
 {
 	unsigned long flags;
-	int	retval;
+	int	retval=0;
 	int next_irq;
 	struct esp_struct *next_info = 0;
         unsigned int num_chars;
 
 	save_flags(flags); cli();
 
-	if (info->flags & ASYNC_INITIALIZED) {
-		restore_flags(flags);
-		return 0;
-	}
+	if (info->flags & ASYNC_INITIALIZED)
+		goto errout;
 
 	if (!info->xmit_buf) {
 		info->xmit_buf = (unsigned char *)get_free_page(GFP_KERNEL);
 		if (!info->xmit_buf) {
-			restore_flags(flags);
-			return -ENOMEM;
+			retval = -ENOMEM;
+			goto errout;
 		}
 	}
 
@@ -803,8 +815,8 @@
 		if (!info->tty_buf) {
 			free_page((unsigned long) info->xmit_buf);
 			info->xmit_buf = 0;
-			restore_flags(flags);
-			return -ENOMEM;
+			retval = -ENOMEM;
+			goto errout;
 		}
 
 		memset(info->tty_buf, 0, sizeof(struct tty_flip_buffer));
@@ -838,7 +850,7 @@
 
 	/* set receive character timeout */
 	serial_out(info, UART_ESI_CMD1, ESI_SET_RX_TIMEOUT);
-	serial_out(info, UART_ESI_CMD2, 0x80);
+	serial_out(info, UART_ESI_CMD2, rx_timeout);
 
 	info->stat_flags = 0;
 
@@ -870,14 +882,13 @@
 		}
 
 		if (retval) {
-			restore_flags(flags);
 			if (suser()) {
 				if (info->tty)
 					set_bit(TTY_IO_ERROR,
 						&info->tty->flags);
-				return 0;
-			} else
-				return retval;
+				retval = 0;
+			}
+			goto errout;
 		}
 	}
 
@@ -939,6 +950,10 @@
 	info->flags |= ASYNC_INITIALIZED;
 	restore_flags(flags);
 	return 0;
+
+errout:
+	restore_flags(flags);
+	return retval;
 }
 
 /*
@@ -1128,7 +1143,11 @@
 	}
 	if (!(cflag & PARODD))
 		cval |= UART_LCR_EPAR;
-	
+#ifdef CMSPAR
+	if (cflag & CMSPAR)
+		cval |= UART_LCR_SPAR;
+#endif
+
 	if (!quot) {
 		quot = quot_table[i];
 
@@ -1234,10 +1253,10 @@
 
 	/* Set high/low water */
 	serial_out(info, UART_ESI_CMD1, ESI_SET_FLOW_LVL);
-	serial_out(info, UART_ESI_CMD2, 0x03);
-	serial_out(info, UART_ESI_CMD2, 0xfc);
-	serial_out(info, UART_ESI_CMD2, (trigger + 4) / 256);
-	serial_out(info, UART_ESI_CMD2, (trigger + 4) % 256);
+	serial_out(info, UART_ESI_CMD2, flow_off >> 8);
+	serial_out(info, UART_ESI_CMD2, flow_off);
+	serial_out(info, UART_ESI_CMD2, flow_on >> 8);
+	serial_out(info, UART_ESI_CMD2, flow_on);
 
 	restore_flags(flags);
 }
@@ -1288,7 +1307,7 @@
 static int rs_write(struct tty_struct * tty, int from_user,
 		    const unsigned char *buf, int count)
 {
-	int	c, total = 0;
+	int	c, ret = 0;
 	struct esp_struct *info = (struct esp_struct *)tty->driver_data;
 	unsigned long flags;
 				
@@ -1309,7 +1328,12 @@
 			break;
 
 		if (from_user) {
-			copy_from_user(tmp_buf, buf, c);
+			c -= copy_from_user(tmp_buf, buf, c);
+			if (!c) {
+				if (!ret)
+					ret = -EFAULT;
+				break;
+			}
 			c = MIN(c, MIN(ESP_XMIT_SIZE - info->xmit_cnt - 1,
 				       ESP_XMIT_SIZE - info->xmit_head));
 			memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c);
@@ -1320,7 +1344,7 @@
 		restore_flags(flags);
 		buf += c;
 		count -= c;
-		total += c;
+		ret += c;
 	}
 	if (from_user)
 		up(&tmp_buf_sem);
@@ -1330,7 +1354,7 @@
 		serial_out(info, UART_ESI_CMD2, info->IER);
 	}
 	restore_flags(flags);
-	return total;
+	return ret;
 }
 
 static int rs_write_room(struct tty_struct *tty)
@@ -1418,7 +1442,7 @@
 	serial_out(info, UART_ESI_CMD1, ESI_SET_SRV_MASK);
 	serial_out(info, UART_ESI_CMD2, info->IER);
 	serial_out(info, UART_ESI_CMD1, ESI_SET_RX_TIMEOUT);
-	serial_out(info, UART_ESI_CMD2, 0x80);
+	serial_out(info, UART_ESI_CMD2, rx_timeout);
 	sti();
 }
 
@@ -1441,12 +1465,20 @@
 	tmp.port = info->port;
 	tmp.irq = info->irq;
 	tmp.flags = info->flags;
+	tmp.xmit_fifo_size = 1024;
 	tmp.baud_base = BASE_BAUD;
 	tmp.close_delay = info->close_delay;
 	tmp.closing_wait = info->closing_wait;
 	tmp.custom_divisor = info->custom_divisor;
 	tmp.hub6 = 0;
-	copy_to_user(retinfo,&tmp,sizeof(*retinfo));
+	tmp.reserved_char[0] = 'E';
+	tmp.reserved_char[1] = rx_timeout;
+	tmp.reserved[0] = rx_trigger;
+	tmp.reserved[1] = tx_trigger;
+	tmp.reserved[2] = flow_off;
+	tmp.reserved[3] = flow_on;
+	if (copy_to_user(retinfo,&tmp,sizeof(*retinfo)))
+		return -EFAULT;
 	return 0;
 }
 
@@ -1456,26 +1488,37 @@
 	struct serial_struct new_serial;
 	struct esp_struct old_info;
 	unsigned int		change_irq;
+	unsigned int change_flow;
 	int 			i, retval = 0;
 	struct esp_struct *current_async;
 
-	if (!new_info)
+	if (copy_from_user(&new_serial,new_info,sizeof(new_serial)))
 		return -EFAULT;
-	copy_from_user(&new_serial,new_info,sizeof(new_serial));
 	old_info = *info;
 
 	if ((new_serial.type != PORT_16550A) ||
-		(new_serial.hub6) ||
-		(info->port != new_serial.port) ||
-		(new_serial.baud_base != BASE_BAUD) ||
-		(new_serial.irq > 15) ||
-		(new_serial.irq < 2) ||
-		(new_serial.irq == 6) ||
-		(new_serial.irq == 8) ||
-		(new_serial.irq == 13))
+	    (new_serial.hub6) ||
+	    (info->port != new_serial.port) ||
+	    (new_serial.baud_base != BASE_BAUD) ||
+	    (new_serial.irq > 15) ||
+	    (new_serial.irq < 2) ||
+	    (new_serial.irq == 6) ||
+	    (new_serial.irq == 8) ||
+	    (new_serial.irq == 13) ||
+	    (new_serial.reserved[3] >= new_serial.reserved[2]) ||
+	    (new_serial.reserved[0] < 1) ||
+	    (new_serial.reserved[1] < 1) ||
+	    (new_serial.reserved[2] < 1) ||
+	    (new_serial.reserved[3] < 1) ||
+	    (new_serial.reserved[0] > 1023) ||
+	    (new_serial.reserved[1] > 1023) ||
+	    (new_serial.reserved[2] > 1023) ||
+	    (new_serial.reserved[3] > 1023))
 		return -EINVAL;
 
 	change_irq = new_serial.irq != info->irq;
+	change_flow = ((new_serial.reserved[2] != flow_off) ||
+		       (new_serial.reserved[3] != flow_on));
 
 	if (change_irq && (info->line % 8))
 		return -EINVAL;
@@ -1529,6 +1572,37 @@
 	info->custom_divisor = new_serial.custom_divisor;
 	info->close_delay = new_serial.close_delay * HZ/100;
 	info->closing_wait = new_serial.closing_wait * HZ/100;
+	flow_off = new_serial.reserved[2];
+	flow_on = new_serial.reserved[3];
+
+	if ((new_serial.reserved[0] != rx_trigger) ||
+	    (new_serial.reserved[1] != tx_trigger)) {
+		unsigned long flags;
+
+		rx_trigger = new_serial.reserved[0];
+		tx_trigger = new_serial.reserved[1];
+		save_flags(flags); cli();
+		serial_out(info, UART_ESI_CMD1, ESI_SET_TRIGGER);
+		serial_out(info, UART_ESI_CMD2, rx_trigger >> 8);
+		serial_out(info, UART_ESI_CMD2, rx_trigger);
+		serial_out(info, UART_ESI_CMD2, tx_trigger >> 8);
+		serial_out(info, UART_ESI_CMD2, tx_trigger);
+		restore_flags(flags);
+	}
+
+	if (((unsigned char)(new_serial.reserved_char[1]) != rx_timeout)) {
+		unsigned long flags;
+
+		rx_timeout = (unsigned char)(new_serial.reserved_char[1]);
+		save_flags(flags); cli();
+
+		if (info->IER & UART_IER_RDI) {
+			serial_out(info, UART_ESI_CMD1, ESI_SET_RX_TIMEOUT);
+			serial_out(info, UART_ESI_CMD2, rx_timeout);
+		}
+
+		restore_flags(flags);
+	}
 
 	if (change_irq) {
 		/*
@@ -1557,7 +1631,8 @@
 	if (info->flags & ASYNC_INITIALIZED) {
 		if (((old_info.flags & ASYNC_SPD_MASK) !=
 		     (info->flags & ASYNC_SPD_MASK)) ||
-		    (old_info.custom_divisor != info->custom_divisor))
+		    (old_info.custom_divisor != info->custom_divisor) ||
+		    change_flow)
 			change_speed(info);
 	} else
 		retval = startup(info);
@@ -1737,17 +1812,9 @@
 		case TIOCMSET:
 			return set_modem_info(info, cmd, (unsigned int *) arg);
 		case TIOCGSERIAL:
-			error = verify_area(VERIFY_WRITE, (void *) arg,
-						sizeof(struct serial_struct));
-			if (error)
-				return error;
 			return get_serial_info(info,
 					       (struct serial_struct *) arg);
 		case TIOCSSERIAL:
-			error = verify_area(VERIFY_READ, (void *) arg,
-						sizeof(struct serial_struct));
-			if (error)
-				return error;
 			return set_serial_info(info,
 					       (struct serial_struct *) arg);
 		case TIOCSERCONFIG:
@@ -2316,8 +2383,8 @@
  
 static _INLINE_ void show_serial_version(void)
 {
- 	printk(KERN_INFO "%s version %s (DMA %u, trigger level %u)\n",
-		serial_name, serial_version, dma, trigger);
+ 	printk(KERN_INFO "%s version %s (DMA %u)\n",
+		serial_name, serial_version, dma);
 }
 
 /*
@@ -2406,9 +2473,24 @@
 	if ((dma != 1) && (dma != 3))
 		dma = 1;
 
-	if ((trigger < 1) || (trigger > 1015))
-		trigger = 768;
+	if ((rx_trigger < 1) || (rx_trigger > 1023))
+		rx_trigger = 768;
+
+	if ((tx_trigger < 1) || (tx_trigger > 1023))
+		tx_trigger = 768;
+
+	if ((flow_off < 1) || (flow_off > 1023))
+		flow_off = 1016;
 	
+	if ((flow_on < 1) || (flow_on > 1023))
+		flow_on = 944;
+
+	if ((rx_timeout < 0) || (rx_timeout > 255))
+		rx_timeout = 128;
+	
+	if (flow_on >= flow_off)
+		flow_on = flow_off - 1;
+
 	show_serial_version();
 
 	/* Initialize the tty_driver structure */
diff -u --recursive --new-file v2.1.49/linux/drivers/char/tty_ioctl.c linux/drivers/char/tty_ioctl.c
--- v2.1.49/linux/drivers/char/tty_ioctl.c	Thu Mar 27 14:40:03 1997
+++ linux/drivers/char/tty_ioctl.c	Wed Aug 13 15:41:19 1997
@@ -374,7 +374,6 @@
 {
 	struct tty_struct * real_tty;
 	int retval;
-	int opt = 0;
 
 	if (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
 	    tty->driver.subtype == PTY_TYPE_MASTER)
@@ -407,19 +406,19 @@
 				return -EFAULT;
 			return 0;
 		case TCSETSF:
-			opt |= TERMIOS_FLUSH;
+			return set_termios(real_tty, arg,  TERMIOS_FLUSH);
 		case TCSETSW:
-			opt |= TERMIOS_WAIT;
+			return set_termios(real_tty, arg, TERMIOS_WAIT);
 		case TCSETS:
-			return set_termios(real_tty, arg, opt);
+			return set_termios(real_tty, arg, 0);
 		case TCGETA:
 			return get_termio(real_tty,(struct termio *) arg);
 		case TCSETAF:
-			opt |= TERMIOS_FLUSH;
+			return set_termios(real_tty, arg, TERMIOS_FLUSH | TERMIOS_TERMIO);
 		case TCSETAW:
-			opt |= TERMIOS_WAIT;
+			return set_termios(real_tty, arg, TERMIOS_WAIT | TERMIOS_TERMIO);
 		case TCSETA:
-			return set_termios(real_tty, arg, opt|TERMIOS_TERMIO);
+			return set_termios(real_tty, arg, TERMIOS_TERMIO);
 		case TCXONC:
 			retval = tty_check_change(tty);
 			if (retval)
diff -u --recursive --new-file v2.1.49/linux/drivers/char/uni_hash.tbl linux/drivers/char/uni_hash.tbl
--- v2.1.49/linux/drivers/char/uni_hash.tbl	Wed Dec 31 16:00:00 1969
+++ linux/drivers/char/uni_hash.tbl	Mon Aug 11 16:28:31 1997
@@ -0,0 +1,89 @@
+/*
+ * uni_hash.tbl
+ *
+ * Do not edit this file; it was automatically generated by
+ *
+ * conmakehash cp437.uni > uni_hash.tbl
+ *
+ */
+
+#include <linux/types.h>
+#include <linux/kd.h>
+
+static u8 dfont_unicount[256] = 
+{
+	  1,   1,   1,   1,   2,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  2,   2,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   2,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   2,   2,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   5,   1,   2,   1,   4,   1,   1,
+	  1,   5,   1,   2,   1,   1,   1,   5,
+	  1,   1,   2,   1,   1,   4,   1,   1,
+	  1,   2,   1,   1,   1,   1,   1,   2,
+	  1,   2,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   2,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  2,   2,   1,   1,   2,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   2,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   2,   1,   1,   1,   1,   2,   1,
+	  2,   1,   2,   1,   1,   2,   1,   1,
+	  1,   1,   1,   1,   1,   1,   1,   1,
+	  1,   1,   1,   1,   1,   1,   2,   1
+};
+
+static u16 dfont_unitable[297] = 
+{
+	0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x25c6, 0x2663, 0x2660,
+	0x2022, 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b,
+	0x263c, 0x25b6, 0x25ba, 0x25c0, 0x25c4, 0x2195, 0x203c, 0x00b6,
+	0x00a7, 0x25ac, 0x21a8, 0x2191, 0x2193, 0x2192, 0x2190, 0x221f,
+	0x2194, 0x25b2, 0x25bc, 0x0020, 0x0021, 0x0022, 0x00a8, 0x0023,
+	0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b,
+	0x002c, 0x00b8, 0x002d, 0x00ad, 0x002e, 0x002f, 0x0030, 0x0031,
+	0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039,
+	0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, 0x0040, 0x0041,
+	0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x0042, 0x0043, 0x00a9, 0x0044,
+	0x0045, 0x00c8, 0x00ca, 0x00cb, 0x0046, 0x0047, 0x0048, 0x0049,
+	0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x004a, 0x004b, 0x212a, 0x004c,
+	0x004d, 0x004e, 0x004f, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x0050,
+	0x0051, 0x0052, 0x00ae, 0x0053, 0x0054, 0x0055, 0x00d9, 0x00da,
+	0x00db, 0x0056, 0x0057, 0x0058, 0x0059, 0x00dd, 0x005a, 0x005b,
+	0x005c, 0x005d, 0x005e, 0x005f, 0xf804, 0x0060, 0x0061, 0x00e3,
+	0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069,
+	0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x00f5, 0x0070,
+	0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078,
+	0x00d7, 0x0079, 0x00fd, 0x007a, 0x007b, 0x007c, 0x00a5, 0x007d,
+	0x007e, 0x2302, 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0,
+	0x00e5, 0x00e7, 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec,
+	0x00c4, 0x00c5, 0x212b, 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6,
+	0x00f2, 0x00fb, 0x00f9, 0x00ff, 0x00d6, 0x00dc, 0x00a2, 0x00a3,
+	0x00a5, 0x20a7, 0x0192, 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1,
+	0x00d1, 0x00aa, 0x00ba, 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc,
+	0x00a1, 0x00ab, 0x00bb, 0x2591, 0x2592, 0x2593, 0x2502, 0x2524,
+	0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255d,
+	0x255c, 0x255b, 0x2510, 0x2514, 0x2534, 0x252c, 0x251c, 0x2500,
+	0x253c, 0x255e, 0x255f, 0x255a, 0x2554, 0x2569, 0x2566, 0x2560,
+	0x2550, 0x256c, 0x2567, 0x2568, 0x2564, 0x2565, 0x2559, 0x2558,
+	0x2552, 0x2553, 0x256b, 0x256a, 0x2518, 0x250c, 0x2588, 0x2584,
+	0x258c, 0x2590, 0x2580, 0x03b1, 0x03b2, 0x00df, 0x0393, 0x03c0,
+	0x03a3, 0x03c3, 0x00b5, 0x03bc, 0x03c4, 0x03a6, 0x00d8, 0x0398,
+	0x03a9, 0x2126, 0x03b4, 0x221e, 0x03c6, 0x00f8, 0x03b5, 0x2229,
+	0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248,
+	0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0xfffd,
+	0x00a0
+};
\ No newline at end of file
diff -u --recursive --new-file v2.1.49/linux/drivers/char/vt.c linux/drivers/char/vt.c
--- v2.1.49/linux/drivers/char/vt.c	Mon Aug 11 14:47:04 1997
+++ linux/drivers/char/vt.c	Wed Aug 13 12:50:25 1997
@@ -504,7 +504,7 @@
 		 * If the time is zero, turn off sound ourselves.
 		 */
 		ticks = HZ * ((arg >> 16) & 0xffff) / 1000;
-		count = ticks ? arg : 0;
+		count = ticks ? (arg & 0xffff) : 0;
 		kd_mksound(count, ticks);
 		return 0;
 	}
diff -u --recursive --new-file v2.1.49/linux/drivers/pci/pci.c linux/drivers/pci/pci.c
--- v2.1.49/linux/drivers/pci/pci.c	Thu Jun 26 12:33:39 1997
+++ linux/drivers/pci/pci.c	Wed Aug 13 12:51:51 1997
@@ -43,6 +43,9 @@
  */
 struct pci_dev_info dev_info[] = {
 	DEVICE( COMPAQ,		COMPAQ_1280,	"QVision 1280/p"),
+	DEVICE( COMPAQ,		COMPAQ_NETELL100,"Netelligent 10/100"),
+	DEVICE( COMPAQ,		COMPAQ_NETELL10,"Netelligent 10"),
+	DEVICE( COMPAQ,		COMPAQ_NETFLEX3,"NetFlex 3"),
 	DEVICE( COMPAQ,		COMPAQ_THUNDER,	"ThunderLAN"),
 	DEVICE( NCR,		NCR_53C810,	"53c810"),
 	DEVICE( NCR,		NCR_53C820,	"53c820"),
@@ -63,6 +66,7 @@
 	DEVICE( VLSI,		VLSI_82C593,	"82C593-FC1"),
 	DEVICE( VLSI,		VLSI_82C594,	"82C594-AFC2"),
 	DEVICE( VLSI,		VLSI_82C597,	"82C597-AFC2"),
+	DEVICE( VLSI,		VLSI_VAS96011,	"VAS96011 PowerPC"),
 	DEVICE( ADL,		ADL_2301,	"2301"),
 	DEVICE( NS,		NS_87410,	"87410"),
 	DEVICE( TSENG,		TSENG_W32P_2,	"ET4000W32P"),
@@ -87,11 +91,15 @@
 	DEVICE( CIRRUS,		CIRRUS_5434_8,	"GD 5434"),
 	DEVICE( CIRRUS,		CIRRUS_5436,	"GD 5436"),
 	DEVICE( CIRRUS,		CIRRUS_5446,	"GD 5446"),
+	DEVICE( CIRRUS,		CIRRUS_5480,	"GD 5480"),
 	DEVICE( CIRRUS,		CIRRUS_5464,	"GD 5464"),
+	DEVICE( CIRRUS,		CIRRUS_5465,	"GD 5465"),
 	DEVICE( CIRRUS,		CIRRUS_6729,	"CL 6729"),
+	DEVICE( CIRRUS,		CIRRUS_6832,	"PD 6832"),
 	DEVICE( CIRRUS,		CIRRUS_7542,	"CL 7542"),
 	DEVICE( CIRRUS,		CIRRUS_7543,	"CL 7543"),
 	DEVICE( CIRRUS,		CIRRUS_7541,	"CL 7541"),
+	DEVICE( IBM,		IBM_FIRE_CORAL,	"Fire Coral"),
 	DEVICE( IBM,		IBM_82G2675,	"82G2675"),
 	DEVICE( IBM,		IBM_82351,	"82351"),
 	DEVICE( WD,		WD_7197,	"WD 7197"),
@@ -104,6 +112,7 @@
 	DEVICE( MATROX,		MATROX_MGA_2,	"Atlas PX2085"),
 	DEVICE( MATROX,		MATROX_MIL,	"Millennium"),
 	DEVICE( MATROX,		MATROX_MYS,	"Mystique"),
+	DEVICE( MATROX,		MATROX_MIL_2,	"Millennium II"),
 	DEVICE( MATROX,		MATROX_MGA_IMP,	"MGA Impression"),
 	DEVICE( CT,		CT_65545,	"65545"),
 	DEVICE( CT,		CT_65548,	"65548"),
@@ -118,6 +127,7 @@
 	DEVICE( SI,		SI_501,		"85C501"),
 	DEVICE( SI,		SI_496,		"85C496"),
 	DEVICE( SI,		SI_601,		"85C601"),
+	DEVICE( SI,		SI_5107,	"5107"),
 	DEVICE( SI,		SI_5511,		"85C5511"),
 	DEVICE( SI,		SI_5513,		"85C5513"),
 	DEVICE( SI,		SI_5571,	"5571"),
@@ -137,12 +147,17 @@
 	DEVICE( BUSLOGIC,	BUSLOGIC_MULTIMASTER_NC, "MultiMaster NC"),
 	DEVICE( BUSLOGIC,	BUSLOGIC_MULTIMASTER,    "MultiMaster"),
 	DEVICE( BUSLOGIC,	BUSLOGIC_FLASHPOINT,     "FlashPoint"),
+	DEVICE( TI,		TI_PCI1130,	"PCI1130"),
+	DEVICE( TI,		TI_PCI1131,	"PCI1131"),
 	DEVICE( OAK,		OAK_OTI107,	"OTI107"),
 	DEVICE( WINBOND2,	WINBOND2_89C940,"NE2000-PCI"),
 	DEVICE( MOTOROLA,	MOTOROLA_MPC105,"MPC105 Eagle"),
 	DEVICE( MOTOROLA,	MOTOROLA_MPC106,"MPC106 Grackle"),
 	DEVICE( MOTOROLA,	MOTOROLA_RAVEN,	"Raven"),
 	DEVICE( PROMISE,	PROMISE_5300,	"DC5030"),
+	DEVICE( APPLE,		APPLE_BANDIT,	"Bandit"),
+	DEVICE( APPLE,		APPLE_GC,	"Grand Central"),
+	DEVICE( APPLE,		APPLE_HYDRA,	"Hydra"),
 	DEVICE( N9,		N9_I128,	"Imagine 128"),
 	DEVICE( N9,		N9_I128_2,	"Imagine 128v2"),
 	DEVICE( UMC,		UMC_UM8673F,	"UM8673F"),
@@ -160,8 +175,16 @@
 	DEVICE( QLOGIC,		QLOGIC_ISP1022,	"ISP1022"),
 	DEVICE( LEADTEK,	LEADTEK_805,	"S3 805"),
 	DEVICE( CONTAQ,		CONTAQ_82C599,	"82C599"),
+	DEVICE( OLICOM,		OLICOM_OC3136,	"OC-3136/3137"),
+	DEVICE( OLICOM,		OLICOM_OC2315,	"OC-2315"),
+	DEVICE( OLICOM,		OLICOM_OC2325,	"OC-2325"),
+	DEVICE( OLICOM,		OLICOM_OC2183,	"OC-2183/2185"),
+	DEVICE( OLICOM,		OLICOM_OC2326,	"OC-2326"),
+	DEVICE( OLICOM,		OLICOM_OC6151,	"OC-6151/6152"),
 	DEVICE( CMD,		CMD_640,	"640 (buggy)"),
+	DEVICE( CMD,		CMD_643,	"643"),
 	DEVICE( CMD,		CMD_646,	"646"),
+	DEVICE( CMD,		CMD_670,	"670"),
 	DEVICE( VISION,		VISION_QD8500,	"QD-8500"),
 	DEVICE( VISION,		VISION_QD8580,	"QD-8580"),
 	DEVICE( BROOKTREE,	BT848,		"Brooktree 848"),
@@ -170,6 +193,7 @@
 	DEVICE( WINBOND,	WINBOND_83769,	"W83769F"),
 	DEVICE( WINBOND,	WINBOND_82C105,	"SL82C105"),
 	DEVICE( WINBOND,	WINBOND_83C553,	"W83C553"),
+	DEVICE( DATABOOK,      	DATABOOK_87144,	"DB87144"),
 	DEVICE( 3COM,		3COM_3C590,	"3C590 10bT"),
 	DEVICE( 3COM,		3COM_3C595TX,	"3C595 100bTX"),
 	DEVICE( 3COM,		3COM_3C595T4,	"3C595 100bT4"),
@@ -186,6 +210,7 @@
 	DEVICE( AL,		AL_M1513,	"M1513"),
 	DEVICE( AL,		AL_M4803,	"M4803"),
 	DEVICE( NEOMAGIC,       NEOMAGIC_MAGICGRAPH_NM2070,     "Magicgraph NM2070"),
+	DEVICE( NEOMAGIC,	NEOMAGIC_MAGICGRAPH_128V, "MagicGraph 128V"),
 	DEVICE( ASP,		ASP_ABP940,	"ABP940"),
 	DEVICE( ASP,		ASP_ABP940U,	"ABP940U"),
 	DEVICE( CERN,		CERN_SPSB_PMC,	"STAR/RD24 SCI-PCI (PMC)"),
@@ -198,6 +223,8 @@
 	DEVICE( INTERG,		INTERG_1680,	"IGA-1680"),
 	DEVICE( INTERG,         INTERG_1682,    "IGA-1682"),
 	DEVICE( REALTEK,	REALTEK_8029,	"8029"),
+	DEVICE( REALTEK,	REALTEK_8129,	"8129"),
+	DEVICE( TRUEVISION,	TRUEVISION_T1000,"TARGA 1000"),
 	DEVICE( INIT,		INIT_320P,	"320 P"),
 	DEVICE( VIA,		VIA_82C505,	"VT 82C505"),
 	DEVICE( VIA,		VIA_82C561,	"VT 82C561"),
@@ -206,6 +233,7 @@
 	DEVICE( VIA,		VIA_82C585,	"VT 82C585VP Apollo VP-1"),
 	DEVICE( VIA,		VIA_82C586,	"VT 82C586 Apollo VP-1"),
 	DEVICE( VIA,		VIA_82C416,	"VT 82C416MV"),
+	DEVICE( VIA,		VIA_82C926,	"VT 82C926 Amazon"),
 	DEVICE( VORTEX,		VORTEX_GDT60x0,	"GDT 60x0"),
 	DEVICE( VORTEX,		VORTEX_GDT6000B,"GDT 6000b"),
 	DEVICE( VORTEX,		VORTEX_GDT6x10,	"GDT 6110/6510"),
@@ -225,18 +253,25 @@
 	DEVICE( FORE,		FORE_PCA200PC, "PCA-200PC"),
 	DEVICE( FORE,		FORE_PCA200E,	 "PCA-200E"),
 	DEVICE( IMAGINGTECH,	IMAGINGTECH_ICPCI, "MVC IC-PCI"),
+	DEVICE( PHILIPS,	PHILIPS_SAA7146,"SAA7146"),
 	DEVICE( PLX,		PLX_9060,	"PCI9060 i960 bridge"),
 	DEVICE( ALLIANCE,	ALLIANCE_PROMOTIO, "Promotion-6410"),
 	DEVICE( ALLIANCE,	ALLIANCE_PROVIDEO, "Provideo"),
 	DEVICE( VMIC,		VMIC_VME,	"VMIVME-7587"),
  	DEVICE( DIGI,		DIGI_RIGHTSWITCH, "RightSwitch SE-6"),
 	DEVICE( MUTECH,		MUTECH_MV1000,	"MV-1000"),
+	DEVICE( RENDITION,	RENDITION_VERITE,"Verite 1000"),
 	DEVICE( TOSHIBA,	TOSHIBA_601,	"Laptop"),
+	DEVICE( RICOH,		RICOH_RL5C466,	"RL5C466"),
 	DEVICE( ZEITNET,	ZEITNET_1221,	"1221"),
 	DEVICE( ZEITNET,	ZEITNET_1225,	"1225"),
-	DEVICE( OMEGA,		OMEGA_PCMCIA,	"PCMCIA"),
+	DEVICE( OMEGA,		OMEGA_82C092G,	"82C092G"),
+	DEVICE( NP,		NP_PCI_FDDI,	"NP-PCI"),       
 	DEVICE( SPECIALIX,	SPECIALIX_XIO,	"XIO/SIO host"),
 	DEVICE( SPECIALIX,	SPECIALIX_RIO,	"RIO host"),
+	DEVICE( IKON,		IKON_10115,	"10115 Greensheet"),
+	DEVICE( IKON,		IKON_10117,	"10117 Greensheet"),
+	DEVICE( ZORAN,		ZORAN_36057,	"ZR36057"),
 	DEVICE( ZORAN,		ZORAN_36120,	"ZR36120"),
 	DEVICE( COMPEX,		COMPEX_RL2000,	"ReadyLink 2000"),
 	DEVICE( RP,             RP8OCTA,        "RocketPort 8 Oct"),
@@ -257,6 +292,7 @@
 	DEVICE( SYMPHONY,	SYMPHONY_101,	"82C101"),
 	DEVICE( TEKRAM,		TEKRAM_DC290,	"DC-290"),
 	DEVICE( 3DLABS,		3DLABS_300SX,	"GLINT 300SX"),
+	DEVICE( 3DLABS,		3DLABS_500TX,	"GLINT 500TX"),
 	DEVICE( 3DLABS,		3DLABS_DELTA,	"GLINT Delta"),
 	DEVICE( 3DLABS,		3DLABS_PERMEDIA,"PERMEDIA"),
 	DEVICE( AVANCE,		AVANCE_ALG2064,	"ALG2064i"),
@@ -273,6 +309,9 @@
 	DEVICE( S3,		S3_964_1,	"Vision 964-P"),
 	DEVICE( S3,		S3_964_2,	"Vision 964-P"),
 	DEVICE( S3,		S3_968,		"Vision 968"),
+	DEVICE( S3,		S3_TRIO64V2,	"Trio64V2"),
+	DEVICE( S3,		S3_PLATO_PXG,	"Plato"),
+	DEVICE( S3,		S3_ViRGE_DXGX,	"ViRGE/DX"),
 	DEVICE( INTEL,		INTEL_82375,	"82375EB"),
 	BRIDGE( INTEL,		INTEL_82424,	"82424ZX Saturn",	0x00),
 	DEVICE( INTEL,		INTEL_82378,	"82378IB"),
@@ -539,13 +578,15 @@
 	      case PCI_VENDOR_ID_HP:		return "Hewlett Packard";
 	      case PCI_VENDOR_ID_PCTECH:	return "PCTECH";
 	      case PCI_VENDOR_ID_DPT:		return "DPT";
-	      case PCI_VENDOR_ID_OPTI:		return "OPTI";
+	      case PCI_VENDOR_ID_OPTI:		return "OPTi";
 	      case PCI_VENDOR_ID_SGS:		return "SGS Thomson";
 	      case PCI_VENDOR_ID_BUSLOGIC:	return "BusLogic";
+	      case PCI_VENDOR_ID_TI:		return "Texas Instruments";
 	      case PCI_VENDOR_ID_OAK: 		return "OAK";
 	      case PCI_VENDOR_ID_WINBOND2:	return "Winbond";
 	      case PCI_VENDOR_ID_MOTOROLA:	return "Motorola";
 	      case PCI_VENDOR_ID_PROMISE:	return "Promise Technology";
+	      case PCI_VENDOR_ID_APPLE:		return "Apple";
 	      case PCI_VENDOR_ID_N9:		return "Number Nine";
 	      case PCI_VENDOR_ID_UMC:		return "UMC";
 	      case PCI_VENDOR_ID_X:		return "X TECHNOLOGY";
@@ -561,8 +602,11 @@
 	      case PCI_VENDOR_ID_SIERRA:	return "Sierra";
 	      case PCI_VENDOR_ID_ACC:		return "ACC MICROELECTRONICS";
 	      case PCI_VENDOR_ID_WINBOND:	return "Winbond";
+	      case PCI_VENDOR_ID_DATABOOK:	return "Databook";
 	      case PCI_VENDOR_ID_3COM:		return "3Com";
+	      case PCI_VENDOR_ID_SMC:		return "SMC";
 	      case PCI_VENDOR_ID_AL:		return "Acer Labs";
+	      case PCI_VENDOR_ID_MITSUBISHI:	return "Mitsubishi";
 	      case PCI_VENDOR_ID_NEOMAGIC:	return "Neomagic";
 	      case PCI_VENDOR_ID_ASP:		return "Advanced System Products";
 	      case PCI_VENDOR_ID_CERN:		return "CERN";
@@ -572,21 +616,27 @@
 	      case PCI_VENDOR_ID_AMCC:		return "AMCC";
 	      case PCI_VENDOR_ID_INTERG:	return "Intergraphics";
 	      case PCI_VENDOR_ID_REALTEK:	return "Realtek";
+	      case PCI_VENDOR_ID_TRUEVISION:	return "Truevision";
 	      case PCI_VENDOR_ID_INIT:		return "Initio Corp";
 	      case PCI_VENDOR_ID_VIA:		return "VIA Technologies";
 	      case PCI_VENDOR_ID_VORTEX:	return "VORTEX";
 	      case PCI_VENDOR_ID_EF:		return "Efficient Networks";
 	      case PCI_VENDOR_ID_FORE:		return "Fore Systems";
 	      case PCI_VENDOR_ID_IMAGINGTECH:	return "Imaging Technology";
+	      case PCI_VENDOR_ID_PHILIPS:	return "Philips";
 	      case PCI_VENDOR_ID_PLX:		return "PLX";
 	      case PCI_VENDOR_ID_ALLIANCE:	return "Alliance";
 	      case PCI_VENDOR_ID_VMIC:		return "VMIC";
 	      case PCI_VENDOR_ID_DIGI:		return "Digi Intl.";
 	      case PCI_VENDOR_ID_MUTECH:	return "Mutech";
+	      case PCI_VENDOR_ID_RENDITION:	return "Rendition";
 	      case PCI_VENDOR_ID_TOSHIBA:	return "Toshiba";
+	      case PCI_VENDOR_ID_RICOH:		return "Ricoh";
 	      case PCI_VENDOR_ID_ZEITNET:	return "ZeitNet";
 	      case PCI_VENDOR_ID_OMEGA:		return "Omega Micro";
+	      case PCI_VENDOR_ID_NP:		return "Network Peripherals";
 	      case PCI_VENDOR_ID_SPECIALIX:	return "Specialix";
+	      case PCI_VENDOR_ID_IKON:		return "Ikon";
 	      case PCI_VENDOR_ID_ZORAN:		return "Zoran";
 	      case PCI_VENDOR_ID_COMPEX:	return "Compex";
 	      case PCI_VENDOR_ID_RP:		return "Comtrol";
diff -u --recursive --new-file v2.1.49/linux/drivers/scsi/Config.in linux/drivers/scsi/Config.in
--- v2.1.49/linux/drivers/scsi/Config.in	Mon Aug 11 14:47:04 1997
+++ linux/drivers/scsi/Config.in	Wed Aug 13 09:52:48 1997
@@ -24,10 +24,13 @@
 dep_tristate 'Adaptec AIC7xxx support' CONFIG_SCSI_AIC7XXX $CONFIG_SCSI
 if [ "$CONFIG_SCSI_AIC7XXX" != "n" ]; then
     bool '   Enable tagged command queueing' CONFIG_AIC7XXX_TAGGED_QUEUEING Y
-    int  '   Maximum number of commands per LUN' CONFIG_AIC7XXX_CMDS_PER_LUN 8
+    dep_tristate '   Override driver defaults for commands per LUN' CONFIG_OVERRIDE_CMDS N
+    if [ "$CONFIG_OVERRIDE_CMDS" != "n" ]; then
+      int  '   Maximum number of commands per LUN' CONFIG_AIC7XXX_CMDS_PER_LUN 8
+    fi
     bool '   Enable SCB paging' CONFIG_AIC7XXX_PAGE_ENABLE N
     bool '   Collect statistics to report in /proc' CONFIG_AIC7XXX_PROC_STATS N
-    int  '   delay in seconds after SCSI bus reset' CONFIG_AIC7XXX_RESET_DELAY 15
+    int  '   Delay in seconds after SCSI bus reset' CONFIG_AIC7XXX_RESET_DELAY 15
 fi
 dep_tristate 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS $CONFIG_SCSI
 dep_tristate 'Always IN2000 SCSI support' CONFIG_SCSI_IN2000 $CONFIG_SCSI
diff -u --recursive --new-file v2.1.49/linux/drivers/scsi/aic7xxx/aic7xxx.reg linux/drivers/scsi/aic7xxx/aic7xxx.reg
--- v2.1.49/linux/drivers/scsi/aic7xxx/aic7xxx.reg	Mon Aug  4 16:25:38 1997
+++ linux/drivers/scsi/aic7xxx/aic7xxx.reg	Wed Aug 13 09:50:32 1997
@@ -1079,6 +1079,21 @@
 	CUR_SCBID {
 		size		1
 	}
+	/*
+	 * Running count of commands placed in
+	 * the QOUTFIFO.  This is cleared by the
+	 * kernel driver every FIFODEPTH commands.
+	 */
+	CMDOUTCNT {
+		size		1
+	}
+	/*
+	 * Maximum number of entries allowed in
+	 * the QOUT/INFIFO.
+	 */
+	FIFODEPTH {
+		size		1
+	}
 	ARG_1 {
 		size		1
 		mask	SEND_MSG	0x80
diff -u --recursive --new-file v2.1.49/linux/drivers/scsi/aic7xxx/aic7xxx.seq linux/drivers/scsi/aic7xxx/aic7xxx.seq
--- v2.1.49/linux/drivers/scsi/aic7xxx/aic7xxx.seq	Mon Aug  4 16:25:38 1997
+++ linux/drivers/scsi/aic7xxx/aic7xxx.seq	Wed Aug 13 09:50:32 1997
@@ -643,6 +643,15 @@
 
 complete:
 	/* Post the SCB and issue an interrupt */
+.if ( SCB_PAGING )
+	/*
+	 * Spin loop until there is space
+	 * in the QOUTFIFO.
+	 */
+	mov	A, FIFODEPTH;
+	cmp	CMDOUTCNT, A	je .;
+	inc	CMDOUTCNT;
+.endif
 	mov	QOUTFIFO,SCB_TAG;
 	mvi	INTSTAT,CMDCMPLT;
 	test	SCB_CONTROL, ABORT_SCB jz dma_next_scb;
diff -u --recursive --new-file v2.1.49/linux/drivers/scsi/aic7xxx.c linux/drivers/scsi/aic7xxx.c
--- v2.1.49/linux/drivers/scsi/aic7xxx.c	Mon Aug 11 14:47:05 1997
+++ linux/drivers/scsi/aic7xxx.c	Wed Aug 13 09:50:32 1997
@@ -829,6 +829,7 @@
   unsigned char            pause;            /* pause value for HCNTRL */
   unsigned char            qcntmask;
   unsigned char            qfullcount;
+  unsigned char            cmdoutcnt;
   unsigned char            curqincnt;
   struct Scsi_Host        *next;             /* allow for multiple IRQs */
   unsigned char            activescbs;       /* active scbs */
@@ -3880,6 +3881,19 @@
 #endif
     while (qoutcnt > 0)
     {
+      if ((p->flags & PAGE_ENABLED) != 0)
+      {
+        p->cmdoutcnt += qoutcnt;
+        if (p->cmdoutcnt >= p->qfullcount)
+        {
+          /*
+           * Since paging only occurs on aic78x0 chips, we can use
+           * Auto Access Pause to clear the command count.
+           */
+          outb(0, p->base + CMDOUTCNT);
+          p->cmdoutcnt = 0;
+        }
+      }
       for (i = 0; i < qoutcnt; i++)
       {
         scb_index = inb(p->base + QOUTFIFO);
@@ -5290,6 +5304,9 @@
    * garbage in the upper bits of their QCNT registers.
     */
   outb(p->qcntmask, p->base + QCNTMASK);
+
+  outb(p->qfullcount, p->base + FIFODEPTH);
+  outb(0, p->base + CMDOUTCNT);
 
   /*
    * We don't have any waiting selections or disconnected SCBs.
diff -u --recursive --new-file v2.1.49/linux/drivers/scsi/aic7xxx_reg.h linux/drivers/scsi/aic7xxx_reg.h
--- v2.1.49/linux/drivers/scsi/aic7xxx_reg.h	Mon Aug  4 16:25:38 1997
+++ linux/drivers/scsi/aic7xxx_reg.h	Wed Aug 13 09:50:32 1997
@@ -252,14 +252,18 @@
 
 #define	CUR_SCBID       		0x58
 
-#define	ARG_1           		0x59
-#define	RETURN_1        		0x59
-#define		SEND_MSG        	0x80
-#define		SEND_SENSE      	0x40
-#define		SEND_REJ        	0x20
+#define	CMDOUTCNT       		0x59
 
 #define	SCSICONF        		0x5a
 #define		RESET_SCSI      	0x40
+
+#define	FIFODEPTH       		0x5a
+
+#define	ARG_1           		0x5b
+#define	RETURN_1        		0x5b
+#define		SEND_MSG        	0x80
+#define		SEND_SENSE      	0x40
+#define		SEND_REJ        	0x20
 
 #define	HOSTCONF        		0x5d
 
diff -u --recursive --new-file v2.1.49/linux/drivers/scsi/aic7xxx_seq.h linux/drivers/scsi/aic7xxx_seq.h
--- v2.1.49/linux/drivers/scsi/aic7xxx_seq.h	Mon Aug  4 16:25:38 1997
+++ linux/drivers/scsi/aic7xxx_seq.h	Wed Aug 13 09:50:32 1997
@@ -16,28 +16,28 @@
 	0xff, 0x48, 0x2c, 0x18,
 	0xff, 0x40, 0x64, 0x02,
 	0x00, 0x9c, 0x03, 0x1e,
-	0x00, 0x6a, 0xaa, 0x17,
+	0x00, 0x6a, 0xad, 0x17,
 	0xff, 0x65, 0x03, 0x1c,
 	0xff, 0x9b, 0x58, 0x02,
 	0xff, 0x58, 0x90, 0x02,
 	0x0d, 0x6a, 0x3d, 0x00,
-	0x00, 0x58, 0x74, 0x17,
+	0x00, 0x58, 0x77, 0x17,
 	0x28, 0xa0, 0x2a, 0x1a,
 	0x50, 0x6a, 0x60, 0x00,
 	0xff, 0x90, 0x4a, 0x02,
-	0x00, 0xa1, 0x9e, 0x17,
-	0xff, 0x6c, 0x59, 0x02,
-	0xff, 0x59, 0x27, 0x1c,
+	0x00, 0xa1, 0xa1, 0x17,
+	0xff, 0x6c, 0x5b, 0x02,
+	0xff, 0x5b, 0x27, 0x1c,
 	0xff, 0x4a, 0x90, 0x02,
-	0x00, 0x65, 0xa7, 0x17,
-	0x00, 0x6a, 0x4f, 0x17,
+	0x00, 0x65, 0xaa, 0x17,
+	0x00, 0x6a, 0x52, 0x17,
 	0xff, 0x65, 0x1f, 0x18,
 	0x51, 0x6a, 0x91, 0x00,
 	0xff, 0x58, 0xb3, 0x02,
-	0x00, 0x65, 0xb8, 0x17,
+	0x00, 0x65, 0xbb, 0x17,
 	0x10, 0x6a, 0x60, 0x00,
 	0x00, 0x65, 0x03, 0x10,
-	0xff, 0x59, 0x90, 0x02,
+	0xff, 0x5b, 0x90, 0x02,
 	0xff, 0x58, 0xb3, 0x02,
 	0x10, 0x6a, 0x60, 0x00,
 	0x00, 0x65, 0x03, 0x10,
@@ -121,26 +121,26 @@
 	0x7d, 0x6a, 0x3d, 0x00,
 	0x00, 0x65, 0x7a, 0x10,
 	0x08, 0x6a, 0x66, 0x00,
-	0xa9, 0x6a, 0x71, 0x17,
+	0xa9, 0x6a, 0x74, 0x17,
 	0x00, 0x65, 0x82, 0x10,
 	0x79, 0x6a, 0x3d, 0x00,
-	0x00, 0x65, 0x4c, 0x17,
+	0x00, 0x65, 0x4f, 0x17,
 	0x10, 0x41, 0x76, 0x1a,
 	0x88, 0x6a, 0x66, 0x00,
-	0xac, 0x6a, 0x6d, 0x17,
-	0x00, 0x65, 0x6a, 0x17,
+	0xac, 0x6a, 0x70, 0x17,
+	0x00, 0x65, 0x6d, 0x17,
 	0xff, 0xa3, 0x43, 0x02,
 	0x44, 0x6a, 0x66, 0x00,
-	0xa4, 0x6a, 0x70, 0x17,
+	0xa4, 0x6a, 0x73, 0x17,
 	0xff, 0x43, 0x88, 0x1a,
 	0x80, 0x02, 0x02, 0x00,
 	0xff, 0x6a, 0x8c, 0x00,
 	0xff, 0x6a, 0x8d, 0x00,
 	0xff, 0x6a, 0x8e, 0x00,
-	0x00, 0x65, 0x6a, 0x17,
+	0x00, 0x65, 0x6d, 0x17,
 	0x01, 0x43, 0x8a, 0x18,
 	0xbf, 0x3d, 0x3d, 0x02,
-	0x00, 0x3d, 0x41, 0x17,
+	0x00, 0x3d, 0x44, 0x17,
 	0x80, 0x02, 0xa2, 0x1a,
 	0xff, 0x65, 0x9c, 0x1e,
 	0xff, 0x43, 0x43, 0x06,
@@ -149,14 +149,14 @@
 	0x08, 0x44, 0x44, 0x06,
 	0x00, 0x45, 0x45, 0x08,
 	0x88, 0x6a, 0x66, 0x00,
-	0x44, 0x6a, 0x70, 0x17,
+	0x44, 0x6a, 0x73, 0x17,
 	0x08, 0x6a, 0x8c, 0x00,
 	0xff, 0x6a, 0x8d, 0x02,
 	0xff, 0x6a, 0x8e, 0x02,
 	0x0d, 0x93, 0x93, 0x00,
-	0x00, 0x65, 0x9a, 0x17,
-	0x88, 0x6a, 0x92, 0x17,
-	0x00, 0x65, 0x6a, 0x17,
+	0x00, 0x65, 0x9d, 0x17,
+	0x88, 0x6a, 0x95, 0x17,
+	0x00, 0x65, 0x6d, 0x17,
 	0x10, 0x0c, 0x82, 0x1e,
 	0xff, 0x08, 0xa9, 0x02,
 	0xff, 0x09, 0xaa, 0x02,
@@ -167,19 +167,19 @@
 	0x7f, 0x02, 0x02, 0x02,
 	0xe1, 0x6a, 0x91, 0x00,
 	0x00, 0x65, 0x5c, 0x10,
-	0x00, 0x65, 0x4c, 0x17,
+	0x00, 0x65, 0x4f, 0x17,
 	0x88, 0x6a, 0x66, 0x00,
-	0xb4, 0x6a, 0x6f, 0x17,
+	0xb4, 0x6a, 0x72, 0x17,
 	0xff, 0x6a, 0x8d, 0x02,
 	0xff, 0x6a, 0x8e, 0x02,
-	0x00, 0x65, 0x6a, 0x17,
-	0x3d, 0x6a, 0x41, 0x17,
+	0x00, 0x65, 0x6d, 0x17,
+	0x3d, 0x6a, 0x44, 0x17,
 	0x00, 0x65, 0x5c, 0x10,
-	0x00, 0x65, 0x4c, 0x17,
+	0x00, 0x65, 0x4f, 0x17,
 	0xff, 0x06, 0xa2, 0x02,
 	0x00, 0x65, 0x5c, 0x10,
 	0xff, 0x34, 0xb2, 0x1a,
-	0x08, 0x6a, 0x2f, 0x17,
+	0x08, 0x6a, 0x32, 0x17,
 	0x35, 0x6a, 0x65, 0x00,
 	0xff, 0x34, 0x66, 0x02,
 	0x01, 0x0c, 0xb4, 0x1e,
@@ -197,116 +197,119 @@
 	0x40, 0x6a, 0x0c, 0x00,
 	0xff, 0x6a, 0x34, 0x02,
 	0x00, 0x65, 0x5c, 0x10,
-	0x64, 0x6a, 0x3c, 0x17,
+	0x64, 0x6a, 0x3f, 0x17,
 	0xff, 0x64, 0x4b, 0x02,
-	0x80, 0x64, 0x0b, 0x1b,
-	0x04, 0x64, 0xfe, 0x1c,
-	0x02, 0x64, 0x01, 0x1d,
+	0x80, 0x64, 0x0e, 0x1b,
+	0x04, 0x64, 0x01, 0x1d,
+	0x02, 0x64, 0x04, 0x1d,
 	0x00, 0x6a, 0xd1, 0x1c,
-	0x03, 0x64, 0x09, 0x1d,
-	0x01, 0x64, 0xf2, 0x1c,
-	0x07, 0x64, 0x2d, 0x1d,
+	0x03, 0x64, 0x0c, 0x1d,
+	0x01, 0x64, 0xf5, 0x1c,
+	0x07, 0x64, 0x30, 0x1d,
 	0x08, 0x64, 0xcf, 0x1c,
 	0x11, 0x6a, 0x91, 0x00,
-	0x07, 0x6a, 0x2f, 0x17,
+	0x07, 0x6a, 0x32, 0x17,
 	0xff, 0x06, 0x6a, 0x02,
 	0x00, 0x65, 0x5c, 0x10,
 	0xff, 0xa8, 0xd3, 0x1a,
 	0xff, 0xa2, 0xda, 0x1e,
 	0x01, 0x6a, 0x3d, 0x00,
-	0x00, 0xb9, 0x74, 0x17,
+	0x00, 0xb9, 0x77, 0x17,
 	0xff, 0xa2, 0xda, 0x1e,
 	0x71, 0x6a, 0x91, 0x00,
-	0x40, 0x59, 0xda, 0x18,
+	0x40, 0x5b, 0xda, 0x18,
 	0xff, 0xb9, 0xb3, 0x02,
-	0x00, 0x65, 0xe4, 0x10,
+	0x00, 0x65, 0xe7, 0x10,
 	0x20, 0xa0, 0xe0, 0x1a,
 	0xff, 0x90, 0x4a, 0x02,
 	0xff, 0xb3, 0x49, 0x02,
-	0x00, 0xa1, 0x9e, 0x17,
+	0x00, 0xa1, 0xa1, 0x17,
 	0xff, 0x49, 0x6d, 0x02,
 	0xff, 0x4a, 0x90, 0x02,
+	0xff, 0x5a, 0x64, 0x02,
+	0x00, 0x59, 0xe1, 0x1c,
+	0x01, 0x59, 0x59, 0x06,
 	0xff, 0xb9, 0x9d, 0x02,
 	0x02, 0x6a, 0x91, 0x00,
-	0x08, 0xa0, 0xe4, 0x1e,
+	0x08, 0xa0, 0xe7, 0x1e,
 	0x91, 0x6a, 0x91, 0x00,
-	0xff, 0xb3, 0xf0, 0x1c,
+	0xff, 0xb3, 0xf3, 0x1c,
 	0xff, 0xb3, 0x64, 0x02,
-	0x00, 0xb9, 0xea, 0x1c,
-	0x00, 0x65, 0xa7, 0x17,
+	0x00, 0xb9, 0xed, 0x1c,
+	0x00, 0x65, 0xaa, 0x17,
 	0xff, 0x64, 0x90, 0x02,
-	0x00, 0x65, 0xec, 0x10,
+	0x00, 0x65, 0xef, 0x10,
 	0x0d, 0x6a, 0x3d, 0x00,
-	0x00, 0xb3, 0x74, 0x17,
+	0x00, 0xb3, 0x77, 0x17,
 	0xff, 0x48, 0xba, 0x02,
 	0xff, 0x90, 0x48, 0x02,
 	0x00, 0x65, 0x2f, 0x16,
 	0x00, 0x65, 0x69, 0x10,
-	0x00, 0x65, 0xa7, 0x17,
+	0x00, 0x65, 0xaa, 0x17,
 	0x00, 0x65, 0x69, 0x10,
-	0x4d, 0x6a, 0x37, 0x17,
+	0x4d, 0x6a, 0x3a, 0x17,
 	0xff, 0x4d, 0x64, 0x02,
-	0x00, 0x66, 0x37, 0x17,
+	0x00, 0x66, 0x3a, 0x17,
 	0xff, 0x64, 0x64, 0x06,
-	0x52, 0x66, 0xf8, 0x18,
+	0x52, 0x66, 0xfb, 0x18,
 	0xff, 0x66, 0x66, 0x06,
-	0xff, 0x64, 0xf4, 0x1a,
+	0xff, 0x64, 0xf7, 0x1a,
 	0x41, 0x6a, 0x91, 0x00,
-	0x20, 0x59, 0xcd, 0x1c,
-	0x80, 0x59, 0xcf, 0x18,
+	0x20, 0x5b, 0xcd, 0x1c,
+	0x80, 0x5b, 0xcf, 0x18,
 	0x10, 0x4c, 0x03, 0x00,
 	0x00, 0x65, 0xcf, 0x10,
 	0x04, 0xa0, 0xa0, 0x00,
-	0x00, 0x65, 0xb8, 0x17,
+	0x00, 0x65, 0xbb, 0x17,
 	0x00, 0x65, 0x69, 0x10,
 	0x10, 0x41, 0xcf, 0x1e,
 	0xff, 0x43, 0xa3, 0x02,
 	0xa4, 0x6a, 0x66, 0x00,
-	0x44, 0x6a, 0x70, 0x17,
+	0x44, 0x6a, 0x73, 0x17,
 	0xac, 0x6a, 0x66, 0x00,
-	0x14, 0x6a, 0x70, 0x17,
-	0xa9, 0x6a, 0x71, 0x17,
+	0x14, 0x6a, 0x73, 0x17,
+	0xa9, 0x6a, 0x74, 0x17,
 	0x00, 0x65, 0xcf, 0x10,
 	0xef, 0x41, 0x41, 0x02,
 	0x00, 0x65, 0xcf, 0x10,
 	0x78, 0x64, 0xcd, 0x1a,
 	0x07, 0x64, 0x64, 0x02,
 	0x00, 0x42, 0x42, 0x00,
-	0x00, 0x42, 0x9e, 0x17,
-	0xff, 0x6c, 0x59, 0x02,
-	0xff, 0x59, 0x25, 0x19,
-	0xff, 0x59, 0x15, 0x1d,
-	0xff, 0x59, 0x90, 0x02,
-	0x04, 0xa0, 0x2a, 0x1f,
-	0x00, 0x65, 0x27, 0x11,
+	0x00, 0x42, 0xa1, 0x17,
+	0xff, 0x6c, 0x5b, 0x02,
+	0xff, 0x5b, 0x28, 0x19,
+	0xff, 0x5b, 0x18, 0x1d,
+	0xff, 0x5b, 0x90, 0x02,
+	0x04, 0xa0, 0x2d, 0x1f,
+	0x00, 0x65, 0x2a, 0x11,
 	0xff, 0x06, 0x6a, 0x02,
-	0x01, 0x0c, 0x16, 0x1f,
-	0x04, 0x0c, 0x16, 0x1b,
+	0x01, 0x0c, 0x19, 0x1f,
+	0x04, 0x0c, 0x19, 0x1b,
 	0xe0, 0x03, 0x4c, 0x02,
-	0xe0, 0x4c, 0x2a, 0x19,
-	0x20, 0x12, 0x2a, 0x19,
+	0xe0, 0x4c, 0x2d, 0x19,
+	0x20, 0x12, 0x2d, 0x19,
 	0x20, 0x41, 0x41, 0x00,
-	0x59, 0x6a, 0x37, 0x17,
+	0x5b, 0x6a, 0x3a, 0x17,
 	0xff, 0x3f, 0x64, 0x02,
-	0x00, 0x59, 0x65, 0x06,
-	0x00, 0x65, 0x2a, 0x13,
-	0xff, 0x59, 0x90, 0x02,
+	0x00, 0x5b, 0x65, 0x06,
+	0x00, 0x65, 0x2d, 0x13,
+	0xff, 0x5b, 0x90, 0x02,
 	0xff, 0x42, 0x64, 0x02,
-	0x00, 0xa1, 0x2a, 0x19,
-	0x20, 0xa0, 0x2a, 0x1f,
-	0x04, 0xa0, 0x2a, 0x1f,
-	0x00, 0x6a, 0x4f, 0x17,
-	0xff, 0x65, 0x2a, 0x1d,
+	0x00, 0xa1, 0x2d, 0x19,
+	0x20, 0xa0, 0x2d, 0x1f,
+	0x04, 0xa0, 0x2d, 0x1f,
+	0x00, 0x6a, 0x52, 0x17,
+	0xff, 0x65, 0x2d, 0x1d,
 	0xfb, 0xa0, 0xa0, 0x02,
 	0x40, 0x41, 0x41, 0x00,
 	0x00, 0x65, 0xcf, 0x10,
 	0x31, 0x6a, 0x91, 0x00,
-	0x0c, 0x6a, 0x2f, 0x17,
+	0x0c, 0x6a, 0x32, 0x17,
 	0x00, 0x65, 0xcf, 0x10,
 	0x61, 0x6a, 0x91, 0x00,
 	0x00, 0x65, 0xcf, 0x10,
 	0x50, 0x6a, 0x60, 0x00,
-	0xff, 0x34, 0x33, 0x1f,
+	0xff, 0x34, 0x36, 0x1f,
 	0x10, 0x6a, 0x60, 0x00,
 	0xc1, 0x6a, 0x91, 0x00,
 	0x10, 0x4c, 0x03, 0x00,
@@ -314,50 +317,50 @@
 	0xff, 0x65, 0x35, 0x02,
 	0x10, 0x6a, 0x60, 0x01,
 	0xff, 0x06, 0x6a, 0x02,
-	0x01, 0x0c, 0x38, 0x1f,
-	0x04, 0x0c, 0x38, 0x1b,
+	0x01, 0x0c, 0x3b, 0x1f,
+	0x04, 0x0c, 0x3b, 0x1b,
 	0xe0, 0x03, 0x4c, 0x02,
-	0xe0, 0x4c, 0x3f, 0x19,
+	0xe0, 0x4c, 0x42, 0x19,
 	0xff, 0x65, 0x66, 0x02,
 	0xff, 0x12, 0x6d, 0x03,
 	0xff, 0x06, 0x6a, 0x03,
 	0xd1, 0x6a, 0x91, 0x00,
 	0x00, 0x65, 0x5c, 0x10,
 	0xff, 0x65, 0x93, 0x02,
-	0x01, 0x0b, 0x49, 0x1b,
-	0x10, 0x0c, 0x42, 0x1f,
-	0x04, 0x0b, 0x46, 0x1b,
+	0x01, 0x0b, 0x4c, 0x1b,
+	0x10, 0x0c, 0x45, 0x1f,
+	0x04, 0x0b, 0x49, 0x1b,
 	0xff, 0x6a, 0x65, 0x02,
-	0x04, 0x93, 0x48, 0x1b,
-	0x01, 0x94, 0x47, 0x1f,
-	0x10, 0x94, 0x48, 0x1b,
+	0x04, 0x93, 0x4b, 0x1b,
+	0x01, 0x94, 0x4a, 0x1f,
+	0x10, 0x94, 0x4b, 0x1b,
 	0xc7, 0x93, 0x93, 0x02,
-	0x38, 0x93, 0x4a, 0x1b,
+	0x38, 0x93, 0x4d, 0x1b,
 	0xff, 0x6a, 0x6a, 0x03,
-	0x80, 0x41, 0x4b, 0x1f,
-	0x40, 0x41, 0x4b, 0x1b,
+	0x80, 0x41, 0x4e, 0x1f,
+	0x40, 0x41, 0x4e, 0x1b,
 	0x21, 0x6a, 0x91, 0x01,
 	0xff, 0x65, 0x90, 0x02,
-	0xff, 0x59, 0x64, 0x02,
-	0x00, 0xb9, 0x53, 0x19,
-	0x04, 0xa0, 0x5d, 0x1b,
+	0xff, 0x5b, 0x64, 0x02,
+	0x00, 0xb9, 0x56, 0x19,
+	0x04, 0xa0, 0x60, 0x1b,
 	0x01, 0x65, 0x65, 0x06,
 	0xff, 0x3e, 0x64, 0x02,
-	0x00, 0x65, 0x4f, 0x19,
-	0x00, 0x6a, 0xaa, 0x17,
+	0x00, 0x65, 0x52, 0x19,
+	0x00, 0x6a, 0xad, 0x17,
 	0x0d, 0x6a, 0x3d, 0x00,
-	0x00, 0x59, 0x74, 0x17,
-	0xff, 0xa8, 0x5b, 0x1f,
+	0x00, 0x5b, 0x77, 0x17,
+	0xff, 0xa8, 0x5e, 0x1f,
 	0x10, 0xa0, 0xa0, 0x00,
-	0x08, 0xa0, 0x4b, 0x1f,
+	0x08, 0xa0, 0x4e, 0x1f,
 	0xff, 0x6a, 0x65, 0x01,
-	0x08, 0xa0, 0x5c, 0x1b,
-	0xff, 0xba, 0x63, 0x1d,
+	0x08, 0xa0, 0x5f, 0x1b,
+	0xff, 0xba, 0x66, 0x1d,
 	0xff, 0xbb, 0x49, 0x02,
 	0xff, 0xba, 0x90, 0x02,
 	0xff, 0x49, 0xbb, 0x02,
 	0xff, 0x65, 0x90, 0x02,
-	0xff, 0xbb, 0x68, 0x1d,
+	0xff, 0xbb, 0x6b, 0x1d,
 	0xff, 0xba, 0x49, 0x02,
 	0xff, 0xbb, 0x90, 0x02,
 	0xff, 0x49, 0xba, 0x02,
@@ -386,7 +389,7 @@
 	0xff, 0x6a, 0x8d, 0x02,
 	0xff, 0x6a, 0x8e, 0x02,
 	0xff, 0x3d, 0x93, 0x02,
-	0x04, 0x3d, 0x8c, 0x1b,
+	0x04, 0x3d, 0x8f, 0x1b,
 	0xa0, 0x6a, 0x65, 0x00,
 	0x1c, 0x65, 0x64, 0x06,
 	0xff, 0x6c, 0x99, 0x02,
@@ -396,14 +399,14 @@
 	0xff, 0x6c, 0x99, 0x02,
 	0xff, 0x6c, 0x99, 0x02,
 	0xff, 0x6c, 0x99, 0x02,
-	0x00, 0x65, 0x83, 0x19,
+	0x00, 0x65, 0x86, 0x19,
 	0x0a, 0x93, 0x93, 0x00,
-	0x00, 0x65, 0x9a, 0x17,
-	0x04, 0x3d, 0x4b, 0x1f,
-	0xa0, 0x6a, 0x92, 0x17,
-	0x00, 0x65, 0x93, 0x17,
-	0x00, 0x65, 0x93, 0x17,
-	0x00, 0x65, 0x93, 0x11,
+	0x00, 0x65, 0x9d, 0x17,
+	0x04, 0x3d, 0x4e, 0x1f,
+	0xa0, 0x6a, 0x95, 0x17,
+	0x00, 0x65, 0x96, 0x17,
+	0x00, 0x65, 0x96, 0x17,
+	0x00, 0x65, 0x96, 0x11,
 	0xff, 0x65, 0x66, 0x02,
 	0xff, 0x99, 0x6d, 0x02,
 	0xff, 0x99, 0x6d, 0x02,
@@ -412,40 +415,40 @@
 	0xff, 0x99, 0x6d, 0x02,
 	0xff, 0x99, 0x6d, 0x02,
 	0xff, 0x99, 0x6d, 0x03,
-	0x08, 0x94, 0x9a, 0x1f,
+	0x08, 0x94, 0x9d, 0x1f,
 	0xf7, 0x93, 0x93, 0x02,
-	0x08, 0x93, 0x9c, 0x1b,
+	0x08, 0x93, 0x9f, 0x1b,
 	0xff, 0x6a, 0x6a, 0x03,
 	0xff, 0x65, 0x66, 0x02,
 	0x4c, 0x66, 0x66, 0x0a,
 	0x03, 0x66, 0x66, 0x02,
 	0xbc, 0x66, 0x66, 0x06,
 	0x6a, 0x65, 0x64, 0x0a,
-	0x08, 0x65, 0xa5, 0x1f,
+	0x08, 0x65, 0xa8, 0x1f,
 	0x02, 0x64, 0x64, 0x06,
 	0xff, 0x64, 0x90, 0x02,
 	0xff, 0x66, 0x65, 0x03,
 	0xff, 0x53, 0xba, 0x02,
 	0xff, 0x6a, 0xb9, 0x00,
 	0xff, 0x90, 0x53, 0x03,
-	0xff, 0x53, 0xb6, 0x19,
-	0xff, 0x52, 0xad, 0x19,
+	0xff, 0x53, 0xb9, 0x19,
+	0xff, 0x52, 0xb0, 0x19,
 	0xff, 0x6a, 0x65, 0x01,
 	0xff, 0x52, 0x90, 0x02,
-	0x10, 0xa0, 0xb1, 0x1f,
+	0x10, 0xa0, 0xb4, 0x1f,
 	0xef, 0xa0, 0xa0, 0x02,
-	0x00, 0x65, 0xb3, 0x11,
-	0xff, 0xa8, 0xb3, 0x1b,
-	0xff, 0xb3, 0xb5, 0x1d,
+	0x00, 0x65, 0xb6, 0x11,
+	0xff, 0xa8, 0xb6, 0x1b,
+	0xff, 0xb3, 0xb8, 0x1d,
 	0x01, 0x6a, 0x3d, 0x00,
-	0x00, 0xb9, 0x74, 0x17,
-	0x00, 0x90, 0x5e, 0x11,
+	0x00, 0xb9, 0x77, 0x17,
+	0x00, 0x90, 0x61, 0x11,
 	0xff, 0x53, 0x90, 0x02,
 	0xff, 0xba, 0x53, 0x03,
 	0xff, 0x6a, 0xbb, 0x00,
 	0xff, 0x52, 0xba, 0x02,
 	0xff, 0x90, 0x52, 0x02,
-	0xff, 0xba, 0x4b, 0x1d,
+	0xff, 0xba, 0x4e, 0x1d,
 	0xff, 0xba, 0x90, 0x02,
 	0xff, 0x52, 0xbb, 0x02,
 	0xff, 0x52, 0x90, 0x03,
@@ -466,14 +469,15 @@
 	{ 0x00000004, 1, 0x023, 0x027 },
 	{ 0x00000002, 0, 0x02f, 0x033 },
 	{ 0x00000008, 0, 0x04f, 0x056 },
-	{ 0x00000004, 1, 0x0e5, 0x0ea },
-	{ 0x00000004, 0, 0x0ff, 0x100 },
-	{ 0x00000004, 0, 0x110, 0x111 },
-	{ 0x00000004, 1, 0x111, 0x115 },
-	{ 0x00000004, 1, 0x120, 0x125 },
-	{ 0x00000004, 0, 0x125, 0x127 },
-	{ 0x00000004, 0, 0x14f, 0x169 },
-	{ 0x00000004, 1, 0x169, 0x16a },
-	{ 0x00000004, 0, 0x1aa, 0x1bf },
+	{ 0x00000004, 0, 0x0e0, 0x0e3 },
+	{ 0x00000004, 1, 0x0e8, 0x0ed },
+	{ 0x00000004, 0, 0x102, 0x103 },
+	{ 0x00000004, 0, 0x113, 0x114 },
+	{ 0x00000004, 1, 0x114, 0x118 },
+	{ 0x00000004, 1, 0x123, 0x128 },
+	{ 0x00000004, 0, 0x128, 0x12a },
+	{ 0x00000004, 0, 0x152, 0x16c },
+	{ 0x00000004, 1, 0x16c, 0x16d },
+	{ 0x00000004, 0, 0x1ad, 0x1c2 },
 	{ 0x00000000, 0, 0x000, 0x000 }
 };
diff -u --recursive --new-file v2.1.49/linux/drivers/scsi/ncr53c8xx.c linux/drivers/scsi/ncr53c8xx.c
--- v2.1.49/linux/drivers/scsi/ncr53c8xx.c	Mon Aug 11 14:47:05 1997
+++ linux/drivers/scsi/ncr53c8xx.c	Tue Aug 12 14:08:40 1997
@@ -9283,7 +9283,7 @@
 	*/
 #ifdef NCR_IOMAPPED
 	request_region(io_port, 128, "ncr53c8xx");
-	device->slot.port = ioport;
+	device->slot.port = io_port;
 #else
 	device->slot.reg = (struct ncr_reg *) remap_pci_mem((ulong) base, 128);
 	if (!device->slot.reg)
diff -u --recursive --new-file v2.1.49/linux/drivers/scsi/sd.c linux/drivers/scsi/sd.c
--- v2.1.49/linux/drivers/scsi/sd.c	Tue May 13 22:41:13 1997
+++ linux/drivers/scsi/sd.c	Tue Aug 12 18:22:30 1997
@@ -1509,8 +1509,9 @@
     for (i=max_p - 1; i >=0 ; i--) {
 	int minor = start+i;
 	kdev_t devi = MKDEV(MAJOR_NR, minor);
+	struct super_block *sb = get_super(devi);
 	sync_dev(devi);
-	invalidate_inodes(devi);
+	if (sb) invalidate_inodes(sb);
 	invalidate_buffers(devi);
 	gdev->part[minor].start_sect = 0;
 	gdev->part[minor].nr_sects = 0;
@@ -1561,8 +1562,9 @@
 	    for (i=max_p - 1; i >=0 ; i--) {
 		int minor = start+i;
 		kdev_t devi = MKDEV(MAJOR_NR, minor);
+		struct super_block *sb = get_super(devi);
 		sync_dev(devi);
-		invalidate_inodes(devi);
+		if (sb) invalidate_inodes(sb);
 		invalidate_buffers(devi);
 		sd_gendisk.part[minor].start_sect = 0;
 		sd_gendisk.part[minor].nr_sects = 0;
diff -u --recursive --new-file v2.1.49/linux/drivers/scsi/ultrastor.c linux/drivers/scsi/ultrastor.c
--- v2.1.49/linux/drivers/scsi/ultrastor.c	Wed Oct  2 04:20:55 1996
+++ linux/drivers/scsi/ultrastor.c	Tue Aug 12 20:26:26 1997
@@ -1144,8 +1144,13 @@
     else
 	printk("US14F: interrupt: unexpected interrupt\n");
 
-    if (config.slot ? inb(config.icm_address - 1) : (inb(SYS_DOORBELL_INTR(config.doorbell_address)) & 1))
+    if (config.slot ? inb(config.icm_address - 1) :
+       (inb(SYS_DOORBELL_INTR(config.doorbell_address)) & 1))
+#if (ULTRASTOR_DEBUG & UD_MULTI_CMD)
       printk("Ux4F: multiple commands completed\n");
+#else
+      ;
+#endif
 
 #if (ULTRASTOR_DEBUG & UD_INTERRUPT)
     printk("USx4F: interrupt: returning\n");
diff -u --recursive --new-file v2.1.49/linux/fs/autofs/root.c linux/fs/autofs/root.c
--- v2.1.49/linux/fs/autofs/root.c	Mon Aug  4 16:25:38 1997
+++ linux/fs/autofs/root.c	Thu Aug 14 12:56:14 1997
@@ -176,6 +176,12 @@
 	return 1;
 }
 
+static struct dentry_operations autofs_dentry_operations = {
+	autofs_revalidate,
+	NULL,			/* d_hash */
+	NULL,			/* d_compare */
+};
+
 static int autofs_root_lookup(struct inode *dir, struct dentry * dentry)
 {
 	struct autofs_sb_info *sbi;
@@ -204,14 +210,23 @@
 	 *
 	 * We need to do this before we release the directory semaphore.
 	 */
-	dentry->d_revalidate = autofs_revalidate;
+	dentry->d_op = &autofs_dentry_operations;
 	dentry->d_flags |= DCACHE_AUTOFS_PENDING;
 	d_add(dentry, NULL);
 
 	up(&dir->i_sem);
 	autofs_revalidate(dentry);
 	down(&dir->i_sem);
-	
+
+	/*
+	 * If we are still pending, check if we had to handle
+	 * a signal. If so we can force a restart..
+	 */
+	if (dentry->d_flags & DCACHE_AUTOFS_PENDING) {
+		if (current->signal & ~current->blocked)
+			return -ERESTARTNOINTR;
+	}
+
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.49/linux/fs/buffer.c linux/fs/buffer.c
--- v2.1.49/linux/fs/buffer.c	Mon Aug 11 14:47:05 1997
+++ linux/fs/buffer.c	Wed Aug 13 10:05:03 1997
@@ -113,7 +113,7 @@
 int bdflush_min[N_PARAM] = {  0,  10,    5,   25,  0,   100,   100, 1, 1};
 int bdflush_max[N_PARAM] = {100,5000, 2000, 2000,100, 60000, 60000, 2047, 5};
 
-static void wakeup_bdflush(int);
+void wakeup_bdflush(int);
 
 /*
  * Rewrote the wait-routines to use the "new" wait-queue functionality,
@@ -1663,7 +1663,7 @@
 static struct wait_queue * bdflush_done = NULL;
 struct task_struct *bdflush_tsk = 0;
 
-static void wakeup_bdflush(int wait)
+void wakeup_bdflush(int wait)
 {
 	if (current == bdflush_tsk)
 		return;
diff -u --recursive --new-file v2.1.49/linux/fs/dcache.c linux/fs/dcache.c
--- v2.1.49/linux/fs/dcache.c	Mon Aug 11 14:47:05 1997
+++ linux/fs/dcache.c	Thu Aug 14 13:42:53 1997
@@ -178,7 +178,7 @@
 	dentry->d_name.name = str;
 	dentry->d_name.len = name->len;
 	dentry->d_name.hash = name->hash;
-	dentry->d_revalidate = NULL;
+	dentry->d_op = NULL;
 	return dentry;
 }
 
@@ -233,9 +233,14 @@
 		tmp = tmp->next;
 		if (dentry->d_name.hash != hash)
 			continue;
-		if (dentry->d_name.len != len)
-			continue;
 		if (dentry->d_parent != parent)
+			continue;
+		if (parent->d_op && parent->d_op->d_compare) {
+			if (parent->d_op->d_compare(parent, &dentry->d_name, name))
+				continue;
+			return dentry;
+		}
+		if (dentry->d_name.len != len)
 			continue;
 		if (memcmp(dentry->d_name.name, str, len))
 			continue;
diff -u --recursive --new-file v2.1.49/linux/fs/devices.c linux/fs/devices.c
--- v2.1.49/linux/fs/devices.c	Mon Aug  4 16:25:38 1997
+++ linux/fs/devices.c	Tue Aug 12 17:15:15 1997
@@ -198,6 +198,7 @@
 {
 	int i;
 	struct file_operations * fops;
+	struct super_block * sb;
 
 	i = MAJOR(dev);
 	if (i >= MAX_BLKDEV || (fops = blkdevs[i].fops) == NULL)
@@ -210,7 +211,8 @@
 	printk(KERN_DEBUG "VFS: Disk change detected on device %s\n",
 		kdevname(dev));
 
-	if (invalidate_inodes(dev))
+	sb = get_super(dev);
+	if (sb && invalidate_inodes(sb))
 		printk("VFS: busy inodes on changed media..\n");
 
 	invalidate_buffers(dev);
diff -u --recursive --new-file v2.1.49/linux/fs/inode.c linux/fs/inode.c
--- v2.1.49/linux/fs/inode.c	Mon Aug 11 14:47:05 1997
+++ linux/fs/inode.c	Thu Aug 14 09:57:54 1997
@@ -260,10 +260,9 @@
 }
 
 /*
- * Invalidate all inodes for a device, except for the root inode. 
+ * Invalidate all inodes for a device.
  */
-static int invalidate_list(struct list_head *head, kdev_t dev, 
-			struct inode * root, struct list_head * dispose)
+static int invalidate_list(struct list_head *head, struct super_block * sb, struct list_head * dispose)
 {
 	struct list_head *next;
 	int busy = 0;
@@ -277,11 +276,9 @@
 		if (tmp == head)
 			break;
 		inode = list_entry(tmp, struct inode, i_list);
-		if (inode->i_dev != dev)
-			continue;
-		if (inode == root)
+		if (inode->i_sb != sb)
 			continue;
-		if (!inode->i_count && !inode->i_state) {
+		if (!inode->i_count) {
 			list_del(&inode->i_hash);
 			INIT_LIST_HEAD(&inode->i_hash);
 			list_del(&inode->i_list);
@@ -300,16 +297,14 @@
  * is because we don't want to sleep while messing
  * with the global lists..
  */
-static int invalidate_inodes_except(kdev_t dev, struct inode * root)
+int invalidate_inodes(struct super_block * sb)
 {
-	struct super_block * sb = get_super(dev);
 	int busy;
 	LIST_HEAD(throw_away);
 
 	spin_lock(&inode_lock);
-	busy = invalidate_list(&inode_in_use, dev, root, &throw_away);
-	if (sb)
-		busy |= invalidate_list(&sb->s_dirty, dev, root, &throw_away);
+	busy = invalidate_list(&inode_in_use, sb, &throw_away);
+	busy |= invalidate_list(&sb->s_dirty, sb, &throw_away);
 	spin_unlock(&inode_lock);
 
 	dispose_list(&throw_away);
@@ -317,11 +312,6 @@
 	return busy;
 }
 
-int invalidate_inodes(kdev_t dev)
-{
-	return invalidate_inodes_except(dev, NULL);
-}
-
 /*
  * This is called with the inode lock held. It just looks at the last
  * inode on the in-use list, and if the inode is trivially freeable
@@ -421,6 +411,7 @@
 		inode = list_entry(tmp, struct inode, i_list);
 add_new_inode:
 		inode->i_sb = NULL;
+		inode->i_dev = 0;
 		inode->i_ino = ++last_ino;
 		inode->i_count = 1;
 		list_add(&inode->i_list, &inode_in_use);
@@ -578,7 +569,7 @@
  */
 int fs_may_mount(kdev_t dev)
 {
-	return !invalidate_inodes(dev);
+	return 1;
 }
 
 /*
@@ -586,29 +577,14 @@
  */
 int fs_may_umount(struct super_block *sb, struct dentry * root)
 {
-	int busy;
-
 	shrink_dcache();
-
-	if (!root->d_inode || root->d_inode->i_dev != sb->s_dev) {
-		printk("fs_may_umount: root inode not on device??\n");
-		return 0;
-	}
-
-	/*
-	 * Invalidate the inodes for this device. Device has been synced
-	 * prior to call, so there should be no dirty inodes.
-	 */
-	busy = invalidate_inodes_except(sb->s_dev, root->d_inode);
-
-	return (root->d_count == 1) && !busy;
+	return root->d_count == 1;
 }
 
 /* This belongs in file_table.c, not here... */
 int fs_may_remount_ro(struct super_block *sb)
 {
 	struct file *file;
-	kdev_t dev = sb->s_dev;
 
 	/* Check that no files are currently opened for writing. */
 	for (file = inuse_filps; file; file = file->f_next) {
@@ -616,7 +592,7 @@
 		if (!file->f_dentry)
 			continue;
 		inode = file->f_dentry->d_inode;
-		if (!inode || inode->i_dev != dev)
+		if (!inode || inode->i_sb != sb)
 			continue;
 		if (S_ISREG(inode->i_mode) && file->f_mode & FMODE_WRITE)
 			return 0;
diff -u --recursive --new-file v2.1.49/linux/fs/msdos/namei.c linux/fs/msdos/namei.c
--- v2.1.49/linux/fs/msdos/namei.c	Mon Aug 11 14:47:05 1997
+++ linux/fs/msdos/namei.c	Thu Aug 14 12:56:14 1997
@@ -63,24 +63,6 @@
 	NULL
 };
 
-struct super_block *msdos_read_super(struct super_block *sb,void *data, int silent)
-{
-	struct super_block *res;
-
-	MOD_INC_USE_COUNT;
-
-	sb->s_op = &msdos_sops;
-	res =  fat_read_super(sb, data, silent);
-	if (res == NULL)
-		MOD_DEC_USE_COUNT;
-
-	return res;
-}
-
-
-
-
-
 /***** Formats an MS-DOS file name. Rejects invalid names. */
 static int msdos_format_name(char conv,const char *name,int len,
 	char *res,int dot_dirs,char dotsOK)
@@ -190,6 +172,73 @@
 	return fat_scan(dir,msdos_name,bh,de,ino,scantype);
 }
 
+
+static int msdos_hash(struct dentry *dentry, struct qstr *qstr)
+{
+	unsigned long hash;
+	char msdos_name[MSDOS_NAME];
+	int error;
+	int i;
+	struct fat_mount_options *options = 
+		& (MSDOS_SB(dentry->d_inode->i_sb)->options);
+	
+	error = msdos_format_name(options->name_check,
+				  qstr->name, qstr->len, msdos_name,1,
+				  options->dotsOK);
+	if(error)
+		return error;
+	hash = init_name_hash();
+	for(i=0; i< MSDOS_NAME; i++)
+		hash = partial_name_hash(msdos_name[i], hash);
+	qstr->hash = end_name_hash(hash);
+	return 0;
+}
+
+
+static int msdos_cmp(struct dentry *dentry,       
+		     struct qstr *a, struct qstr *b)
+{
+	char a_msdos_name[MSDOS_NAME],b_msdos_name[MSDOS_NAME];
+	int error;
+	struct fat_mount_options *options = 
+		& (MSDOS_SB(dentry->d_inode->i_sb)->options);
+
+	error = msdos_format_name(options->name_check,
+				  a->name, a->len, a_msdos_name,1,
+				  options->dotsOK);
+	if(error)
+		return error;
+	error = msdos_format_name(options->name_check,
+				  b->name, b->len, b_msdos_name,1,
+				  options->dotsOK);
+	if(error)
+		return error;
+
+	return memcmp(a_msdos_name, b_msdos_name, MSDOS_NAME);
+}
+
+
+static struct dentry_operations msdos_dentry_operations = {
+	0, 		/* d_revalidate */
+	msdos_hash,
+	msdos_cmp
+};
+
+struct super_block *msdos_read_super(struct super_block *sb,void *data, int silent)
+{
+	struct super_block *res;
+
+	MOD_INC_USE_COUNT;
+
+	sb->s_op = &msdos_sops;
+	res =  fat_read_super(sb, data, silent);
+	if (res == NULL)
+		MOD_DEC_USE_COUNT;
+	sb->s_root->d_op = &msdos_dentry_operations;
+	return res;
+}
+
+
 /***** Get inode using directory and name */
 int msdos_lookup(struct inode *dir,struct dentry *dentry)
 {
@@ -201,10 +250,20 @@
 	
 	PRINTK (("msdos_lookup\n"));
 
-	if ((res = msdos_find(dir,dentry->d_name.name,dentry->d_name.len,&bh,&de,&ino)) < 0) {
+	dentry->d_op = &msdos_dentry_operations;
+
+	if(!dir) {
 		d_add(dentry, NULL);
 		return 0;
 	}
+
+	if ((res = msdos_find(dir,dentry->d_name.name,dentry->d_name.len,&bh,&de,&ino)) < 0) {
+		if(res == -ENOENT) {
+			d_add(dentry, NULL);
+			res = 0;
+		}
+		return res;
+	}
 	PRINTK (("msdos_lookup 4\n"));
 	if (bh)
 		fat_brelse(sb, bh);
@@ -229,6 +288,7 @@
 		iput(inode);
 		if (!(inode = iget(next->i_sb,next->i_ino))) {
 			fat_fs_panic(dir->i_sb,"msdos_lookup: Can't happen");
+			d_add(dentry, NULL);
 			return -ENOENT;
 		}
 	}
@@ -248,6 +308,9 @@
 	struct msdos_dir_entry *de;
 	int res,ino;
 
+	if(!dir)
+		return -ENOENT;
+
 	*result = NULL;
 	if ((res = fat_scan(dir,NULL,&bh,&de,&ino,SCAN_ANY)) < 0) {
 		if (res != -ENOENT) return res;
@@ -748,7 +811,10 @@
 	NULL,			/* writepage */
 	fat_bmap,		/* bmap */
 	NULL,			/* truncate */
-	NULL			/* permission */
+	NULL,			/* permission */
+	NULL,                   /* smap */
+	NULL,                   /* updatepage */
+	NULL,                   /* revalidate */
 };
 
 
diff -u --recursive --new-file v2.1.49/linux/fs/namei.c linux/fs/namei.c
--- v2.1.49/linux/fs/namei.c	Mon Aug 11 14:47:05 1997
+++ linux/fs/namei.c	Thu Aug 14 13:39:11 1997
@@ -268,8 +268,8 @@
 {
 	struct dentry * dentry = d_lookup(parent, name);
 
-	if (dentry && dentry->d_revalidate) {
-		int validated, (*revalidate)(struct dentry *) = dentry->d_revalidate;
+	if (dentry && dentry->d_op && dentry->d_op->d_revalidate) {
+		int validated, (*revalidate)(struct dentry *) = dentry->d_op->d_revalidate;
 
 		dentry->d_count++;
 		validated = revalidate(dentry) || d_invalidate(dentry);
@@ -350,16 +350,6 @@
 }
 
 /*
- * Allow a filesystem to translate the character set of
- * a file name. This allows for filesystems that are not
- * case-sensitive, for example.
- *
- * This is only a dummy define right now, but eventually
- * it might become something like "(parent)->d_charmap[c]"
- */
-#define name_translate_char(parent, c) (c)
-
-/*
  * Name resolution.
  *
  * This is the basic name resolution function, turning a pathname
@@ -406,16 +396,15 @@
 			break;
 
 		this.name = name;
-		hash = init_name_hash();
 		len = 0;
 		c = *name;
+
+		hash = init_name_hash();
 		do {
 			len++; name++;
-			c = name_translate_char(base, c);
 			hash = partial_name_hash(c, hash);
 			c = *name;
 		} while (c && (c != '/'));
-
 		this.len = len;
 		this.hash = end_name_hash(hash);
 
@@ -426,6 +415,19 @@
 			do {
 				c = *++name;
 			} while (c == '/');
+		}
+
+		/*
+		 * See if the low-level filesystem might want
+		 * to use its own hash..
+		 */
+		if (base->d_op && base->d_op->d_hash) {
+			int error;
+			error = base->d_op->d_hash(base, &this);
+			if (error < 0) {
+				dentry = ERR_PTR(error);
+				break;
+			}
 		}
 
 		dentry = lookup(base, &this);
diff -u --recursive --new-file v2.1.49/linux/fs/nfs/dir.c linux/fs/nfs/dir.c
--- v2.1.49/linux/fs/nfs/dir.c	Mon Aug 11 14:47:05 1997
+++ linux/fs/nfs/dir.c	Thu Aug 14 12:56:14 1997
@@ -349,6 +349,12 @@
 	return time < max;
 }
 
+static struct dentry_operations nfs_dentry_operations = {
+	nfs_lookup_revalidate,
+	0,			/* d_hash */
+	0,			/* d_compare */
+};
+
 static int nfs_lookup(struct inode *dir, struct dentry * dentry)
 {
 	struct inode *inode;
@@ -380,7 +386,7 @@
 		return error;
 
 	dentry->d_time = jiffies;
-	dentry->d_revalidate = nfs_lookup_revalidate;
+	dentry->d_op = &nfs_dentry_operations;
 	d_add(dentry, inode);
 	return 0;
 }
diff -u --recursive --new-file v2.1.49/linux/fs/super.c linux/fs/super.c
--- v2.1.49/linux/fs/super.c	Mon Aug 11 14:47:05 1997
+++ linux/fs/super.c	Thu Aug 14 14:39:52 1997
@@ -550,16 +550,25 @@
 			kdevname(dev));
 }
 
-static void d_umount(struct dentry *dentry)
+static int d_umount(struct super_block * sb)
 {
-	struct dentry * covers = dentry->d_covers;
+	struct dentry * root = sb->s_root;
+	struct dentry * covers = root->d_covers;
 
-	if (covers != dentry) {
-		covers->d_mounts = covers;
-		dentry->d_covers = dentry;
-		dput(covers);
-		dput(dentry);
-	}
+	if (root->d_count != 1)
+		return -EBUSY;
+
+	if (root->d_inode->i_state)
+		return -EBUSY;
+
+	sb->s_root = NULL;
+
+	covers->d_mounts = covers;
+	root->d_covers = root;
+
+	dput(covers);
+	dput(root);
+	return 0;
 }
 
 static void d_mount(struct dentry *covers, struct dentry *dentry)
@@ -599,8 +608,7 @@
 			quota_off(dev, -1);
 			fsync_dev(dev);
 			retval = do_remount_sb(sb, MS_RDONLY, 0);
-			if (retval)
-				return retval;
+			return retval;
 		}
 		return 0;
 	}
@@ -611,15 +619,25 @@
 	 * too bad there are no quotas running anymore. Turn them on again by hand.
 	 */
 	quota_off(dev, -1);
-	if (!fs_may_umount(sb, sb->s_root))
-		return -EBUSY;
 
-	/* clean up dcache .. */
-	d_umount(sb->s_root);
-	sb->s_root = NULL;
+	/*
+	 * Shrink dcache, then fsync. This guarantees that if the
+	 * filesystem is quiescent at this point, then (a) only the
+	 * root entry should be in use and (b) that root entry is
+	 * clean.
+	 */
+	shrink_dcache();
+	fsync_dev(dev);
+
+	retval = d_umount(sb);
+	if (retval)
+		return retval;
 
 	/* Forget any inodes */
-	invalidate_inodes(dev);
+	if (invalidate_inodes(sb)) {
+		printk("VFS: Busy inodes after unmount. "
+			"Self-destruct in 5 seconds. Bye-bye..\n");
+	}
 
 	if (sb->s_op) {
 		if (sb->s_op->write_super && sb->s_dirt)
@@ -636,9 +654,14 @@
 	int retval;
 	struct inode * inode = get_empty_inode();
 
+	retval = -ENOMEM;
+	if (!inode)
+		goto out;
+
 	inode->i_rdev = dev;
+	retval = -ENXIO;
 	if (MAJOR(dev) >= MAX_BLKDEV)
-		return -ENXIO;
+		goto out_iput;
 
 	fsync_dev(dev);
 	retval = do_umount(dev,0);
@@ -649,7 +672,9 @@
 			put_unnamed_dev(dev);
 		}
 	}
+out_iput:
 	iput(inode);
+out:
 	return retval;
 }
 
@@ -1118,6 +1143,8 @@
 		dput(dir_d);
 		error = -ENOTDIR;
 	}
+	printk("do_change_root: old root d_count=%d\n", old_root->d_count);
+	dput(old_root);
 	dput(old_pwd);
 	if (error) {
 		int umount_error;
@@ -1133,15 +1160,15 @@
 	}
 	remove_vfsmnt(old_root_dev);
 	vfsmnt = add_vfsmnt(old_root_dev,"/dev/root.old",put_old);
-	if (!vfsmnt) printk(KERN_CRIT "Trouble: add_vfsmnt failed\n");
-	else {
+	if (vfsmnt) {
 		vfsmnt->mnt_sb = old_root->d_inode->i_sb;
-		d_mount(dir_d,vfsmnt->mnt_sb->s_root);
 		vfsmnt->mnt_flags = vfsmnt->mnt_sb->s_flags;
+		d_mount(dir_d,old_root);
+		return 0;
 	}
-	d_umount(old_root);
-	d_mount(dir_d,old_root);
-	return 0;
+	printk(KERN_CRIT "Trouble: add_vfsmnt failed\n");
+	dput(old_root);
+	return -ENOMEM;
 }
 
 int change_root(kdev_t new_root_dev,const char *put_old)
diff -u --recursive --new-file v2.1.49/linux/fs/vfat/namei.c linux/fs/vfat/namei.c
--- v2.1.49/linux/fs/vfat/namei.c	Mon Aug  4 16:25:39 1997
+++ linux/fs/vfat/namei.c	Wed Aug 13 10:05:03 1997
@@ -1413,7 +1413,7 @@
 		iput(new_inode);
 		if (new_is_dir) {
 			PRINTK(("vfat_rename 7\n"));
-			res = vfat_rmdirx(new_dir,&new_dentry);
+			res = vfat_rmdirx(new_dir,new_dentry);
 			PRINTK(("vfat_rename 8\n"));
 			if (res < 0) goto rename_done;
 		} else {
diff -u --recursive --new-file v2.1.49/linux/include/asm-i386/pgtable.h linux/include/asm-i386/pgtable.h
--- v2.1.49/linux/include/asm-i386/pgtable.h	Mon Jul  7 16:02:01 1997
+++ linux/include/asm-i386/pgtable.h	Thu Aug 14 14:47:34 1997
@@ -201,6 +201,7 @@
 #define _PAGE_PRESENT	0x001
 #define _PAGE_RW	0x002
 #define _PAGE_USER	0x004
+#define _PAGE_WT	0x008
 #define _PAGE_PCD	0x010
 #define _PAGE_ACCESSED	0x020
 #define _PAGE_DIRTY	0x040
diff -u --recursive --new-file v2.1.49/linux/include/linux/dcache.h linux/include/linux/dcache.h
--- v2.1.49/linux/include/linux/dcache.h	Mon Aug 11 14:47:05 1997
+++ linux/include/linux/dcache.h	Thu Aug 14 12:56:14 1997
@@ -50,8 +50,23 @@
 	struct list_head d_lru;		/* d_count = 0 LRU list */
 	struct qstr d_name;
 	unsigned long d_time;		/* used by d_revalidate */
+	struct dentry_operations  *d_op;
+};
+
+struct dentry_operations {
 	int (*d_revalidate)(struct dentry *);
+	int (*d_hash) (struct dentry *,struct qstr *);
+	int (*d_compare) (struct dentry *,struct qstr *, struct qstr *);
 };
+
+/* the dentry parameter passed to d_hash and d_compare is the parent
+ * directory of the entries to be compared. It is used in case these
+ * functions need any directory specific information for determining
+ * equivalency classes.  Using the dentry itself might not work, as it
+ * might be a negative dentry which has no information associated with
+ * it */
+
+
 
 /* d_flags entries */
 #define DCACHE_AUTOFS_PENDING 0x0001    /* autofs: "under construction" */
diff -u --recursive --new-file v2.1.49/linux/include/linux/fs.h linux/include/linux/fs.h
--- v2.1.49/linux/include/linux/fs.h	Mon Aug 11 14:47:05 1997
+++ linux/include/linux/fs.h	Thu Aug 14 14:47:34 1997
@@ -673,7 +673,7 @@
 }
 
 extern int check_disk_change(kdev_t dev);
-extern int invalidate_inodes(kdev_t dev);
+extern int invalidate_inodes(struct super_block * sb);
 extern void invalidate_inode_pages(struct inode *);
 extern void invalidate_buffers(kdev_t dev);
 extern int floppy_is_wp(int minor);
diff -u --recursive --new-file v2.1.49/linux/include/linux/pci.h linux/include/linux/pci.h
--- v2.1.49/linux/include/linux/pci.h	Thu Jun 26 12:33:40 1997
+++ linux/include/linux/pci.h	Wed Aug 13 12:51:51 1997
@@ -221,6 +221,9 @@
  */
 #define PCI_VENDOR_ID_COMPAQ		0x0e11
 #define PCI_DEVICE_ID_COMPAQ_1280	0x3033
+#define PCI_DEVICE_ID_COMPAQ_NETELL100	0xae32
+#define PCI_DEVICE_ID_COMPAQ_NETELL10	0xae34
+#define PCI_DEVICE_ID_COMPAQ_NETFLEX3	0xae35
 #define PCI_DEVICE_ID_COMPAQ_THUNDER	0xf130
 
 #define PCI_VENDOR_ID_NCR		0x1000
@@ -247,6 +250,7 @@
 #define PCI_DEVICE_ID_VLSI_82C593	0x0006
 #define PCI_DEVICE_ID_VLSI_82C594	0x0007
 #define PCI_DEVICE_ID_VLSI_82C597	0x0009
+#define PCI_DEVICE_ID_VLSI_VAS96011	0x0702
 
 #define PCI_VENDOR_ID_ADL		0x1005
 #define PCI_DEVICE_ID_ADL_2301		0x2301
@@ -283,13 +287,17 @@
 #define PCI_DEVICE_ID_CIRRUS_5434_8	0x00a8
 #define PCI_DEVICE_ID_CIRRUS_5436	0x00ac
 #define PCI_DEVICE_ID_CIRRUS_5446	0x00b8
+#define PCI_DEVICE_ID_CIRRUS_5480	0x00bc
 #define PCI_DEVICE_ID_CIRRUS_5464	0x00d4
+#define PCI_DEVICE_ID_CIRRUS_5465	0x00d6
 #define PCI_DEVICE_ID_CIRRUS_6729	0x1100
+#define PCI_DEVICE_ID_CIRRUS_6832	0x1110
 #define PCI_DEVICE_ID_CIRRUS_7542	0x1200
 #define PCI_DEVICE_ID_CIRRUS_7543	0x1202
 #define PCI_DEVICE_ID_CIRRUS_7541	0x1204
 
 #define PCI_VENDOR_ID_IBM		0x1014
+#define PCI_DEVICE_ID_IBM_FIRE_CORAL	0x000a
 #define PCI_DEVICE_ID_IBM_82G2675	0x001d
 #define PCI_DEVICE_ID_IBM_82351		0x0022
 
@@ -312,6 +320,7 @@
 #define PCI_DEVICE_ID_MATROX_MGA_2	0x0518
 #define PCI_DEVICE_ID_MATROX_MIL	0x0519
 #define PCI_DEVICE_ID_MATROX_MYS	0x051A
+#define PCI_DEVICE_ID_MATROX_MIL_2	0x051b
 #define PCI_DEVICE_ID_MATROX_MGA_IMP	0x0d10
 
 #define PCI_VENDOR_ID_CT		0x102c
@@ -334,6 +343,7 @@
 #define PCI_DEVICE_ID_SI_501		0x0406
 #define PCI_DEVICE_ID_SI_496		0x0496
 #define PCI_DEVICE_ID_SI_601		0x0601
+#define PCI_DEVICE_ID_SI_5107		0x5107
 #define PCI_DEVICE_ID_SI_5511		0x5511
 #define PCI_DEVICE_ID_SI_5513		0x5513
 #define PCI_DEVICE_ID_SI_5571		0x5571
@@ -366,6 +376,10 @@
 #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER    0x1040
 #define PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT     0x8130
 
+#define PCI_VENDOR_ID_TI		0x104c
+#define PCI_DEVICE_ID_TI_PCI1130	0xac12
+#define PCI_DEVICE_ID_TI_PCI1131	0xac15
+
 #define PCI_VENDOR_ID_OAK		0x104e
 #define PCI_DEVICE_ID_OAK_OTI107	0x0107
 
@@ -381,6 +395,11 @@
 #define PCI_VENDOR_ID_PROMISE		0x105a
 #define PCI_DEVICE_ID_PROMISE_5300	0x5300
 
+#define PCI_VENDOR_ID_APPLE		0x106b
+#define PCI_DEVICE_ID_APPLE_BANDIT	0x0001
+#define PCI_DEVICE_ID_APPLE_GC		0x0002
+#define PCI_DEVICE_ID_APPLE_HYDRA	0x000e
+
 #define PCI_VENDOR_ID_N9		0x105d
 #define PCI_DEVICE_ID_N9_I128		0x2309
 #define PCI_DEVICE_ID_N9_I128_2		0x2339
@@ -415,10 +434,18 @@
 #define PCI_VENDOR_ID_FOREX		0x1083
 
 #define PCI_VENDOR_ID_OLICOM		0x108d
+#define PCI_DEVICE_ID_OLICOM_OC3136	0x0001
+#define PCI_DEVICE_ID_OLICOM_OC2315	0x0011
+#define PCI_DEVICE_ID_OLICOM_OC2325	0x0012
+#define PCI_DEVICE_ID_OLICOM_OC2183	0x0013
+#define PCI_DEVICE_ID_OLICOM_OC2326	0x0014
+#define PCI_DEVICE_ID_OLICOM_OC6151	0x0021
 
 #define PCI_VENDOR_ID_CMD		0x1095
 #define PCI_DEVICE_ID_CMD_640		0x0640
+#define PCI_DEVICE_ID_CMD_643		0x0643
 #define PCI_DEVICE_ID_CMD_646		0x0646
+#define PCI_DEVICE_ID_CMD_670		0x0670
 
 #define PCI_VENDOR_ID_VISION		0x1098
 #define PCI_DEVICE_ID_VISION_QD8500	0x0001
@@ -438,6 +465,9 @@
 #define PCI_DEVICE_ID_WINBOND_82C105	0x0105
 #define PCI_DEVICE_ID_WINBOND_83C553	0x0565
 
+#define PCI_VENDOR_ID_DATABOOK		0x10b3
+#define PCI_DEVICE_ID_DATABOOK_87144	0xb106
+
 #define PCI_VENDOR_ID_3COM		0x10b7
 #define PCI_DEVICE_ID_3COM_3C590	0x5900
 #define PCI_DEVICE_ID_3COM_3C595TX	0x5950
@@ -447,6 +477,8 @@
 #define PCI_DEVICE_ID_3COM_3C900COMBO	0x9001
 #define PCI_DEVICE_ID_3COM_3C905TX	0x9050
 
+#define PCI_VENDOR_ID_SMC		0x10b8
+
 #define PCI_VENDOR_ID_AL		0x10b9
 #define PCI_DEVICE_ID_AL_M1445		0x1445
 #define PCI_DEVICE_ID_AL_M1449		0x1449
@@ -457,8 +489,11 @@
 #define PCI_DEVICE_ID_AL_M1513		0x1513
 #define PCI_DEVICE_ID_AL_M4803		0x5215
 
+#define PCI_VENDOR_ID_MITSUBISHI	0x10ba
+
 #define PCI_VENDOR_ID_NEOMAGIC          0x10c8
 #define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2070 0x0001
+#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128V 0x0002
 
 #define PCI_VENDOR_ID_ASP		0x10cd
 #define PCI_DEVICE_ID_ASP_ABP940	0x1200
@@ -487,6 +522,10 @@
 
 #define PCI_VENDOR_ID_REALTEK		0x10ec
 #define PCI_DEVICE_ID_REALTEK_8029	0x8029
+#define PCI_DEVICE_ID_REALTEK_8129	0x8129
+
+#define PCI_VENDOR_ID_TRUEVISION	0x10fa
+#define PCI_DEVICE_ID_TRUEVISION_T1000	0x000c
 
 #define PCI_VENDOR_ID_INIT		0x1101
 #define PCI_DEVICE_ID_INIT_320P		0x9100
@@ -498,6 +537,7 @@
 #define PCI_DEVICE_ID_VIA_82C576	0x0576
 #define PCI_DEVICE_ID_VIA_82C585	0x0585
 #define PCI_DEVICE_ID_VIA_82C586	0x0586
+#define PCI_DEVICE_ID_VIA_82C926	0x0926
 #define PCI_DEVICE_ID_VIA_82C416	0x1571
 
 #define PCI_VENDOR_ID_VORTEX		0x1119
@@ -527,6 +567,9 @@
 #define PCI_VENDOR_ID_IMAGINGTECH	0x112f
 #define PCI_DEVICE_ID_IMAGINGTECH_ICPCI	0x0000
 
+#define PCI_VENDOR_ID_PHILIPS		0x1131
+#define PCI_DEVICE_ID_PHILIPS_SAA7146	0x7146
+
 #define PCI_VENDOR_ID_PLX		0x113c
 #define PCI_DEVICE_ID_PLX_9060		0x0001
 
@@ -543,21 +586,35 @@
 #define PCI_VENDOR_ID_MUTECH		0x1159
 #define PCI_DEVICE_ID_MUTECH_MV1000	0x0001
 
+#define PCI_VENDOR_ID_RENDITION		0x1163
+#define PCI_DEVICE_ID_RENDITION_VERITE	0x0001
+
 #define PCI_VENDOR_ID_TOSHIBA		0x1179
 #define PCI_DEVICE_ID_TOSHIBA_601	0x0601
 
+#define PCI_VENDOR_ID_RICOH		0x1180
+#define PCI_DEVICE_ID_RICOH_RL5C466	0x0466
+
 #define PCI_VENDOR_ID_ZEITNET		0x1193
 #define PCI_DEVICE_ID_ZEITNET_1221	0x0001
 #define PCI_DEVICE_ID_ZEITNET_1225	0x0002
 
 #define PCI_VENDOR_ID_OMEGA		0x119b
-#define PCI_DEVICE_ID_OMEGA_PCMCIA     	0x1221
+#define PCI_DEVICE_ID_OMEGA_82C092G	0x1221
+
+#define PCI_VENDOR_ID_NP		0x11bc
+#define PCI_DEVICE_ID_NP_PCI_FDDI	0x0001
 
 #define PCI_VENDOR_ID_SPECIALIX		0x11cb
 #define PCI_DEVICE_ID_SPECIALIX_XIO	0x4000
 #define PCI_DEVICE_ID_SPECIALIX_RIO	0x8000
 
+#define PCI_VENDOR_ID_IKON		0x11d5
+#define PCI_DEVICE_ID_IKON_10115	0x0115
+#define PCI_DEVICE_ID_IKON_10117	0x0117
+
 #define PCI_VENDOR_ID_ZORAN		0x11de
+#define PCI_DEVICE_ID_ZORAN_36057	0x6057
 #define PCI_DEVICE_ID_ZORAN_36120	0x6120
 
 #define PCI_VENDOR_ID_COMPEX		0x11f6
@@ -584,7 +641,7 @@
 #define PCI_VENDOR_ID_OPTIBASE		0x1255
 #define PCI_DEVICE_ID_OPTIBASE_FORGE	0x1110
 #define PCI_DEVICE_ID_OPTIBASE_FUSION	0x1210
-#define PCI_DEVICE_ID_OPTIBASE_VPLEX	0x2120
+#define PCI_DEVICE_ID_OPTIBASE_VPLEX	0x2110
 #define PCI_DEVICE_ID_OPTIBASE_VPLEXCC	0x2120
 #define PCI_DEVICE_ID_OPTIBASE_VQUEST	0x2130
 
@@ -596,6 +653,7 @@
 
 #define PCI_VENDOR_ID_3DLABS		0x3d3d
 #define PCI_DEVICE_ID_3DLABS_300SX	0x0001
+#define PCI_DEVICE_ID_3DLABS_500TX	0x0002
 #define PCI_DEVICE_ID_3DLABS_DELTA	0x0003
 #define PCI_DEVICE_ID_3DLABS_PERMEDIA	0x0004
 
@@ -616,6 +674,9 @@
 #define PCI_DEVICE_ID_S3_964_1		0x88d0
 #define PCI_DEVICE_ID_S3_964_2		0x88d1
 #define PCI_DEVICE_ID_S3_968		0x88f0
+#define PCI_DEVICE_ID_S3_TRIO64V2	0x8901
+#define PCI_DEVICE_ID_S3_PLATO_PXG	0x8902
+#define PCI_DEVICE_ID_S3_ViRGE_DXGX	0x8a01
 
 #define PCI_VENDOR_ID_INTEL		0x8086
 #define PCI_DEVICE_ID_INTEL_82375	0x0482
diff -u --recursive --new-file v2.1.49/linux/include/net/tcp.h linux/include/net/tcp.h
--- v2.1.49/linux/include/net/tcp.h	Mon Aug 11 14:47:05 1997
+++ linux/include/net/tcp.h	Thu Aug 14 14:49:15 1997
@@ -60,6 +60,22 @@
 	return (lport ^ (lport >> 7)) & (TCP_BHTABLE_SIZE - 1);
 }
 
+/* Find the next port that hashes h that is larger than lport.
+ * If you change the hash, change this function to match, or you will
+ * break TCP port selection. This function must also NOT wrap around
+ * when the next number exceeds the largest possible port (2^16-1).
+ */
+static __inline__ int tcp_bhashnext(__u16 short lport, __u16 h)
+{
+        __u32 s;	/* don't change this to a smaller type! */
+
+        s = (lport ^ (h ^ tcp_bhashfn(lport)));
+        if (s > lport)
+                return s;
+        s = lport + TCP_BHTABLE_SIZE;
+        return (s ^ (h ^ tcp_bhashfn(s)));
+}
+
 static __inline__ int tcp_sk_bhashfn(struct sock *sk)
 {
 	__u16 lport = sk->num;
diff -u --recursive --new-file v2.1.49/linux/kernel/fork.c linux/kernel/fork.c
--- v2.1.49/linux/kernel/fork.c	Thu Jul 17 10:06:09 1997
+++ linux/kernel/fork.c	Tue Aug 12 14:24:41 1997
@@ -266,6 +266,7 @@
 		init_new_context(mm);
 		mm->count = 1;
 		mm->def_flags = 0;
+		mm->mmap_sem = MUTEX;
 
 		/* It has not run yet, so cannot be present in anyone's
 		 * cache or tlb.
diff -u --recursive --new-file v2.1.49/linux/kernel/ksyms.c linux/kernel/ksyms.c
--- v2.1.49/linux/kernel/ksyms.c	Mon Aug  4 16:25:40 1997
+++ linux/kernel/ksyms.c	Wed Aug 13 10:05:03 1997
@@ -67,6 +67,7 @@
 #include <asm/irq.h>
 #ifdef __SMP__
 #include <linux/smp.h>
+#include <linux/smp_lock.h>
 #endif
 
 extern char *get_options(char *str, int *ints);
@@ -281,6 +282,7 @@
 /* Various random spinlocks we want to export */
 EXPORT_SYMBOL(tqueue_lock);
 EXPORT_SYMBOL(waitqueue_lock);
+EXPORT_SYMBOL(lk_lockmsg);
 #endif
 
 /* autoirq from  drivers/net/auto_irq.c */
diff -u --recursive --new-file v2.1.49/linux/mm/slab.c linux/mm/slab.c
--- v2.1.49/linux/mm/slab.c	Thu Jul 17 10:06:09 1997
+++ linux/mm/slab.c	Wed Aug 13 20:03:22 1997
@@ -1582,6 +1582,12 @@
 	} else
 		kmem_report_free_err("Bad obj addr", objp, cachep);
 	spin_unlock_irqrestore(&cachep->c_spinlock, save_flags);
+
+#if 1
+/* FORCE A KERNEL DUMP WHEN THIS HAPPENS. SPEAK IN ALL CAPS. GET THE CALL CHAIN. */
+*(int *) 0 = 0;
+#endif
+
 	return;
 null_addr:
 	kmem_report_free_err("NULL ptr", objp, cachep);
@@ -1624,7 +1630,7 @@
 		goto null_ptr;
 	nr = MAP_NR(objp);
 	if (nr >= max_mapnr)
-		goto null_ptr;
+		goto bad_ptr;
 
 	/* Assume we own the page structure - hence no locking.
 	 * If someone is misbehaving (eg. someone calling us with a bad
@@ -1647,8 +1653,15 @@
 			return;
 		}
 	}
-null_ptr:
+bad_ptr:
 	printk(KERN_ERR "kfree: Bad obj %p\n", objp);
+
+#if 1
+/* FORCE A KERNEL DUMP WHEN THIS HAPPENS. SPEAK IN ALL CAPS. GET THE CALL CHAIN. */
+*(int *) 0 = 0;
+#endif
+
+null_ptr:
 	return;
 }
 
diff -u --recursive --new-file v2.1.49/linux/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
--- v2.1.49/linux/net/ipv4/tcp_ipv4.c	Mon Aug  4 16:25:41 1997
+++ linux/net/ipv4/tcp_ipv4.c	Wed Aug 13 10:05:03 1997
@@ -158,49 +158,58 @@
 	int retval = 0, i, end, bc;
 
 	SOCKHASH_LOCK();
-	i = tcp_bhashfn(start);
-	end = i + TCP_BHTABLE_SIZE;
-	bc = binding_contour;
-	do {
-		struct sock *sk = tcp_bound_hash[tcp_bhashfn(i)];
-		if(!sk) {
-			retval = (start + i);
-			start  = (retval + 1);
+        i = tcp_bhashfn(start);
+        end = i + TCP_BHTABLE_SIZE;
+        bc = binding_contour;
+        do {
+                struct sock *sk = tcp_bound_hash[i&(TCP_BHTABLE_SIZE-1)];
+                if(!sk) {
+                        /* find the smallest value no smaller than start
+                         * that has this hash value.
+                         */
+                        retval = tcp_bhashnext(start-1,i&(TCP_BHTABLE_SIZE-1));
 
-			/* Check for decreasing load. */
-			if(bc != 0)
-				binding_contour = 0;
-			goto done;
-		} else {
-			int j = 0;
-			do { sk = sk->bind_next; } while(++j < size && sk);
-			if(j < size) {
-				best = (start + i);
-				size = j;
-				if(bc && size <= bc) {
-					start = best + 1;
-					goto verify;
-				}
-			}
-		}
-	} while(++i != end);
+                        /* Check for decreasing load. */
+                        if (bc != 0)
+                                binding_contour = 0;
+                        goto done;
+                } else {
+                        int j = 0;
+                        do { sk = sk->bind_next; } while (++j < size && sk);
+                        if (j < size) {
+                                best = i&(TCP_BHTABLE_SIZE-1);
+                                size = j;
+                                if (bc && size <= bc)
+                                        goto verify;
+                        }
+                }
+        } while(++i != end);
+        i = best;
 
-	/* Socket load is increasing, adjust our load average. */
-	binding_contour = size;
+        /* Socket load is increasing, adjust our load average. */
+        binding_contour = size;
 verify:
-	if(size < binding_contour)
-		binding_contour = size;
+        if (size < binding_contour)
+                binding_contour = size;
 
-	if(best > 32767)
-		best -= (32768 - PROT_SOCK);
+        retval = tcp_bhashnext(start-1,i);
 
-	while(tcp_lport_inuse(best))
-		best += TCP_BHTABLE_SIZE;
-	retval = best;
-done:
-	if(start > 32767)
-		start -= (32768 - PROT_SOCK);
+	best = retval;	/* mark the starting point to avoid infinite loops */
+        while(tcp_lport_inuse(retval)) {
+               	retval = tcp_bhashnext(retval,i);
+		if (retval > 32767)	/* Upper bound */
+			retval = tcp_bhashnext(PROT_SOCK,i);
+		if (retval == best) {
+			/* This hash chain is full. No answer. */
+			retval = 0;
+			break;
+		}
+        }
 
+done:
+        start = (retval + 1);
+        if (start > 32767 || start < PROT_SOCK)
+                start = PROT_SOCK;
 	SOCKHASH_UNLOCK();
 
 	return retval;
