patch-2.3.99-pre7 linux/drivers/sbus/char/sab82532.c

Next file: linux/drivers/sbus/char/sunkbd.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.3.99-pre6/linux/drivers/sbus/char/sab82532.c linux/drivers/sbus/char/sab82532.c
@@ -1,4 +1,4 @@
-/* $Id: sab82532.c,v 1.44 2000/04/26 09:36:32 davem Exp $
+/* $Id: sab82532.c,v 1.45 2000/05/08 22:23:08 ecd Exp $
  * sab82532.c: ASYNC Driver for the SIEMENS SAB82532 DUSCC.
  *
  * Copyright (C) 1997  Eddie C. Dost  (ecd@skynet.be)
@@ -352,6 +352,11 @@
 		free_fifo++;
 	}
 
+	if (stat->sreg.isr0 & SAB82532_ISR0_TCD) {
+		count = readb(&info->regs->r.rbcl) & (info->recv_fifo_size - 1);
+		free_fifo++;
+	}
+
 	/* Issue a FIFO read command in case we where idle. */
 	if (stat->sreg.isr0 & SAB82532_ISR0_TIME) {
 		sab82532_cec_wait(info);
@@ -360,13 +365,6 @@
 		sab82532_cec_wait(info);
 	}
 
-	if (stat->sreg.isr0 & SAB82532_ISR0_TCD) {
-		count = readb(&info->regs->r.rbcl) & (info->recv_fifo_size - 1);
-		if (count == 0)
-			count = info->recv_fifo_size;
-		free_fifo++;
-	}
-
 	if (stat->sreg.isr0 & SAB82532_ISR0_RFO) {
 #if 1
 		printk("sab82532: receive_chars: RFO");
@@ -835,8 +833,8 @@
 				SAB82532_IMR0_PLLA;
 	writeb(info->interrupt_mask0, &info->regs->w.imr0);
 	info->interrupt_mask1 = SAB82532_IMR1_BRKT | SAB82532_IMR1_XOFF |
-				SAB82532_IMR1_TIN | SAB82532_IMR1_XON |
-				SAB82532_IMR1_XPR;
+				SAB82532_IMR1_TIN | SAB82532_IMR1_CSC |
+				SAB82532_IMR1_XON | SAB82532_IMR1_XPR;
 	writeb(info->interrupt_mask1, &info->regs->w.imr1);
 
 	if (info->tty)
@@ -1056,10 +1054,14 @@
 		writeb(readb(&info->regs->rw.mode) & ~(SAB82532_MODE_RTS), &info->regs->rw.mode);
 		writeb(readb(&info->regs->rw.mode) | SAB82532_MODE_FRTS, &info->regs->rw.mode);
 		writeb(readb(&info->regs->rw.mode) & ~(SAB82532_MODE_FCTS), &info->regs->rw.mode);
+		info->interrupt_mask1 &= ~(SAB82532_IMR1_CSC);
+		writeb(info->interrupt_mask1, &info->regs->w.imr1);
 	} else {
 		writeb(readb(&info->regs->rw.mode) | SAB82532_MODE_RTS, &info->regs->rw.mode);
 		writeb(readb(&info->regs->rw.mode) & ~(SAB82532_MODE_FRTS), &info->regs->rw.mode);
 		writeb(readb(&info->regs->rw.mode) | SAB82532_MODE_FCTS, &info->regs->rw.mode);
+		info->interrupt_mask1 |= SAB82532_IMR1_CSC;
+		writeb(info->interrupt_mask1, &info->regs->w.imr1);
 	}
 	writeb(readb(&info->regs->rw.mode) | SAB82532_MODE_RAC, &info->regs->rw.mode);
 	restore_flags(flags);
@@ -2171,7 +2173,7 @@
 
 static inline void __init show_serial_version(void)
 {
-	char *revision = "$Revision: 1.44 $";
+	char *revision = "$Revision: 1.45 $";
 	char *version, *p;
 
 	version = strchr(revision, ' ');

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