From: Jiri Slaby Acked-by: Paul Fulghum Signed-off-by: Jiri Slaby Signed-off-by: Andrew Morton --- drivers/char/n_hdlc.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) diff -puN drivers/char/n_hdlc.c~char-n_hdlc-allow-restartsys-retval-of-tty-write drivers/char/n_hdlc.c --- a/drivers/char/n_hdlc.c~char-n_hdlc-allow-restartsys-retval-of-tty-write +++ a/drivers/char/n_hdlc.c @@ -400,7 +400,12 @@ static void n_hdlc_send_frames(struct n_ /* 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) _