aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/n_tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r--drivers/tty/n_tty.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 6aa90332dd3e..900ebbe0a7ab 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -1259,11 +1259,6 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
1259 struct n_tty_data *ldata = tty->disc_data; 1259 struct n_tty_data *ldata = tty->disc_data;
1260 int parmrk; 1260 int parmrk;
1261 1261
1262 if (ldata->raw) {
1263 put_tty_queue(c, ldata);
1264 return;
1265 }
1266
1267 if (I_ISTRIP(tty)) 1262 if (I_ISTRIP(tty))
1268 c &= 0x7f; 1263 c &= 0x7f;
1269 if (I_IUCLC(tty) && L_IEXTEN(tty)) 1264 if (I_IUCLC(tty) && L_IEXTEN(tty))
@@ -1530,6 +1525,23 @@ n_tty_receive_buf_real_raw(struct tty_struct *tty, const unsigned char *cp,
1530 ldata->read_head += n; 1525 ldata->read_head += n;
1531} 1526}
1532 1527
1528static void
1529n_tty_receive_buf_raw(struct tty_struct *tty, const unsigned char *cp,
1530 char *fp, int count)
1531{
1532 struct n_tty_data *ldata = tty->disc_data;
1533 char flag = TTY_NORMAL;
1534
1535 while (count--) {
1536 if (fp)
1537 flag = *fp++;
1538 if (likely(flag == TTY_NORMAL))
1539 put_tty_queue(*cp++, ldata);
1540 else
1541 n_tty_receive_char_flagged(tty, *cp++, flag);
1542 }
1543}
1544
1533static void __receive_buf(struct tty_struct *tty, const unsigned char *cp, 1545static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
1534 char *fp, int count) 1546 char *fp, int count)
1535{ 1547{
@@ -1537,6 +1549,8 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
1537 1549
1538 if (ldata->real_raw) 1550 if (ldata->real_raw)
1539 n_tty_receive_buf_real_raw(tty, cp, fp, count); 1551 n_tty_receive_buf_real_raw(tty, cp, fp, count);
1552 else if (ldata->raw)
1553 n_tty_receive_buf_raw(tty, cp, fp, count);
1540 else { 1554 else {
1541 char flag = TTY_NORMAL; 1555 char flag = TTY_NORMAL;
1542 1556