# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1496  -> 1.1497 
#	drivers/char/sn_serial.c	1.1     -> 1.2    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/24	jbarnes@tomahawk.engr.sgi.com	1.1497
# fix console for medusa
# --------------------------------------------
#
diff -Nru a/drivers/char/sn_serial.c b/drivers/char/sn_serial.c
--- a/drivers/char/sn_serial.c	Mon Nov 24 12:45:55 2003
+++ b/drivers/char/sn_serial.c	Mon Nov 24 12:45:55 2003
@@ -813,13 +813,18 @@
 {
 	unsigned long flags;
 
-	sn_debug_printf("sn_serial: about to switch to asynchronous console\n");
-
 	/* without early_printk, we may be invoked late enough to race
 	 * with other cpus doing console IO at this point, however
 	 * console interrupts will never be enabled */
 	spin_lock_irqsave(&sn_sal_lock, flags);
 
+	if (sn_sal_is_asynch) {
+		spin_unlock_irqrestore(&sn_sal_lock, flags);
+		return;
+	}
+
+	sn_debug_printf("sn_serial: switch to asynchronous console\n");
+
 	/* early_printk invocation may have done this for us */
 	if (!sn_func) {
 		if (IS_RUNNING_ON_SIMULATOR())
@@ -901,8 +906,7 @@
 	/* when this driver is compiled in, the console initialization
 	 * will have already switched us into asynchronous operation
 	 * before we get here through the module initcalls */
-	if (!sn_sal_is_asynch)
-		sn_sal_switch_to_asynch();
+	sn_sal_switch_to_asynch();
 
 	/* at this point (module_init) we can try to turn on interrupts */
 	if (!IS_RUNNING_ON_SIMULATOR())
