aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/68328serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/68328serial.c')
-rw-r--r--drivers/serial/68328serial.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c
index 67e9afa000c1..4dd5c3f98167 100644
--- a/drivers/serial/68328serial.c
+++ b/drivers/serial/68328serial.c
@@ -294,7 +294,7 @@ static _INLINE_ void receive_chars(struct m68k_serial *info, struct pt_regs *reg
294{ 294{
295 struct tty_struct *tty = info->tty; 295 struct tty_struct *tty = info->tty;
296 m68328_uart *uart = &uart_addr[info->line]; 296 m68328_uart *uart = &uart_addr[info->line];
297 unsigned char ch; 297 unsigned char ch, flag;
298 298
299 /* 299 /*
300 * This do { } while() loop will get ALL chars out of Rx FIFO 300 * This do { } while() loop will get ALL chars out of Rx FIFO
@@ -332,26 +332,24 @@ static _INLINE_ void receive_chars(struct m68k_serial *info, struct pt_regs *reg
332 /* 332 /*
333 * Make sure that we do not overflow the buffer 333 * Make sure that we do not overflow the buffer
334 */ 334 */
335 if (tty->flip.count >= TTY_FLIPBUF_SIZE) { 335 if (tty_request_buffer_room(tty, 1) == 0) {
336 schedule_work(&tty->flip.work); 336 schedule_work(&tty->flip.work);
337 return; 337 return;
338 } 338 }
339 339
340 flag = TTY_NORMAL;
341
340 if(rx & URX_PARITY_ERROR) { 342 if(rx & URX_PARITY_ERROR) {
341 *tty->flip.flag_buf_ptr++ = TTY_PARITY; 343 flag = TTY_PARITY;
342 status_handle(info, rx); 344 status_handle(info, rx);
343 } else if(rx & URX_OVRUN) { 345 } else if(rx & URX_OVRUN) {
344 *tty->flip.flag_buf_ptr++ = TTY_OVERRUN; 346 flag = TTY_OVERRUN;
345 status_handle(info, rx); 347 status_handle(info, rx);
346 } else if(rx & URX_FRAME_ERROR) { 348 } else if(rx & URX_FRAME_ERROR) {
347 *tty->flip.flag_buf_ptr++ = TTY_FRAME; 349 flag = TTY_FRAME;
348 status_handle(info, rx); 350 status_handle(info, rx);
349 } else {
350 *tty->flip.flag_buf_ptr++ = 0; /* XXX */
351 } 351 }
352 *tty->flip.char_buf_ptr++ = ch; 352 tty_insert_flip_char(tty, ch, flag);
353 tty->flip.count++;
354
355#ifndef CONFIG_XCOPILOT_BUGS 353#ifndef CONFIG_XCOPILOT_BUGS
356 } while((rx = uart->urx.w) & URX_DATA_READY); 354 } while((rx = uart->urx.w) & URX_DATA_READY);
357#endif 355#endif