patch-2.2.14 linux/drivers/sbus/char/sab82532.c

Next file: linux/drivers/sbus/char/su.c
Previous file: linux/drivers/sbus/char/pcikbd.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.13/linux/drivers/sbus/char/sab82532.c linux/drivers/sbus/char/sab82532.c
@@ -1,4 +1,4 @@
-/* $Id: sab82532.c,v 1.30 1999/03/24 11:34:52 davem Exp $
+/* $Id: sab82532.c,v 1.30.2.2 1999/10/12 14:11:20 davem Exp $
  * sab82532.c: ASYNC Driver for the SIEMENS SAB82532 DUSCC.
  *
  * Copyright (C) 1997  Eddie C. Dost  (ecd@skynet.be)
@@ -36,6 +36,12 @@
 
 static DECLARE_TASK_QUEUE(tq_serial);
 
+/* This is (one of many) a special gross hack to allow SU and
+ * SAB serials to co-exist on the same machine. -DaveM
+ */
+#undef SERIAL_BH
+#define SERIAL_BH	AURORA_BH
+
 static struct tty_driver serial_driver, callout_driver;
 static int sab82532_refcount;
 
@@ -250,6 +256,8 @@
 static void batten_down_hatches(struct sab82532 *info)
 {
 	unsigned char saved_rfc;
+	
+	if (!stop_a_enabled) return;
 
 	/* If we are doing kadb, we call the debugger
 	 * else we just drop into the boot monitor.
@@ -2136,7 +2144,7 @@
 
 __initfunc(static inline void show_serial_version(void))
 {
-	char *revision = "$Revision: 1.30 $";
+	char *revision = "$Revision: 1.30.2.2 $";
 	char *version, *p;
 
 	version = strchr(revision, ' ');
@@ -2146,6 +2154,8 @@
 	printk("SAB82532 serial driver version %s\n", serial_version);
 }
 
+extern int su_num_ports;
+
 /*
  * The serial driver boot-time initialization code!
  */
@@ -2169,7 +2179,7 @@
 	serial_driver.driver_name = "serial";
 	serial_driver.name = "ttyS";
 	serial_driver.major = TTY_MAJOR;
-	serial_driver.minor_start = 64;
+	serial_driver.minor_start = 64 + su_num_ports;
 	serial_driver.num = NR_PORTS;
 	serial_driver.type = TTY_DRIVER_TYPE_SERIAL;
 	serial_driver.subtype = SERIAL_TYPE_NORMAL;
@@ -2267,7 +2277,7 @@
 	
 		printk(KERN_INFO
 		       "ttyS%02d at 0x%lx (irq = %s) is a SAB82532 %s\n",
-		       info->line, (unsigned long)info->regs,
+		       info->line + su_num_ports, (unsigned long)info->regs,
 		       __irq_itoa(info->irq), sab82532_version[info->type]);
 	}
 
@@ -2565,8 +2575,9 @@
 __initfunc(int sab82532_console_init(void))
 {
 	extern int con_is_present(void);
+	extern int su_console_registered;
 
-	if (con_is_present())
+	if (con_is_present() || su_console_registered)
 		return 0;
 
 	if (!sab82532_chain) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)