mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 15:11:50 +00:00
Char: n_hdlc, allow RESTARTSYS retval of tty write
Acked-by: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
c2aef333c9
commit
b0fed3140f
@ -400,7 +400,12 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
|
||||
/* Send the next block of data to device */
|
||||
tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
|
||||
actual = tty->driver->write(tty, tbuf->buf, tbuf->count);
|
||||
|
||||
|
||||
/* rollback was possible and has been done */
|
||||
if (actual == -ERESTARTSYS) {
|
||||
n_hdlc->tbuf = tbuf;
|
||||
break;
|
||||
}
|
||||
/* if transmit error, throw frame away by */
|
||||
/* pretending it was accepted by driver */
|
||||
if (actual < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user