Char: n_hdlc, allow RESTARTSYS retval of tty write
PATCH 1/1 Char: n_hdlc, allow RESTARTSYS retval of tty write
n_hdlc, allow RESTARTSYS retval of tty write
Cc Paul Fulghum <[email protected]>
Signed-off-by Jiri Slaby <[email protected]>
---
commit 119ce83eb190c70d50ed7558c7b67b400ea00ec7
tree d334650d032ded74085a6951c0a1d3e3268fb7db
parent 221eebee5eedfa7c2463dcbfb545b92595512310
author Jiri Slaby <[email protected]> Wed, 23 May 2007 17:55:46 +0200 committer Jiri Slaby <[email protected]> Wed, 23 May 2007 17:55:46 +0200
drivers/char/n_hdlc.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/char/n_hdlc.c +6 -1
@@ -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 )
Quoted 5 lines · Jiri Slaby
n_hdlc, allow RESTARTSYS retval of tty writeCc Paul Fulghum <[email protected]>Signed-off-by Jiri Slaby <[email protected]>
Acked-by Paul Fulghum <[email protected]>
--
Paul Fulghum
Microgate Systems, Ltd