diff options
Diffstat (limited to 'drivers/tty/serial/mpsc.c')
-rw-r--r-- | drivers/tty/serial/mpsc.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/tty/serial/mpsc.c b/drivers/tty/serial/mpsc.c index 6a9c6605666a..bc24f4931670 100644 --- a/drivers/tty/serial/mpsc.c +++ b/drivers/tty/serial/mpsc.c | |||
@@ -937,7 +937,7 @@ static int serial_polled; | |||
937 | static int mpsc_rx_intr(struct mpsc_port_info *pi) | 937 | static int mpsc_rx_intr(struct mpsc_port_info *pi) |
938 | { | 938 | { |
939 | struct mpsc_rx_desc *rxre; | 939 | struct mpsc_rx_desc *rxre; |
940 | struct tty_struct *tty = pi->port.state->port.tty; | 940 | struct tty_port *port = &pi->port.state->port; |
941 | u32 cmdstat, bytes_in, i; | 941 | u32 cmdstat, bytes_in, i; |
942 | int rc = 0; | 942 | int rc = 0; |
943 | u8 *bp; | 943 | u8 *bp; |
@@ -968,10 +968,9 @@ static int mpsc_rx_intr(struct mpsc_port_info *pi) | |||
968 | } | 968 | } |
969 | #endif | 969 | #endif |
970 | /* Following use of tty struct directly is deprecated */ | 970 | /* Following use of tty struct directly is deprecated */ |
971 | if (unlikely(tty_buffer_request_room(tty, bytes_in) | 971 | if (tty_buffer_request_room(port, bytes_in) < bytes_in) { |
972 | < bytes_in)) { | 972 | if (port->low_latency) |
973 | if (tty->low_latency) | 973 | tty_flip_buffer_push(port); |
974 | tty_flip_buffer_push(tty); | ||
975 | /* | 974 | /* |
976 | * If this failed then we will throw away the bytes | 975 | * If this failed then we will throw away the bytes |
977 | * but must do so to clear interrupts. | 976 | * but must do so to clear interrupts. |
@@ -1040,10 +1039,10 @@ static int mpsc_rx_intr(struct mpsc_port_info *pi) | |||
1040 | | SDMA_DESC_CMDSTAT_FR | 1039 | | SDMA_DESC_CMDSTAT_FR |
1041 | | SDMA_DESC_CMDSTAT_OR))) | 1040 | | SDMA_DESC_CMDSTAT_OR))) |
1042 | && !(cmdstat & pi->port.ignore_status_mask)) { | 1041 | && !(cmdstat & pi->port.ignore_status_mask)) { |
1043 | tty_insert_flip_char(tty, *bp, flag); | 1042 | tty_insert_flip_char(port, *bp, flag); |
1044 | } else { | 1043 | } else { |
1045 | for (i=0; i<bytes_in; i++) | 1044 | for (i=0; i<bytes_in; i++) |
1046 | tty_insert_flip_char(tty, *bp++, TTY_NORMAL); | 1045 | tty_insert_flip_char(port, *bp++, TTY_NORMAL); |
1047 | 1046 | ||
1048 | pi->port.icount.rx += bytes_in; | 1047 | pi->port.icount.rx += bytes_in; |
1049 | } | 1048 | } |
@@ -1081,7 +1080,7 @@ next_frame: | |||
1081 | if ((readl(pi->sdma_base + SDMA_SDCM) & SDMA_SDCM_ERD) == 0) | 1080 | if ((readl(pi->sdma_base + SDMA_SDCM) & SDMA_SDCM_ERD) == 0) |
1082 | mpsc_start_rx(pi); | 1081 | mpsc_start_rx(pi); |
1083 | 1082 | ||
1084 | tty_flip_buffer_push(tty); | 1083 | tty_flip_buffer_push(port); |
1085 | return rc; | 1084 | return rc; |
1086 | } | 1085 | } |
1087 | 1086 | ||