From: Jiri Slaby Date: Mon, 16 Jul 2007 06:40:12 +0000 (-0700) Subject: Char: n_hdlc, allow RESTARTSYS retval of tty write X-Git-Tag: v2.6.23-rc1~919 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0fed3140f57c435d2783b698c5090f325c22bad;p=linux-2.6 Char: n_hdlc, allow RESTARTSYS retval of tty write Acked-by: Paul Fulghum Signed-off-by: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c index 37f7d34030..e8332f305d 100644 --- a/drivers/char/n_hdlc.c +++ b/drivers/char/n_hdlc.c @@ -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)