diff -u --recursive --new-file v1.1.25/linux/Makefile linux/Makefile
--- v1.1.25/linux/Makefile	Fri Jul  8 13:26:31 1994
+++ linux/Makefile	Fri Jul  8 11:09:40 1994
@@ -1,6 +1,6 @@
 VERSION = 1
 PATCHLEVEL = 1
-SUBLEVEL = 25
+SUBLEVEL = 26
 
 all:	Version zImage
 
diff -u --recursive --new-file v1.1.25/linux/config.in linux/config.in
--- v1.1.25/linux/config.in	Fri Jul  8 13:26:31 1994
+++ linux/config.in	Fri Jul  8 11:46:42 1994
@@ -101,7 +101,7 @@
 fi
 bool 'Other ISA cards' CONFIG_NET_ISA n
 if [ "$CONFIG_NET_ISA" = "y" ]; then
-	bool 'AT1500 and NE2100 (LANCE and PCnet-ISA) support' CONFIG_LANCE y
+	bool 'AT1500 and NE2100 (LANCE and PCnet-ISA) support' CONFIG_LANCE n
 	bool 'Cabletron E21xx support (not recommended)' CONFIG_E2100 n
 	bool 'DEPCA support' CONFIG_DEPCA n
 	if [ "$CONFIG_NET_ALPHA" = "y" ]; then
@@ -109,7 +109,7 @@
 		bool 'AT1700 support' CONFIG_AT1700 n
 	fi
 	bool 'HP PCLAN support' CONFIG_HPLAN n
-	bool 'NE2000/NE1000 support' CONFIG_NE2000 n
+	bool 'NE2000/NE1000 support' CONFIG_NE2000 y
 fi
 bool 'EISA and on board controllers' CONFIG_NET_EISA n
 	if [ "$CONFIG_NET_ALPHA" = "y" ]; then
@@ -133,6 +133,15 @@
 bool 'Sony CDU31A/CDU33A CDROM driver support' CONFIG_CDU31A n
 bool 'Mitsumi CDROM driver support' CONFIG_MCD n
 bool 'Matsushita/Panasonic CDROM driver support' CONFIG_SBPCD n
+if [ "$CONFIG_SBPCD" = "y" ]; 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
+    if [ "$CONFIG_SBPCD3" = "y" ]; then
+      bool 'Matsushita/Panasonic fourth CDROM controller support' CONFIG_SBPCD4 n
+    fi
+  fi
+fi
 
 comment 'Filesystems'
 
diff -u --recursive --new-file v1.1.25/linux/drivers/block/Makefile linux/drivers/block/Makefile
--- v1.1.25/linux/drivers/block/Makefile	Sun Mar  6 16:08:21 1994
+++ linux/drivers/block/Makefile	Fri Jul  8 11:36:03 1994
@@ -39,6 +39,21 @@
 SRCS := $(SRCS) sbpcd.c
 endif #CONFIG_SBPCD
 
+ifdef CONFIG_SBPCD2
+OBJS := $(OBJS) sbpcd2.o
+SRCS := $(SRCS) sbpcd2.c
+endif #CONFIG_SBPCD2
+
+ifdef CONFIG_SBPCD3
+OBJS := $(OBJS) sbpcd3.o
+SRCS := $(SRCS) sbpcd3.c
+endif #CONFIG_SBPCD3
+
+ifdef CONFIG_SBPCD4
+OBJS := $(OBJS) sbpcd4.o
+SRCS := $(SRCS) sbpcd4.c
+endif #CONFIG_SBPCD4
+
 ifdef CONFIG_BLK_DEV_HD
 OBJS := $(OBJS) hd.o
 SRCS := $(SRCS) hd.c
diff -u --recursive --new-file v1.1.25/linux/drivers/block/README.sbpcd linux/drivers/block/README.sbpcd
--- v1.1.25/linux/drivers/block/README.sbpcd	Thu Jul  7 21:37:11 1994
+++ linux/drivers/block/README.sbpcd	Fri Jul  8 11:36:03 1994
@@ -1,4 +1,4 @@
-This README belongs to release 2.1 of the SoundBlaster Pro (Matsushita,
+This README belongs to release 2.2 of the SoundBlaster Pro (Matsushita,
 Kotobuki, Panasonic, CreativeLabs) CD-ROM driver for Linux.
 
 The driver is able to drive the whole family of IDE-style
diff -u --recursive --new-file v1.1.25/linux/drivers/block/blk.h linux/drivers/block/blk.h
--- v1.1.25/linux/drivers/block/blk.h	Thu Jun  9 18:56:09 1994
+++ linux/drivers/block/blk.h	Fri Jul  8 11:36:03 1994
@@ -194,8 +194,32 @@
 
 #elif (MAJOR_NR == MATSUSHITA_CDROM_MAJOR)
 
-#define DEVICE_NAME "Matsushita CD-ROM"
+#define DEVICE_NAME "Matsushita CD-ROM controller #1"
 #define DEVICE_REQUEST do_sbpcd_request
+#define DEVICE_NR(device) (MINOR(device))
+#define DEVICE_ON(device)
+#define DEVICE_OFF(device)
+
+#elif (MAJOR_NR == MATSUSHITA_CDROM2_MAJOR)
+
+#define DEVICE_NAME "Matsushita CD-ROM controller #2"
+#define DEVICE_REQUEST do_sbpcd2_request
+#define DEVICE_NR(device) (MINOR(device))
+#define DEVICE_ON(device)
+#define DEVICE_OFF(device)
+
+#elif (MAJOR_NR == MATSUSHITA_CDROM3_MAJOR)
+
+#define DEVICE_NAME "Matsushita CD-ROM controller #3"
+#define DEVICE_REQUEST do_sbpcd3_request
+#define DEVICE_NR(device) (MINOR(device))
+#define DEVICE_ON(device)
+#define DEVICE_OFF(device)
+
+#elif (MAJOR_NR == MATSUSHITA_CDROM4_MAJOR)
+
+#define DEVICE_NAME "Matsushita CD-ROM controller #4"
+#define DEVICE_REQUEST do_sbpcd4_request
 #define DEVICE_NR(device) (MINOR(device))
 #define DEVICE_ON(device)
 #define DEVICE_OFF(device)
diff -u --recursive --new-file v1.1.25/linux/drivers/block/mcd.c linux/drivers/block/mcd.c
--- v1.1.25/linux/drivers/block/mcd.c	Fri Jul  8 13:26:32 1994
+++ linux/drivers/block/mcd.c	Fri Jul  8 11:44:13 1994
@@ -158,8 +158,8 @@
 }
 
  
-int
-check_mcd_media_change(int full_dev, int flag)
+static int
+check_mcd_change(dev_t full_dev)
 {
    int retval, target;
 
@@ -175,10 +175,7 @@
    }
 
    retval = mcdDiskChanged;
-   if (!flag)
-   {
-      mcdDiskChanged = 0;
-   }
+   mcdDiskChanged = 0;
 
    return retval;
 }
@@ -1082,7 +1079,10 @@
 	NULL,			/* mmap */
 	mcd_open,		/* open */
 	mcd_release,		/* release */
-	NULL			/* fsync */
+	NULL,			/* fsync */
+	NULL,			/* fasync */
+	check_mcd_change,	/* media change */
+	NULL			/* revalidate */
 };
 
 
diff -u --recursive --new-file v1.1.25/linux/drivers/block/sbpcd.c linux/drivers/block/sbpcd.c
--- v1.1.25/linux/drivers/block/sbpcd.c	Thu Jul  7 21:37:12 1994
+++ linux/drivers/block/sbpcd.c	Fri Jul  8 11:36:03 1994
@@ -5,7 +5,7 @@
  *            and for "no-sound" interfaces like Lasermate and the
  *            Panasonic CI-101P.
  *
- *  NOTE:     This is release 2.1.
+ *  NOTE:     This is release 2.2.
  *            It works with my SbPro & drive CR-521 V2.11 from 2/92
  *            and with the new CR-562-B V0.75 on a "naked" Panasonic
  *            CI-101P interface. And vice versa. 
@@ -111,6 +111,7 @@
  *       Bigger audio frame buffer: allows reading max. 4 frames at time; but
  *       reading more than one frame at once gives poor quality.
  *
+ *  2.2  
  *
  *  TODO
  *
@@ -187,7 +188,7 @@
 
 #include "blk.h"
 
-#define VERSION "2.1 Eberhard Moenkeberg <emoenke@gwdg.de>"
+#define VERSION "2.2 Eberhard Moenkeberg <emoenke@gwdg.de>"
 
 #define SBPCD_DEBUG
 
@@ -222,52 +223,24 @@
  * currently up to 4 drivers, expandable
  */
 #if !(SBPCD_ISSUE-1)
-#define SBPCD_IOCTL_F sbpcd_ioctl
-#define SBPCD_IOCTL(a,b,c,d) sbpcd_ioctl(a,b,c,d)
 #define DO_SBPCD_REQUEST(a) do_sbpcd_request(a)
-#define SBPCD_OPEN_F sbpcd_open
-#define SBPCD_OPEN(a,b) sbpcd_open(a,b)
-#define SBPCD_RELEASE_F sbpcd_release
-#define SBPCD_RELEASE(a,b) sbpcd_release(a,b)
 #define SBPCD_SETUP(a,b) sbpcd_setup(a,b)
 #define SBPCD_INIT(a,b) sbpcd_init(a,b)
-#define SBPCD_MEDIA_CHANGE(a,b) check_sbpcd_media_change(a,b)
 #endif
 #if !(SBPCD_ISSUE-2)
-#define SBPCD_IOCTL_F sbpcd2_ioctl
-#define SBPCD_IOCTL(a,b,c,d) sbpcd2_ioctl(a,b,c,d)
 #define DO_SBPCD_REQUEST(a) do_sbpcd2_request(a)
-#define SBPCD_OPEN_F sbpcd2_open
-#define SBPCD_OPEN(a,b) sbpcd2_open(a,b)
-#define SBPCD_RELEASE_F sbpcd2_release
-#define SBPCD_RELEASE(a,b) sbpcd2_release(a,b)
 #define SBPCD_SETUP(a,b) sbpcd2_setup(a,b)
 #define SBPCD_INIT(a,b) sbpcd2_init(a,b)
-#define SBPCD_MEDIA_CHANGE(a,b) check_sbpcd2_media_change(a,b)
 #endif
 #if !(SBPCD_ISSUE-3)
-#define SBPCD_IOCTL_F sbpcd3_ioctl
-#define SBPCD_IOCTL(a,b,c,d) sbpcd3_ioctl(a,b,c,d)
 #define DO_SBPCD_REQUEST(a) do_sbpcd3_request(a)
-#define SBPCD_OPEN_F sbpcd3_open
-#define SBPCD_OPEN(a,b) sbpcd3_open(a,b)
-#define SBPCD_RELEASE_F sbpcd3_release
-#define SBPCD_RELEASE(a,b) sbpcd3_release(a,b)
 #define SBPCD_SETUP(a,b) sbpcd3_setup(a,b)
 #define SBPCD_INIT(a,b) sbpcd3_init(a,b)
-#define SBPCD_MEDIA_CHANGE(a,b) check_sbpcd3_media_change(a,b)
 #endif
 #if !(SBPCD_ISSUE-4)
-#define SBPCD_IOCTL_F sbpcd4_ioctl
-#define SBPCD_IOCTL(a,b,c,d) sbpcd4_ioctl(a,b,c,d)
 #define DO_SBPCD_REQUEST(a) do_sbpcd4_request(a)
-#define SBPCD_OPEN_F sbpcd4_open
-#define SBPCD_OPEN(a,b) sbpcd4_open(a,b)
-#define SBPCD_RELEASE_F sbpcd4_release
-#define SBPCD_RELEASE(a,b) sbpcd4_release(a,b)
 #define SBPCD_SETUP(a,b) sbpcd4_setup(a,b)
 #define SBPCD_INIT(a,b) sbpcd4_init(a,b)
-#define SBPCD_MEDIA_CHANGE(a,b) check_sbpcd4_media_change(a,b)
 #endif
 /*==========================================================================*/
 #if MANY_SESSION
@@ -335,12 +308,30 @@
 
 /*==========================================================================*/
 /*
+ * the external references:
+ */
+#if !(SBPCD_ISSUE-1)
+#ifdef CONFIG_SBPCD2
+extern unsigned long sbpcd2_init(unsigned long, unsigned long);
+#endif
+#ifdef CONFIG_SBPCD3
+extern unsigned long sbpcd3_init(unsigned long, unsigned long);
+#endif
+#ifdef CONFIG_SBPCD4
+extern unsigned long sbpcd4_init(unsigned long, unsigned long);
+#endif
+#endif
+
+/*==========================================================================*/
+/*==========================================================================*/
+/*
  * the forward references:
  */
 static void sbp_read_cmd(void);
 static int sbp_data(void);
 static int cmd_out(void);
 static int DiskInfo(void);
+static int check_media_change(dev_t);
 
 /*==========================================================================*/
 
@@ -719,12 +710,18 @@
   cmd_type=0;
 }
 /*==========================================================================*/
-static void mark_timeout(void)
+static void mark_timeout(unsigned long i)
 {
   timed_out=1;
-  DPRINTF((DBG_TIM,"SBPCD: timer stopped.\n"));
+  DPRINTF((DBG_TIM,"SBPCD: timer expired.\n"));
 }
 /*==========================================================================*/
+static struct timer_list delay_timer = { NULL, NULL, 0, 0, mark_timeout};
+#if 0
+static struct timer_list data_timer = { NULL, NULL, 0, 0, mark_timeout};
+static struct timer_list audio_timer = { NULL, NULL, 0, 0, mark_timeout};
+#endif
+/*==========================================================================*/
 static void flush_status(void)
 {
 #ifdef CDMKE
@@ -739,10 +736,16 @@
     }
 #else
   timed_out=0;
-  SET_TIMER(mark_timeout,150);
+#if 0
+  del_timer(&delay_timer);
+#endif
+  delay_timer.expires = 150;
+  add_timer(&delay_timer);
   do { }
   while (!timed_out);
-  CLEAR_TIMER;
+#if 0
+  del_timer(&delay_timer);
+#endif 0
   inb(CDi_status);
 #endif CDMKE
 }
@@ -1782,29 +1785,30 @@
   int i=0;
 
   DPRINTF((DBG_IOX,"SBPCD: check_datarate entered.\n"));
-  timed_out=0;
   datarate=0;
-
 #if TEST_STI
   for (i=0;i<=1000;i++) printk(".");
 #endif
-
   /* set a timer to make (timed_out!=0) after 1.1 seconds */
-
+#if 0
+  del_timer(&delay_timer);
+#endif
+  delay_timer.expires = 110;
+  timed_out=0;
+  add_timer(&delay_timer);
   DPRINTF((DBG_TIM,"SBPCD: timer started (110).\n"));
-  SET_TIMER(mark_timeout,110);
   do
     {
       i=inb(CDi_status);
       datarate++;
-
 #if 00000
       if (datarate>0x0FFFFFFF) break;
 #endif 00000
-
     }
   while (!timed_out); /* originally looping for 1.1 seconds */
-  CLEAR_TIMER;
+#if 0
+  del_timer(&delay_timer);
+#endif 0
   DPRINTF((DBG_TIM,"SBPCD: datarate: %d\n", datarate));
   if (datarate<65536) datarate=65536;
 
@@ -2292,7 +2296,7 @@
 /*==========================================================================*/
 /*==========================================================================*/
 /*
- * Called from the timer to check the results of the get-status cmd.
+ * Check the results of the "get status" command.
  */
 static int sbp_status(void)
 {
@@ -2341,7 +2345,7 @@
 /*
  * ioctl support, adopted from scsi/sr_ioctl.c and mcd.c
  */
-static int SBPCD_IOCTL(struct inode *inode, struct file *file, u_int cmd,
+static int sbpcd_ioctl(struct inode *inode, struct file *file, u_int cmd,
 		       u_long arg)
 {
   int i, st;
@@ -2612,10 +2616,7 @@
 	int status_tries;
 	int error_flag;
 
-	error_flag=0;
-
 	DPRINTF((DBG_IOC,"SBPCD: ioctl: CDROMREADAUDIO requested.\n"));
-
 #if 0
 	if (!new_drive) return (-EINVAL);
 #endif
@@ -2636,10 +2637,9 @@
 	DPRINTF((DBG_AUD,"SBPCD: read_audio: lba: %d, msf: %06X\n",
 		 block, blk2msf(block)));
 	DPRINTF((DBG_AUD,"SBPCD: read_audio: before xx_ReadStatus.\n"));
-
 	while (busy_data) sbp_sleep(10); /* wait a bit */
 	busy_audio=1;
-
+	error_flag=0;
 	for (data_tries=5; data_tries>0; data_tries--)
 	  {
 	    DPRINTF((DBG_AUD,"SBPCD: data_tries=%d ...\n", data_tries));
@@ -2717,7 +2717,6 @@
 		    break;
 		  }
 		DPRINTF((DBG_AUD,"SBPCD: read_audio: before reading data.\n"));
-		CLEAR_TIMER;
 		error_flag=0;
 		p = DriveStruct[d].aud_buf;
 		if (sbpro_type==1) OUT(CDo_sel_d_i,0x01);
@@ -3091,7 +3090,6 @@
 	}
 
       SBPCD_STI;
-      CLEAR_TIMER;
       error_flag=0;
       p = DriveStruct[d].sbp_buf + frame *  CD_FRAMESIZE;
 
@@ -3181,7 +3179,7 @@
 /*
  *  Open the device special file.  Check that a disk is in. Read TOC.
  */
-int SBPCD_OPEN(struct inode *ip, struct file *fp)
+static int sbpcd_open(struct inode *ip, struct file *fp)
 {
   int i;
 
@@ -3234,7 +3232,7 @@
 /*
  *  On close, we flush all sbp blocks from the buffer cache.
  */
-static void SBPCD_RELEASE(struct inode * ip, struct file * file)
+static void sbpcd_release(struct inode * ip, struct file * file)
 {
   int i;
 
@@ -3247,7 +3245,7 @@
   switch_drive(i);
 
   DriveStruct[d].sbp_first_frame=DriveStruct[d].sbp_last_frame=-1;
-  sync_dev(ip->i_rdev);                    /* nonsense if read only device? */
+  fsync_dev(ip->i_rdev);                   /* nonsense if read only device? */
   invalidate_buffers(ip->i_rdev);
   DriveStruct[d].diskstate_flags &= ~cd_size_bit;
 
@@ -3274,18 +3272,23 @@
   block_write,            /* write - general block-dev write */
   NULL,                   /* readdir - bad */
   NULL,                   /* select */
-  SBPCD_IOCTL_F,          /* ioctl */
+  sbpcd_ioctl,            /* ioctl */
   NULL,                   /* mmap */
-  SBPCD_OPEN_F,           /* open */
-  SBPCD_RELEASE_F,        /* release */
+  sbpcd_open,             /* open */
+  sbpcd_release,          /* release */
   NULL,                   /* fsync */
-  NULL                    /* fasync */
+  NULL,                   /* fasync */
+  check_media_change,     /* media_change */
+  NULL                    /* revalidate */
 };
 /*==========================================================================*/
 /*
  * accept "kernel command line" parameters 
  * (suggested by Peter MacDonald with SLS 1.03)
  *
+ * This is only implemented for the first controller. Should be enough to
+ * allow installing with a "strange" distribution kernel.
+ *
  * use: tell LILO:
  *                 sbpcd=0x230,SoundBlaster
  *             or
@@ -3299,6 +3302,9 @@
  * not the soundcard base address.
  *
  */
+#if (SBPCD_ISSUE-1)
+static
+#endif
 void SBPCD_SETUP(char *s, int *p)
 {
   DPRINTF((DBG_INI,"SBPCD: sbpcd_setup called with %04X,%s\n",p[1], s));
@@ -3442,7 +3448,7 @@
 #if PRINTK_BUG
       sti(); /* to avoid possible "printk" bug */
 #endif
-      return (mem_start);
+      goto init_done;
     }
 
   if (port_index>0)
@@ -3515,7 +3521,7 @@
 #if PRINTK_BUG
       sti(); /* to avoid possible "printk" bug */
 #endif
-      return (mem_start);
+      goto init_done;
     }
   blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST;
   read_ahead[MAJOR_NR] = SBP_BUFFER_FRAMES * (CD_FRAMESIZE / 512);
@@ -3543,7 +3549,21 @@
     }
   blksize_size[MAJOR_NR]=sbpcd_blocksizes;
 
+init_done:
+#if !(SBPCD_ISSUE-1)
+#ifdef CONFIG_SBPCD2
+  mem_start=sbpcd2_init(mem_start, mem_end);
+#endif
+#ifdef CONFIG_SBPCD3
+  mem_start=sbpcd3_init(mem_start, mem_end);
+#endif
+#ifdef CONFIG_SBPCD4
+  mem_start=sbpcd4_init(mem_start, mem_end);
+#endif
+#endif
+#if !(SBPCD_ISSUE-1)
   DPRINTF((DBG_INF,"SBPCD: init done.\n"));
+#endif
   return (mem_start);
 }
 /*==========================================================================*/
@@ -3552,7 +3572,7 @@
  * used externally (isofs/inode.c, fs/buffer.c)
  * Currently disabled (has to get "synchronized").
  */
-int SBPCD_MEDIA_CHANGE(int full_dev, int unused_minor)
+static int check_media_change(dev_t full_dev)
 {
   int st;
 
diff -u --recursive --new-file v1.1.25/linux/drivers/char/n_tty.c linux/drivers/char/n_tty.c
--- v1.1.25/linux/drivers/char/n_tty.c	Tue Jun 28 22:30:26 1994
+++ linux/drivers/char/n_tty.c	Fri Jul  8 11:09:02 1994
@@ -594,6 +594,9 @@
 
 static void n_tty_set_termios(struct tty_struct *tty, struct termios * old)
 {
+	if (!tty)
+		return;
+	
 	tty->icanon = (L_ICANON(tty) != 0);
 	if (I_ISTRIP(tty) || I_IUCLC(tty) || I_IGNCR(tty) ||
 	    I_ICRNL(tty) || I_INLCR(tty) || L_ICANON(tty) ||
@@ -661,6 +664,9 @@
 
 static int n_tty_open(struct tty_struct *tty)
 {
+	if (!tty)
+		return -EINVAL;
+
 	if (!tty->read_buf) {
 		tty->read_buf = (unsigned char *)
 			get_free_page(intr_count ? GFP_ATOMIC : GFP_KERNEL);
diff -u --recursive --new-file v1.1.25/linux/drivers/char/serial.c linux/drivers/char/serial.c
--- v1.1.25/linux/drivers/char/serial.c	Wed Jun 22 14:57:08 1994
+++ linux/drivers/char/serial.c	Fri Jul  8 11:09:02 1994
@@ -845,7 +845,7 @@
 	if (!info->xmit_buf) {
 		info->xmit_buf = (unsigned char *) get_free_page(GFP_KERNEL);
 		if (!info->xmit_buf)
-			return ENOMEM;
+			return -ENOMEM;
 	}
 
 	save_flags(flags); cli();
@@ -871,7 +871,7 @@
 	 * here.
 	 */
 	if (serial_inp(info, UART_LSR) == 0xff) {
-			restore_flags(flags);
+		restore_flags(flags);
 		if (suser()) {
 			if (info->tty)
 				set_bit(TTY_IO_ERROR, &info->tty->flags);
@@ -1802,11 +1802,9 @@
 	}
 	if (info->blocked_open) {
 		if (info->close_delay) {
-			tty->count++; /* avoid race condition */
 			current->state = TASK_INTERRUPTIBLE;
 			current->timeout = jiffies + info->close_delay;
 			schedule();
-			tty->count--;
 		}
 		wake_up_interruptible(&info->open_wait);
 	}
@@ -2156,9 +2154,15 @@
 	/*
 	 * Do a simple existence test first; if we fail this, there's
 	 * no point trying anything else.
+	 *
+	 * 0x80 is used as a nonsense port to prevent against false
+	 * positives due to ISA bus float.  The assumption is that
+	 * 0x80 is a non-existent port; which should be safe since
+	 * include/asm/io.h also makes this assumption.
 	 */
 	scratch = serial_inp(info, UART_IER);
 	serial_outp(info, UART_IER, 0);
+	outb(0xff, 0x080);
 	scratch2 = serial_inp(info, UART_IER);
 	serial_outp(info, UART_IER, scratch);
 	if (scratch2) {
@@ -2358,3 +2362,75 @@
 	return kmem_start;
 }
 
+/*
+ * register_serial and unregister_serial allows for serial ports to be
+ * configured at run-time, to support PCMCIA modems.
+ */
+int register_serial(struct serial_struct *req)
+{
+	int i;
+	unsigned long flags;
+	struct async_struct *info;
+
+	save_flags(flags);
+	cli();
+	for (i = 0; i < NR_PORTS; i++) {
+		if (rs_table[i].port == req->port)
+			break;
+	}
+	if (i == NR_PORTS) {
+		for (i = 0; i < NR_PORTS; i++)
+			if ((rs_table[i].type == PORT_UNKNOWN) &&
+			    (rs_table[i].count == 0))
+				break;
+	}
+	if (i == NR_PORTS) {
+		restore_flags(flags);
+		return -1;
+	}
+	info = &rs_table[i];
+	if (rs_table[i].count) {
+		restore_flags(flags);
+		printk("Couldn't configure serial #%d (port=%d,irq=%d): "
+		       "device already open\n", i, req->port, req->irq);
+		return -1;
+	}
+	info->irq = req->irq;
+	info->port = req->port;
+	autoconfig(info);
+	if (info->type == PORT_UNKNOWN) {
+		restore_flags(flags);
+		printk("register_serial(): autoconfig failed\n");
+		return -1;
+	}
+	printk("tty%02d at 0x%04x (irq = %d)", info->line, 
+	       info->port, info->irq);
+	switch (info->type) {
+	case PORT_8250:
+		printk(" is a 8250\n"); break;
+	case PORT_16450:
+		printk(" is a 16450\n"); break;
+	case PORT_16550:
+		printk(" is a 16550\n"); break;
+	case PORT_16550A:
+		printk(" is a 16550A\n"); break;
+	default:
+		printk("\n"); break;
+	}
+	restore_flags(flags);
+	return info->line;
+}
+
+void unregister_serial(int line)
+{
+	unsigned long flags;
+	struct async_struct *info = &rs_table[line];
+
+	save_flags(flags);
+	cli();
+	if (info->tty)
+		tty_hangup(info->tty);
+	info->type = PORT_UNKNOWN;
+	printk("tty%02d unloaded\n", info->line);
+	restore_flags(flags);
+}
diff -u --recursive --new-file v1.1.25/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
--- v1.1.25/linux/drivers/char/tty_io.c	Tue May 31 12:48:17 1994
+++ linux/drivers/char/tty_io.c	Fri Jul  8 11:09:02 1994
@@ -160,7 +160,7 @@
 /* Set the discipline of a tty line. */
 static int tty_set_ldisc(struct tty_struct *tty, int ldisc)
 {
-	int	retval;
+	int	retval = 0;
 	struct	tty_ldisc o_ldisc;
 
 	if ((ldisc < N_TTY) || (ldisc >= NR_LDISCS) ||
@@ -178,11 +178,9 @@
 	/* Now set up the new line discipline. */
 	tty->ldisc = ldiscs[ldisc];
 	tty->termios->c_line = ldisc;
-	if (tty->ldisc.open) {
+	if (tty->ldisc.open)
 		retval = (tty->ldisc.open)(tty);
-		if (retval >= 0)
-			return retval;
-		
+	if (retval < 0) {
 		tty->ldisc = o_ldisc;
 		tty->termios->c_line = tty->ldisc.num;
 		if (tty->ldisc.open && (tty->ldisc.open(tty) < 0)) {
@@ -197,9 +195,10 @@
 					      tty_name(tty), r);
 			}
 		}
-		return retval;
 	}
-	return 0;
+	if (tty->ldisc.num != o_ldisc.num && tty->driver.set_ldisc)
+		tty->driver.set_ldisc(tty);
+	return retval;
 }
 
 /*
@@ -731,12 +730,12 @@
 	tp_loc = &driver->termios[idx];
 	ltp_loc = &driver->termios_locked[idx];
 
+repeat:
 	retval = -EAGAIN;
 	if (driver->type == TTY_DRIVER_TYPE_PTY &&
 	    driver->subtype == PTY_TYPE_MASTER &&
 	    *tty_loc && (*tty_loc)->count)
 		goto end_init;
-repeat:
 	retval = -ENOMEM;
 	if (!*tty_loc && !tty) {
 		if (!(tty = (struct tty_struct*) get_free_page(GFP_KERNEL)))
@@ -813,13 +812,18 @@
 		tty->termios_locked = *ltp_loc;
 		*tty_loc = tty;
 		(*driver->refcount)++;
+		(*tty_loc)->count++;
 		if (tty->ldisc.open) {
 			retval = (tty->ldisc.open)(tty);
-			if (retval < 0)
+			if (retval < 0) {
+				(*tty_loc)->count--;
+				tty = NULL;
 				goto end_init;
+			}
 		}
 		tty = NULL;
-	}
+	} else
+		(*tty_loc)->count++;
 	if (driver->type == TTY_DRIVER_TYPE_PTY) {
 		if (!*o_tp_loc) {
 			*o_tp_loc = o_tp;
@@ -836,19 +840,19 @@
 			(*driver->other->refcount)++;
 			if (o_tty->ldisc.open) {
 				retval = (o_tty->ldisc.open)(o_tty);
-				if (retval < 0)
+				if (retval < 0) {
+					(*tty_loc)->count--;
+					o_tty = NULL;
 					goto end_init;
+				}
 			}
 			o_tty = NULL;
 		}
 		(*tty_loc)->link = *o_tty_loc;
 		(*o_tty_loc)->link = *tty_loc;
+		if (driver->subtype == PTY_TYPE_MASTER)
+			(*o_tty_loc)->count++;
 	}
-	(*tty_loc)->count++;
-	(*tty_loc)->driver = *driver;
-	if (driver->type == TTY_DRIVER_TYPE_PTY &&
-	    driver->subtype == PTY_TYPE_MASTER)
-		(*o_tty_loc)->count++;
 	*ret_tty = *tty_loc;
 	retval = 0;
 end_init:
diff -u --recursive --new-file v1.1.25/linux/fs/devices.c linux/fs/devices.c
--- v1.1.25/linux/fs/devices.c	Fri Jul  8 13:26:40 1994
+++ linux/fs/devices.c	Fri Jul  8 11:45:40 1994
@@ -15,19 +15,6 @@
 #include <linux/fcntl.h>
 #include <linux/errno.h>
 
-#include <linux/config.h>
-
-/*
- * Ugly. We'll fix this once all the drivers use the f_ops->check_media_change()
- * stuff instead..
- */
-#ifdef CONFIG_MCD
-extern int check_mcd_media_change(int, int);
-#endif
-#ifdef CONFIG_SBPCD
-extern int check_sbpcd_media_change(int, int);
-#endif
-
 struct device_struct {
 	const char * name;
 	struct file_operations * fops;
@@ -144,27 +131,6 @@
 		if (!fops->check_media_change(dev))
 			return 0;
 	} 
-#if 1 /* this will go soon.. */
-	else switch(MAJOR(dev)){
-
-#if defined(CONFIG_MCD)
-         case MITSUMI_CDROM_MAJOR:
-		if (!check_mcd_media_change(dev, 0))
-			return 0;
-		break;
-#endif
-
-#if defined(CONFIG_SBPCD)
-         case MATSUSHITA_CDROM_MAJOR:
-		if (!check_sbpcd_media_change(dev, 0))
-			return 0;
-		break;
-#endif
-
-         default:
-		return 0;
-	}
-#endif	/* will go away */
 
 	printk("VFS: Disk change detected on device %d/%d\n",
 					MAJOR(dev), MINOR(dev));
diff -u --recursive --new-file v1.1.25/linux/fs/isofs/inode.c linux/fs/isofs/inode.c
--- v1.1.25/linux/fs/isofs/inode.c	Fri Jul  8 13:26:41 1994
+++ linux/fs/isofs/inode.c	Fri Jul  8 11:36:04 1994
@@ -30,9 +30,6 @@
 #if defined(CONFIG_MCD)
 extern int check_mcd_media_change(int, int);
 #endif
-#if defined (CONFIG_SBPCD)
-extern int check_sbpcd_media_change(int, int);
-#endif CONFIG_SBPCD
 
 #ifdef LEAK_CHECK
 static int check_malloc = 0;
diff -u --recursive --new-file v1.1.25/linux/include/linux/major.h linux/include/linux/major.h
--- v1.1.25/linux/include/linux/major.h	Sat Jan 29 14:55:05 1994
+++ linux/include/linux/major.h	Fri Jul  8 11:36:04 1994
@@ -43,8 +43,9 @@
  * 23 -                        mitsumi cdrom
  * 24 -	                       sony535 cdrom
  * 25 -                        matsushita cdrom       minors 0..3
- * 26 -
- * 27 - qic117 tape
+ * 26 -                        matsushita cdrom 2     minors 0..3
+ * 27 - qic117 tape            matsushita cdrom 3     minors 0..3
+ * 28 -                        matsushita cdrom 4     minors 0..3
  */
 
 #define UNNAMED_MAJOR	0
@@ -72,6 +73,9 @@
 #define MITSUMI_CDROM_MAJOR 23
 #define CDU535_CDROM_MAJOR 24
 #define MATSUSHITA_CDROM_MAJOR 25
+#define MATSUSHITA_CDROM2_MAJOR 26
+#define MATSUSHITA_CDROM3_MAJOR 27
+#define MATSUSHITA_CDROM4_MAJOR 28
 #define QIC117_TAPE_MAJOR 27
 
 /*
diff -u --recursive --new-file v1.1.25/linux/include/linux/mm.h linux/include/linux/mm.h
--- v1.1.25/linux/include/linux/mm.h	Tue Jun 21 14:16:25 1994
+++ linux/include/linux/mm.h	Fri Jul  8 13:23:20 1994
@@ -44,6 +44,7 @@
  */
 #define VM_GROWSDOWN	0x01
 #define VM_GROWSUP	0x02
+#define VM_SHM		0x04
 
 /*
  * These are the virtual MM functions - opening of an area, closing it (needed to
diff -u --recursive --new-file v1.1.25/linux/include/linux/sbpcd.h linux/include/linux/sbpcd.h
--- v1.1.25/linux/include/linux/sbpcd.h	Thu Jul  7 21:37:13 1994
+++ linux/include/linux/sbpcd.h	Fri Jul  8 11:36:04 1994
@@ -3,18 +3,15 @@
  */
 
 /*
- * these definitions can get overridden by the kernel command line
- * ("lilo boot option"). Examples:
+ * the definitions for the first controller can get overridden by
+ * the kernel command line ("lilo boot option").
+ * Examples:
  *                                 sbpcd=0x230,SoundBlaster
  *                             or
  *                                 sbpcd=0x300,LaserMate
  *                             or
  *                                 sbpcd=0x330,SPEA
  *
- *  and, if you have a second CDROM controller board,
- *                                 sbpcd2=0x310,LaserMate
- *  and so on.
- *
  * These strings are case sensitive !!!
  */
 
@@ -72,36 +69,6 @@
 #ifndef _LINUX_SBPCD_H
 
 #define _LINUX_SBPCD_H
-
-/*==========================================================================*/
-/*==========================================================================*/
-/*
- * to fork and execute a function after some elapsed time:
- * one "jifs" unit is 10 msec.
- */
-#undef MY_TIMER
-#undef SET_TIMER
-#undef CLEAR_TIMER
-
-#if !(SBPCD_ISSUE-1)
-#define MY_TIMER SBPCD_TIMER
-#endif
-#if !(SBPCD_ISSUE-2)
-#define MY_TIMER SBPCD2_TIMER
-#endif
-#if !(SBPCD_ISSUE-3)
-#define MY_TIMER SBPCD3_TIMER
-#endif
-#if !(SBPCD_ISSUE-4)
-#define MY_TIMER SBPCD4_TIMER
-#endif
-
-#define SET_TIMER(func, jifs) \
-        ((timer_table[MY_TIMER].expires = jiffies + jifs), \
-        (timer_table[MY_TIMER].fn = func), \
-        (timer_active |= 1<<MY_TIMER))
-
-#define CLEAR_TIMER	timer_active &= ~(1<<MY_TIMER)
 
 /*==========================================================================*/
 /*==========================================================================*/
diff -u --recursive --new-file v1.1.25/linux/include/linux/timer.h linux/include/linux/timer.h
--- v1.1.25/linux/include/linux/timer.h	Fri Feb 11 12:59:42 1994
+++ linux/include/linux/timer.h	Fri Jul  8 11:36:04 1994
@@ -30,8 +30,6 @@
  * TAPE_QIC02_TIMER	timer for QIC-02 tape driver (it's not hardcoded)
  *
  * MCD_TIMER		Mitsumi CD-ROM Timer
- *
- * SBPCD_TIMER		SoundBlaster/Matsushita/Panasonic CD-ROM timer
  */
 
 #define BLANK_TIMER	0
@@ -49,8 +47,6 @@
 #define MCD_TIMER	23
 
 #define HD_TIMER2	24
-
-#define SBPCD_TIMER	25
 
 struct timer_struct {
 	unsigned long expires;
diff -u --recursive --new-file v1.1.25/linux/include/linux/tty_driver.h linux/include/linux/tty_driver.h
--- v1.1.25/linux/include/linux/tty_driver.h	Tue May 31 12:48:19 1994
+++ linux/include/linux/tty_driver.h	Fri Jul  8 11:09:02 1994
@@ -56,7 +56,14 @@
  * void (*set_termios)(struct tty_struct *tty, struct termios * old);
  *
  * 	This routine allows the tty driver to be notified when
- * 	device's termios settings have changed.  
+ * 	device's termios settings have changed.  Note that a
+ * 	well-designed tty driver should be prepared to accept the case
+ * 	where old == NULL, and try to do something rational.
+ *
+ * void (*set_ldisc)(struct tty_struct *tty);
+ *
+ * 	This routine allows the tty driver to be notified when the
+ * 	device's termios settings have changed.
  * 
  * void (*throttle)(struct tty_struct * tty);
  *
@@ -131,6 +138,7 @@
 	void (*start)(struct tty_struct *tty);
 	void (*hangup)(struct tty_struct *tty);
 	void (*flush_buffer)(struct tty_struct *tty);
+	void (*set_ldisc)(struct tty_struct *tty);
 
 	/*
 	 * linked list pointers
diff -u --recursive --new-file v1.1.25/linux/ipc/shm.c linux/ipc/shm.c
--- v1.1.25/linux/ipc/shm.c	Sat May  7 14:54:13 1994
+++ linux/ipc/shm.c	Fri Jul  8 13:23:20 1994
@@ -375,6 +375,34 @@
 	return 0;
 }
 
+/*
+ * This is really minimal support to make the shared mem stuff
+ * ve known by the general VM manager. It should add the vm_ops
+ * field so that 'munmap()' and friends work correctly on shared
+ * memory areas..
+ */
+static int add_vm_area(unsigned long addr, unsigned long len)
+{
+	struct vm_area_struct * vma;
+
+	vma = (struct vm_area_struct * ) kmalloc(sizeof(struct vm_area_struct), GFP_KERNEL);
+	if (!vma)
+		return -ENOMEM;
+	do_munmap(addr, len);
+	vma->vm_task = current;
+	vma->vm_start = addr;
+	vma->vm_end = addr + len;
+	vma->vm_page_prot = PAGE_SHARED;
+	vma->vm_flags = VM_SHM;
+	vma->vm_share = NULL;
+	vma->vm_inode = NULL;
+	vma->vm_offset = 0;
+	vma->vm_ops = NULL;
+	insert_vm_struct(current, vma);
+	merge_segments(current->mm->mmap, NULL, NULL);
+	return 0;
+}
+
 /* 
  * Fix shmaddr, allocate descriptor, map shm, add attach descriptor to lists.
  * raddr is needed to return addresses above 2Gig.
@@ -448,6 +476,11 @@
 	shmd->end = addr + shp->shm_npages * PAGE_SIZE;
 	shmd->task = current;
 
+	if ((err = add_vm_area(shmd->start, shmd->end - shmd->start))) {
+		kfree(shmd);
+		return err;
+	}
+
 	shp->shm_nattch++;            /* prevent destruction */
 	if (addr < current->mm->end_data) {
 		iput (current->executable);
@@ -496,7 +529,7 @@
  	printk("detach: shm segment (id=%d) attach list inconsistent\n",id);
 	
  found:
-	unmap_page_range (shmd->start, shp->shm_segsz); /* sleeps */
+	do_munmap(shmd->start, shp->shm_segsz);
 	kfree(shmd);
   	shp->shm_lpid = current->pid;
 	shp->shm_dtime = CURRENT_TIME;
@@ -543,6 +576,8 @@
 	struct shmid_ds *shp;
 	int id;
 
+	p2->semun = NULL;
+	p2->shm = NULL;
         if (!p1->shm)
 		return 0;
 	for (shmd = p1->shm; shmd; shmd = shmd->task_next) {
diff -u --recursive --new-file v1.1.25/linux/kernel/fork.c linux/kernel/fork.c
--- v1.1.25/linux/kernel/fork.c	Tue Jun 21 14:16:26 1994
+++ linux/kernel/fork.c	Fri Jul  8 13:23:20 1994
@@ -147,7 +147,7 @@
 			return 1;
 		dup_mmap(p);		/* wrong.. */
 	}
-	return 0;
+	return shm_fork(current, p);
 }
 
 static void copy_fs(unsigned long clone_flags, struct task_struct * p)
@@ -243,8 +243,7 @@
 		p->tss.io_bitmap[i] = ~0;
 	if (last_task_used_math == current)
 		__asm__("clts ; fnsave %0 ; frstor %0":"=m" (p->tss.i387));
-	p->semun = NULL; p->shm = NULL;
-	if (copy_mm(clone_flags, p) || shm_fork(current, p))
+	if (copy_mm(clone_flags, p))
 		goto bad_fork_cleanup;
 	copy_files(clone_flags, p);
 	copy_fs(clone_flags, p);
diff -u --recursive --new-file v1.1.25/linux/mm/mmap.c linux/mm/mmap.c
--- v1.1.25/linux/mm/mmap.c	Tue Jun 21 14:16:27 1994
+++ linux/mm/mmap.c	Fri Jul  8 13:23:21 1994
@@ -423,6 +423,7 @@
 		    prev->vm_inode != mpnt->vm_inode ||
 		    prev->vm_end != mpnt->vm_start ||
 		    !mp ||
+		    prev->vm_flags != mpnt->vm_flags ||
 		    prev->vm_share != mpnt->vm_share ||		/* ?? */
 		    prev->vm_next != mpnt)			/* !!! */
 			continue;
