Commit 81e859ac authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] m68k/MVME167: SERIAL167 tty flip buffer updates

Compile fixes related to changed tty flip buffer handling.
Signed-off-by: default avatarKars de Jong <jongk@linux-m68k.org>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ea62aa1b
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
#include <linux/console.h> #include <linux/console.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/tty_flip.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -427,8 +428,9 @@ cd2401_rxerr_interrupt(int irq, void *dev_id) ...@@ -427,8 +428,9 @@ cd2401_rxerr_interrupt(int irq, void *dev_id)
overflowing, we still loose overflowing, we still loose
the next incoming character. the next incoming character.
*/ */
tty_insert_flip_char(tty, data, TTY_NORMAL); if (tty_buffer_request_room(tty, 1) != 0){
} tty_insert_flip_char(tty, data, TTY_FRAME);
}
/* These two conditions may imply */ /* These two conditions may imply */
/* a normal read should be done. */ /* a normal read should be done. */
/* else if(data & CyTIMEOUT) */ /* else if(data & CyTIMEOUT) */
...@@ -437,14 +439,14 @@ cd2401_rxerr_interrupt(int irq, void *dev_id) ...@@ -437,14 +439,14 @@ cd2401_rxerr_interrupt(int irq, void *dev_id)
tty_insert_flip_char(tty, 0, TTY_NORMAL); tty_insert_flip_char(tty, 0, TTY_NORMAL);
} }
}else{ }else{
tty_insert_flip_char(tty, data, TTY_NORMAL); tty_insert_flip_char(tty, data, TTY_NORMAL);
} }
}else{ }else{
/* there was a software buffer overrun /* there was a software buffer overrun
and nothing could be done about it!!! */ and nothing could be done about it!!! */
} }
} }
schedule_delayed_work(&tty->flip.work, 1); tty_schedule_flip(tty);
/* end of service */ /* end of service */
base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS; base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS;
return IRQ_HANDLED; return IRQ_HANDLED;
...@@ -635,6 +637,7 @@ cd2401_rx_interrupt(int irq, void *dev_id) ...@@ -635,6 +637,7 @@ cd2401_rx_interrupt(int irq, void *dev_id)
char data; char data;
int char_count; int char_count;
int save_cnt; int save_cnt;
int len;
/* determine the channel and change to that context */ /* determine the channel and change to that context */
channel = (u_short ) (base_addr[CyLICR] >> 2); channel = (u_short ) (base_addr[CyLICR] >> 2);
...@@ -667,14 +670,15 @@ cd2401_rx_interrupt(int irq, void *dev_id) ...@@ -667,14 +670,15 @@ cd2401_rx_interrupt(int irq, void *dev_id)
info->mon.char_max = char_count; info->mon.char_max = char_count;
info->mon.char_last = char_count; info->mon.char_last = char_count;
#endif #endif
while(char_count--){ len = tty_buffer_request_room(tty, char_count);
while(len--){
data = base_addr[CyRDR]; data = base_addr[CyRDR];
tty_insert_flip_char(tty, data, TTY_NORMAL); tty_insert_flip_char(tty, data, TTY_NORMAL);
#ifdef CYCLOM_16Y_HACK #ifdef CYCLOM_16Y_HACK
udelay(10L); udelay(10L);
#endif #endif
} }
schedule_delayed_work(&tty->flip.work, 1); tty_schedule_flip(tty);
} }
/* end of service */ /* end of service */
base_addr[CyREOIR] = save_cnt ? 0 : CyNOTRANS; base_addr[CyREOIR] = save_cnt ? 0 : CyNOTRANS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment