r2668 - in trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches: . series

Jurij Smakov jurij-guest@costa.debian.org
Fri, 11 Mar 2005 05:51:46 +0100


Author: jurij-guest
Date: 2005-03-11 05:51:45 +0100 (Fri, 11 Mar 2005)
New Revision: 2668

Added:
   trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/sparc-sunsab-serial-lockup.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/series/2.6.11-1
Log:
Added sparc-sunsab-serial-lockup.patch 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.11-2.6.11/debian/patches/series/2.6.11-1
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/series/2.6.11-1	2005-03-10 23:51:43 UTC (rev 2667)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/series/2.6.11-1	2005-03-11 04:51:45 UTC (rev 2668)
@@ -53,3 +53,4 @@
 + modular-ide.dpatch
 + drivers-ide-__devinit.dpatch
 + fs-eventpoll-overflow-fix.dpatch
++ sparc-sunsab-serial-lockup.dpatch

Added: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/sparc-sunsab-serial-lockup.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/sparc-sunsab-serial-lockup.dpatch	2005-03-10 23:51:43 UTC (rev 2667)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/sparc-sunsab-serial-lockup.dpatch	2005-03-11 04:51:45 UTC (rev 2668)
@@ -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>  Thu, 10 Mar 2005 23:46:51 -0500
+diff -aur a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
+--- a/drivers/serial/sunsab.c	2005-03-02 02:38:07.000000000 -0500
++++ b/drivers/serial/sunsab.c	2005-03-09 19:44:51.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)
+@@ -788,6 +790,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	2005-03-02 02:38:33.000000000 -0500
++++ b/drivers/serial/sunsab.h	2005-03-09 19:44:51.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