diff options
Diffstat (limited to 'drivers/char/istallion.c')
-rw-r--r-- | drivers/char/istallion.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 24435f8daa68..28c5a3193b81 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c | |||
@@ -2711,17 +2711,13 @@ static void stli_read(stlibrd_t *brdp, stliport_t *portp) | |||
2711 | stlen = size - tail; | 2711 | stlen = size - tail; |
2712 | } | 2712 | } |
2713 | 2713 | ||
2714 | len = MIN(len, (TTY_FLIPBUF_SIZE - tty->flip.count)); | 2714 | len = tty_buffer_request_room(tty, len); |
2715 | /* FIXME : iomap ? */ | ||
2715 | shbuf = (volatile char *) EBRDGETMEMPTR(brdp, portp->rxoffset); | 2716 | shbuf = (volatile char *) EBRDGETMEMPTR(brdp, portp->rxoffset); |
2716 | 2717 | ||
2717 | while (len > 0) { | 2718 | while (len > 0) { |
2718 | stlen = MIN(len, stlen); | 2719 | stlen = MIN(len, stlen); |
2719 | memcpy(tty->flip.char_buf_ptr, (char *) (shbuf + tail), stlen); | 2720 | tty_insert_flip_string(tty, (char *)(shbuf + tail), stlen); |
2720 | memset(tty->flip.flag_buf_ptr, 0, stlen); | ||
2721 | tty->flip.char_buf_ptr += stlen; | ||
2722 | tty->flip.flag_buf_ptr += stlen; | ||
2723 | tty->flip.count += stlen; | ||
2724 | |||
2725 | len -= stlen; | 2721 | len -= stlen; |
2726 | tail += stlen; | 2722 | tail += stlen; |
2727 | if (tail >= size) { | 2723 | if (tail >= size) { |
@@ -2906,16 +2902,12 @@ static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp) | |||
2906 | 2902 | ||
2907 | if ((nt.data & DT_RXBREAK) && (portp->rxmarkmsk & BRKINT)) { | 2903 | if ((nt.data & DT_RXBREAK) && (portp->rxmarkmsk & BRKINT)) { |
2908 | if (tty != (struct tty_struct *) NULL) { | 2904 | if (tty != (struct tty_struct *) NULL) { |
2909 | if (tty->flip.count < TTY_FLIPBUF_SIZE) { | 2905 | tty_insert_flip_char(tty, 0, TTY_BREAK); |
2910 | tty->flip.count++; | 2906 | if (portp->flags & ASYNC_SAK) { |
2911 | *tty->flip.flag_buf_ptr++ = TTY_BREAK; | 2907 | do_SAK(tty); |
2912 | *tty->flip.char_buf_ptr++ = 0; | 2908 | EBRDENABLE(brdp); |
2913 | if (portp->flags & ASYNC_SAK) { | ||
2914 | do_SAK(tty); | ||
2915 | EBRDENABLE(brdp); | ||
2916 | } | ||
2917 | tty_schedule_flip(tty); | ||
2918 | } | 2909 | } |
2910 | tty_schedule_flip(tty); | ||
2919 | } | 2911 | } |
2920 | } | 2912 | } |
2921 | 2913 | ||
@@ -4940,7 +4932,7 @@ static int stli_portcmdstats(stliport_t *portp) | |||
4940 | if (portp->tty != (struct tty_struct *) NULL) { | 4932 | if (portp->tty != (struct tty_struct *) NULL) { |
4941 | if (portp->tty->driver_data == portp) { | 4933 | if (portp->tty->driver_data == portp) { |
4942 | stli_comstats.ttystate = portp->tty->flags; | 4934 | stli_comstats.ttystate = portp->tty->flags; |
4943 | stli_comstats.rxbuffered = portp->tty->flip.count; | 4935 | stli_comstats.rxbuffered = -1 /*portp->tty->flip.count*/; |
4944 | if (portp->tty->termios != (struct termios *) NULL) { | 4936 | if (portp->tty->termios != (struct termios *) NULL) { |
4945 | stli_comstats.cflags = portp->tty->termios->c_cflag; | 4937 | stli_comstats.cflags = portp->tty->termios->c_cflag; |
4946 | stli_comstats.iflags = portp->tty->termios->c_iflag; | 4938 | stli_comstats.iflags = portp->tty->termios->c_iflag; |