diff -u --recursive --new-file v1.3.23/linux/Makefile linux/Makefile
--- v1.3.23/linux/Makefile	Sun Sep  3 16:12:48 1995
+++ linux/Makefile	Mon Sep  4 14:59:53 1995
@@ -1,6 +1,6 @@
 VERSION = 1
 PATCHLEVEL = 3
-SUBLEVEL = 23
+SUBLEVEL = 24
 
 ARCH = i386
 
diff -u --recursive --new-file v1.3.23/linux/arch/alpha/kernel/ptrace.c linux/arch/alpha/kernel/ptrace.c
--- v1.3.23/linux/arch/alpha/kernel/ptrace.c	Sun Sep  3 12:26:49 1995
+++ linux/arch/alpha/kernel/ptrace.c	Mon Sep  4 13:40:47 1995
@@ -160,7 +160,8 @@
  * and that it is in the task area before calling this: this routine does
  * no checking.
  */
-static unsigned long get_long(struct vm_area_struct * vma, unsigned long addr)
+static unsigned long get_long(struct task_struct * tsk,
+	struct vm_area_struct * vma, unsigned long addr)
 {
 	pgd_t * pgdir;
 	pmd_t * pgmiddle;
@@ -169,9 +170,9 @@
 
 	DBG(DBG_MEM_ALL, ("getting long at 0x%lx\n", addr));
 repeat:
-	pgdir = pgd_offset(vma->vm_task, addr);
+	pgdir = pgd_offset(vma->vm_mm, addr);
 	if (pgd_none(*pgdir)) {
-		do_no_page(vma, addr, 0);
+		do_no_page(tsk, vma, addr, 0);
 		goto repeat;
 	}
 	if (pgd_bad(*pgdir)) {
@@ -181,7 +182,7 @@
 	}
 	pgmiddle = pmd_offset(pgdir, addr);
 	if (pmd_none(*pgmiddle)) {
-		do_no_page(vma, addr, 0);
+		do_no_page(tsk, vma, addr, 0);
 		goto repeat;
 	}
 	if (pmd_bad(*pgmiddle)) {
@@ -191,7 +192,7 @@
 	}
 	pgtable = pte_offset(pgmiddle, addr);
 	if (!pte_present(*pgtable)) {
-		do_no_page(vma, addr, 0);
+		do_no_page(tsk, vma, addr, 0);
 		goto repeat;
 	}
 	page = pte_page(*pgtable);
@@ -211,8 +212,8 @@
  * Now keeps R/W state of page so that a text page stays readonly
  * even if a debugger scribbles breakpoints into it.  -M.U-
  */
-static void put_long(struct vm_area_struct * vma, unsigned long addr,
-		     unsigned long data)
+static void put_long(struct task_struct * tsk, struct vm_area_struct * vma,
+	unsigned long addr, unsigned long data)
 {
 	pgd_t *pgdir;
 	pmd_t *pgmiddle;
@@ -220,9 +221,9 @@
 	unsigned long page;
 
 repeat:
-	pgdir = pgd_offset(vma->vm_task, addr);
+	pgdir = pgd_offset(vma->vm_mm, addr);
 	if (!pgd_present(*pgdir)) {
-		do_no_page(vma, addr, 1);
+		do_no_page(tsk, vma, addr, 1);
 		goto repeat;
 	}
 	if (pgd_bad(*pgdir)) {
@@ -232,7 +233,7 @@
 	}
 	pgmiddle = pmd_offset(pgdir, addr);
 	if (pmd_none(*pgmiddle)) {
-		do_no_page(vma, addr, 1);
+		do_no_page(tsk, vma, addr, 1);
 		goto repeat;
 	}
 	if (pmd_bad(*pgmiddle)) {
@@ -242,12 +243,12 @@
 	}
 	pgtable = pte_offset(pgmiddle, addr);
 	if (!pte_present(*pgtable)) {
-		do_no_page(vma, addr, 1);
+		do_no_page(tsk, vma, addr, 1);
 		goto repeat;
 	}
 	page = pte_page(*pgtable);
 	if (!pte_write(*pgtable)) {
-		do_wp_page(vma, addr, 1);
+		do_wp_page(tsk, vma, addr, 1);
 		goto repeat;
 	}
 /* this is a hack for non-kernel-mapped video buffers and similar */
@@ -304,17 +305,17 @@
 		}
 		align = addr & (sizeof(long) - 1);
 		addr -= align;
-		low = get_long(vma, addr);
+		low = get_long(tsk, vma, addr);
 		if (align) {
 		    unsigned long high;
 
-		    high = get_long(vma_high, addr + sizeof(long));
+		    high = get_long(tsk, vma_high, addr + sizeof(long));
 		    low >>= align * 8;
 		    low  |= high << (64 - align * 8);
 		}
 		*result = low;
 	} else {
-	        long l = get_long(vma, addr);
+	        long l = get_long(tsk, vma, addr);
 
 		DBG(DBG_MEM_ALL, ("value is 0x%lx\n", l));
 		*result = l;
@@ -344,16 +345,16 @@
 		}
 		align = addr & (sizeof(long) - 1);
 		addr -= align;
-		low  = get_long(vma, addr);
-		high = get_long(vma_high, addr + sizeof(long));
+		low  = get_long(tsk, vma, addr);
+		high = get_long(tsk, vma_high, addr + sizeof(long));
 		low  &= ~0UL >> (64 - align * 8);
 		high &= ~0UL << (align * 8);
 		low  |= data << (align * 8);
 		high |= data >> (64 - align * 8);
-		put_long(vma, addr, low);
-		put_long(vma_high, addr + sizeof(long), high);
+		put_long(tsk, vma, addr, low);
+		put_long(tsk, vma_high, addr + sizeof(long), high);
 	} else
-		put_long(vma, addr, data);
+		put_long(tsk, vma, addr, data);
 	return 0;
 }
 
diff -u --recursive --new-file v1.3.23/linux/arch/i386/config.in linux/arch/i386/config.in
--- v1.3.23/linux/arch/i386/config.in	Sun Sep  3 12:26:49 1995
+++ linux/arch/i386/config.in	Tue Sep  5 10:25:36 1995
@@ -6,7 +6,7 @@
 comment 'General setup'
 
 bool 'Kernel math emulation' CONFIG_MATH_EMULATION n
-bool 'Normal floppy disk support' CONFIG_BLK_DEV_FD y
+tristate 'Normal floppy disk support' CONFIG_BLK_DEV_FD y
 bool 'Normal (MFM/RLL) disk and IDE disk/cdrom support' CONFIG_ST506 y
 if [ "$CONFIG_ST506" = "y" ]; then
   comment 'Please see drivers/block/README.ide for help/info on IDE drives'
@@ -32,7 +32,7 @@
   fi
 fi
 bool 'System V IPC' CONFIG_SYSVIPC y
-bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF y
+tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF y
 if [ "$CONFIG_BINFMT_ELF" = "y" ]; then
 bool 'Compile kernel as ELF - if your GCC is ELF-GCC' CONFIG_KERNEL_ELF n
 fi
@@ -52,7 +52,7 @@
 bool 'IP: multicasting' CONFIG_IP_MULTICAST n
 bool 'IP: firewalling' CONFIG_IP_FIREWALL n
 bool 'IP: accounting' CONFIG_IP_ACCT n
-bool 'IP: tunneling' CONFIG_NET_IPIP n
+tristate 'IP: tunneling' CONFIG_NET_IPIP n
 if [ "$CONFIG_IP_FORWARD" = "y" -a "$CONFIG_IP_FIREWALL" = "y" ]; then
   bool 'IP: firewall packet logging' CONFIG_IP_FIREWALL_VERBOSE y
   bool 'IP: masquerading (ALPHA)' CONFIG_IP_MASQUERADE n
@@ -62,7 +62,7 @@
 fi
 comment '(it is safe to leave these untouched)'
 bool 'IP: PC/TCP compatibility mode' CONFIG_INET_PCTCP n
-bool 'IP: Reverse ARP' CONFIG_INET_RARP n
+tristate 'IP: Reverse ARP' CONFIG_INET_RARP n
 bool 'IP: Assume subnets are local' CONFIG_INET_SNARL y
 bool 'IP: Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF n
 bool 'IP: Drop source routed frames' CONFIG_IP_NOSR y
@@ -88,10 +88,10 @@
 
 comment 'SCSI support type (disk, tape, CDrom)'
 
-bool 'SCSI disk support' CONFIG_BLK_DEV_SD y
-bool 'SCSI tape support' CONFIG_CHR_DEV_ST n
-bool 'SCSI CDROM support' CONFIG_BLK_DEV_SR y
-bool 'SCSI generic support' CONFIG_CHR_DEV_SG n
+tristate 'SCSI disk support' CONFIG_BLK_DEV_SD y
+tristate 'SCSI tape support' CONFIG_CHR_DEV_ST n
+tristate 'SCSI CDROM support' CONFIG_BLK_DEV_SR y
+tristate 'SCSI generic support' CONFIG_CHR_DEV_SG n
 
 comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
 
@@ -99,28 +99,28 @@
 
 comment 'SCSI low-level drivers'
 
-bool 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X y
-bool 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 n
-bool 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 n
-bool 'Adaptec AHA274X/284X/294X support' CONFIG_SCSI_AIC7XXX n
-bool 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC n
-bool 'EATA-DMA (DPT, NEC, ATT, Olivetti) support' CONFIG_SCSI_EATA_DMA n
-bool 'EATA-PIO (old DPT PM2001, PM2012A) support' CONFIG_SCSI_EATA_PIO n
-bool 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F n
-bool 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN n
+tristate 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X y
+tristate 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 n
+tristate 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 n
+tristate 'Adaptec AHA274X/284X/294X support' CONFIG_SCSI_AIC7XXX n
+tristate 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC n
+tristate 'EATA-DMA (DPT, NEC, ATT, Olivetti) support' CONFIG_SCSI_EATA_DMA n
+tristate 'EATA-PIO (old DPT PM2001, PM2012A) support' CONFIG_SCSI_EATA_PIO n
+tristate 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F n
+tristate 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN n
 bool 'Generic NCR5380 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 n
 if [ "$CONFIG_PCI" = "y" ]; then
-  bool 'NCR53c7,8xx SCSI support'  CONFIG_SCSI_NCR53C7xx n
+  tristate 'NCR53c7,8xx SCSI support'  CONFIG_SCSI_NCR53C7xx n
 fi
-bool 'Always IN2000 SCSI support (test release)' CONFIG_SCSI_IN2000 n
+tristate 'Always IN2000 SCSI support (test release)' CONFIG_SCSI_IN2000 n
 bool 'PAS16 SCSI support' CONFIG_SCSI_PAS16 n
-bool 'QLOGIC SCSI support' CONFIG_SCSI_QLOGIC n
-bool 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE n
+tristate 'QLOGIC SCSI support' CONFIG_SCSI_QLOGIC n
+tristate 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE n
 bool 'Trantor T128/T128F/T228 SCSI support' CONFIG_SCSI_T128 n
-bool 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR n
-bool '7000FASST SCSI support' CONFIG_SCSI_7000FASST n
-bool 'EATA ISA/EISA (DPT PM2011/021/012/022/122/322) support' CONFIG_SCSI_EATA n
-#bool 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG n
+tristate 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR n
+tristate '7000FASST SCSI support' CONFIG_SCSI_7000FASST n
+tristate 'EATA ISA/EISA (DPT PM2011/021/012/022/122/322) support' CONFIG_SCSI_EATA n
+#tristate 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG n
 fi
 
 
@@ -134,13 +134,13 @@
 comment 'Skipping network driver configuration options...'
 
 else
-bool 'Dummy net driver support' CONFIG_DUMMY y
-bool 'SLIP (serial line) support' CONFIG_SLIP n
-if [ "$CONFIG_SLIP" = "y" ]; then
+tristate 'Dummy net driver support' CONFIG_DUMMY y
+tristate 'SLIP (serial line) support' CONFIG_SLIP n
+if [ "$CONFIG_SLIP" != "n" ]; then
   bool ' CSLIP compressed headers' CONFIG_SLIP_COMPRESSED y
 fi
-bool 'PPP (point-to-point) support' CONFIG_PPP n
-if [ "$CONFIG_PPP" = "y" ]; then
+tristate 'PPP (point-to-point) support' CONFIG_PPP n
+if [ "$CONFIG_PPP" != "n" ]; then
   bool ' 16 channels instead of 4' CONFIG_PPP_LOTS n
 fi
 if [ "$CONFIG_AX25" = "y" ]; then
@@ -148,57 +148,57 @@
 else
 	bool 'Z8530 SCC kiss emulation driver for AX.25' CONFIG_SCC n
 fi
-bool 'PLIP (parallel port) support' CONFIG_PLIP n
-bool 'EQL (serial line load balancing) support' CONFIG_EQUALIZER n
+tristate 'PLIP (parallel port) support' CONFIG_PLIP n
+tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER n
 bool 'Do you want to be offered ALPHA test drivers' CONFIG_NET_ALPHA n
 bool 'Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC n
 if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then
-	bool 'WD80*3 support' CONFIG_WD80x3 n
-	bool 'SMC Ultra support' CONFIG_ULTRA n
+	tristate 'WD80*3 support' CONFIG_WD80x3 n
+	tristate 'SMC Ultra support' CONFIG_ULTRA n
 fi
 bool 'AMD LANCE and PCnet (AT1500 and NE2100) support' CONFIG_LANCE n
 bool '3COM cards' CONFIG_NET_VENDOR_3COM y
 if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then
-	bool '3c501 support' CONFIG_EL1 n
-	bool '3c503 support' CONFIG_EL2 n
+	tristate '3c501 support' CONFIG_EL1 n
+	tristate '3c503 support' CONFIG_EL2 n
 	if [ "$CONFIG_NET_ALPHA" = "y" ]; then
-		bool '3c505 support' CONFIG_ELPLUS n
-		bool '3c507 support' CONFIG_EL16 n
+		tristate '3c505 support' CONFIG_ELPLUS n
+		tristate '3c507 support' CONFIG_EL16 n
 	fi
-	bool '3c509/3c579 support' CONFIG_EL3 y
+	tristate '3c509/3c579 support' CONFIG_EL3 y
 fi
 bool 'Other ISA cards' CONFIG_NET_ISA n
 if [ "$CONFIG_NET_ISA" = "y" ]; then
-	bool 'Arcnet support' CONFIG_ARCNET n
-	bool 'Cabletron E21xx support' CONFIG_E2100 n
-	bool 'DEPCA support' CONFIG_DEPCA n
-	bool 'EtherWorks 3 support' CONFIG_EWRK3 n
+	tristate 'Arcnet support' CONFIG_ARCNET n
+	tristate 'Cabletron E21xx support' CONFIG_E2100 n
+	tristate 'DEPCA support' CONFIG_DEPCA n
+	tristate 'EtherWorks 3 support' CONFIG_EWRK3 n
 	if [ "$CONFIG_NET_ALPHA" = "y" ]; then
 		bool 'SEEQ8005 support' CONFIG_SEEQ8005 n
-		bool 'AT1700 support' CONFIG_AT1700 n
-		bool 'EtherExpressPro support' CONFIG_EEXPRESS_PRO n
-		bool 'EtherExpress support' CONFIG_EEXPRESS n
+		tristate 'AT1700 support' CONFIG_AT1700 n
+		tristate 'EtherExpressPro support' CONFIG_EEXPRESS_PRO n
+		tristate 'EtherExpress support' CONFIG_EEXPRESS n
 		bool 'NI5210 support' CONFIG_NI52 n
 		bool 'NI6510 support' CONFIG_NI65 n
 		if [ "$CONFIG_AX25" = "y" ]; then
 			bool 'Ottawa PI and PI/2 support' CONFIG_PI y
 		fi
-		bool 'WaveLAN support' CONFIG_WAVELAN n
+		tristate 'WaveLAN support' CONFIG_WAVELAN n
 	fi
-	bool 'HP PCLAN+ (27247B and 27252A) support' CONFIG_HPLAN_PLUS n
-	bool 'HP PCLAN (27245 and other 27xxx series) support' CONFIG_HPLAN n
-	bool 'HP 10/100VG PCLAN (ISA, EISA, PCI) support' CONFIG_HP100 y
-	bool 'NE2000/NE1000 support' CONFIG_NE2000 y
+	tristate 'HP PCLAN+ (27247B and 27252A) support' CONFIG_HPLAN_PLUS n
+	tristate 'HP PCLAN (27245 and other 27xxx series) support' CONFIG_HPLAN n
+	tristate 'HP 10/100VG PCLAN (ISA, EISA, PCI) support' CONFIG_HP100 y
+	tristate 'NE2000/NE1000 support' CONFIG_NE2000 y
 	bool 'SK_G16 support' CONFIG_SK_G16 n
 fi
 bool 'EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA n
 if [ "$CONFIG_NET_EISA" = "y" ]; then
 	if [ "$CONFIG_NET_ALPHA" = "y" ]; then
-		bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
+		tristate 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
 	fi
-	bool 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
-	bool 'DE425, DE434, DE435, DE500 support' CONFIG_DE4X5 n
-#	bool 'DEC 21040 PCI support' CONFIG_DEC_ELCP n
+	tristate 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
+	tristate 'DE425, DE434, DE435, DE500 support' CONFIG_DE4X5 n
+#	tristate 'DEC 21040 PCI support' CONFIG_DEC_ELCP n
 #	bool 'LPL T100V 100Mbs support' CONFIG_LPL_T100 n
 #	bool 'PCnet32 (32 bit VLB and PCI LANCE) support' CONFIG_PCNET32 n
 	bool 'Zenith Z-Note support' CONFIG_ZNET y
@@ -206,26 +206,26 @@
 bool 'Pocket and portable adaptors' CONFIG_NET_POCKET n
 if [ "$CONFIG_NET_POCKET" = "y" ]; then
 	bool 'AT-LAN-TEC/RealTek pocket adaptor support' CONFIG_ATP n
-	bool 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n
-	bool 'D-Link DE620 pocket adaptor support' CONFIG_DE620 n
+	tristate 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n
+	tristate 'D-Link DE620 pocket adaptor support' CONFIG_DE620 n
 #	bool 'Silicom pocket adaptor support' CONFIG_SILICOM_PEA n
 #	bool 'WaveLAN PCMCIA support' CONFIG_WaveLAN n
 #	bool '3 Com 3c589 PCMCIA support' CONFIG_3C589 n
 fi
 bool 'Token Ring driver support' CONFIG_TR n
 if [ "$CONFIG_TR" = "y" ]; then
-	bool 'IBM Tropic chipset based adaptor support' CONFIG_IBMTR y
+	tristate 'IBM Tropic chipset based adaptor support' CONFIG_IBMTR y
 fi
 fi
 fi
 
 comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
 
-bool 'Sony CDU31A/CDU33A CDROM support' CONFIG_CDU31A n
-bool 'Standard Mitsumi [no XA/Multisession] CDROM support' CONFIG_MCD n
-bool 'Experimental Mitsumi [XA/MultiSession] support' CONFIG_MCDX n
-bool 'Matsushita/Panasonic CDROM support' CONFIG_SBPCD n
-if [ "$CONFIG_SBPCD" = "y" ]; then
+tristate 'Sony CDU31A/CDU33A CDROM support' CONFIG_CDU31A n
+tristate 'Standard Mitsumi [no XA/Multisession] CDROM support' CONFIG_MCD n
+tristate 'Experimental Mitsumi [XA/MultiSession] support' CONFIG_MCDX n
+tristate 'Matsushita/Panasonic CDROM support' CONFIG_SBPCD n
+if [ "$CONFIG_SBPCD" != "n" ]; then
   bool 'Matsushita/Panasonic second CDROM controller support' CONFIG_SBPCD2 n
   if [ "$CONFIG_SBPCD2" = "y" ]; then
     bool 'Matsushita/Panasonic third CDROM controller support' CONFIG_SBPCD3 n
@@ -234,44 +234,40 @@
     fi
   fi
 fi
-bool 'Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support' CONFIG_AZTCD n
-bool 'Sony CDU535 CDROM support' CONFIG_CDU535 n
-bool 'Goldstar R420 CDROM support' CONFIG_GSCD n
-bool 'Philips/LMS CM206 CDROM support' CONFIG_CM206 n
-bool 'Experimental Optics Storage DOLPHIN 8000AT CDROM support' CONFIG_OPTCD n
+tristate 'Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support' CONFIG_AZTCD n
+tristate 'Sony CDU535 CDROM support' CONFIG_CDU535 n
+tristate 'Goldstar R420 CDROM support' CONFIG_GSCD n
+tristate 'Philips/LMS CM206 CDROM support' CONFIG_CM206 n
+tristate 'Experimental Optics Storage DOLPHIN 8000AT CDROM support' CONFIG_OPTCD n
 bool 'Experimental Sanyo H94A CDROM support' CONFIG_SJCD n
 
 comment 'Filesystems'
 
-bool 'Standard (minix) fs support' CONFIG_MINIX_FS y
+tristate 'Standard (minix) fs support' CONFIG_MINIX_FS y
 bool 'Extended fs support' CONFIG_EXT_FS n
 bool 'Second extended fs support' CONFIG_EXT2_FS y
-bool 'xiafs filesystem support' CONFIG_XIA_FS n
-bool 'msdos fs support' CONFIG_MSDOS_FS y
-if [ "$CONFIG_MSDOS_FS" = "y" ]; then
-bool 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n
+tristate 'xiafs filesystem support' CONFIG_XIA_FS n
+tristate 'msdos fs support' CONFIG_MSDOS_FS y
+if [ "$CONFIG_MSDOS_FS" != "n" ]; then
+  tristate 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n
 fi
 bool '/proc filesystem support' CONFIG_PROC_FS y
 if [ "$CONFIG_INET" = "y" ]; then
-bool 'NFS filesystem support' CONFIG_NFS_FS y
+  tristate 'NFS filesystem support' CONFIG_NFS_FS y
 fi
-if [ "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_BLK_DEV_IDECD" = "y" -o "$CONFIG_CDU31A" = "y" -o "$CONFIG_MCDX" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_AZTCD" = "y" -o "$CONFIG_CDU535" = "y" -o "$CONFIG_GSCD" = "y" -o "$CONFIG_CM206" = "y" -o "$CONFIG_OPTCD" = "y" -o "$CONFIG_SJCD" = "y" ]; then
-	bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS y
-else
-	bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS n
-fi
-bool 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS n
-bool 'System V and Coherent filesystem support' CONFIG_SYSV_FS n
-bool 'SMB filesystem (to mount WfW shares etc..) support' CONFIG_SMB_FS n
+tristate 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS y
+tristate 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS n
+tristate 'System V and Coherent filesystem support' CONFIG_SYSV_FS n
+tristate 'SMB filesystem (to mount WfW shares etc..) support' CONFIG_SMB_FS n
 
 comment 'character devices'
 
 bool 'Cyclades async mux support' CONFIG_CYCLADES n
-bool 'Parallel printer support' CONFIG_PRINTER n
+tristate 'Parallel printer support' CONFIG_PRINTER n
 bool 'Logitech busmouse support' CONFIG_BUSMOUSE n
 bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE n
 if [ "$CONFIG_PSMOUSE" = "y" ]; then
-bool 'C&T 82C710 mouse port support (as on TI Travelmate)' CONFIG_82C710_MOUSE y
+  bool 'C&T 82C710 mouse port support (as on TI Travelmate)' CONFIG_82C710_MOUSE y
 fi
 bool 'Microsoft busmouse support' CONFIG_MS_BUSMOUSE n
 bool 'ATIXL busmouse support' CONFIG_ATIXL_BUSMOUSE n
@@ -279,7 +275,7 @@
 
 bool 'QIC-02 tape support' CONFIG_QIC02_TAPE n
 if [ "$CONFIG_QIC02_TAPE" = "y" ]; then
-bool 'Do you want runtime configuration for QIC-02' CONFIG_QIC02_DYNCONF y
+  bool 'Do you want runtime configuration for QIC-02' CONFIG_QIC02_DYNCONF y
 if [ "$CONFIG_QIC02_DYNCONF" != "y" ]; then
 
 comment '>>> Edit configuration parameters in ./include/linux/tpqic02.h!'
@@ -294,7 +290,7 @@
 
 bool 'QIC-117 tape support' CONFIG_FTAPE n
 if [ "$CONFIG_FTAPE" = "y" ]; then
-int ' number of ftape buffers' NR_FTAPE_BUFFERS 3
+  int ' number of ftape buffers' NR_FTAPE_BUFFERS 3
 fi
 
 comment 'Sound'
@@ -304,7 +300,7 @@
 comment 'Kernel hacking'
 
 #bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n
-bool 'Kernel profiling support' CONFIG_PROFILE y
+bool 'Kernel profiling support' CONFIG_PROFILE n
 if [ "$CONFIG_PROFILE" = "y" ]; then
   int ' Profile shift count' CONFIG_PROFILE_SHIFT 2
 fi
diff -u --recursive --new-file v1.3.23/linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
--- v1.3.23/linux/arch/i386/kernel/ptrace.c	Sun Sep  3 12:26:49 1995
+++ linux/arch/i386/kernel/ptrace.c	Mon Sep  4 13:35:16 1995
@@ -83,7 +83,8 @@
  * and that it is in the task area before calling this: this routine does
  * no checking.
  */
-static unsigned long get_long(struct vm_area_struct * vma, unsigned long addr)
+static unsigned long get_long(struct task_struct * tsk, 
+	struct vm_area_struct * vma, unsigned long addr)
 {
 	pgd_t * pgdir;
 	pmd_t * pgmiddle;
@@ -91,9 +92,9 @@
 	unsigned long page;
 
 repeat:
-	pgdir = pgd_offset(vma->vm_task, addr);
+	pgdir = pgd_offset(vma->vm_mm, addr);
 	if (pgd_none(*pgdir)) {
-		do_no_page(vma, addr, 0);
+		do_no_page(tsk, vma, addr, 0);
 		goto repeat;
 	}
 	if (pgd_bad(*pgdir)) {
@@ -103,7 +104,7 @@
 	}
 	pgmiddle = pmd_offset(pgdir, addr);
 	if (pmd_none(*pgmiddle)) {
-		do_no_page(vma, addr, 0);
+		do_no_page(tsk, vma, addr, 0);
 		goto repeat;
 	}
 	if (pmd_bad(*pgmiddle)) {
@@ -113,7 +114,7 @@
 	}
 	pgtable = pte_offset(pgmiddle, addr);
 	if (!pte_present(*pgtable)) {
-		do_no_page(vma, addr, 0);
+		do_no_page(tsk, vma, addr, 0);
 		goto repeat;
 	}
 	page = pte_page(*pgtable);
@@ -133,7 +134,7 @@
  * Now keeps R/W state of page so that a text page stays readonly
  * even if a debugger scribbles breakpoints into it.  -M.U-
  */
-static void put_long(struct vm_area_struct * vma, unsigned long addr,
+static void put_long(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long addr,
 	unsigned long data)
 {
 	pgd_t *pgdir;
@@ -142,9 +143,9 @@
 	unsigned long page;
 
 repeat:
-	pgdir = pgd_offset(vma->vm_task, addr);
+	pgdir = pgd_offset(vma->vm_mm, addr);
 	if (!pgd_present(*pgdir)) {
-		do_no_page(vma, addr, 1);
+		do_no_page(tsk, vma, addr, 1);
 		goto repeat;
 	}
 	if (pgd_bad(*pgdir)) {
@@ -154,7 +155,7 @@
 	}
 	pgmiddle = pmd_offset(pgdir, addr);
 	if (pmd_none(*pgmiddle)) {
-		do_no_page(vma, addr, 1);
+		do_no_page(tsk, vma, addr, 1);
 		goto repeat;
 	}
 	if (pmd_bad(*pgmiddle)) {
@@ -164,12 +165,12 @@
 	}
 	pgtable = pte_offset(pgmiddle, addr);
 	if (!pte_present(*pgtable)) {
-		do_no_page(vma, addr, 1);
+		do_no_page(tsk, vma, addr, 1);
 		goto repeat;
 	}
 	page = pte_page(*pgtable);
 	if (!pte_write(*pgtable)) {
-		do_wp_page(vma, addr, 1);
+		do_wp_page(tsk, vma, addr, 1);
 		goto repeat;
 	}
 /* this is a hack for non-kernel-mapped video buffers and similar */
@@ -220,8 +221,8 @@
 			if (!vma_high || vma_high->vm_start != vma->vm_end)
 				return -EIO;
 		}
-		low = get_long(vma, addr & ~(sizeof(long)-1));
-		high = get_long(vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1));
+		low = get_long(tsk, vma, addr & ~(sizeof(long)-1));
+		high = get_long(tsk, vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1));
 		switch (addr & (sizeof(long)-1)) {
 			case 1:
 				low >>= 8;
@@ -238,7 +239,7 @@
 		}
 		*result = low;
 	} else
-		*result = get_long(vma, addr);
+		*result = get_long(tsk, vma, addr);
 	return 0;
 }
 
@@ -262,8 +263,8 @@
 			if (!vma_high || vma_high->vm_start != vma->vm_end)
 				return -EIO;
 		}
-		low = get_long(vma, addr & ~(sizeof(long)-1));
-		high = get_long(vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1));
+		low = get_long(tsk, vma, addr & ~(sizeof(long)-1));
+		high = get_long(tsk, vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1));
 		switch (addr & (sizeof(long)-1)) {
 			case 0: /* shouldn't happen, but safety first */
 				low = data;
@@ -287,10 +288,10 @@
 				high |= data >> 8;
 				break;
 		}
-		put_long(vma, addr & ~(sizeof(long)-1),low);
-		put_long(vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1),high);
+		put_long(tsk, vma, addr & ~(sizeof(long)-1),low);
+		put_long(tsk, vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1),high);
 	} else
-		put_long(vma, addr, data);
+		put_long(tsk, vma, addr, data);
 	return 0;
 }
 
diff -u --recursive --new-file v1.3.23/linux/arch/i386/kernel/signal.c linux/arch/i386/kernel/signal.c
--- v1.3.23/linux/arch/i386/kernel/signal.c	Fri Jun 16 22:02:54 1995
+++ linux/arch/i386/kernel/signal.c	Mon Sep  4 13:52:30 1995
@@ -90,7 +90,7 @@
 #define __CODE ((unsigned long)(frame+24))
 #define CODE(x) ((unsigned long *) ((x)+__CODE))
 	frame = *fp;
-	if (regs->ss != USER_DS)
+	if (regs->ss != USER_DS && sa->sa_restorer)
 		frame = (unsigned long *) sa->sa_restorer;
 	frame -= 32;
 	if (verify_area(VERIFY_WRITE,frame,32*4))
diff -u --recursive --new-file v1.3.23/linux/arch/i386/kernel/sys_i386.c linux/arch/i386/kernel/sys_i386.c
--- v1.3.23/linux/arch/i386/kernel/sys_i386.c	Tue Jun 27 14:11:30 1995
+++ linux/arch/i386/kernel/sys_i386.c	Mon Sep  4 14:35:43 1995
@@ -59,10 +59,10 @@
 		if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
 			return -EBADF;
 	}
+	flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
 	return do_mmap(file, get_user(buffer), get_user(buffer+1),
 		       get_user(buffer+2), flags, get_user(buffer+5));
 }
-
 
 extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
 
diff -u --recursive --new-file v1.3.23/linux/arch/i386/kernel/vm86.c linux/arch/i386/kernel/vm86.c
--- v1.3.23/linux/arch/i386/kernel/vm86.c	Sun Sep  3 12:26:49 1995
+++ linux/arch/i386/kernel/vm86.c	Mon Sep  4 13:32:21 1995
@@ -74,7 +74,7 @@
 	pte_t *pte;
 	int i;
 
-	pgd = pgd_offset(tsk, 0xA0000);
+	pgd = pgd_offset(tsk->mm, 0xA0000);
 	if (pgd_none(*pgd))
 		return;
 	if (pgd_bad(*pgd)) {
diff -u --recursive --new-file v1.3.23/linux/arch/i386/mm/fault.c linux/arch/i386/mm/fault.c
--- v1.3.23/linux/arch/i386/mm/fault.c	Sun Sep  3 16:12:48 1995
+++ linux/arch/i386/mm/fault.c	Mon Sep  4 13:36:26 1995
@@ -92,10 +92,10 @@
 		if (regs->cs == KERNEL_CS)
 			printk("WP fault at %08x\n", regs->eip);
 #endif
-		do_wp_page(vma, address, error_code & 2);
+		do_wp_page(current, vma, address, error_code & 2);
 		return;
 	}
-	do_no_page(vma, address, error_code & 2);
+	do_no_page(current, vma, address, error_code & 2);
 	return;
 
 /*
diff -u --recursive --new-file v1.3.23/linux/arch/mips/kernel/ptrace.c linux/arch/mips/kernel/ptrace.c
--- v1.3.23/linux/arch/mips/kernel/ptrace.c	Sun Sep  3 12:26:49 1995
+++ linux/arch/mips/kernel/ptrace.c	Mon Sep  4 11:27:21 1995
@@ -89,7 +89,7 @@
 	unsigned long page;
 
 repeat:
-	pgdir = PAGE_DIR_OFFSET(vma->vm_task, addr);
+	pgdir = PAGE_DIR_OFFSET(vma->vm_mm, addr);
 	if (pgd_none(*pgdir)) {
 		do_no_page(vma, addr, 0);
 		goto repeat;
@@ -129,7 +129,7 @@
 	unsigned long page;
 
 repeat:
-	pgdir = PAGE_DIR_OFFSET(vma->vm_task, addr);
+	pgdir = PAGE_DIR_OFFSET(vma->vm_mm, addr);
 	if (!pgd_present(*pgdir)) {
 		do_no_page(vma, addr, 1);
 		goto repeat;
diff -u --recursive --new-file v1.3.23/linux/drivers/block/Makefile linux/drivers/block/Makefile
--- v1.3.23/linux/drivers/block/Makefile	Mon Aug 28 14:52:18 1995
+++ linux/drivers/block/Makefile	Mon Sep  4 07:31:53 1995
@@ -20,101 +20,123 @@
 M_OBJS   :=
 MOD_LIST_NAME := BLOCK_MODULES
 
-ifdef CONFIG_BLK_DEV_FD
+ifeq ($(CONFIG_BLK_DEV_FD),y)
 L_OBJS += floppy.o
 else
-M_OBJS += floppy.o
+  ifeq ($(CONFIG_BLK_DEV_FD),m)
+  M_OBJS += floppy.o
+  endif
 endif
 
-ifdef CONFIG_AZTCD
+ifeq ($(CONFIG_AZTCD),y)
 L_OBJS += aztcd.o
 else
-M_OBJS += aztcd.o
+  ifeq ($(CONFIG_AZTCD),m)
+  M_OBJS += aztcd.o
+  endif
 endif #CONFIG_AZTCD
 
-ifdef CONFIG_CDU31A
+ifeq ($(CONFIG_CDU31A),y)
 L_OBJS += cdu31a.o
 else
-M_OBJS += cdu31a.o
+  ifeq ($(CONFIG_CDU31A),m)
+  M_OBJS += cdu31a.o
+  endif
 endif #CONFIG_CDU31A
 
-ifdef CONFIG_MCD
+ifeq ($(CONFIG_MCD),y)
 L_OBJS += mcd.o
 else
-M_OBJS += mcd.o
+  ifeq ($(CONFIG_MCD),m)
+  M_OBJS += mcd.o
+  endif
 endif #CONFIG_MCD
 
-ifdef CONFIG_MCDX
+ifeq ($(CONFIG_MCDX),y)
 L_OBJS += mcdx.o
 else
-M_OBJS += mcdx.o
+  ifeq ($(CONFIG_MCDX),m)
+  M_OBJS += mcdx.o
+  endif
 endif #CONFIG_MCDX
 
-ifdef CONFIG_SBPCD
+ifeq ($(CONFIG_SBPCD),y)
 L_OBJS += sbpcd.o
 else
-M_OBJS += sbpcd.o
+  ifeq ($(CONFIG_SBPCD),m)
+  M_OBJS += sbpcd.o
+  endif
 endif #CONFIG_SBPCD
 
-ifdef CONFIG_SBPCD2
+ifeq ($(CONFIG_SBPCD2),y)
 L_OBJS += sbpcd2.o
 endif #CONFIG_SBPCD2
 
-ifdef CONFIG_SBPCD3
+ifeq ($(CONFIG_SBPCD3),y)
 L_OBJS += sbpcd3.o
 endif #CONFIG_SBPCD3
 
-ifdef CONFIG_SBPCD4
+ifeq ($(CONFIG_SBPCD4),y)
 L_OBJS += sbpcd4.o
 endif #CONFIG_SBPCD4
 
-ifdef CONFIG_CDU535
+ifeq ($(CONFIG_CDU535),y)
 L_OBJS += sonycd535.o
 else
-M_OBJS += sonycd535.o
+  ifeq ($(CONFIG_CDU535),m)
+  M_OBJS += sonycd535.o
+  endif
 endif #CONFIG_CDU535
 
-ifdef CONFIG_GSCD
+ifeq ($(CONFIG_GSCD),y)
 L_OBJS += gscd.o
 else
-M_OBJS += gscd.o
+  ifeq ($(CONFIG_GSCD),m)
+  M_OBJS += gscd.o
+  endif
 endif #CONFIG_GSCD
 
-ifdef CONFIG_CM206
+ifeq ($(CONFIG_CM206),y)
 L_OBJS += cm206.o
 else
-M_OBJS += cm206.o
+  ifeq ($(CONFIG_CM206),m)
+  M_OBJS += cm206.o
+  endif
 endif #CONFIG_CM206
 
-ifdef CONFIG_OPTCD
+ifeq ($(CONFIG_OPTCD),y)
 L_OBJS += optcd.o
 else
-M_OBJS += optcd.o
+  ifeq ($(CONFIG_OPTCD),m)
+  M_OBJS += optcd.o
+  endif
 endif #CONFIG_OPTCD
 
-ifdef CONFIG_SJCD
+ifeq ($(CONFIG_SJCD),y)
 L_OBJS += sjcd.o
 #else
-#M_OBJS += sjcd.o
+#  ifeq ($(CONFIG_SJCD),m)
+#  M_OBJS += sjcd.o
+#  endif
 endif #CONFIG_SJCD
 
-ifdef CONFIG_BLK_DEV_HD
+ifeq ($(CONFIG_BLK_DEV_HD),y)
 L_OBJS += hd.o
 endif
 
-ifdef CONFIG_BLK_DEV_IDE
+ifeq ($(CONFIG_BLK_DEV_IDE),y)
 L_OBJS += ide.o
 endif
 
-ifdef CONFIG_BLK_DEV_TRITON
+ifeq ($(CONFIG_BLK_DEV_TRITON),y)
 L_OBJS += triton.o
 endif
 
-ifdef CONFIG_BLK_DEV_IDECD
+ifeq ($(CONFIG_BLK_DEV_IDECD),y)
 L_OBJS += ide-cd.o
 endif
 
-ifdef CONFIG_BLK_DEV_XD
+ifeq ($(CONFIG_BLK_DEV_XD),y)
 L_OBJS += xd.o
 endif
 
diff -u --recursive --new-file v1.3.23/linux/drivers/block/ide.c linux/drivers/block/ide.c
--- v1.3.23/linux/drivers/block/ide.c	Sun Sep  3 16:12:48 1995
+++ linux/drivers/block/ide.c	Tue Sep  5 09:02:52 1995
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/block/ide.c	Version 5.12  Sep 1, 1995
+ *  linux/drivers/block/ide.c	Version 5.13  Sep 4, 1995
  *
  *  Copyright (C) 1994, 1995  Linus Torvalds & authors (see below)
  */
@@ -37,6 +37,8 @@
  *	Petri Mattila	(ptjmatti@kruuna.helsinki.fi)	(EIDE stuff)
  *	Scott Snyder	(snyder@fnald0.fnal.gov)	(ATAPI IDE cd-rom)
  *
+ *  Maintained by Mark Lord (mlord@bnr.ca):  ide.c, ide.h, triton.c, hd.c, ..
+ *
  *  This was a rewrite of just about everything from hd.c, though some original
  *  code is still sprinkled about.  Think of it as a major evolution, with 
  *  inspiration from lots of linux users, esp.  hamish@zot.apana.org.au
@@ -136,6 +138,8 @@
  *			driver now forces "serialize" again for all cmd640 chips
  *			noticed REALLY_SLOW_IO had no effect, moved it to ide.c
  *			made do_drive_cmd() into public ide_do_drive_cmd()
+ *  Version 5.13	fixed typo ('B'), thanks to houston@boyd.geog.mcgill.ca
+ *			fixed ht6560b support
  *
  *  Driver compile-time options are in ide.h
  *
@@ -352,18 +356,18 @@
 
 void ide_hwif_select (ide_hwif_t *hwif)
 {
-	static ide_hwif_t *current_hwif = NULL;
+	static byte current_select = 0;
 
-	if (hwif != current_hwif) {
+	if (hwif->select != current_select) {
 		unsigned long flags;
 		save_flags (flags);
 		cli();
+		current_select = hwif->select;
 		(void) inb(0x3e6);
 		(void) inb(0x3e6);
 		(void) inb(0x3e6);
 		(void) inb(0x3e6);
-		outb(0x1c,hwif->select);
-		current_hwif = hwif;
+		outb(current_select,0x3e6);
 		restore_flags (flags);
 	}
 }
@@ -1724,7 +1728,8 @@
 	};
 
 	drive->part[0].nr_sects = current_capacity(drive);
-	resetup_one_dev(HWIF(drive)->gd, drive->select.b.unit);
+	if (drive->media == disk)
+		resetup_one_dev(HWIF(drive)->gd, drive->select.b.unit);
 
 	drive->busy = 0;
 	wake_up(&drive->wqueue);
@@ -2582,6 +2587,11 @@
 				 *
 				 * Need to add an ioctl to select between them.
 				 */
+				if (check_region(0x3e6,1)) {
+					printk(" -- HT6560 PORT 0x3e6 ALREADY IN USE");
+					goto done;
+				}
+				request_region(0x3e6, 1, hwif->name);
 				ide_hwifs[0].select = 0x3c;
 				ide_hwifs[1].select = 0x3d;
 				goto do_serialize;
@@ -2921,7 +2931,6 @@
 			if (hwif->irq == HD_IRQ && hwif->io_base != HD_DATA) {
 				printk("%s: CANNOT SHARE IRQ WITH OLD HARDDISK DRIVER (hd.c)\n", hwif->name);
 				hwif->present = 0;
-B
 			}
 #endif /* CONFIG_BLK_DEV_HD */
 		}
diff -u --recursive --new-file v1.3.23/linux/drivers/block/ide.h linux/drivers/block/ide.h
--- v1.3.23/linux/drivers/block/ide.h	Sun Sep  3 16:12:49 1995
+++ linux/drivers/block/ide.h	Tue Sep  5 14:15:12 1995
@@ -20,7 +20,7 @@
  * 
  * REALLY_SLOW_IO can be defined in ide.c and ide-cd.c, if necessary
  */
-#define REALLY_FAST_IO			/* define if ide ports are perfect */
+#undef REALLY_FAST_IO			/* define if ide ports are perfect */
 #define INITIAL_MULT_COUNT	0	/* off=0; on=2,4,8,16,32, etc.. */
 
 #ifndef DISK_RECOVERY_TIME		/* off=0; on=access_delay_time */
diff -u --recursive --new-file v1.3.23/linux/drivers/block/ramdisk.c linux/drivers/block/ramdisk.c
--- v1.3.23/linux/drivers/block/ramdisk.c	Sun Aug 13 14:45:28 1995
+++ linux/drivers/block/ramdisk.c	Mon Sep  4 07:55:16 1995
@@ -216,7 +216,7 @@
 		return;
 
 	/* for Slackware install disks */
-	printk(KERN_NOTICE "VFS: Insert ramdisk floppy and press ENTER\n");
+	printk(KERN_NOTICE "VFS: Insert root floppy to be loaded into ramdisk and press ENTER\n");
 	wait_for_keypress();
 
 	memset(&filp, 0, sizeof(filp));
diff -u --recursive --new-file v1.3.23/linux/drivers/char/Makefile linux/drivers/char/Makefile
--- v1.3.23/linux/drivers/char/Makefile	Tue Aug 15 20:39:02 1995
+++ linux/drivers/char/Makefile	Mon Sep  4 07:31:53 1995
@@ -34,10 +34,12 @@
 L_OBJS += busmouse.o
 endif
 
-ifdef CONFIG_PRINTER
+ifeq ($(CONFIG_PRINTER),y)
 L_OBJS += lp.o
 else
-M_OBJS += lp.o
+  ifeq ($(CONFIG_PRINTER),m)
+  M_OBJS += lp.o
+  endif
 endif
 
 ifdef CONFIG_MS_BUSMOUSE
diff -u --recursive --new-file v1.3.23/linux/drivers/char/psaux.c linux/drivers/char/psaux.c
--- v1.3.23/linux/drivers/char/psaux.c	Sun Sep  3 12:26:52 1995
+++ linux/drivers/char/psaux.c	Tue Sep  5 12:21:27 1995
@@ -84,7 +84,7 @@
 #define QP_DATA         0x310		/* Data Port I/O Address */
 #define QP_STATUS       0x311		/* Status Port I/O Address */
 
-#define QP_DEV_IDLE     0x01	        /* Device Idle */
+#define QP_DEV_IDLE     0x01		/* Device Idle */
 #define QP_RX_FULL      0x02		/* Device Char received */
 #define QP_TX_IDLE      0x04		/* Device XMIT Idle */
 #define QP_RESET        0x08		/* Device Reset */
@@ -140,11 +140,10 @@
 /*
  * Write to device & handle returned ack
  */
- 
 #if defined INITIALIZE_DEVICE
 static int aux_write_ack(int val)
 {
-        int retries = 0;
+	int retries = 0;
 
 	poll_aux_status_nosleep();
 	outb_p(AUX_MAGIC_WRITE,AUX_COMMAND);
@@ -261,11 +260,11 @@
 	unsigned char status;
 
 	if (!poll_qp_status())
-	        printk("Warning: Mouse device busy in release_qp()\n");
+		printk("Warning: Mouse device busy in release_qp()\n");
 	status = inb_p(qp_status);
 	outb_p(status & ~(QP_ENABLE|QP_INTS_ON), qp_status);
 	if (!poll_qp_status())
-	        printk("Warning: Mouse device busy in release_qp()\n");
+		printk("Warning: Mouse device busy in release_qp()\n");
 	free_irq(QP_IRQ);
 	fasync_aux(inode, file, 0);
 	qp_busy = 0;
@@ -275,6 +274,7 @@
 static int fasync_aux(struct inode *inode, struct file *filp, int on)
 {
 	struct fasync_struct *fa, *prev;
+	unsigned long flags;
 
 	for (fa = queue->fasync, prev = 0; fa; prev= fa, fa = fa->fa_next) {
 		if (fa->fa_file == filp)
@@ -287,21 +287,27 @@
 		fa = (struct fasync_struct *)kmalloc(sizeof(struct fasync_struct), GFP_KERNEL);
 		if (!fa)
 			return -ENOMEM;
+		save_flags(flags);
+		cli();
 		fa->magic = FASYNC_MAGIC;
 		fa->fa_file = filp;
 		fa->fa_next = queue->fasync;
 		queue->fasync = fa;
+		restore_flags(flags);
 	}
 	else {
 		if (!fa)
 			return 0;
+		save_flags(flags);
+		cli();
 		if (prev)
 			prev->fa_next = fa->fa_next;
 		else
 			queue->fasync = fa->fa_next;
+		restore_flags(flags);
 		kfree_s(fa, sizeof(struct fasync_struct));
 	}
-	return 0;	
+	return 0;
 }
 
 /*
@@ -318,7 +324,7 @@
 	if (!poll_aux_status())
 		return -EBUSY;
 	aux_busy = 1;
-	queue->head = queue->tail = 0;	        /* Flush input queue */
+	queue->head = queue->tail = 0;		/* Flush input queue */
 	if (request_irq(AUX_IRQ, aux_interrupt, 0, "PS/2 Mouse")) {
 		aux_busy = 0;
 		return -EBUSY;
@@ -341,7 +347,7 @@
 
 static int open_qp(struct inode * inode, struct file * file)
 {
-        unsigned char status;
+	unsigned char status;
 
 	if (!qp_present)
 		return -EINVAL;
@@ -365,9 +371,9 @@
 	outb_p(status, qp_status);              /* Enable interrupts */
 
 	while (!poll_qp_status()) {
-	        printk("Error: Mouse device busy in open_qp()\n");
+		printk("Error: Mouse device busy in open_qp()\n");
 		return -EBUSY;
-        }
+	}
 
 	outb_p(AUX_ENABLE_DEV, qp_data);	/* Wake up mouse */
 
@@ -437,8 +443,8 @@
 			goto repeat;
 		}
 		current->state = TASK_RUNNING;
-		remove_wait_queue(&queue->proc_list, &wait);			
-	}		
+		remove_wait_queue(&queue->proc_list, &wait);
+	}
 	while (i > 0 && !queue_empty()) {
 		c = get_from_queue();
 		put_user(c, buffer++);
@@ -488,11 +494,11 @@
 
 unsigned long psaux_init(unsigned long kmem_start)
 {
-        int qp_found = 0;
+	int qp_found = 0;
 
 #ifdef CONFIG_82C710_MOUSE
-        if ((qp_found = probe_qp())) {
-	        printk("82C710 type pointing device detected -- driver installed.\n");
+	if ((qp_found = probe_qp())) {
+		printk("82C710 type pointing device detected -- driver installed.\n");
 /*		printk("82C710 address = %x (should be 0x310)\n", qp_data); */
 		qp_present = 1;
 		psaux_fops.write = write_qp;
@@ -501,8 +507,8 @@
 	} else
 #endif
 	if (aux_device_present == 0xaa) {
-	        printk("PS/2 auxiliary pointing device detected -- driver installed.\n");
-         	aux_present = 1;
+		printk("PS/2 auxiliary pointing device detected -- driver installed.\n");
+	 	aux_present = 1;
 		kbd_read_mask = AUX_OBUF_FULL;
 	} else {
 		return kmem_start;              /* No mouse at all */
@@ -514,15 +520,15 @@
 	queue->proc_list = NULL;
 	if (!qp_found) {
 #if defined INITIALIZE_DEVICE
-                outb_p(AUX_ENABLE,AUX_COMMAND);		/* Enable Aux */
-	        aux_write_ack(AUX_SET_SAMPLE);
-	        aux_write_ack(100);			/* 100 samples/sec */
-	        aux_write_ack(AUX_SET_RES);
-	        aux_write_ack(3);			/* 8 counts per mm */
-	        aux_write_ack(AUX_SET_SCALE21);		/* 2:1 scaling */
-	        poll_aux_status_nosleep();
+		outb_p(AUX_ENABLE,AUX_COMMAND);		/* Enable Aux */
+		aux_write_ack(AUX_SET_SAMPLE);
+		aux_write_ack(100);			/* 100 samples/sec */
+		aux_write_ack(AUX_SET_RES);
+		aux_write_ack(3);			/* 8 counts per mm */
+		aux_write_ack(AUX_SET_SCALE21);		/* 2:1 scaling */
+		poll_aux_status_nosleep();
 #endif /* INITIALIZE_DEVICE */
-        	outb_p(AUX_DISABLE,AUX_COMMAND);   /* Disable Aux device */
+		outb_p(AUX_DISABLE,AUX_COMMAND);   /* Disable Aux device */
 		poll_aux_status_nosleep();
 		outb_p(AUX_CMD_WRITE,AUX_COMMAND);
 		poll_aux_status_nosleep();             /* Disable interrupts */
@@ -568,11 +574,11 @@
 	int retries=0;
 
 	while ((inb(qp_status)&(QP_RX_FULL|QP_TX_IDLE|QP_DEV_IDLE))
-	               != (QP_DEV_IDLE|QP_TX_IDLE)
-	               && retries < MAX_RETRIES) {
+		       != (QP_DEV_IDLE|QP_TX_IDLE)
+		       && retries < MAX_RETRIES) {
 
-	        if (inb_p(qp_status)&(QP_RX_FULL))
-		        inb_p(qp_data);
+		if (inb_p(qp_status)&(QP_RX_FULL))
+			inb_p(qp_data);
 		current->state = TASK_INTERRUPTIBLE;
 		current->timeout = jiffies + (5*HZ + 99) / 100;
 		schedule();
@@ -587,7 +593,7 @@
 
 static inline unsigned char read_710(unsigned char index)
 {
-        outb_p(index, 0x390);			/* Write index */
+	outb_p(index, 0x390);			/* Write index */
 	return inb_p(0x391);			/* Read the data */
 }
 
@@ -597,7 +603,7 @@
 
 static int probe_qp(void)
 {
-        outb_p(0x55, 0x2fa);			/* Any value except 9, ff or 36 */
+	outb_p(0x55, 0x2fa);			/* Any value except 9, ff or 36 */
 	outb_p(0xaa, 0x3fa);			/* Inverse of 55 */
 	outb_p(0x36, 0x3fa);			/* Address the chip */
 	outb_p(0xe4, 0x3fa);			/* 390/4; 390 = config address */
diff -u --recursive --new-file v1.3.23/linux/drivers/net/Makefile linux/drivers/net/Makefile
--- v1.3.23/linux/drivers/net/Makefile	Sun Sep  3 16:12:49 1995
+++ linux/drivers/net/Makefile	Mon Sep  4 07:38:03 1995
@@ -12,262 +12,342 @@
 M_OBJS   :=
 MOD_LIST_NAME := NET_MODULES
 
-ifdef CONFIG_SEEQ8005
+ifeq ($(CONFIG_SEEQ8005),y)
 L_OBJS += seeq8005.o
 endif
 
-ifdef CONFIG_IBMTR
+ifeq ($(CONFIG_IBMTR),y)
 L_OBJS += ibmtr.o
 else
-M_OBJS += ibmtr.o
+  ifeq ($(CONFIG_IBMTR),m)
+  M_OBJS += ibmtr.o
+  endif
 endif
 
-ifdef CONFIG_SK_G16
+ifeq ($(CONFIG_SK_G16),y)
 L_OBJS += sk_g16.o
 endif
 
-ifdef CONFIG_NET_IPIP
+ifeq ($(CONFIG_NET_IPIP),y)
 L_OBJS += tunnel.o
 else
-M_OBJS += tunnel.o
+  ifeq ($(CONFIG_NET_IPIP),m)
+  M_OBJS += tunnel.o
+  endif
 endif
 
-ifdef CONFIG_HP100
+ifeq ($(CONFIG_HP100),y)
 L_OBJS += hp100.o
 else
-M_OBJS += hp100.o
+  ifeq ($(CONFIG_HP100),m)
+  M_OBJS += hp100.o
+  endif
 endif
 
-ifdef CONFIG_WD80x3
+ifeq ($(CONFIG_WD80x3),y)
 L_OBJS += wd.o
-CONFIG_8390 = CONFIG_8390
+CONFIG_8390 = y
 else
-M_OBJS += wd.o
+  ifeq ($(CONFIG_WD80x3),m)
+  CONFIG_8390 = m
+  M_OBJS += wd.o
+  endif
 endif
 
-ifdef CONFIG_EL2
+ifeq ($(CONFIG_EL2),y)
 L_OBJS += 3c503.o
-CONFIG_8390 = CONFIG_8390
+CONFIG_8390 = y
 else
-M_OBJS += 3c503.o
+  ifeq ($(CONFIG_EL2),m)
+  CONFIG_8390 = m
+  M_OBJS += 3c503.o
+  endif
 endif
 
-ifdef CONFIG_NE2000
+ifeq ($(CONFIG_NE2000),y)
 L_OBJS += ne.o
-CONFIG_8390 = CONFIG_8390
+CONFIG_8390 = y
 else
-M_OBJS += ne.o
+  ifeq ($(CONFIG_NE2000),m)
+  CONFIG_8390 = m
+  M_OBJS += ne.o
+  endif
 endif
 
-ifdef CONFIG_HPLAN
+ifeq ($(CONFIG_HPLAN),y)
 L_OBJS += hp.o
-CONFIG_8390 = CONFIG_8390
+CONFIG_8390 = y
 else
-M_OBJS += hp.o
+  ifeq ($(CONFIG_HPLAN),m)
+  CONFIG_8390 = m
+  M_OBJS += hp.o
+  endif
 endif
 
-ifdef CONFIG_HPLAN_PLUS
+ifeq ($(CONFIG_HPLAN_PLUS),y)
 L_OBJS += hp-plus.o
-CONFIG_8390 = CONFIG_8390
+CONFIG_8390 = y
 else
-M_OBJS += hp-plus.o
+  ifeq ($(CONFIG_HPLAN_PLUS),m)
+  CONFIG_8390 = m
+  M_OBJS += hp-plus.o
+  endif
 endif
 
-ifdef CONFIG_ULTRA
+ifeq ($(CONFIG_ULTRA),y)
 L_OBJS += smc-ultra.o
-CONFIG_8390 = CONFIG_8390
+CONFIG_8390 = y
 else
-M_OBJS += smc-ultra.o
+  ifeq ($(CONFIG_ULTRA),m)
+  CONFIG_8390 = m
+  M_OBJS += smc-ultra.o
+  endif
 endif
 
-ifdef CONFIG_E2100
+ifeq ($(CONFIG_E2100),y)
 L_OBJS += e2100.o
-CONFIG_8390 = CONFIG_8390
+CONFIG_8390 = y
 else
-M_OBJS += e2100.o
+  ifeq ($(CONFIG_E2100),m)
+  CONFIG_8390 = m
+  M_OBJS += e2100.o
+  endif
 endif
 
-ifdef CONFIG_PLIP
+ifeq ($(CONFIG_PLIP),y)
 L_OBJS += plip.o
 else
-M_OBJS += plip.o
+  ifeq ($(CONFIG_PLIP),m)
+  M_OBJS += plip.o
+  endif
 endif
 
-ifdef CONFIG_PPP
+ifeq ($(CONFIG_PPP),y)
 L_OBJS += ppp.o
-CONFIG_SLHC = CONFIG_SLHC
+CONFIG_SLHC = y
 else
-M_OBJS += ppp.o
+  ifeq ($(CONFIG_PPP),m)
+  CONFIG_SLHC = m
+  M_OBJS += ppp.o
+  endif
 endif
 
-ifdef CONFIG_SLIP
+ifeq ($(CONFIG_SLIP),y)
 L_OBJS += slip.o
-CONFIG_SLHC = CONFIG_SLHC
+CONFIG_SLHC = y
 else
-M_OBJS += slip.o
+  ifeq ($(CONFIG_SLIP),m)
+  CONFIG_SLHC = m
+  M_OBJS += slip.o
+  endif
 endif
 
-ifdef CONFIG_DE650
+ifeq ($(CONFIG_DE650),y)
 ETDRV_OBJS := $(L_OBJS) de650.o
-CONFIG_8390 = CONFIG_8390
+CONFIG_8390 = y
 endif
 
-ifdef CONFIG_3C589
+ifeq ($(CONFIG_3C589),y)
 L_OBJS += 3c589.o
 endif
 
-ifdef CONFIG_DUMMY
+ifeq ($(CONFIG_DUMMY),y)
 L_OBJS += dummy.o
 else
-M_OBJS += dummy.o
+  ifeq ($(CONFIG_DUMMY),m)
+  M_OBJS += dummy.o
+  endif
 endif
 
-ifdef CONFIG_DE600
+ifeq ($(CONFIG_DE600),y)
 L_OBJS += de600.o
 else
-M_OBJS += de600.o
+  ifeq ($(CONFIG_DE600),m)
+  M_OBJS += de600.o
+  endif
 endif
 
-ifdef CONFIG_DE620
+ifeq ($(CONFIG_DE620),y)
 L_OBJS += de620.o
 else
-M_OBJS += de620.o
+  ifeq ($(CONFIG_DE620),m)
+  M_OBJS += de620.o
+  endif
 endif
 
-ifdef CONFIG_AT1500
+ifeq ($(CONFIG_AT1500),y)
 L_OBJS += lance.o
 endif
 
-ifdef CONFIG_LANCE
+ifeq ($(CONFIG_LANCE),y)
 L_OBJS += lance.o
 endif
 
-ifdef CONFIG_AT1700
+ifeq ($(CONFIG_AT1700),y)
 L_OBJS += at1700.o
 else
-M_OBJS += at1700.o
+  ifeq ($(CONFIG_AT1700),m)
+  M_OBJS += at1700.o
+  endif
 endif
 
-ifdef CONFIG_EL1
+ifeq ($(CONFIG_EL1),y)
 L_OBJS += 3c501.o
 else
-M_OBJS += 3c501.o
+  ifeq ($(CONFIG_EL1),m)
+  M_OBJS += 3c501.o
+  endif
 endif
 
-ifdef CONFIG_EL16
+ifeq ($(CONFIG_EL16),y)
 L_OBJS += 3c507.o
 else
-M_OBJS += 3c507.o
+  ifeq ($(CONFIG_EL16),m)
+  M_OBJS += 3c507.o
+  endif
 endif
 
-ifdef CONFIG_EL3
+ifeq ($(CONFIG_EL3),y)
 L_OBJS += 3c509.o
 else
-M_OBJS += 3c509.o
+  ifeq ($(CONFIG_EL3),m)
+  M_OBJS += 3c509.o
+  endif
 endif
 
-ifdef CONFIG_EEXPRESS
+ifeq ($(CONFIG_EEXPRESS),y)
 L_OBJS += eexpress.o
 else
-M_OBJS += eexpress.o
+  ifeq ($(CONFIG_EEXPRESS),m)
+  M_OBJS += eexpress.o
+  endif
 endif
 
-ifdef CONFIG_EEXPRESS_PRO
+ifeq ($(CONFIG_EEXPRESS_PRO),y)
 L_OBJS += eepro.o
 else
-M_OBJS += eepro.o
+  ifeq ($(CONFIG_EEXPRESS_PRO),m)
+  M_OBJS += eepro.o
+  endif
 endif
 
-ifdef CONFIG_WAVELAN
+ifeq ($(CONFIG_WAVELAN),y)
 L_OBJS += wavelan.o
 else
-M_OBJS += wavelan.o
+  ifeq ($(CONFIG_WAVELAN),m)
+  M_OBJS += wavelan.o
+  endif
 endif
 
-ifdef CONFIG_ZNET
+ifeq ($(CONFIG_ZNET),y)
 L_OBJS += znet.o
 endif
 
-ifdef CONFIG_DEPCA
+ifeq ($(CONFIG_DEPCA),y)
 L_OBJS += depca.o
 else
-M_OBJS += depca.o
+  ifeq ($(CONFIG_DEPCA),m)
+  M_OBJS += depca.o
+  endif
 endif
 
-ifdef CONFIG_EWRK3
+ifeq ($(CONFIG_EWRK3),y)
 L_OBJS += ewrk3.o
 else
-M_OBJS += ewrk3.o
+  ifeq ($(CONFIG_EWRK3),m)
+  M_OBJS += ewrk3.o
+  endif
 endif
 
-ifdef CONFIG_ATP
+ifeq ($(CONFIG_ATP),y)
 L_OBJS += atp.o
 endif
 
-ifdef CONFIG_DE4X5
+ifeq ($(CONFIG_DE4X5),y)
 L_OBJS += de4x5.o
 else
-M_OBJS += de4x5.o
+  ifeq ($(CONFIG_DE4X5),m)
+  M_OBJS += de4x5.o
+  endif
 endif
 
-ifdef CONFIG_NI52
+ifeq ($(CONFIG_NI52),y)
 L_OBJS += ni52.o
 endif
 
-ifdef CONFIG_NI65
+ifeq ($(CONFIG_NI65),y)
 L_OBJS += ni65.o
 endif
 
-ifdef CONFIG_ELPLUS
+ifeq ($(CONFIG_ELPLUS),y)
 L_OBJS += 3c505.o
 else
-M_OBJS += 3c505.o
+  ifeq ($(CONFIG_ELPLUS),m)
+  M_OBJS += 3c505.o
+  endif
 endif
 
-ifdef CONFIG_AC3200
+ifeq ($(CONFIG_AC3200),y)
 L_OBJS += ac3200.o
-CONFIG_8390 = CONFIG_8390
+CONFIG_8390 = y
 else
-M_OBJS += ac3200.o
+  ifeq ($(CONFIG_AC3200),m)
+  CONFIG_8390 = m
+  M_OBJS += ac3200.o
+  endif
 endif
 
-ifdef CONFIG_APRICOT
+ifeq ($(CONFIG_APRICOT),y)
 L_OBJS += apricot.o
 else
-M_OBJS += apricot.o
+  ifeq ($(CONFIG_APRICOT),m)
+  M_OBJS += apricot.o
+  endif
 endif
 
-ifdef CONFIG_DEC_ELCP
+ifeq ($(CONFIG_DEC_ELCP),y)
 L_OBJS += tulip.o
 else
-M_OBJS += tulip.o
+  ifeq ($(CONFIG_DEC_ELCP),m)
+  M_OBJS += tulip.o
+  endif
 endif
 
-ifdef CONFIG_ARCNET
+ifeq ($(CONFIG_ARCNET),y)
 L_OBJS += arcnet.o
+else
+  ifeq ($(CONFIG_ARCNET),m)
+  M_OBJS += arcnet.o
+  endif
 endif
 
-ifdef CONFIG_PI
+ifeq ($(CONFIG_PI),y)
 L_OBJS += pi2.o
 CONFIG_PI = CONFIG_PI
 endif
 
-ifdef CONFIG_SLHC
+ifeq ($(CONFIG_SLHC),y)
 L_OBJS += slhc.o
 else
-M_OBJS += slhc.o
+  ifeq ($(CONFIG_SLHC),m)
+  M_OBJS += slhc.o
+  endif
 endif
 
-ifdef CONFIG_8390
+ifeq ($(CONFIG_8390),y)
 L_OBJS += 8390.o
 else
-M_OBJS += 8390.o
+  ifeq ($(CONFIG_8390),m)
+  M_OBJS += 8390.o
+  endif
 endif
 
-ifdef CONFIG_EQUALIZER
+ifeq ($(CONFIG_EQUALIZER),y)
 L_OBJS += eql.o
 else
-M_OBJS += eql.o
+  ifeq ($(CONFIG_EQUALIZER),m)
+  M_OBJS += eql.o
+  endif
 endif
 
 include $(TOPDIR)/Rules.make
diff -u --recursive --new-file v1.3.23/linux/drivers/net/net_init.c linux/drivers/net/net_init.c
--- v1.3.23/linux/drivers/net/net_init.c	Sun Sep  3 12:26:54 1995
+++ linux/drivers/net/net_init.c	Mon Sep  4 14:48:37 1995
@@ -15,6 +15,9 @@
 	Modifications/additions by Bjorn Ekwall <bj0rn@blox.se>:
 		ethdev_index[MAX_ETH_CARDS]
 		register_netdev() / unregister_netdev()
+		
+	Modifications by Wolfgang Walter
+		Use dev_close cleanly so we always shut things down tidily.
 */
 
 #include <linux/config.h>
diff -u --recursive --new-file v1.3.23/linux/drivers/scsi/Makefile linux/drivers/scsi/Makefile
--- v1.3.23/linux/drivers/scsi/Makefile	Mon Aug 28 14:52:20 1995
+++ linux/drivers/scsi/Makefile	Mon Sep  4 07:31:54 1995
@@ -43,146 +43,193 @@
 M_OBJS += scsi_mod.o
 endif
 
-ifdef CONFIG_CHR_DEV_ST
+ifeq ($(CONFIG_CHR_DEV_ST),y)
 L_OBJS += st.o
 else
-M_OBJS += st.o
+  ifeq ($(CONFIG_CHR_DEV_ST),m)
+  M_OBJS += st.o
+  endif
 endif
 
-ifdef CONFIG_BLK_DEV_SD
+ifeq ($(CONFIG_BLK_DEV_SD),y)
 L_OBJS += sd.o sd_ioctl.o
 else
-M_OBJS += sd_mod.o
+  ifeq ($(CONFIG_BLK_DEV_SD),m)
+  M_OBJS += sd_mod.o
+  endif
 endif
 
-ifdef CONFIG_BLK_DEV_SR
+ifeq ($(CONFIG_BLK_DEV_SR),y)
 L_OBJS += sr.o sr_ioctl.o
 else
-M_OBJS += sr_mod.o
+  ifeq ($(CONFIG_BLK_DEV_SR),m)
+  M_OBJS += sr_mod.o
+  endif
 endif
 
-ifdef CONFIG_CHR_DEV_SG
+ifeq ($(CONFIG_CHR_DEV_SG),y)
 L_OBJS += sg.o
 else
-M_OBJS += sg.o
+  ifeq ($(CONFIG_CHR_DEV_SG),m)
+  M_OBJS += sg.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_QLOGIC
+ifeq ($(CONFIG_SCSI_QLOGIC),y)
 L_OBJS += qlogic.o
 else
-M_OBJS += qlogic.o
+  ifeq ($(CONFIG_SCSI_QLOGIC),m)
+  M_OBJS += qlogic.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_AHA152X
+ifeq ($(CONFIG_SCSI_AHA152X),y)
 L_OBJS += aha152x.o
 else
-M_OBJS += aha152x.o
+  ifeq ($(CONFIG_SCSI_AHA152X),m)
+  M_OBJS += aha152x.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_AHA1542
+ifeq ($(CONFIG_SCSI_AHA1542),y)
 L_OBJS += aha1542.o
 else
-M_OBJS += aha1542.o
+  ifeq ($(CONFIG_SCSI_AHA1542),m)
+  M_OBJS += aha1542.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_AHA1740
+ifeq ($(CONFIG_SCSI_AHA1740),y)
 L_OBJS += aha1740.o
 else
-M_OBJS += aha1740.o
+  ifeq ($(CONFIG_SCSI_AHA1740),m)
+  M_OBJS += aha1740.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_AIC7XXX
+ifeq ($(CONFIG_SCSI_AIC7XXX),y)
 L_OBJS += aic7xxx.o
 else
-M_OBJS += aic7xxx.o
+  ifeq ($(CONFIG_SCSI_AIC7XXX),m)
+  M_OBJS += aic7xxx.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_BUSLOGIC
+ifeq ($(CONFIG_SCSI_BUSLOGIC),y)
 L_OBJS += buslogic.o
 else
-M_OBJS += buslogic.o
+  ifeq ($(CONFIG_SCSI_BUSLOGIC),m)
+  M_OBJS += buslogic.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_EATA_DMA
+ifeq ($(CONFIG_SCSI_EATA_DMA),y)
 L_OBJS += eata_dma.o
 else
-M_OBJS += eata_dma.o
+  ifeq ($(CONFIG_SCSI_EATA_DMA),m)
+  M_OBJS += eata_dma.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_EATA_PIO
+ifeq ($(CONFIG_SCSI_EATA_PIO),y)
 L_OBJS += eata_pio.o
 else
-M_OBJS += eata_pio.o
+  ifeq ($(CONFIG_SCSI_EATA_PIO),m)
+  M_OBJS += eata_pio.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_U14_34F
+ifeq ($(CONFIG_SCSI_U14_34F),y)
 L_OBJS += u14-34f.o
 else
-M_OBJS += u14-34f.o
+  ifeq ($(CONFIG_SCSI_U14_34F),m)
+  M_OBJS += u14-34f.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_DEBUG
+ifeq ($(CONFIG_SCSI_DEBUG),y)
 L_OBJS += scsi_debug.o
 else
-M_OBJS += scsi_debug.o
+  ifeq ($(CONFIG_SCSI_DEBUG),m)
+  M_OBJS += scsi_debug.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_FUTURE_DOMAIN
+ifeq ($(CONFIG_SCSI_FUTURE_DOMAIN),y)
 L_OBJS += fdomain.o
 else
-M_OBJS += fdomain.o
+  ifeq ($(CONFIG_SCSI_FUTURE_DOMAIN),m)
+  M_OBJS += fdomain.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_IN2000
+ifeq ($(CONFIG_SCSI_IN2000),y)
 L_OBJS += in2000.o
 else
-M_OBJS += in2000.o
+  ifeq ($(CONFIG_SCSI_IN2000),m)
+  M_OBJS += in2000.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_GENERIC_NCR5380
+ifeq ($(CONFIG_SCSI_GENERIC_NCR5380),y)
 L_OBJS += g_NCR5380.o
 endif
 
-ifdef CONFIG_SCSI_NCR53C7xx
+ifeq ($(CONFIG_SCSI_NCR53C7xx),y)
 L_OBJS += 53c7,8xx.o 
 else
-M_OBJS += 53c7,8xx.o
+  ifeq ($(CONFIG_SCSI_NCR53C7xx),m)
+  M_OBJS += 53c7,8xx.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_PAS16
+ifeq ($(CONFIG_SCSI_PAS16),y)
 L_OBJS += pas16.o
 endif
 
-ifdef CONFIG_SCSI_SEAGATE
+ifeq ($(CONFIG_SCSI_SEAGATE),y)
 L_OBJS += seagate.o
 else
-ifdef CONFIG_SCSI_FD_8xx
-L_OBJS += seagate.o
-else
-M_OBJS += seagate.o
-endif
+  ifeq ($(CONFIG_SCSI_SEAGATE),m)
+  M_OBJS += seagate.o
+  endif
+endif
+ifndef CONFIG_SCSI_SEAGATE
+  ifeq ($(CONFIG_SCSI_FD_8xx),y)
+  L_OBJS += seagate.o
+  else
+    ifeq ($(CONFIG_SCSI_FD_8xx),m)
+    M_OBJS += seagate.o
+    endif
+  endif
 endif
 
-ifdef CONFIG_SCSI_7000FASST
+ifeq ($(CONFIG_SCSI_7000FASST),y)
 L_OBJS += wd7000.o
 else
-M_OBJS += wd7000.o
+  ifeq ($(CONFIG_SCSI_7000FASST),m)
+  M_OBJS += wd7000.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_T128
+ifeq ($(CONFIG_SCSI_T128),y)
 L_OBJS += t128.o
 endif
 
-ifdef CONFIG_SCSI_ULTRASTOR
+ifeq ($(CONFIG_SCSI_ULTRASTOR),y)
 L_OBJS += ultrastor.o
 else
-M_OBJS += ultrastor.o
+  ifeq ($(CONFIG_SCSI_ULTRASTOR),m)
+  M_OBJS += ultrastor.o
+  endif
 endif
 
-ifdef CONFIG_SCSI_EATA
+ifeq ($(CONFIG_SCSI_EATA),y)
 L_OBJS += eata.o
 else
-M_OBJS += eata.o
+  ifeq ($(CONFIG_SCSI_EATA),m)
+  M_OBJS += eata.o
+  endif
 endif
 
 include $(TOPDIR)/Rules.make
diff -u --recursive --new-file v1.3.23/linux/drivers/scsi/st.c linux/drivers/scsi/st.c
--- v1.3.23/linux/drivers/scsi/st.c	Sun Sep  3 12:27:00 1995
+++ linux/drivers/scsi/st.c	Mon Sep  4 09:46:50 1995
@@ -11,7 +11,7 @@
   Copyright 1992, 1993, 1994, 1995 Kai Makisara
 		 email Kai.Makisara@metla.fi
 
-  Last modified: Thu Aug 31 00:04:12 1995 by root@kai.makisara.fi
+  Last modified: Sat Sep  2 11:50:15 1995 by root@kai.makisara.fi
 */
 #ifdef MODULE
 #include <linux/autoconf.h>
@@ -249,13 +249,12 @@
   unsigned char cmd[10];
   unsigned int flags;
 
+  SCpnt = allocate_device(NULL, STp->device, 1);
   cmd[0] = SPACE;
-  cmd[1] = 0x01; /* Space FileMarks */
+  cmd[1] = ((SCpnt->lun << 5) & 0xe0) | 0x01; /* Space FileMarks */
   cmd[2] = cmd[3] = cmd[4] = 0xff;  /* -1 filemarks */
   cmd[5] = 0;
 
-  SCpnt = allocate_device(NULL, STp->device, 1);
-  SCpnt->sense_buffer[0] = 0;
   SCpnt->request.dev = dev;
   scsi_do_cmd(SCpnt,
 	      (void *) cmd, (void *) (STp->buffer)->b_data, 0,
@@ -320,10 +319,9 @@
 #endif
     memset((STp->buffer)->b_data + offset, 0, transfer - offset);
 
-    SCpnt->sense_buffer[0] = 0;
     memset(cmd, 0, 10);
     cmd[0] = WRITE_6;
-    cmd[1] = 1;
+    cmd[1] = ((SCpnt->lun << 5) & 0xe0) | 1;
     blks = transfer / STp->block_size;
     cmd[2] = blks >> 16;
     cmd[3] = blks >> 8;
@@ -465,9 +463,9 @@
       return (-EBUSY);
     }
 
-    SCpnt->sense_buffer[0]=0;
     memset ((void *) &cmd[0], 0, 10);
     cmd[0] = TEST_UNIT_READY;
+    cmd[1] = (SCpnt->lun << 5) & 0xe0;
     SCpnt->request.dev = dev;
     scsi_do_cmd(SCpnt,
 		(void *) cmd, (void *) (STp->buffer)->b_data,
@@ -483,9 +481,9 @@
     if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
 	(SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */
       (STp->mt_status)->mt_fileno = 0 ;
-      SCpnt->sense_buffer[0]=0;
       memset ((void *) &cmd[0], 0, 10);
       cmd[0] = TEST_UNIT_READY;
+      cmd[1] = (SCpnt->lun << 5) & 0xe0;
       SCpnt->request.dev = dev;
       scsi_do_cmd(SCpnt,
 		  (void *) cmd, (void *) (STp->buffer)->b_data,
@@ -525,9 +523,9 @@
       return 0;
     }
 
-    SCpnt->sense_buffer[0]=0;
     memset ((void *) &cmd[0], 0, 10);
     cmd[0] = READ_BLOCK_LIMITS;
+    cmd[1] = (SCpnt->lun << 5) & 0xe0;
     SCpnt->request.dev = dev;
     scsi_do_cmd(SCpnt,
 		(void *) cmd, (void *) (STp->buffer)->b_data,
@@ -558,9 +556,9 @@
 #endif
     }
 
-    SCpnt->sense_buffer[0]=0;
     memset ((void *) &cmd[0], 0, 10);
     cmd[0] = MODE_SENSE;
+    cmd[1] = (SCpnt->lun << 5) & 0xe0;
     cmd[4] = 12;
     SCpnt->request.dev = dev;
     scsi_do_cmd(SCpnt,
@@ -687,9 +685,9 @@
       if (result == 0 || result == (-ENOSPC)) {
 	SCpnt = allocate_device(NULL, STp->device, 1);
 
-	SCpnt->sense_buffer[0] = 0;
 	memset(cmd, 0, 10);
 	cmd[0] = WRITE_FILEMARKS;
+	cmd[1] = (SCpnt->lun << 5) & 0xe0;
 	cmd[4] = 1 + STp->two_fm;
 	SCpnt->request.dev = dev;
 	scsi_do_cmd( SCpnt,
@@ -833,7 +831,7 @@
 
     memset(cmd, 0, 10);
     cmd[0] = WRITE_6;
-    cmd[1] = (STp->block_size != 0);
+    cmd[1] = ((SCpnt->lun << 5) & 0xe0) | (STp->block_size != 0);
 
     STp->rw = ST_WRITING;
 
@@ -863,7 +861,6 @@
       cmd[2] = blks >> 16;
       cmd[3] = blks >> 8;
       cmd[4] = blks;
-      SCpnt->sense_buffer[0] = 0;
       SCpnt->request.dev = dev;
       scsi_do_cmd (SCpnt,
 		   (void *) cmd, (STp->buffer)->b_data, transfer,
@@ -978,7 +975,6 @@
       cmd[2] = blks >> 16;
       cmd[3] = blks >> 8;
       cmd[4] = blks;
-      SCpnt->sense_buffer[0] = 0;
       SCpnt->request.dev = dev;
       STp->write_pending = 1;
       scsi_do_cmd (SCpnt,
@@ -1057,7 +1053,7 @@
 
 	memset(cmd, 0, 10);
 	cmd[0] = READ_6;
-	cmd[1] = (STp->block_size != 0);
+	cmd[1] = ((SCpnt->lun << 5) & 0xe0) | (STp->block_size != 0);
 	if (STp->block_size == 0)
 	  blks = bytes = count;
 	else {
@@ -1077,7 +1073,6 @@
 	cmd[3] = blks >> 8;
 	cmd[4] = blks;
 
-	SCpnt->sense_buffer[0] = 0;
 	SCpnt->request.dev = dev;
 	scsi_do_cmd (SCpnt,
 		     (void *) cmd, (STp->buffer)->b_data,
@@ -1643,7 +1638,7 @@
      }
 
    SCpnt = allocate_device(NULL, STp->device, 1);
-   SCpnt->sense_buffer[0] = 0;
+   cmd[1] |= (SCpnt->lun << 5) & 0xe0;
    SCpnt->request.dev = dev;
    scsi_do_cmd(SCpnt,
 	       (void *) cmd, (void *) (STp->buffer)->b_data, datalen,
@@ -1900,7 +1895,6 @@
 
      SCpnt = allocate_device(NULL, STp->device, 1);
 
-     SCpnt->sense_buffer[0]=0;
      memset (scmd, 0, 10);
      if ((STp->device)->scsi_level < SCSI_2) {
        scmd[0] = QFA_REQUEST_BLOCK;
@@ -1911,7 +1905,7 @@
        scmd[1] = 1;
      }
      SCpnt->request.dev = dev;
-     SCpnt->sense_buffer[0] = 0;
+     scmd[1] |= (SCpnt->lun << 5) & 0xe0;
      scsi_do_cmd(SCpnt,
 		 (void *) scmd, (void *) (STp->buffer)->b_data,
 		 20, st_sleep_done, ST_TIMEOUT, MAX_READY_RETRIES);
diff -u --recursive --new-file v1.3.23/linux/fs/Makefile linux/fs/Makefile
--- v1.3.23/linux/fs/Makefile	Sun Sep  3 12:27:00 1995
+++ linux/fs/Makefile	Tue Sep  5 07:50:31 1995
@@ -18,10 +18,12 @@
 MOD_LIST_NAME := FS_MODULES
 ALL_SUB_DIRS = minix ext ext2 msdos proc isofs nfs xiafs umsdos hpfs sysv smbfs
 
-ifdef CONFIG_MINIX_FS
+ifeq ($(CONFIG_MINIX_FS),y)
 SUB_DIRS += minix
 else
-MOD_SUB_DIRS += minix
+  ifeq ($(CONFIG_MINIX_FS),m)
+  MOD_SUB_DIRS += minix
+  endif
 endif
 
 ifdef CONFIG_EXT_FS
@@ -32,62 +34,80 @@
 SUB_DIRS += ext2
 endif
 
-ifdef CONFIG_MSDOS_FS
+ifeq ($(CONFIG_MSDOS_FS),y)
 SUB_DIRS += msdos
 else
-MOD_SUB_DIRS += msdos
+  ifeq ($(CONFIG_MSDOS_FS),m)
+  MOD_SUB_DIRS += msdos
+  endif
 endif
 
 ifdef CONFIG_PROC_FS
 SUB_DIRS += proc
 endif
 
-ifdef CONFIG_ISO9660_FS
+ifeq ($(CONFIG_ISO9660_FS),y)
 SUB_DIRS += isofs
 else
-MOD_SUB_DIRS += isofs
+  ifeq ($(CONFIG_ISO9660_FS),m)
+  MOD_SUB_DIRS += isofs
+  endif
 endif
 
-ifdef CONFIG_NFS_FS
+ifeq ($(CONFIG_NFS_FS),y)
 SUB_DIRS += nfs
 else
-MOD_SUB_DIRS += nfs
+  ifeq ($(CONFIG_NFS_FS),m)
+  MOD_SUB_DIRS += nfs
+  endif
 endif
 
-ifdef CONFIG_XIA_FS
+ifeq ($(CONFIG_XIA_FS),y)
 SUB_DIRS += xiafs
 else
-MOD_SUB_DIRS += xiafs
+  ifeq ($(CONFIG_XIA_FS),m)
+  MOD_SUB_DIRS += xiafs
+  endif
 endif
 
-ifdef CONFIG_UMSDOS_FS
+ifeq ($(CONFIG_UMSDOS_FS),y)
 SUB_DIRS += umsdos
 else
-MOD_SUB_DIRS += umsdos
+  ifeq ($(CONFIG_UMSDOS_FS),m)
+  MOD_SUB_DIRS += umsdos
+  endif
 endif
 
-ifdef CONFIG_SYSV_FS
+ifeq ($(CONFIG_SYSV_FS),y)
 SUB_DIRS += sysv
 else
-MOD_SUB_DIRS += sysv
+  ifeq ($(CONFIG_SYSV_FS),m)
+  MOD_SUB_DIRS += sysv
+  endif
 endif
 
-ifdef CONFIG_SMB_FS
+ifeq ($(CONFIG_SMB_FS),y)
 SUB_DIRS += smbfs
 else
-MOD_SUB_DIRS += smbfs
+  ifeq ($(CONFIG_SMB_FS),m)
+  MOD_SUB_DIRS += smbfs
+  endif
 endif
 
-ifdef CONFIG_HPFS_FS
+ifeq ($(CONFIG_HPFS_FS),y)
 SUB_DIRS += hpfs
 else
-MOD_SUB_DIRS += hpfs
+  ifeq ($(CONFIG_HPFS_FS),m)
+  MOD_SUB_DIRS += hpfs
+  endif
 endif
 
-ifdef CONFIG_BINFMT_ELF
+ifeq ($(CONFIG_BINFMT_ELF),y)
 BINFMTS += binfmt_elf.o
 else
-MOD_SUB_DIRS += binfmt_elf.o
+  ifeq ($(CONFIG_BINFMT_ELF),m)
+  M_OBJS += binfmt_elf.o
+  endif
 endif
 
 include $(TOPDIR)/Rules.make
diff -u --recursive --new-file v1.3.23/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
--- v1.3.23/linux/fs/binfmt_elf.c	Sun Sep  3 12:27:00 1995
+++ linux/fs/binfmt_elf.c	Mon Sep  4 13:52:30 1995
@@ -97,7 +97,7 @@
 
 	mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL);
 	if (mpnt) {
-		mpnt->vm_task = current;
+		mpnt->vm_mm = current->mm;
 		mpnt->vm_start = PAGE_MASK & (unsigned long) p;
 		mpnt->vm_end = TASK_SIZE;
 		mpnt->vm_page_prot = PAGE_COPY;
@@ -235,7 +235,7 @@
 	    
 	    error = do_mmap(file, 
 			    vaddr & 0xfffff000,
-			    eppnt->p_filesz + (vaddr & 0xfff),
+			    eppnt->p_filesz + (eppnt->p_vaddr & 0xfff),
 			    elf_prot,
 			    elf_type,
 			    eppnt->p_offset & 0xfffff000);
diff -u --recursive --new-file v1.3.23/linux/fs/exec.c linux/fs/exec.c
--- v1.3.23/linux/fs/exec.c	Sun Sep  3 12:27:00 1995
+++ linux/fs/exec.c	Tue Sep  5 11:09:25 1995
@@ -305,7 +305,7 @@
 
 	mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL);
 	if (mpnt) {
-		mpnt->vm_task = current;
+		mpnt->vm_mm = current->mm;
 		mpnt->vm_start = PAGE_MASK & (unsigned long) p;
 		mpnt->vm_end = STACK_TOP;
 		mpnt->vm_page_prot = PAGE_COPY;
@@ -542,7 +542,7 @@
 	current->comm[i] = '\0';
 
 	/* Release all of the old mmap stuff. */
-	exit_mmap(current);
+	exit_mmap(current->mm);
 
 	flush_thread();
 
diff -u --recursive --new-file v1.3.23/linux/fs/proc/array.c linux/fs/proc/array.c
--- v1.3.23/linux/fs/proc/array.c	Sun Sep  3 12:27:01 1995
+++ linux/fs/proc/array.c	Mon Sep  4 13:30:18 1995
@@ -293,7 +293,7 @@
 
 	if (!p || ptr >= TASK_SIZE)
 		return 0;
-	page_dir = pgd_offset(p,ptr);
+	page_dir = pgd_offset(p->mm,ptr);
 	if (pgd_none(*page_dir))
 		return 0;
 	if (pgd_bad(*page_dir)) {
@@ -556,7 +556,7 @@
 		struct vm_area_struct * vma = (*p)->mm->mmap;
 
 		while (vma) {
-			pgd_t *pgd = pgd_offset(*p, vma->vm_start);
+			pgd_t *pgd = pgd_offset((*p)->mm, vma->vm_start);
 			int pages = 0, shared = 0, dirty = 0, total = 0;
 
 			statm_pgd_range(pgd, vma->vm_start, vma->vm_end, &pages, &shared, &dirty, &total);
diff -u --recursive --new-file v1.3.23/linux/fs/proc/mem.c linux/fs/proc/mem.c
--- v1.3.23/linux/fs/proc/mem.c	Sun Sep  3 12:27:01 1995
+++ linux/fs/proc/mem.c	Mon Sep  4 12:58:55 1995
@@ -81,7 +81,7 @@
 	while (count > 0) {
 		if (current->signal & ~current->blocked)
 			break;
-		page_dir = pgd_offset(tsk,addr);
+		page_dir = pgd_offset(tsk->mm,addr);
 		if (pgd_none(*page_dir))
 			break;
 		if (pgd_bad(*page_dir)) {
@@ -236,7 +236,7 @@
 		if (!src_vma || (src_vma->vm_flags & VM_SHM))
 			return -EINVAL;
 
-		src_dir = pgd_offset(tsk, stmp);
+		src_dir = pgd_offset(tsk->mm, stmp);
 		if (pgd_none(*src_dir))
 			return -EINVAL;
 		if (pgd_bad(*src_dir)) {
@@ -271,11 +271,11 @@
 		while (src_vma && stmp > src_vma->vm_end)
 			src_vma = src_vma->vm_next;
 
-		src_dir = pgd_offset(tsk, stmp);
+		src_dir = pgd_offset(tsk->mm, stmp);
 		src_middle = pmd_offset(src_dir, stmp);
 		src_table = pte_offset(src_middle, stmp);
 
-		dest_dir = pgd_offset(current, dtmp);
+		dest_dir = pgd_offset(current->mm, dtmp);
 		dest_middle = pmd_alloc(dest_dir, dtmp);
 		if (!dest_middle)
 			return -ENOMEM;
@@ -284,10 +284,10 @@
 			return -ENOMEM;
 
 		if (!pte_present(*src_table))
-			do_no_page(src_vma, stmp, 1);
+			do_no_page(tsk, src_vma, stmp, 1);
 
 		if ((vma->vm_flags & VM_WRITE) && !pte_write(*src_table))
-			do_wp_page(src_vma, stmp, 1);
+			do_wp_page(tsk, src_vma, stmp, 1);
 
 		set_pte(src_table, pte_mkdirty(*src_table));
 		set_pte(dest_table, *src_table);
diff -u --recursive --new-file v1.3.23/linux/include/asm-alpha/processor.h linux/include/asm-alpha/processor.h
--- v1.3.23/linux/include/asm-alpha/processor.h	Fri Jun  2 13:53:58 1995
+++ linux/include/asm-alpha/processor.h	Mon Sep  4 13:00:38 1995
@@ -37,7 +37,7 @@
 	unsigned long res1, res2;
 };
 
-#define INIT_MMAP { &init_task, 0xfffffc0000000000,  0xfffffc0010000000, \
+#define INIT_MMAP { &init_mm, 0xfffffc0000000000,  0xfffffc0010000000, \
 	PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC }
 
 #define INIT_TSS  { \
diff -u --recursive --new-file v1.3.23/linux/include/asm-i386/pgtable.h linux/include/asm-i386/pgtable.h
--- v1.3.23/linux/include/asm-i386/pgtable.h	Tue Aug  8 12:31:41 1995
+++ linux/include/asm-i386/pgtable.h	Mon Sep  4 09:01:07 1995
@@ -219,9 +219,9 @@
 { return pmd_val(pmd) & PAGE_MASK; }
 
 /* to find an entry in a page-table-directory */
-extern inline pgd_t * pgd_offset(struct task_struct * tsk, unsigned long address)
+extern inline pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address)
 {
-	return (pgd_t *) tsk->tss.cr3 + (address >> PGDIR_SHIFT);
+	return mm->pgd + (address >> PGDIR_SHIFT);
 }
 
 /* Find an entry in the second-level page table.. */
diff -u --recursive --new-file v1.3.23/linux/include/asm-i386/processor.h linux/include/asm-i386/processor.h
--- v1.3.23/linux/include/asm-i386/processor.h	Fri Jun 16 22:02:55 1995
+++ linux/include/asm-i386/processor.h	Mon Sep  4 13:00:28 1995
@@ -106,7 +106,7 @@
 	unsigned long v86flags, v86mask, v86mode;
 };
 
-#define INIT_MMAP { &init_task, 0, 0x40000000, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC }
+#define INIT_MMAP { &init_mm, 0, 0x40000000, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC }
 
 #define INIT_TSS  { \
 	0,0, \
diff -u --recursive --new-file v1.3.23/linux/include/linux/igmp.h linux/include/linux/igmp.h
--- v1.3.23/linux/include/linux/igmp.h	Sun Sep  3 16:12:49 1995
+++ linux/include/linux/igmp.h	Mon Sep  4 14:48:36 1995
@@ -4,6 +4,8 @@
  *	Authors:
  *		Alan Cox <Alan.Cox@linux.org>	
  *
+ *	Extended to talk the BSD extended IGMP protocol of mrouted 3.6
+ *
  *
  *	This program is free software; you can redistribute it and/or
  *	modify it under the terms of the GNU General Public License
@@ -24,30 +26,37 @@
  
 struct igmphdr
 {
-	unsigned char type;
-	unsigned char code;
-	unsigned short csum;
-	unsigned long group;
+	__u8 type;
+	__u8 code;		/* For newer IGMP */
+	__u16 csum;
+	__u32 group;
 };
 
+#define IGMP_HOST_MEMBERSHIP_QUERY	0x11	/* From RFC1112 */
+#define IGMP_HOST_MEMBERSHIP_REPORT	0x12	/* Ditto */
+#define IGMP_DVMRP			0x13	/* DVMRP routing */
+#define IGMP_PIM			0x14	/* PIM routing */
+#define IGMP_HOST_NEW_MEMBERSHIP_REPORT	0x16	/* New version of 0x11 */
+#define IGMP_HOST_LEAVE_MESSAGE		0x17	/* An extra BSD seems to send */
+
+#define IGMP_MTRACE_RESP		0x1e
+#define IGMP_MTRACE			0x1f
+
 /*
- *	Header in host convenient format
+ *	Use the BSD names for these for compatibility
  */
 
-struct igmp_header
-{
-	unsigned char type;
-	unsigned char code;
-	unsigned short csum;
-	unsigned long group;
-};
+#define IGMP_DELAYING_MEMBER		0x01
+#define IGMP_IDLE_MEMBER		0x02
+#define IGMP_LAZY_MEMBER		0x03
+#define IGMP_SLEEPING_MEMBER		0x04
+#define IGMP_AWAKENING_MEMBER		0x05
+
+#define IGMP_OLD_ROUTER			0x00
+#define IGMP_NEW_ROUTER			0x01
 
 
-#define IGMP_HOST_MEMBERSHIP_QUERY	0x11	/* From RFC1112 */
-#define IGMP_HOST_MEMBERSHIP_REPORT	0x12	/* Ditto */
-#define IGMP_HOST_LEAVE_MESSAGE		0x17	/* An extra BSD seems to send */
 
-				/* 224.0.0.1 */
 #define IGMP_ALL_HOSTS		htonl(0xE0000001L)
 
 /*
diff -u --recursive --new-file v1.3.23/linux/include/linux/mm.h linux/include/linux/mm.h
--- v1.3.23/linux/include/linux/mm.h	Mon Aug 28 14:52:23 1995
+++ linux/include/linux/mm.h	Tue Sep  5 10:14:01 1995
@@ -33,7 +33,7 @@
  * library, the executable area etc).
  */
 struct vm_area_struct {
-	struct task_struct * vm_task;		/* VM area parameters */
+	struct mm_struct * vm_mm;	/* VM area parameters */
 	unsigned long vm_start;
 	unsigned long vm_end;
 	pgprot_t vm_page_prot;
@@ -181,8 +181,8 @@
 extern int zeromap_page_range(unsigned long from, unsigned long size, pgprot_t prot);
 
 extern void handle_mm_fault(struct vm_area_struct *vma, unsigned long address, int write_access);
-extern void do_wp_page(struct vm_area_struct * vma, unsigned long address, int write_access);
-extern void do_no_page(struct vm_area_struct * vma, unsigned long address, int write_access);
+extern void do_wp_page(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long address, int write_access);
+extern void do_no_page(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long address, int write_access);
 
 extern unsigned long paging_init(unsigned long start_mem, unsigned long end_mem);
 extern void mem_init(unsigned long start_mem, unsigned long end_mem);
@@ -201,7 +201,7 @@
 
 extern void swap_free(unsigned long);
 extern void swap_duplicate(unsigned long);
-extern void swap_in(struct vm_area_struct *, pte_t *, unsigned long id, int write_access);
+extern void swap_in(struct task_struct *, struct vm_area_struct *, pte_t *, unsigned long id, int write_access);
 
 extern void si_swapinfo(struct sysinfo * val);
 extern void rw_swap_page(int rw, unsigned long nr, char * buf);
@@ -214,8 +214,8 @@
 extern void merge_segments(struct task_struct *, unsigned long, unsigned long);
 extern void insert_vm_struct(struct task_struct *, struct vm_area_struct *);
 extern void remove_shared_vm_struct(struct vm_area_struct *);
-extern void build_mmap_avl(struct task_struct *);
-extern void exit_mmap(struct task_struct *);
+extern void build_mmap_avl(struct mm_struct *);
+extern void exit_mmap(struct mm_struct *);
 extern int do_munmap(unsigned long, size_t);
 extern unsigned long get_unmapped_area(unsigned long, unsigned long);
 
diff -u --recursive --new-file v1.3.23/linux/include/linux/pci.h linux/include/linux/pci.h
--- v1.3.23/linux/include/linux/pci.h	Sun Sep  3 12:27:03 1995
+++ linux/include/linux/pci.h	Mon Sep  4 15:12:50 1995
@@ -132,7 +132,7 @@
 #define PCI_CLASS_STORAGE_IDE		0x0101
 #define PCI_CLASS_STORAGE_FLOPPY	0x0102
 #define PCI_CLASS_STORAGE_IPI		0x0103
-#define PCI_CLASS_STORAGE_RAID		0x0104 
+#define PCI_CLASS_STORAGE_RAID		0x0104
 #define PCI_CLASS_STORAGE_OTHER		0x0180
 
 #define PCI_BASE_CLASS_NETWORK		0x02
diff -u --recursive --new-file v1.3.23/linux/include/linux/sched.h linux/include/linux/sched.h
--- v1.3.23/linux/include/linux/sched.h	Sun Sep  3 12:27:03 1995
+++ linux/include/linux/sched.h	Mon Sep  4 13:02:29 1995
@@ -19,6 +19,7 @@
 #include <linux/tasks.h>
 #include <linux/kernel.h>
 #include <asm/system.h>
+#include <asm/page.h>
 
 /*
  * These are the constant used to fake the fixed-point load-average
@@ -114,6 +115,7 @@
 
 struct mm_struct {
 	int count;
+	pgd_t * pgd;
 	unsigned long start_code, end_code, start_data, end_data;
 	unsigned long start_brk, brk, start_stack, start_mmap;
 	unsigned long arg_start, arg_end, env_start, env_end;
@@ -130,6 +132,7 @@
 
 #define INIT_MM { \
 		1, \
+		swapper_pg_dir, \
 		0, 0, 0, 0, \
 		0, 0, 0, 0, \
 		0, 0, 0, 0, \
@@ -261,6 +264,7 @@
 
 #ifdef __KERNEL__
 
+extern struct   mm_struct init_mm;
 extern struct task_struct init_task;
 extern struct task_struct *task[NR_TASKS];
 extern struct task_struct *last_task_used_math;
diff -u --recursive --new-file v1.3.23/linux/include/net/sock.h linux/include/net/sock.h
--- v1.3.23/linux/include/net/sock.h	Sun Sep  3 12:27:03 1995
+++ linux/include/net/sock.h	Tue Sep  5 14:16:35 1995
@@ -352,6 +352,7 @@
 						int *optlen);
 extern struct sk_buff 		*sock_alloc_send_skb(struct sock *skb,
 						     unsigned long size,
+						     unsigned long fallback,
 						     int noblock,
 						     int *errcode);
 
diff -u --recursive --new-file v1.3.23/linux/ipc/shm.c linux/ipc/shm.c
--- v1.3.23/linux/ipc/shm.c	Sun Sep  3 12:27:03 1995
+++ linux/ipc/shm.c	Mon Sep  4 13:31:26 1995
@@ -393,8 +393,8 @@
 		if (shp->attaches != shmd) {
 			printk("shm_close: shm segment (id=%ld) attach list inconsistent\n",
 			       SWP_OFFSET(shmd->vm_pte) & SHM_ID_MASK);
-			printk("shm_close: %d %08lx-%08lx %c%c%c%c %08lx %08lx\n",
-				shmd->vm_task->pid, shmd->vm_start, shmd->vm_end,
+			printk("shm_close: %08lx-%08lx %c%c%c%c %08lx %08lx\n",
+				shmd->vm_start, shmd->vm_end,
 				shmd->vm_flags & VM_READ ? 'r' : '-',
 				shmd->vm_flags & VM_WRITE ? 'w' : '-',
 				shmd->vm_flags & VM_EXEC ? 'x' : '-',
@@ -435,7 +435,7 @@
 	     tmp < shmd->vm_end;
 	     tmp += PAGE_SIZE, shm_sgn += SWP_ENTRY(0, 1 << SHM_IDX_SHIFT))
 	{
-		page_dir = pgd_offset(shmd->vm_task,tmp);
+		page_dir = pgd_offset(shmd->vm_mm,tmp);
 		page_middle = pmd_alloc(page_dir,tmp);
 		if (!page_middle)
 			return -ENOMEM;
@@ -514,7 +514,7 @@
 	shmd->vm_pte = SWP_ENTRY(SHM_SWP_TYPE, id);
 	shmd->vm_start = addr;
 	shmd->vm_end = addr + shp->shm_npages * PAGE_SIZE;
-	shmd->vm_task = current;
+	shmd->vm_mm = current->mm;
 	shmd->vm_page_prot = (shmflg & SHM_RDONLY) ? PAGE_READONLY : PAGE_SHARED;
 	shmd->vm_flags = VM_SHM | VM_MAYSHARE | VM_SHARED
 			 | VM_MAYREAD | VM_MAYEXEC | VM_READ | VM_EXEC
@@ -738,7 +738,7 @@
 		tmp = shmd->vm_start + (idx << PAGE_SHIFT) - shmd->vm_offset;
 		if (!(tmp >= shmd->vm_start && tmp < shmd->vm_end))
 			continue;
-		page_dir = pgd_offset(shmd->vm_task,tmp);
+		page_dir = pgd_offset(shmd->vm_mm,tmp);
 		if (pgd_none(*page_dir) || pgd_bad(*page_dir)) {
 			printk("shm_swap: bad pgtbl! id=%ld start=%lx idx=%ld\n",
 					id, shmd->vm_start, idx);
@@ -765,8 +765,8 @@
 		set_pte(page_table,
 		  __pte(shmd->vm_pte + SWP_ENTRY(0, idx << SHM_IDX_SHIFT)));
 		mem_map[MAP_NR(pte_page(pte))]--;
-		if (shmd->vm_task->mm->rss > 0)
-			shmd->vm_task->mm->rss--;
+		if (shmd->vm_mm->rss > 0)
+			shmd->vm_mm->rss--;
 		invalid++;
 	    /* continue looping through circular list */
 	    } while (0);
diff -u --recursive --new-file v1.3.23/linux/kernel/exit.c linux/kernel/exit.c
--- v1.3.23/linux/kernel/exit.c	Sun Sep  3 12:27:03 1995
+++ linux/kernel/exit.c	Tue Sep  5 10:19:16 1995
@@ -97,6 +97,10 @@
 			if (STACK_MAGIC != *(unsigned long *)p->kernel_stack_page)
 				printk(KERN_ALERT "release: %s kernel stack corruption. Aiee\n", p->comm);
 			free_page(p->kernel_stack_page);
+			free_page((long) p->mm);
+			free_page((long) p->files);
+			free_page((long) p->fs);
+			free_page((long) p->sigaction);
 			free_page((long) p);
 			return;
 		}
@@ -363,7 +367,6 @@
 			if (current->files->fd[i])
 				sys_close(i);
 	}
-	free_page((long) current->files);
 }
 
 static void exit_fs(void)
@@ -374,20 +377,15 @@
 		iput(current->fs->root);
 		current->fs->root = NULL;
 	}
-	free_page((long) current->fs);
 }
 
 static void exit_mm(void)
 {
-	if (!--current->mm->count)
-		exit_mmap(current);
+	if (!--current->mm->count) {
+		current->mm->rss = 0;
+		exit_mmap(current->mm);
+	}
 	free_page_tables(current);
-	free_page((long) current->mm);
-}
-
-static void exit_signal(void)
-{
-	free_page((long) current->sigaction);
 }
 
 NORET_TYPE void do_exit(long code)
@@ -405,7 +403,6 @@
 	exit_mm();
 	exit_files();
 	exit_fs();
-	exit_signal();
 	exit_thread();
 	forget_original_parent(current);
 	/* 
@@ -468,7 +465,6 @@
 		last_task_used_math = NULL;
 	current->state = TASK_ZOMBIE;
 	current->exit_code = code;
-	current->mm->rss = 0;
 #ifdef DEBUG_PROC_TREE
 	audit_ptree();
 #endif
diff -u --recursive --new-file v1.3.23/linux/kernel/fork.c linux/kernel/fork.c
--- v1.3.23/linux/kernel/fork.c	Sun Sep  3 12:27:03 1995
+++ linux/kernel/fork.c	Tue Sep  5 10:30:29 1995
@@ -79,20 +79,20 @@
 	return free_task;
 }
 
-static int dup_mmap(struct task_struct * tsk)
+static int dup_mmap(struct mm_struct * mm)
 {
 	struct vm_area_struct * mpnt, **p, *tmp;
 
-	tsk->mm->mmap = NULL;
-	p = &tsk->mm->mmap;
+	mm->mmap = NULL;
+	p = &mm->mmap;
 	for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) {
 		tmp = (struct vm_area_struct *) kmalloc(sizeof(struct vm_area_struct), GFP_KERNEL);
 		if (!tmp) {
-			exit_mmap(tsk);
+			exit_mmap(mm);
 			return -ENOMEM;
 		}
 		*tmp = *mpnt;
-		tmp->vm_task = tsk;
+		tmp->vm_mm = mm;
 		tmp->vm_next = NULL;
 		if (tmp->vm_inode) {
 			tmp->vm_inode->i_count++;
@@ -106,7 +106,7 @@
 		*p = tmp;
 		p = &tmp->vm_next;
 	}
-	build_mmap_avl(tsk);
+	build_mmap_avl(mm);
 	return 0;
 }
 
@@ -126,7 +126,7 @@
 	u->mm.cmin_flt = u->mm.cmaj_flt = 0;
 	if (copy_page_tables(&u->tsk))
 		return -1;
-	if (dup_mmap(&u->tsk))
+	if (dup_mmap(&u->mm))
 		return -1;
 	mem_map[MAP_NR(u)]++;
 	return 0;
diff -u --recursive --new-file v1.3.23/linux/kernel/sched.c linux/kernel/sched.c
--- v1.3.23/linux/kernel/sched.c	Sun Sep  3 12:27:03 1995
+++ linux/kernel/sched.c	Mon Sep  4 13:01:49 1995
@@ -81,10 +81,11 @@
 static unsigned long init_kernel_stack[1024] = { STACK_MAGIC, };
 unsigned long init_user_stack[1024] = { STACK_MAGIC, };
 static struct vm_area_struct init_mmap = INIT_MMAP;
-static struct mm_struct init_mm = INIT_MM;
 static struct fs_struct init_fs = INIT_FS;
 static struct files_struct init_files = INIT_FILES;
 static struct sigaction init_sigaction[32] = { {0,}, };
+
+struct mm_struct init_mm = INIT_MM;
 struct task_struct init_task = INIT_TASK;
 
 unsigned long volatile jiffies=0;
diff -u --recursive --new-file v1.3.23/linux/mm/filemap.c linux/mm/filemap.c
--- v1.3.23/linux/mm/filemap.c	Sun Sep  3 12:27:04 1995
+++ linux/mm/filemap.c	Mon Sep  4 12:30:08 1995
@@ -260,7 +260,7 @@
 	unsigned long end = address + size;
 	int error = 0;
 
-	dir = pgd_offset(current, address);
+	dir = pgd_offset(current->mm, address);
 	while (address < end) {
 		error |= filemap_sync_pmd_range(dir, address, end - address, vma, flags);
 		address = (address + PGDIR_SIZE) & PGDIR_MASK;
diff -u --recursive --new-file v1.3.23/linux/mm/kmalloc.c linux/mm/kmalloc.c
--- v1.3.23/linux/mm/kmalloc.c	Sun Sep  3 12:27:04 1995
+++ linux/mm/kmalloc.c	Tue Sep  5 12:28:14 1995
@@ -10,6 +10,8 @@
 /*
  * Modified by Alex Bligh (alex@cconcepts.co.uk) 4 Apr 1994 to use multiple
  * pages. So for 'page' throughout, read 'area'.
+ *
+ * Largely rewritten.. Linus
  */
 
 #include <linux/mm.h>
@@ -17,17 +19,6 @@
 #include <asm/system.h>
 #include <asm/dma.h>
 
-/* I want this low enough for a while to catch errors.
-   I want this number to be increased in the near future:
-        loadable device drivers should use this function to get memory */
-
-#define MAX_KMALLOC_K ((PAGE_SIZE<<(NUM_AREA_ORDERS-1))>>10)
-
-
-/* This defines how many times we should try to allocate a free page before
-   giving up. Normally this shouldn't happen at all. */
-#define MAX_GET_FREE_PAGE_TRIES 4
-
 
 /* Private flags. */
 
@@ -229,17 +220,18 @@
 	}
 
 	/* We need to get a new free page..... */
+	/* This can be done with ints on: This is private to this invocation */
+	restore_flags(flags);
 
 	/* sz is the size of the blocks we're dealing with */
 	sz = BLOCKSIZE(order);
 
-	/* This can be done with ints on: This is private to this invocation */
-	page = (struct page_descriptor *) __get_free_pages(priority & GFP_LEVEL_MASK,
+	page = (struct page_descriptor *) __get_free_pages(priority,
 			sizes[order].gfporder, max_addr);
 
 	if (!page) {
 		static unsigned long last = 0;
-		if (last + 10 * HZ < jiffies) {
+		if (priority != GFP_BUFFER && (last + 10 * HZ < jiffies)) {
 			last = jiffies;
 			printk("Couldn't get a free page.....\n");
 		}
diff -u --recursive --new-file v1.3.23/linux/mm/memory.c linux/mm/memory.c
--- v1.3.23/linux/mm/memory.c	Sun Sep  3 12:27:04 1995
+++ linux/mm/memory.c	Mon Sep  4 12:22:45 1995
@@ -154,7 +154,7 @@
 		return;
 	if (tsk == task[0])
 		panic("task[0] (swapper) doesn't support exec()\n");
-	page_dir = pgd_offset(tsk, 0);
+	page_dir = pgd_offset(tsk->mm, 0);
 	if (!page_dir || page_dir == swapper_pg_dir) {
 		printk("%s trying to clear kernel page-directory: not good\n", tsk->comm);
 		return;
@@ -169,6 +169,7 @@
 		for (i = USER_PTRS_PER_PGD ; i < PTRS_PER_PGD ; i++)
 			new_pg[i] = page_dir[i];
 		SET_PAGE_DIR(tsk, new_pg);
+		tsk->mm->pgd = new_pg;
 		pgd_free(page_dir);
 		return;
 	}
@@ -192,12 +193,13 @@
 		printk("task[0] (swapper) killed: unable to recover\n");
 		panic("Trying to free up swapper memory space");
 	}
-	page_dir = pgd_offset(tsk, 0);
+	page_dir = pgd_offset(tsk->mm, 0);
 	if (!page_dir || page_dir == swapper_pg_dir) {
 		printk("%s trying to free kernel page-directory: not good\n", tsk->comm);
 		return;
 	}
 	SET_PAGE_DIR(tsk, swapper_pg_dir);
+	tsk->mm->pgd = swapper_pg_dir;
 	if (pgd_inuse(page_dir)) {
 		pgd_free(page_dir);
 		return;
@@ -218,9 +220,10 @@
 {
 	pgd_t * pg_dir;
 
-	pg_dir = pgd_offset(current, 0);
+	pg_dir = pgd_offset(current->mm, 0);
 	pgd_reuse(pg_dir);
 	SET_PAGE_DIR(tsk, pg_dir);
+	tsk->mm->pgd = pg_dir;
 	return 0;
 }
 
@@ -323,7 +326,8 @@
 	if (!new_pgd)
 		return -ENOMEM;
 	SET_PAGE_DIR(tsk, new_pgd);
-	old_pgd = pgd_offset(current, 0);
+	tsk->mm->pgd = new_pgd;
+	old_pgd = pgd_offset(current->mm, 0);
 	for (i = 0 ; i < PTRS_PER_PGD ; i++) {
 		int errno = copy_one_pgd(old_pgd, new_pgd);
 		if (errno) {
@@ -413,7 +417,7 @@
 	pgd_t * dir;
 	unsigned long end = address + size;
 
-	dir = pgd_offset(current, address);
+	dir = pgd_offset(current->mm, address);
 	while (address < end) {
 		unmap_pmd_range(dir, address, end - address);
 		address = (address + PGDIR_SIZE) & PGDIR_MASK;
@@ -467,7 +471,7 @@
 	pte_t zero_pte;
 
 	zero_pte = pte_wrprotect(mk_pte(ZERO_PAGE, prot));
-	dir = pgd_offset(current, address);
+	dir = pgd_offset(current->mm, address);
 	while (address < end) {
 		pmd_t *pmd = pmd_alloc(dir, address);
 		error = -ENOMEM;
@@ -537,7 +541,7 @@
 	unsigned long end = from + size;
 
 	offset -= from;
-	dir = pgd_offset(current, from);
+	dir = pgd_offset(current->mm, from);
 	while (from < end) {
 		pmd_t *pmd = pmd_alloc(dir, from);
 		error = -ENOMEM;
@@ -581,7 +585,7 @@
 		printk("put_dirty_page: trying to put page %08lx at %08lx\n",page,address);
 	if (mem_map[MAP_NR(page)] != 1)
 		printk("mem_map disagrees with %08lx at %08lx\n",page,address);
-	pgd = pgd_offset(tsk,address);
+	pgd = pgd_offset(tsk->mm,address);
 	pmd = pmd_alloc(pgd, address);
 	if (!pmd) {
 		free_page(page);
@@ -621,8 +625,8 @@
  * change only once the write actually happens. This avoids a few races,
  * and potentially makes it more efficient.
  */
-void do_wp_page(struct vm_area_struct * vma, unsigned long address,
-	int write_access)
+void do_wp_page(struct task_struct * tsk, struct vm_area_struct * vma,
+	unsigned long address, int write_access)
 {
 	pgd_t *page_dir;
 	pmd_t *page_middle;
@@ -630,7 +634,7 @@
 	unsigned long old_page, new_page;
 
 	new_page = __get_free_page(GFP_KERNEL);
-	page_dir = pgd_offset(vma->vm_task,address);
+	page_dir = pgd_offset(vma->vm_mm, address);
 	if (pgd_none(*page_dir))
 		goto end_wp_page;
 	if (pgd_bad(*page_dir))
@@ -649,14 +653,14 @@
 	old_page = pte_page(pte);
 	if (old_page >= high_memory)
 		goto bad_wp_page;
-	vma->vm_task->mm->min_flt++;
+	vma->vm_mm->min_flt++;
 	/*
 	 * Do we need to copy?
 	 */
 	if (mem_map[MAP_NR(old_page)] != 1) {
 		if (new_page) {
 			if (mem_map[MAP_NR(old_page)] & MAP_PAGE_RESERVED)
-				++vma->vm_task->mm->rss;
+				++vma->vm_mm->rss;
 			copy_page(old_page,new_page);
 			set_pte(page_table, pte_mkwrite(pte_mkdirty(mk_pte(new_page, vma->vm_page_prot))));
 			free_page(old_page);
@@ -665,7 +669,7 @@
 		}
 		set_pte(page_table, BAD_PAGE);
 		free_page(old_page);
-		oom(vma->vm_task);
+		oom(tsk);
 		invalidate();
 		return;
 	}
@@ -676,15 +680,15 @@
 	return;
 bad_wp_page:
 	printk("do_wp_page: bogus page at address %08lx (%08lx)\n",address,old_page);
-	send_sig(SIGKILL, vma->vm_task, 1);
+	send_sig(SIGKILL, tsk, 1);
 	goto end_wp_page;
 bad_wp_pagemiddle:
 	printk("do_wp_page: bogus page-middle at address %08lx (%08lx)\n", address, pmd_val(*page_middle));
-	send_sig(SIGKILL, vma->vm_task, 1);
+	send_sig(SIGKILL, tsk, 1);
 	goto end_wp_page;
 bad_wp_pagedir:
 	printk("do_wp_page: bogus page-dir entry at address %08lx (%08lx)\n", address, pgd_val(*page_dir));
-	send_sig(SIGKILL, vma->vm_task, 1);
+	send_sig(SIGKILL, tsk, 1);
 end_wp_page:
 	if (new_page)
 		free_page(new_page);
@@ -754,7 +758,7 @@
 	start &= PAGE_MASK;
 
 	for (;;) {
-		do_wp_page(vma, start, 1);
+		do_wp_page(current, vma, start, 1);
 		if (!size)
 			break;
 		size--;
@@ -773,12 +777,12 @@
 	return -EFAULT;
 }
 
-static inline void get_empty_page(struct vm_area_struct * vma, pte_t * page_table)
+static inline void get_empty_page(struct task_struct * tsk, struct vm_area_struct * vma, pte_t * page_table)
 {
 	unsigned long tmp;
 
 	if (!(tmp = get_free_page(GFP_KERNEL))) {
-		oom(vma->vm_task);
+		oom(tsk);
 		put_page(page_table, BAD_PAGE);
 		return;
 	}
@@ -802,7 +806,7 @@
 	pte_t * from_table, * to_table;
 	pte_t from, to;
 
-	from_dir = pgd_offset(from_area->vm_task,from_address);
+	from_dir = pgd_offset(from_area->vm_mm,from_address);
 /* is there a page-directory at from? */
 	if (pgd_none(*from_dir))
 		return 0;
@@ -836,7 +840,7 @@
 	if (mem_map[MAP_NR(pte_page(from))] & MAP_PAGE_RESERVED)
 		return 0;
 /* is the destination ok? */
-	to_dir = pgd_offset(to_area->vm_task,to_address);
+	to_dir = pgd_offset(to_area->vm_mm,to_address);
 /* is there a page-directory at to? */
 	if (pgd_none(*to_dir))
 		return 0;
@@ -958,7 +962,7 @@
 	pmd_t *pmd;
 	pte_t *pte;
 
-	pgd = pgd_offset(tsk, address);
+	pgd = pgd_offset(tsk->mm, address);
 	pmd = pmd_alloc(pgd, address);
 	if (!pmd) {
 		oom(tsk);
@@ -972,13 +976,14 @@
 	return pte;
 }
 
-static inline void do_swap_page(struct vm_area_struct * vma, unsigned long address,
+static inline void do_swap_page(struct task_struct * tsk, 
+	struct vm_area_struct * vma, unsigned long address,
 	pte_t * page_table, pte_t entry, int write_access)
 {
 	pte_t page;
 
 	if (!vma->vm_ops || !vma->vm_ops->swapin) {
-		swap_in(vma, page_table, pte_val(entry), write_access);
+		swap_in(tsk, vma, page_table, pte_val(entry), write_access);
 		return;
 	}
 	page = vma->vm_ops->swapin(vma, address - vma->vm_start + vma->vm_offset, pte_val(entry));
@@ -988,8 +993,8 @@
 	}
 	if (mem_map[MAP_NR(pte_page(page))] > 1 && !(vma->vm_flags & VM_SHARED))
 		page = pte_wrprotect(page);
-	++vma->vm_task->mm->rss;
-	++vma->vm_task->mm->maj_flt;
+	++vma->vm_mm->rss;
+	++vma->vm_mm->maj_flt;
 	set_pte(page_table, page);
 	return;
 }
@@ -1000,43 +1005,43 @@
  * the "write_access" parameter is true in order to avoid the next
  * page fault.
  */
-void do_no_page(struct vm_area_struct * vma, unsigned long address,
-	int write_access)
+void do_no_page(struct task_struct * tsk, struct vm_area_struct * vma,
+	unsigned long address, int write_access)
 {
 	pte_t * page_table;
 	pte_t entry;
 	unsigned long page;
 
-	page_table = get_empty_pgtable(vma->vm_task,address);
+	page_table = get_empty_pgtable(tsk, address);
 	if (!page_table)
 		return;
 	entry = *page_table;
 	if (pte_present(entry))
 		return;
 	if (!pte_none(entry)) {
-		do_swap_page(vma, address, page_table, entry, write_access);
+		do_swap_page(tsk, vma, address, page_table, entry, write_access);
 		return;
 	}
 	address &= PAGE_MASK;
 	if (!vma->vm_ops || !vma->vm_ops->nopage) {
-		++vma->vm_task->mm->rss;
-		++vma->vm_task->mm->min_flt;
-		get_empty_page(vma, page_table);
+		++vma->vm_mm->rss;
+		++vma->vm_mm->min_flt;
+		get_empty_page(tsk, vma, page_table);
 		return;
 	}
 	page = __get_free_page(GFP_KERNEL);
 	if (share_page(vma, address, write_access, page)) {
-		++vma->vm_task->mm->min_flt;
-		++vma->vm_task->mm->rss;
+		++vma->vm_mm->min_flt;
+		++vma->vm_mm->rss;
 		return;
 	}
 	if (!page) {
-		oom(current);
+		oom(tsk);
 		put_page(page_table, BAD_PAGE);
 		return;
 	}
-	++vma->vm_task->mm->maj_flt;
-	++vma->vm_task->mm->rss;
+	++vma->vm_mm->maj_flt;
+	++vma->vm_mm->rss;
 	/*
 	 * The fourth argument is "no_share", which tells the low-level code
 	 * to copy, not share the page even if sharing is possible.  It's
@@ -1083,7 +1088,7 @@
 	int write_access, pte_t * pte)
 {
 	if (!pte_present(*pte)) {
-		do_no_page(vma, address, write_access);
+		do_no_page(current, vma, address, write_access);
 		return;
 	}
 	set_pte(pte, pte_mkyoung(*pte));
@@ -1093,7 +1098,7 @@
 		set_pte(pte, pte_mkdirty(*pte));
 		return;
 	}
-	do_wp_page(vma, address, write_access);
+	do_wp_page(current, vma, address, write_access);
 }
 
 void handle_mm_fault(struct vm_area_struct * vma, unsigned long address,
@@ -1103,7 +1108,7 @@
 	pmd_t *pmd;
 	pte_t *pte;
 
-	pgd = pgd_offset(vma->vm_task, address);
+	pgd = pgd_offset(vma->vm_mm, address);
 	pmd = pmd_alloc(pgd, address);
 	if (!pmd)
 		goto no_memory;
@@ -1114,5 +1119,5 @@
 	update_mmu_cache(vma, address, *pte);
 	return;
 no_memory:
-	oom(vma->vm_task);
+	oom(current);
 }
diff -u --recursive --new-file v1.3.23/linux/mm/mmap.c linux/mm/mmap.c
--- v1.3.23/linux/mm/mmap.c	Tue Jun 27 14:11:47 1995
+++ linux/mm/mmap.c	Tue Sep  5 10:13:32 1995
@@ -77,8 +77,10 @@
 		default:
 			return -EINVAL;
 		}
-		if ((flags & MAP_DENYWRITE) && (file->f_inode->i_wcount > 0))
-			return -ETXTBSY;
+		if (flags & MAP_DENYWRITE) {
+			if (file->f_inode->i_wcount > 0)
+				return -ETXTBSY;
+		}
 	} else if ((flags & MAP_TYPE) != MAP_PRIVATE)
 		return -EINVAL;
 
@@ -111,7 +113,7 @@
 	if (!vma)
 		return -ENOMEM;
 
-	vma->vm_task = current;
+	vma->vm_mm = current->mm;
 	vma->vm_start = addr;
 	vma->vm_end = addr + len;
 	vma->vm_flags = prot & (VM_READ | VM_WRITE | VM_EXEC);
@@ -772,23 +774,23 @@
 }
 
 /* Build the AVL tree corresponding to the VMA list. */
-void build_mmap_avl(struct task_struct * task)
+void build_mmap_avl(struct mm_struct * mm)
 {
 	struct vm_area_struct * vma;
 
-	task->mm->mmap_avl = NULL;
-	for (vma = task->mm->mmap; vma; vma = vma->vm_next)
-		avl_insert(vma, &task->mm->mmap_avl);
+	mm->mmap_avl = NULL;
+	for (vma = mm->mmap; vma; vma = vma->vm_next)
+		avl_insert(vma, &mm->mmap_avl);
 }
 
 /* Release all mmaps. */
-void exit_mmap(struct task_struct * task)
+void exit_mmap(struct mm_struct * mm)
 {
 	struct vm_area_struct * mpnt;
 
-	mpnt = task->mm->mmap;
-	task->mm->mmap = NULL;
-	task->mm->mmap_avl = NULL;
+	mpnt = mm->mmap;
+	mm->mmap = NULL;
+	mm->mmap_avl = NULL;
 	while (mpnt) {
 		struct vm_area_struct * next = mpnt->vm_next;
 		if (mpnt->vm_ops && mpnt->vm_ops->close)
diff -u --recursive --new-file v1.3.23/linux/mm/mprotect.c linux/mm/mprotect.c
--- v1.3.23/linux/mm/mprotect.c	Sun Sep  3 12:27:04 1995
+++ linux/mm/mprotect.c	Mon Sep  4 12:30:19 1995
@@ -73,7 +73,7 @@
 {
 	pgd_t *dir;
 
-	dir = pgd_offset(current, start);
+	dir = pgd_offset(current->mm, start);
 	while (start < end) {
 		change_pmd_range(dir, start, end - start, newprot);
 		start = (start + PGDIR_SIZE) & PGDIR_MASK;
diff -u --recursive --new-file v1.3.23/linux/mm/swap.c linux/mm/swap.c
--- v1.3.23/linux/mm/swap.c	Sun Sep  3 12:27:04 1995
+++ linux/mm/swap.c	Mon Sep  4 12:29:42 1995
@@ -310,8 +310,8 @@
  * Also, don't bother to add to the swap cache if this page-in
  * was due to a write access.
  */
-void swap_in(struct vm_area_struct * vma, pte_t * page_table,
-	unsigned long entry, int write_access)
+void swap_in(struct task_struct * tsk, struct vm_area_struct * vma,
+	pte_t * page_table, unsigned long entry, int write_access)
 {
 	unsigned long page = __get_free_page(GFP_KERNEL);
 
@@ -322,7 +322,7 @@
 	if (!page) {
 		set_pte(page_table, BAD_PAGE);
 		swap_free(entry);
-		oom(current);
+		oom(tsk);
 		return;
 	}
 	read_swap_page(entry, (char *) page);
@@ -330,8 +330,8 @@
 		free_page(page);
 		return;
 	}
-	vma->vm_task->mm->rss++;
-	vma->vm_task->mm->maj_flt++;
+	vma->vm_mm->rss++;
+	vma->vm_mm->maj_flt++;
 	if (!write_access && add_to_swap_cache(page, entry)) {
 		set_pte(page_table, mk_pte(page, vma->vm_page_prot));
 		return;
@@ -352,7 +352,8 @@
  * using a process that no longer actually exists (it might
  * have died while we slept).
  */
-static inline int try_to_swap_out(struct vm_area_struct* vma, unsigned long address, pte_t * page_table, unsigned long limit)
+static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struct* vma,
+	unsigned long address, pte_t * page_table, unsigned long limit)
 {
 	pte_t pte;
 	unsigned long entry;
@@ -374,8 +375,8 @@
 	}	
 	if (pte_dirty(pte)) {
 		if (vma->vm_ops && vma->vm_ops->swapout) {
-			pid_t pid = vma->vm_task->pid;
-			vma->vm_task->mm->rss--;
+			pid_t pid = tsk->pid;
+			vma->vm_mm->rss--;
 			if (vma->vm_ops->swapout(vma, address - vma->vm_start + vma->vm_offset, page_table))
 				kill_proc(pid, SIGBUS, 1);
 		} else {
@@ -383,7 +384,7 @@
 				return 0;
 			if (!(entry = get_swap_page()))
 				return 0;
-			vma->vm_task->mm->rss--;
+			vma->vm_mm->rss--;
 			set_pte(page_table, __pte(entry));
 			invalidate();
 			write_swap_page(entry, (char *) page);
@@ -397,13 +398,13 @@
 			printk("Aiee.. duplicated cached swap-cache entry\n");
 			return 0;
 		}
-		vma->vm_task->mm->rss--;
+		vma->vm_mm->rss--;
 		set_pte(page_table, __pte(entry));
 		invalidate();
 		free_page(page);
 		return 1;
 	} 
-	vma->vm_task->mm->rss--;
+	vma->vm_mm->rss--;
 	pte_clear(page_table);
 	invalidate();
 	entry = mem_map[MAP_NR(page)];
@@ -438,8 +439,8 @@
  */
 #define SWAP_RATIO	128
 
-static inline int swap_out_pmd(struct vm_area_struct * vma, pmd_t *dir,
-	unsigned long address, unsigned long end, unsigned long limit)
+static inline int swap_out_pmd(struct task_struct * tsk, struct vm_area_struct * vma,
+	pmd_t *dir, unsigned long address, unsigned long end, unsigned long limit)
 {
 	pte_t * pte;
 	unsigned long pmd_end;
@@ -460,8 +461,8 @@
 
 	do {
 		int result;
-		vma->vm_task->mm->swap_address = address + PAGE_SIZE;
-		result = try_to_swap_out(vma, address, pte, limit);
+		vma->vm_mm->swap_address = address + PAGE_SIZE;
+		result = try_to_swap_out(tsk, vma, address, pte, limit);
 		if (result)
 			return result;
 		address += PAGE_SIZE;
@@ -470,8 +471,8 @@
 	return 0;
 }
 
-static inline int swap_out_pgd(struct vm_area_struct * vma, pgd_t *dir,
-	unsigned long address, unsigned long end, unsigned long limit)
+static inline int swap_out_pgd(struct task_struct * tsk, struct vm_area_struct * vma,
+	pgd_t *dir, unsigned long address, unsigned long end, unsigned long limit)
 {
 	pmd_t * pmd;
 	unsigned long pgd_end;
@@ -491,7 +492,7 @@
 		end = pgd_end;
 	
 	do {
-		int result = swap_out_pmd(vma, pmd, address, end, limit);
+		int result = swap_out_pmd(tsk, vma, pmd, address, end, limit);
 		if (result)
 			return result;
 		address = (address + PMD_SIZE) & PMD_MASK;
@@ -500,8 +501,8 @@
 	return 0;
 }
 
-static int swap_out_vma(struct vm_area_struct * vma, pgd_t *pgdir,
-	unsigned long start, unsigned long limit)
+static int swap_out_vma(struct task_struct * tsk, struct vm_area_struct * vma,
+	pgd_t *pgdir, unsigned long start, unsigned long limit)
 {
 	unsigned long end;
 
@@ -512,7 +513,7 @@
 
 	end = vma->vm_end;
 	while (start < end) {
-		int result = swap_out_pgd(vma, pgdir, start, end, limit);
+		int result = swap_out_pgd(tsk, vma, pgdir, start, end, limit);
 		if (result)
 			return result;
 		start = (start + PGDIR_SIZE) & PGDIR_MASK;
@@ -542,7 +543,7 @@
 		address = vma->vm_start;
 
 	for (;;) {
-		int result = swap_out_vma(vma, pgd_offset(p, address), address, limit);
+		int result = swap_out_vma(p, vma, pgd_offset(p->mm, address), address, limit);
 		if (result)
 			return result;
 		vma = vma->vm_next;
@@ -871,7 +872,7 @@
 		return 1;
 	}
 	set_pte(dir, pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))));
-	++vma->vm_task->mm->rss;
+	++vma->vm_mm->rss;
 	swap_free(pte_val(pte));
 	return 1;
 }
@@ -956,7 +957,7 @@
 	 */
 	vma = p->mm->mmap;
 	while (vma) {
-		pgd_t * pgd = pgd_offset(p, vma->vm_start);
+		pgd_t * pgd = pgd_offset(p->mm, vma->vm_start);
 		if (unuse_vma(vma, pgd, vma->vm_start, vma->vm_end, type, page))
 			return 1;
 		vma = vma->vm_next;
diff -u --recursive --new-file v1.3.23/linux/mm/vmalloc.c linux/mm/vmalloc.c
--- v1.3.23/linux/mm/vmalloc.c	Sun Sep  3 12:27:04 1995
+++ linux/mm/vmalloc.c	Mon Sep  4 13:03:05 1995
@@ -32,7 +32,7 @@
 	struct task_struct * p;
 
 	for_each_task(p)
-		*pgd_offset(p,address) = entry;
+		*pgd_offset(p->mm,address) = entry;
 }
 
 static inline void free_area_pte(pmd_t * pmd, unsigned long address, unsigned long size)
@@ -96,7 +96,7 @@
 	pgd_t * dir;
 	unsigned long end = address + size;
 
-	dir = pgd_offset(&init_task, address);
+	dir = pgd_offset(&init_mm, address);
 	while (address < end) {
 		free_area_pmd(dir, address, end - address);
 		address = (address + PGDIR_SIZE) & PGDIR_MASK;
@@ -152,7 +152,7 @@
 	pgd_t * dir;
 	unsigned long end = address + size;
 
-	dir = pgd_offset(&init_task, address);
+	dir = pgd_offset(&init_mm, address);
 	while (address < end) {
 		pmd_t *pmd = pmd_alloc_kernel(dir, address);
 		if (!pmd)
@@ -213,7 +213,7 @@
 	unsigned long end = address + size;
 
 	offset -= address;
-	dir = pgd_offset(&init_task, address);
+	dir = pgd_offset(&init_mm, address);
 	while (address < end) {
 		pmd_t *pmd = pmd_alloc_kernel(dir, address);
 		if (!pmd)
diff -u --recursive --new-file v1.3.23/linux/net/Changes linux/net/Changes
--- v1.3.23/linux/net/Changes	Sun Sep  3 12:27:04 1995
+++ linux/net/Changes	Mon Sep  4 14:48:37 1995
@@ -95,7 +95,7 @@
 o	Appletalk router fixes [Michael Callahan]	[TESTED]
 o	TCP state error fixes [Mark Tamsky]		[TESTED]
 o	Verify area fixes [Heiko Eissfeldt]		[TESTED]
-o	Routes use metric field	[John Naylor]		[TESTED/NOT YET AS BSD]
+o	Routes use metric field	[John Naylor]		[TESTED]
 o	Major AX.25/NetROM fixes [John Nalor]		[TESTED]
 
 ------->>>>>  NET3 030  <<<<<----------
@@ -177,16 +177,44 @@
 o	Datagram generic iovec support			[IN]
 o	Misc minor bug fixes				[IN]
 
--------->>>>> 1.3.22 I expect <<<<<-------
+-------->>>>> 1.3.22  <<<<<-------
 
-o	Device lock against page fault			[IN]
+o	Device lock against page fault			[TESTED]
 o	IP_HDRINCL					[TESTED]
 o	IP firewalling spoofing protection		[IN]
 o	IGMP bug fixes and workarounds			[TESTED]
 o	IFF_ALLMULTI protocol layer support		[TESTED]
 o	First parts of IP multicast routing code	[IN]
-o	Generate BSD ENETDOWN errors			[IN]
+o	Generate BSD ENETDOWN errors			[TESTED]
+o	Clean device unload bug<Walter Wolfgang>	[IN]
 
+-------->>>>> 1.3.23 <<<<<-------
+
+o	Missing IGMP includes fixes			[TESTED]
+o	Smarter buffer use options for sockets		[IN]
+o	AF_UNIX smarter buffer driving			[IN]
+o	AF_UNIX full BSD semantics on STREAM writes	[IN]
+o	IOVEC's support repeated calls to copy more	[IN]
+o	Zero fragment 'solaris nfs' bug fixed <Werner>  [IN]
+o	NetROM supports sendmsg/recvmsg			[IN]
+
+---------- Things Linus had for a while and not merged ----------------
+
+o	Paul Gortmakers 8390 Copy and checksum		[PLEASE ADD 8)]
+
+---------- Things pending from other people to chase -------------
+
+o	Tom May's insw_and_checksum()
+
+---------- Things pending for me to merge --------------
+
+o	IPFW support for TOS changing (Al Longyear)
+o	/dev/skip /dev/ipah etc - Kernel/Usermode communications module (me)
+o	AF_UNIX garbage collect code
+o	Closing socket change (Marc Tamsky)
+o	Faster closedown option for heavy use sites (me)
+
+--------------- Tbings That Need Doing Before 1.4 ------------------
 
 o	Finish merging the bridge code
 o	SIOCSLEEPRT patch
@@ -202,11 +230,14 @@
 o	Clean up RAW AX.25 sockets.
 o	Finish 802.2 Class I code to be compliant to the oddities of 802.2
 o	Full variable length AX.25 support		[JSN doing]
-o	Tidy BPQ support
+o	Tidy BPQ support to use an bpqip tunnel device
 o	Strange eth0-eth3 bug 
 o	Finish IPIP bug fixes
 o	Why doesnt the PROTO_UNREACH get sent ?
-
+o	IP protocols using sendmsg()
+o	Kill off old ip_queue_xmit/ip_send stuff.
+o	Remove kernel RARP and replace with user mode daemon.
+o	Throw out existing firewall ioctl()'s and use a single table load.
 
 0.2
 ---
@@ -222,7 +253,7 @@
 
 0.3
 ---
-o	Merge the layered protocol support.
+o	Merge the layered protocol support.		[ABANDONED TOO SLOW]
 o	IP firewalling performance - caching and radix trees.
 o	Zebedee
 o	802.2 Class 2 services (eg netbios).
@@ -279,7 +310,7 @@
 
 10.	Frame Relay/WAN/ISDN drivers [I'm working on the sonix EuroISDN board
 driver but thats for an internal project and its general release is still
-a maybe (so is finishing it ;))][Someone is working on Frame Relay].
+a maybe (so is finishing it ;))][Jim Freeman is working on Frame Relay].
 
 11.	IP over SCSI.
 
@@ -307,6 +338,9 @@
 
 19.	IPv4 IP-AH and IP-ESP.
 [Taken]
+
+20.	SKIP IP security using ENskip-0.10 - started
+[Me]
 
 BTW: Don't let the magic words 'kernel programming' worry you. Its like DOS
 - you make a mistake you have to reboot. You do at least get dumps and a
diff -u --recursive --new-file v1.3.23/linux/net/appletalk/ddp.c linux/net/appletalk/ddp.c
--- v1.3.23/linux/net/appletalk/ddp.c	Mon Aug 28 14:52:25 1995
+++ linux/net/appletalk/ddp.c	Mon Sep  4 14:48:36 1995
@@ -1545,7 +1545,7 @@
 	
 	size += dev->hard_header_len;
 
-	skb = sock_alloc_send_skb(sk, size, 0 , &err);
+	skb = sock_alloc_send_skb(sk, size, 0, 0 , &err);
 	if(skb==NULL)
 		return err;
 
diff -u --recursive --new-file v1.3.23/linux/net/ax25/af_ax25.c linux/net/ax25/af_ax25.c
--- v1.3.23/linux/net/ax25/af_ax25.c	Mon Aug 28 14:52:25 1995
+++ linux/net/ax25/af_ax25.c	Mon Sep  4 14:48:36 1995
@@ -1720,7 +1720,7 @@
 	/* Assume the worst case */
 	size = len + 3 + size_ax25_addr(dp) + AX25_BPQ_HEADER_LEN;
 
-	if ((skb = sock_alloc_send_skb(sk, size, 0, &err)) == NULL)
+	if ((skb = sock_alloc_send_skb(sk, size, 0, 0, &err)) == NULL)
 		return err;
 
 	skb->sk   = sk;
diff -u --recursive --new-file v1.3.23/linux/net/ax25/ax25_out.c linux/net/ax25/ax25_out.c
--- v1.3.23/linux/net/ax25/ax25_out.c	Fri Aug 18 08:44:59 1995
+++ linux/net/ax25/ax25_out.c	Mon Sep  4 14:48:36 1995
@@ -71,7 +71,7 @@
 
 		while (skb->len > 0) {
 			if (skb->sk != NULL) {
-				if ((skbn = sock_alloc_send_skb(skb->sk, mtu + 2 + frontlen, 0, &err)) == NULL)
+				if ((skbn = sock_alloc_send_skb(skb->sk, mtu + 2 + frontlen, 0, 0, &err)) == NULL)
 					return;
 			} else {
 				if ((skbn = alloc_skb(mtu + 2 + frontlen, GFP_ATOMIC)) == NULL)
diff -u --recursive --new-file v1.3.23/linux/net/core/iovec.c linux/net/core/iovec.c
--- v1.3.23/linux/net/core/iovec.c	Mon Aug 28 14:52:25 1995
+++ linux/net/core/iovec.c	Mon Sep  4 14:56:40 1995
@@ -6,6 +6,9 @@
  *		modify it under the terms of the GNU General Public License
  *		as published by the Free Software Foundation; either version
  *		2 of the License, or (at your option) any later version.
+ *
+ *	Fixes:
+ *		Andrew Lunn	:	Errors in iovec copying.
  */
 
 
@@ -64,10 +67,15 @@
 {
 	while(len>0)
 	{
-		int copy = min(iov->iov_len,len);
-		memcpy_tofs(iov->iov_base,kdata,copy);
-		kdata+=copy;
-		len-=copy;
+		if(iov->iov_len)
+		{
+			int copy = min(iov->iov_len,len);
+			memcpy_tofs(iov->iov_base,kdata,copy);
+			kdata+=copy;
+			len-=copy;
+			iov->iov_len-=copy;
+			iov->iov_base+=copy;
+		}
 		iov++;
 	}
 }
@@ -78,13 +86,17 @@
  
 void memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len)
 {
-	int copy;
 	while(len>0)
 	{
-		copy=min(len,iov->iov_len);
-		memcpy_fromfs(kdata, iov->iov_base, copy);
-		len-=copy;
-		kdata+=copy;
+		if(iov->iov_len)
+		{
+			int copy=min(len,iov->iov_len);
+			memcpy_fromfs(kdata, iov->iov_base, copy);
+			len-=copy;
+			kdata+=copy;
+			iov->iov_base+=copy;
+			iov->iov_len-=copy;
+		}
 		iov++;
 	}
 }
diff -u --recursive --new-file v1.3.23/linux/net/core/sock.c linux/net/core/sock.c
--- v1.3.23/linux/net/core/sock.c	Fri Jul  7 13:42:58 1995
+++ linux/net/core/sock.c	Mon Sep  4 14:48:36 1995
@@ -64,6 +64,7 @@
  *		Alan Cox	:	Make SO_DEBUG superuser only.
  *		Alan Cox	:	Allow anyone to clear SO_DEBUG
  *					(compatibility fix)
+ *		Alan Cox	:	Added optimistic memory grabbing for AF_UNIX throughput.
  *
  * To Fix:
  *
@@ -421,7 +422,7 @@
  *	Generic send/receive buffer handlers
  */
 
-struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, int noblock, int *errcode)
+struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, unsigned long fallback, int noblock, int *errcode)
 {
 	struct sk_buff *skb;
 	int err;
@@ -446,8 +447,21 @@
 			return NULL;
 		}
 		
-		skb = sock_wmalloc(sk, size, 0, GFP_KERNEL);
+		if(!fallback)
+			skb = sock_wmalloc(sk, size, 0, GFP_KERNEL);
+		else
+		{
+			/* The buffer get won't block, or use the atomic queue. It does
+			   produce annoying no free page messages still.... */
+			skb = sock_wmalloc(sk, size, 0 , GFP_BUFFER);
+			if(!skb)
+				skb=sock_wmalloc(sk, fallback, 0, GFP_KERNEL);
+		}
 		
+		/*
+		 *	This means we have too many buffers for this socket already.
+		 */
+		 
 		if(skb==NULL)
 		{
 			unsigned long tmp;
diff -u --recursive --new-file v1.3.23/linux/net/ipv4/Makefile linux/net/ipv4/Makefile
--- v1.3.23/linux/net/ipv4/Makefile	Sun Sep  3 12:27:05 1995
+++ linux/net/ipv4/Makefile	Mon Sep  4 07:38:03 1995
@@ -12,11 +12,13 @@
 		   arp.o ip.o raw.o icmp.o tcp.o udp.o devinet.o af_inet.o \
 		   igmp.o ip_fw.o ipip.o ipmr.o
 
-ifdef CONFIG_INET_RARP
+ifeq ($(CONFIG_INET_RARP),y)
 IPV4_OBJS := $(IPV4_OBJS) rarp.o
 else
-M_OBJS := rarp.o
-MOD_LIST_NAME := IPV4_MODULES
+  ifeq ($(CONFIG_INET_RARP),m)
+    M_OBJS := rarp.o
+    MOD_LIST_NAME := IPV4_MODULES
+   endif
 endif
 
 ifdef CONFIG_INET
diff -u --recursive --new-file v1.3.23/linux/net/ipv4/ip.c linux/net/ipv4/ip.c
--- v1.3.23/linux/net/ipv4/ip.c	Sun Sep  3 16:12:49 1995
+++ linux/net/ipv4/ip.c	Mon Sep  4 14:48:37 1995
@@ -90,6 +90,7 @@
  *	Gerhard Koerting	:	IP fragmentation forwarding fix
  *		Alan Cox	:	Device lock against page fault.
  *		Alan Cox	:	IP_HDRINCL facility.
+ *	Werner Almesberger	:	Zero fragment bug
  *
  *  
  *
@@ -2531,7 +2532,7 @@
 	if(length+20 <= dev->mtu && !MULTICAST(daddr) && daddr!=0xFFFFFFFF && daddr!=dev->pa_brdaddr)
 	{	
 		int error;
-		struct sk_buff *skb=sock_alloc_send_skb(sk, length+20+15+dev->hard_header_len,0,&error);
+		struct sk_buff *skb=sock_alloc_send_skb(sk, length+20+15+dev->hard_header_len,0, 0,&error);
 		if(skb==NULL)
 		{
 			ip_statistics.IpOutDiscards++;
@@ -2614,7 +2615,7 @@
 	 
 	fraglen = length - offset + fragheaderlen;
 	
-	if(fraglen==0)
+	if(length-offset==0)
 	{
 		fraglen = maxfraglen;
 		offset -= maxfraglen-fragheaderlen;
@@ -2660,7 +2661,7 @@
 		 *	Get the memory we require with some space left for alignment.
 		 */
 
-		skb = sock_alloc_send_skb(sk, fraglen+15, 0, &error);
+		skb = sock_alloc_send_skb(sk, fraglen+15, 0, 0, &error);
 		if (skb == NULL)
 		{
 			ip_statistics.IpOutDiscards++;
diff -u --recursive --new-file v1.3.23/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
--- v1.3.23/linux/net/ipv4/tcp.c	Sun Sep  3 12:27:06 1995
+++ linux/net/ipv4/tcp.c	Mon Sep  4 14:48:37 1995
@@ -141,7 +141,7 @@
  *		Alan Cox	:	Per route irtt.
  *		Matt Day	:	Select() match BSD precisely on error
  *		Alan Cox	:	New buffers
- *		Mark Tamsky	:	Various sk->prot->retransmits and 
+ *		Marc Tamsky	:	Various sk->prot->retransmits and 
  *					sk->retransmits misupdating fixed.
  *					Fixed tcp_write_timeout: stuck close,
  *					and TCP syn retries gets used now.
diff -u --recursive --new-file v1.3.23/linux/net/netrom/af_netrom.c linux/net/netrom/af_netrom.c
--- v1.3.23/linux/net/netrom/af_netrom.c	Mon Aug 28 14:52:26 1995
+++ linux/net/netrom/af_netrom.c	Mon Sep  4 14:48:37 1995
@@ -1019,11 +1019,10 @@
 	return 1;
 }
 
-static int nr_sendto(struct socket *sock, const void *ubuf, int len, int noblock,
-	unsigned flags, struct sockaddr *usip, int addr_len)
+static int nr_sendmsg(struct socket *sock, struct msghdr *msg, int len, int noblock, int flags)
 {
 	struct sock *sk = (struct sock *)sock->data;
-	struct sockaddr_ax25 *usax = (struct sockaddr_ax25 *)usip;
+	struct sockaddr_ax25 *usax = (struct sockaddr_ax25 *)msg->msg_name;
 	int err;
 	struct sockaddr_ax25 sax;
 	struct sk_buff *skb;
@@ -1046,7 +1045,7 @@
 		return -ENETUNREACH;
 		
 	if (usax) {
-		if (addr_len < sizeof(sax))
+		if (msg->msg_namelen < sizeof(sax))
 			return -EINVAL;
 		memcpy(&sax, usax, sizeof(sax));
 		if (sk->type == SOCK_SEQPACKET && memcmp(&sk->nr->dest_addr, &sax.sax25_call, sizeof(ax25_address)) != 0)
@@ -1069,7 +1068,7 @@
 
 	size = len + AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + 3 + NR_NETWORK_LEN + NR_TRANSPORT_LEN;
 
-	if ((skb = sock_alloc_send_skb(sk, size, 0, &err)) == NULL)
+	if ((skb = sock_alloc_send_skb(sk, size, 0, 0, &err)) == NULL)
 		return err;
 
 	skb->sk   = sk;
@@ -1110,7 +1109,7 @@
 		printk("NET/ROM: Appending user data\n");
 
 	/* User data follows immediately after the NET/ROM transport header */
-	memcpy_fromfs(asmptr, ubuf, len);
+	memcpy_fromiovec(asmptr, msg->msg_iov, len);
 
 	if (sk->debug)
 		printk("NET/ROM: Transmitting buffer\n");
@@ -1125,6 +1124,21 @@
 	return len;
 }
 
+static int nr_sendto(struct socket *sock, const void *ubuf, int size, int noblock, unsigned flags,
+		struct sockaddr *sa, int addr_len)
+{
+	struct iovec iov;
+	struct msghdr msg;
+	iov.iov_base=(void *)ubuf;
+	iov.iov_len=size;
+	msg.msg_name=(void *)sa;
+	msg.msg_namelen=addr_len;
+	msg.msg_accrights=NULL;
+	msg.msg_iov=&iov;
+	msg.msg_iovlen=1;
+	return nr_sendmsg(sock,&msg,size,noblock,flags);	
+}
+
 static int nr_send(struct socket *sock, const void *ubuf, int size, int noblock, unsigned flags)
 {
 	return nr_sendto(sock, ubuf, size, noblock, flags, NULL, 0);
@@ -1132,21 +1146,23 @@
 
 static int nr_write(struct socket *sock, const char *ubuf, int size, int noblock)
 {
-	return nr_send(sock, ubuf, size, noblock, 0);
+	return nr_sendto(sock, ubuf, size, noblock, 0, NULL, 0);
 }
 
-static int nr_recvfrom(struct socket *sock, void *ubuf, int size, int noblock,
-		   unsigned flags, struct sockaddr *sip, int *addr_len)
+static int nr_recvmsg(struct socket *sock, struct msghdr *msg, int size, int noblock,
+		   int flags, int *addr_len)
 {
 	struct sock *sk = (struct sock *)sock->data;
-	struct sockaddr_ax25 *sax = (struct sockaddr_ax25 *)sip;
+	struct sockaddr_ax25 *sax = (struct sockaddr_ax25 *)msg->msg_name;
 	int copied;
 	struct sk_buff *skb;
 	int er;
 
 	if (sk->err) {
+		cli();
 		er      = -sk->err;
 		sk->err = 0;
+		sti();
 		return er;
 	}
 	
@@ -1170,7 +1186,7 @@
 	}
 
 	copied = (size < skb->len) ? size : skb->len;
-	skb_copy_datagram(skb, 0, ubuf, copied);
+	skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
 	
 	if (sax != NULL) {
 		struct sockaddr_ax25 addr;
@@ -1188,6 +1204,24 @@
 	return copied;
 }		
 
+static int nr_recvfrom(struct socket *sock, void *ubuf, int size, int noblock, unsigned flags,
+		struct sockaddr *sa, int *addr_len)
+{
+	struct iovec iov;
+	struct msghdr msg;
+	iov.iov_base=ubuf;
+	iov.iov_len=size;
+	msg.msg_name=(void *)sa;
+	msg.msg_namelen=0;
+	if (addr_len)
+		msg.msg_namelen = *addr_len;
+	msg.msg_accrights=NULL;
+	msg.msg_iov=&iov;
+	msg.msg_iovlen=1;
+	return nr_recvmsg(sock,&msg,size,noblock,flags,addr_len);	
+}
+
+
 static int nr_recv(struct socket *sock, void *ubuf, int size , int noblock,
 	unsigned flags)
 {
@@ -1387,6 +1421,8 @@
 	nr_setsockopt,
 	nr_getsockopt,
 	nr_fcntl,
+	nr_sendmsg,
+	nr_recvmsg
 };
 
 static struct notifier_block nr_dev_notifier = {
diff -u --recursive --new-file v1.3.23/linux/net/netrom/nr_out.c linux/net/netrom/nr_out.c
--- v1.3.23/linux/net/netrom/nr_out.c	Mon Jul 31 15:59:05 1995
+++ linux/net/netrom/nr_out.c	Mon Sep  4 14:48:37 1995
@@ -61,7 +61,7 @@
 		frontlen = skb_headroom(skb);
 
 		while (skb->len > 0) {
-			if ((skbn = sock_alloc_send_skb(sk, frontlen + mtu, 0, &err)) == NULL)
+			if ((skbn = sock_alloc_send_skb(sk, frontlen + mtu, 0, 0, &err)) == NULL)
 				return;
 
 			skbn->sk   = sk;
diff -u --recursive --new-file v1.3.23/linux/net/unix/af_unix.c linux/net/unix/af_unix.c
--- v1.3.23/linux/net/unix/af_unix.c	Sun Sep  3 12:27:06 1995
+++ linux/net/unix/af_unix.c	Mon Sep  4 15:31:37 1995
@@ -136,7 +136,6 @@
 	 *	Retry;
 	 */
 	 
-	init_timer(&sk->timer);
 	sk->timer.expires=jiffies+10*HZ;	/* No real hurry try it every 10 seconds or so */
 	add_timer(&sk->timer);
 }
@@ -144,7 +143,6 @@
 	 
 static void unix_delayed_delete(unix_socket *sk)
 {
-	init_timer(&sk->timer);
 	sk->timer.data=(unsigned long)sk;
 	sk->timer.expires=jiffies+HZ;		/* Normally 1 second after will clean up. After that we try every 10 */
 	sk->timer.function=unix_destroy_timer;
@@ -275,6 +273,7 @@
 			kfree_s(sk,sizeof(*sk));
 			return -ESOCKTNOSUPPORT;
 	}
+	init_timer(&sk->timer);
 	skb_queue_head_init(&sk->write_queue);
 	skb_queue_head_init(&sk->receive_queue);
 	skb_queue_head_init(&sk->back_log);
@@ -473,7 +472,7 @@
 		 *	Now ready to connect
 		 */
 	 
-		skb=sock_alloc_send_skb(sk, 0, 0, &err); /* Marker object */
+		skb=sock_alloc_send_skb(sk, 0, 0, 0, &err); /* Marker object */
 		if(skb==NULL)
 			return err;
 		skb->sk=sk;				/* So they know it is us */
@@ -658,6 +657,8 @@
 	struct sockaddr_un *sun=msg->msg_name;
 	int err,size;
 	struct sk_buff *skb;
+	int limit=0;
+	int sent=0;
 
 	if(sk->err)
 	{
@@ -687,62 +688,91 @@
 			return -ENOTCONN;
 	}
 
-	/*
-	 *	Optimisation for the fact that under 0.01% of X messages typically
-	 *	need breaking up.
-	 */
 
-	if(len>(sk->sndbuf-sizeof(struct sk_buff))/2)	/* Keep two messages in the pipe so it schedules better */
+	while(sent < len)
 	{
-		if(sock->type==SOCK_DGRAM)
-			return -EMSGSIZE;
-		len=(sk->sndbuf-sizeof(struct sk_buff))/2;
+		/*
+		 *	Optimisation for the fact that under 0.01% of X messages typically
+		 *	need breaking up.
+		 */
+		 
+		size=len-sent;
+
+		if(size>(sk->sndbuf-sizeof(struct sk_buff))/2)	/* Keep two messages in the pipe so it schedules better */
+		{
+			if(sock->type==SOCK_DGRAM)
+				return -EMSGSIZE;
+			size=(sk->sndbuf-sizeof(struct sk_buff))/2;
+		}
 		/*
 		 *	Keep to page sized kmalloc()'s as various people
 		 *	have suggested. Big mallocs stress the vm too
 		 *	much.
 		 */
-		if(len > 4000 && sock->type!=SOCK_DGRAM)
-			len = 4000;
-	}
-	 
-	size=/*protocol_size(&proto_unix)+*/len;
-	skb=sock_alloc_send_skb(sk,size,nonblock, &err);
-	if(skb==NULL)
-		return err;
-/*	protocol_adjust(skb,&proto_unix);*/
-	skb->sk=sk;
-	skb->free=1;
-	memcpy_fromiovec(skb_put(skb,len),msg->msg_iov, len);
 
-	cli();
-	if(sun==NULL)
-	{
-		other=sk->protinfo.af_unix.other;
-		if(sock->type==SOCK_DGRAM && other->dead)
+		if(size > 4000 && sock->type!=SOCK_DGRAM)
+			limit = 4000;	/* Fall back to 4K if we can't grab a big buffer this instant */
+		else
+			limit = 0;	/* Otherwise just grab and wait */
+
+		/*
+		 *	Grab a buffer
+		 */
+		 
+		skb=sock_alloc_send_skb(sk,size,limit,nonblock, &err);
+		
+		if(skb==NULL)
 		{
-			other->protinfo.af_unix.locks--;
-			sk->protinfo.af_unix.other=NULL;
-			sock->state=SS_UNCONNECTED;
-			sti();
-			return -ECONNRESET;
+			if(sent)
+			{
+				sk->err=-err;
+				return sent;
+			}
+			return err;
 		}
-	}
-	else
-	{
-		unix_mkname(sun, msg->msg_namelen);
-		other=unix_find_other(sun->sun_path, &err);
-		if(other==NULL)
+		size=skb_tailroom(skb);		/* If we dropped back on a limit then our skb is smaller */
+
+		skb->sk=sk;
+		skb->free=1;
+		
+		memcpy_fromiovec(skb_put(skb,size),msg->msg_iov, size);
+
+		cli();
+		if(sun==NULL)
 		{
-			kfree_skb(skb, FREE_WRITE);
-			sti();
-			return err;
+			other=sk->protinfo.af_unix.other;
+			if(sock->type==SOCK_DGRAM && other->dead)
+			{
+				other->protinfo.af_unix.locks--;
+				sk->protinfo.af_unix.other=NULL;
+				sock->state=SS_UNCONNECTED;
+				sti();
+				if(!sent)
+					return -ECONNRESET;
+				else
+					return sent;
+			}
+		}
+		else
+		{
+			unix_mkname(sun, msg->msg_namelen);
+			other=unix_find_other(sun->sun_path, &err);
+			if(other==NULL)
+			{
+				kfree_skb(skb, FREE_WRITE);
+				sti();
+				if(sent)
+					return sent;
+				else
+					return err;
+			}
 		}
+		skb_queue_tail(&other->receive_queue, skb);
+		sti();
+		other->data_ready(other,size);
+		sent+=size;
 	}
-	skb_queue_tail(&other->receive_queue, skb);
-	sti();
-	other->data_ready(other,len);
-	return len;
+	return sent;
 }
 		
 static int unix_recvmsg(struct socket *sock, struct msghdr *msg, int size, int noblock, int flags, int *addr_len)
diff -u --recursive --new-file v1.3.23/linux/scripts/Configure linux/scripts/Configure
--- v1.3.23/linux/scripts/Configure	Sun Sep  3 12:27:06 1995
+++ linux/scripts/Configure	Mon Sep  4 07:31:54 1995
@@ -13,6 +13,9 @@
 #
 # 050793 - use IFS='@' to get around a bug in a pre-version of bash-1.13
 # with an empty IFS.
+#
+# 030995 (storner@osiris.ping.dk) - added support for tri-state answers,
+# for selecting modules to compile.
 
 #
 # Make sure we're really running bash.
@@ -60,13 +63,22 @@
 #	define_bool define value
 #
 function define_bool () {
-	if [ "$2" = "y" ]; then
+        case "$2" in
+         "y" | "Y")
 		echo "$1=y" >>$CONFIG
 		echo "#define $1 1" >>$CONFIG_H
-	else
+		;;
+
+         "m" | "M")
+		echo "$1=m" >>$CONFIG
+		echo "#undef  $1" >>$CONFIG_H
+		;;
+
+         "n" | "N")
 		echo "# $1 is not set" >>$CONFIG
 		echo "#undef  $1" >>$CONFIG_H
-	fi
+                ;;
+	esac
 	eval "$1=$2"
 }
 
@@ -78,8 +90,36 @@
 function bool () {
 	ans=""
 	def=$(eval echo "\${$2:-$3}")
+        case "$def" in
+         "y") defprompt="Y/n"
+              ;;
+         "n") defprompt="N/y"
+              ;;
+        esac
 	while [ "$ans" != "y" -a "$ans" != "n" ]; do
-		readln "$1 ($2) [$def] " "$def"
+		readln "$1 ($2) [$defprompt] " "$def" 
+	done
+	define_bool "$2" "$ans"
+}
+
+#
+# tristate processes a tristate argument
+#
+#	tristate question define default
+#
+function tristate () {
+	ans=""
+	def=$(eval echo "\${$2:-$3}")
+        case "$def" in
+         "y") defprompt="Y/m/n"
+              ;;
+         "m") defprompt="M/n/y"
+              ;;
+         "n") defprompt="N/y/m"
+              ;;
+        esac
+	while [ "$ans" != "y" -a "$ans" != "n" -a "$ans" != "m" ]; do
+		readln "$1 ($2) [$defprompt] " "$def"
 	done
 	define_bool "$2" "$ans"
 }
