public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>
Cc: Paul Fulghum <paulkf@microgate.com>
Subject: [PATCH 1/1] Char: n_hdlc, allow RESTARTSYS retval of tty write
Date: Thu, 24 May 2007 14:28:20 +0200 (CEST)	[thread overview]
Message-ID: <23207103161692929650@wsc.cz> (raw)

n_hdlc, allow RESTARTSYS retval of tty write

Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>

---
commit 119ce83eb190c70d50ed7558c7b67b400ea00ec7
tree d334650d032ded74085a6951c0a1d3e3268fb7db
parent 221eebee5eedfa7c2463dcbfb545b92595512310
author Jiri Slaby <jirislaby@gmail.com> Wed, 23 May 2007 17:55:46 +0200
committer Jiri Slaby <jirislaby@gmail.com> Wed, 23 May 2007 17:55:46 +0200

 drivers/char/n_hdlc.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c
index 37f7d34..e8332f3 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)

             reply	other threads:[~2007-05-24 12:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24 12:28 Jiri Slaby [this message]
2007-05-24 15:10 ` [PATCH 1/1] Char: n_hdlc, allow RESTARTSYS retval of tty write Paul Fulghum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23207103161692929650@wsc.cz \
    --to=jirislaby@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox