aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/serial167.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/serial167.c')
-rw-r--r--drivers/char/serial167.c35
1 files changed, 10 insertions, 25 deletions
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index a580748b92a1..f36342ae8e7e 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -422,45 +422,35 @@ cd2401_rxerr_interrupt(int irq, void *dev_id, struct pt_regs *fp)
422 base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS; 422 base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS;
423 return IRQ_HANDLED; 423 return IRQ_HANDLED;
424 } 424 }
425 if (tty->flip.count < TTY_FLIPBUF_SIZE){ 425 if (tty_buffer_request_room(tty, 1) != 0){
426 tty->flip.count++;
427 if (err & info->read_status_mask){ 426 if (err & info->read_status_mask){
428 if(err & CyBREAK){ 427 if(err & CyBREAK){
429 *tty->flip.flag_buf_ptr++ = TTY_BREAK; 428 tty_insert_flip_char(tty, data, TTY_BREAK);
430 *tty->flip.char_buf_ptr++ = data;
431 if (info->flags & ASYNC_SAK){ 429 if (info->flags & ASYNC_SAK){
432 do_SAK(tty); 430 do_SAK(tty);
433 } 431 }
434 }else if(err & CyFRAME){ 432 }else if(err & CyFRAME){
435 *tty->flip.flag_buf_ptr++ = TTY_FRAME; 433 tty_insert_flip_char(tty, data, TTY_FRAME);
436 *tty->flip.char_buf_ptr++ = data;
437 }else if(err & CyPARITY){ 434 }else if(err & CyPARITY){
438 *tty->flip.flag_buf_ptr++ = TTY_PARITY; 435 tty_insert_flip_char(tty, data, TTY_PARITY);
439 *tty->flip.char_buf_ptr++ = data;
440 }else if(err & CyOVERRUN){ 436 }else if(err & CyOVERRUN){
441 *tty->flip.flag_buf_ptr++ = TTY_OVERRUN; 437 tty_insert_flip_char(tty, 0, TTY_OVERRUN);
442 *tty->flip.char_buf_ptr++ = 0;
443 /* 438 /*
444 If the flip buffer itself is 439 If the flip buffer itself is
445 overflowing, we still loose 440 overflowing, we still loose
446 the next incoming character. 441 the next incoming character.
447 */ 442 */
448 if(tty->flip.count < TTY_FLIPBUF_SIZE){ 443 tty_insert_flip_char(tty, data, TTY_NORMAL);
449 tty->flip.count++; 444 }
450 *tty->flip.flag_buf_ptr++ = TTY_NORMAL;
451 *tty->flip.char_buf_ptr++ = data;
452 }
453 /* These two conditions may imply */ 445 /* These two conditions may imply */
454 /* a normal read should be done. */ 446 /* a normal read should be done. */
455 /* else if(data & CyTIMEOUT) */ 447 /* else if(data & CyTIMEOUT) */
456 /* else if(data & CySPECHAR) */ 448 /* else if(data & CySPECHAR) */
457 }else{ 449 }else{
458 *tty->flip.flag_buf_ptr++ = 0; 450 tty_insert_flip_char(tty, 0, TTY_NORMAL);
459 *tty->flip.char_buf_ptr++ = 0;
460 } 451 }
461 }else{ 452 }else{
462 *tty->flip.flag_buf_ptr++ = 0; 453 tty_insert_flip_char(tty, data, TTY_NORMAL);
463 *tty->flip.char_buf_ptr++ = 0;
464 } 454 }
465 }else{ 455 }else{
466 /* there was a software buffer overrun 456 /* there was a software buffer overrun
@@ -692,12 +682,7 @@ cd2401_rx_interrupt(int irq, void *dev_id, struct pt_regs *fp)
692#endif 682#endif
693 while(char_count--){ 683 while(char_count--){
694 data = base_addr[CyRDR]; 684 data = base_addr[CyRDR];
695 if (tty->flip.count >= TTY_FLIPBUF_SIZE){ 685 tty_insert_flip_char(tty, data, TTY_NORMAL);
696 continue;
697 }
698 tty->flip.count++;
699 *tty->flip.flag_buf_ptr++ = TTY_NORMAL;
700 *tty->flip.char_buf_ptr++ = data;
701#ifdef CYCLOM_16Y_HACK 686#ifdef CYCLOM_16Y_HACK
702 udelay(10L); 687 udelay(10L);
703#endif 688#endif