r2689 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches patches/series

Jurij Smakov jurij-guest@costa.debian.org
Sun, 13 Mar 2005 22:25:45 +0100


Author: jurij-guest
Date: 2005-03-13 22:25:44 +0100 (Sun, 13 Mar 2005)
New Revision: 2689

Added:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/sparc-sunsab-serial-lockup.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-14
Log:
Added sparc-sunsab-serial-lockup.dpatch to eliminate
the serial console lockup when booting the kernel
over serial console on a machine with sunsab serial
controller (such as Ultra 5/10).


Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2005-03-13 20:12:38 UTC (rev 2688)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2005-03-13 21:25:44 UTC (rev 2689)
@@ -68,6 +68,9 @@
     an error condition to prevent some nondeterministic behavior.
     (Joshua Kwan)
 
+  * [sparc] Added sparc-sunsab-serial-lockup.dpatch to eliminate the serial
+    console lockup on machines with sunsab serial controller (Jurij Smakov).
+
  -- Joshua Kwan <joshk@triplehelix.org>  Sat, 26 Feb 2005 21:01:07 -0800
 
 kernel-source-2.6.8 (2.6.8-13) unstable; urgency=high

Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-14
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-14	2005-03-13 20:12:38 UTC (rev 2688)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-14	2005-03-13 21:25:44 UTC (rev 2689)
@@ -21,3 +21,4 @@
 + sparc64-sb1500-clock-2.6.dpatch
 + fs-eventpoll-overflow-fix.dpatch
 + nfs-O_DIRECT-fix.dpatch
++ sparc-sunsab-serial-lockup.dpatch

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/sparc-sunsab-serial-lockup.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/sparc-sunsab-serial-lockup.dpatch	2005-03-13 20:12:38 UTC (rev 2688)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/sparc-sunsab-serial-lockup.dpatch	2005-03-13 21:25:44 UTC (rev 2689)
@@ -0,0 +1,68 @@
+# This patch eliminates a serial console lockup when booting on
+# a machine with sunsab serial controller, found on Sun hardware
+# (Ultra 5/10). It has been confirmed working by Frans Pop and
+# myself and submitted upstream for review/comments. See 
+#
+# http://marc.theaimsgroup.com/?l=linux-sparc&m=111042459728561&w=2
+#
+# for details.
+#
+# -- Jurij Smakov <jurij@wooyd.org>  Sun, 13 Mar 2005 16:14:01 -0500
+diff -aur a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
+--- a/drivers/serial/sunsab.c	2005-03-13 15:27:28.000000000 -0500
++++ b/drivers/serial/sunsab.c	2005-03-13 15:56:45.000000000 -0500
+@@ -295,20 +295,22 @@
+ static void check_status(struct uart_sunsab_port *up,
+ 			 union sab82532_irq_status *stat)
+ {
+-	if (stat->sreg.isr0 & SAB82532_ISR0_CDSC)
+-		uart_handle_dcd_change(&up->port,
++	if (test_bit(SAB82532_MODEM_STATUS, &up->irqflags)) {
++		if (stat->sreg.isr0 & SAB82532_ISR0_CDSC)
++			uart_handle_dcd_change(&up->port,
+ 				       !(readb(&up->regs->r.vstr) & SAB82532_VSTR_CD));
+ 
+-	if (stat->sreg.isr1 & SAB82532_ISR1_CSC)
+-		uart_handle_cts_change(&up->port,
++		if (stat->sreg.isr1 & SAB82532_ISR1_CSC)
++			uart_handle_cts_change(&up->port,
+ 				       (readb(&up->regs->r.star) & SAB82532_STAR_CTS));
+ 
+-	if ((readb(&up->regs->r.pvr) & up->pvr_dsr_bit) ^ up->dsr) {
+-		up->dsr = (readb(&up->regs->r.pvr) & up->pvr_dsr_bit) ? 0 : 1;
+-		up->port.icount.dsr++;
+-	}
++		if ((readb(&up->regs->r.pvr) & up->pvr_dsr_bit) ^ up->dsr) {
++			up->dsr = (readb(&up->regs->r.pvr) & up->pvr_dsr_bit) ? 0 : 1;
++			up->port.icount.dsr++;
++		}
+ 
+-	wake_up_interruptible(&up->port.info->delta_msr_wait);
++		wake_up_interruptible(&up->port.info->delta_msr_wait);
++	}
+ }
+ 
+ static irqreturn_t sunsab_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+@@ -806,6 +808,11 @@
+ 
+ 	spin_lock_irqsave(&up->port.lock, flags);
+ 	sunsab_convert_to_sab(up, termios->c_cflag, termios->c_iflag, baud);
++        if (UART_ENABLE_MS(&up->port, termios->c_cflag))
++                set_bit(SAB82532_MODEM_STATUS, &up->irqflags);
++        else
++                clear_bit(SAB82532_MODEM_STATUS, &up->irqflags);
++	uart_update_timeout(port, termios->c_cflag, baud);
+ 	spin_unlock_irqrestore(&up->port.lock, flags);
+ }
+ 
+diff -aur a/drivers/serial/sunsab.h b/drivers/serial/sunsab.h
+--- a/drivers/serial/sunsab.h	2004-08-14 01:38:11.000000000 -0400
++++ b/drivers/serial/sunsab.h	2005-03-13 15:56:45.000000000 -0500
+@@ -126,6 +126,7 @@
+ /* irqflags bits */
+ #define SAB82532_ALLS			0x00000001
+ #define SAB82532_XPR			0x00000002
++#define SAB82532_MODEM_STATUS		0x00000004
+ 
+ /* RFIFO Status Byte */
+ #define SAB82532_RSTAT_PE		0x80