r2933 - in trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian: . patches patches/series

Jurij Smakov jurij-guest@costa.debian.org
Wed, 06 Apr 2005 05:26:11 +0000


Author: jurij-guest
Date: 2005-04-06 05:26:09 +0000 (Wed, 06 Apr 2005)
New Revision: 2933

Added:
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/sparc-sunsab-serial-lockup.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-7
Log:
Added sparc-sunsab-serial-lockup.dpatch, which has been
already included into 2.6.8 and 2.6.11 k-s.


Modified: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog	2005-04-05 08:06:14 UTC (rev 2932)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog	2005-04-06 05:26:09 UTC (rev 2933)
@@ -2,8 +2,11 @@
 
   * [powerpc] replaced pegasos marvell gigabit ethernet driver by the backported
     version (Sven Luther)
+  * [sparc] 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 (Jurij Smakov).
 
- -- Sven Luther <luther@debian.org>  Wed, 16 Mar 2005 11:20:00 +0100
+ -- Sven Luther <luther@debian.org>  Wed,  6 Apr 2005 01:24:00 -0400
 
 kernel-source-2.6.10 (2.6.10-6) unstable; urgency=low
 

Modified: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-7
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-7	2005-04-05 08:06:14 UTC (rev 2932)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-7	2005-04-06 05:26:09 UTC (rev 2933)
@@ -1,3 +1,4 @@
 - marvell-pegasos.dpatch
 + powerpc-mv643xx-enet.dpatch
 + powerpc-mv643xx-eth-pegasos.dpatch
++ sparc-sunsab-serial-lockup.dpatch

Added: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/sparc-sunsab-serial-lockup.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/sparc-sunsab-serial-lockup.dpatch	2005-04-05 08:06:14 UTC (rev 2932)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/sparc-sunsab-serial-lockup.dpatch	2005-04-06 05:26:09 UTC (rev 2933)
@@ -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>  Wed,  6 Apr 2005 01:19:02 -0400
+diff -aur a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
+--- a/drivers/serial/sunsab.c	2004-12-24 16:34:31.000000000 -0500
++++ b/drivers/serial/sunsab.c	2005-04-06 01:06:55.000000000 -0400
+@@ -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	2004-12-24 16:35:50.000000000 -0500
++++ b/drivers/serial/sunsab.h	2005-04-06 01:06:55.000000000 -0400
+@@ -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