aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2006-10-09 16:27:42 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-09 17:54:46 -0400
commit81e859ac1eef300c1b2ff49a2f2da8ee4ce1e844 (patch)
tree58adeba722120499ed6aa428bb4b321d69902727 /drivers/char
parentea62aa1b6f6d31b53a34a6f5271ed85735ccc0bc (diff)
[PATCH] m68k/MVME167: SERIAL167 tty flip buffer updates
Compile fixes related to changed tty flip buffer handling. Signed-off-by: Kars de Jong <jongk@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/serial167.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index defc0dbdedb3..461bfe0234c9 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -62,6 +62,7 @@
62#include <linux/console.h> 62#include <linux/console.h>
63#include <linux/module.h> 63#include <linux/module.h>
64#include <linux/bitops.h> 64#include <linux/bitops.h>
65#include <linux/tty_flip.h>
65 66
66#include <asm/system.h> 67#include <asm/system.h>
67#include <asm/io.h> 68#include <asm/io.h>
@@ -427,8 +428,9 @@ cd2401_rxerr_interrupt(int irq, void *dev_id)
427 overflowing, we still loose 428 overflowing, we still loose
428 the next incoming character. 429 the next incoming character.
429 */ 430 */
430 tty_insert_flip_char(tty, data, TTY_NORMAL); 431 if (tty_buffer_request_room(tty, 1) != 0){
431 } 432 tty_insert_flip_char(tty, data, TTY_FRAME);
433 }
432 /* These two conditions may imply */ 434 /* These two conditions may imply */
433 /* a normal read should be done. */ 435 /* a normal read should be done. */
434 /* else if(data & CyTIMEOUT) */ 436 /* else if(data & CyTIMEOUT) */
@@ -437,14 +439,14 @@ cd2401_rxerr_interrupt(int irq, void *dev_id)
437 tty_insert_flip_char(tty, 0, TTY_NORMAL); 439 tty_insert_flip_char(tty, 0, TTY_NORMAL);
438 } 440 }
439 }else{ 441 }else{
440 tty_insert_flip_char(tty, data, TTY_NORMAL); 442 tty_insert_flip_char(tty, data, TTY_NORMAL);
441 } 443 }
442 }else{ 444 }else{
443 /* there was a software buffer overrun 445 /* there was a software buffer overrun
444 and nothing could be done about it!!! */ 446 and nothing could be done about it!!! */
445 } 447 }
446 } 448 }
447 schedule_delayed_work(&tty->flip.work, 1); 449 tty_schedule_flip(tty);
448 /* end of service */ 450 /* end of service */
449 base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS; 451 base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS;
450 return IRQ_HANDLED; 452 return IRQ_HANDLED;
@@ -635,6 +637,7 @@ cd2401_rx_interrupt(int irq, void *dev_id)
635 char data; 637 char data;
636 int char_count; 638 int char_count;
637 int save_cnt; 639 int save_cnt;
640 int len;
638 641
639 /* determine the channel and change to that context */ 642 /* determine the channel and change to that context */
640 channel = (u_short ) (base_addr[CyLICR] >> 2); 643 channel = (u_short ) (base_addr[CyLICR] >> 2);
@@ -667,14 +670,15 @@ cd2401_rx_interrupt(int irq, void *dev_id)
667 info->mon.char_max = char_count; 670 info->mon.char_max = char_count;
668 info->mon.char_last = char_count; 671 info->mon.char_last = char_count;
669#endif 672#endif
670 while(char_count--){ 673 len = tty_buffer_request_room(tty, char_count);
674 while(len--){
671 data = base_addr[CyRDR]; 675 data = base_addr[CyRDR];
672 tty_insert_flip_char(tty, data, TTY_NORMAL); 676 tty_insert_flip_char(tty, data, TTY_NORMAL);
673#ifdef CYCLOM_16Y_HACK 677#ifdef CYCLOM_16Y_HACK
674 udelay(10L); 678 udelay(10L);
675#endif 679#endif
676 } 680 }
677 schedule_delayed_work(&tty->flip.work, 1); 681 tty_schedule_flip(tty);
678 } 682 }
679 /* end of service */ 683 /* end of service */
680 base_addr[CyREOIR] = save_cnt ? 0 : CyNOTRANS; 684 base_addr[CyREOIR] = save_cnt ? 0 : CyNOTRANS;