From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: PATCH: Fix some ucLinux breakage from the tty updates
Date: Thu, 19 Jan 2006 09:40:19 +0000 [thread overview]
Message-ID: <1137663620.8471.9.camel@localhost.localdomain> (raw)
Breakage reported by Adrian Bunk
Untested (no hardware)
Signed-off-by: Alan Cox <alan@redhat.com>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.16-rc1/arch/v850/kernel/simcons.c linux-2.6.16-rc1/arch/v850/kernel/simcons.c
--- linux.vanilla-2.6.16-rc1/arch/v850/kernel/simcons.c 2006-01-17 15:36:18.000000000 +0000
+++ linux-2.6.16-rc1/arch/v850/kernel/simcons.c 2006-01-19 01:07:14.000000000 +0000
@@ -117,6 +117,7 @@
tty driver. */
void simcons_poll_tty (struct tty_struct *tty)
{
+ char buf[32]; /* Not the nicest way to do it but I need it correct first */
int flip = 0, send_break = 0;
struct pollfd pfd;
pfd.fd = 0;
@@ -124,21 +125,15 @@
if (V850_SIM_SYSCALL (poll, &pfd, 1, 0) > 0) {
if (pfd.revents & POLLIN) {
- int left = TTY_FLIPBUF_SIZE - tty->flip.count;
-
- if (left > 0) {
- unsigned char *buf = tty->flip.char_buf_ptr;
- int rd = V850_SIM_SYSCALL (read, 0, buf, left);
-
- if (rd > 0) {
- tty->flip.count += rd;
- tty->flip.char_buf_ptr += rd;
- memset (tty->flip.flag_buf_ptr, 0, rd);
- tty->flip.flag_buf_ptr += rd;
- flip = 1;
- } else
- send_break = 1;
- }
+ /* Real block hardware knows the transfer size before
+ transfer so the new tty buffering doesn't try to handle
+ this rather weird simulator specific case well */
+ int rd = V850_SIM_SYSCALL (read, 0, buf, 32);
+ if (rd > 0) {
+ tty_insert_flip_string(tty, buf, rd);
+ flip = 1;
+ } else
+ send_break = 1;
} else if (pfd.revents & POLLERR)
send_break = 1;
}
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.16-rc1/arch/xtensa/platform-iss/console.c linux-2.6.16-rc1/arch/xtensa/platform-iss/console.c
--- linux.vanilla-2.6.16-rc1/arch/xtensa/platform-iss/console.c 2006-01-17 15:36:18.000000000 +0000
+++ linux-2.6.16-rc1/arch/xtensa/platform-iss/console.c 2006-01-19 01:01:26.000000000 +0000
@@ -128,9 +128,7 @@
while (__simc(SYS_select_one, 0, XTISS_SELECT_ONE_READ, (int)&tv,0,0)){
__simc (SYS_read, 0, (unsigned long)&c, 1, 0, 0);
- tty->flip.count++;
- *tty->flip.char_buf_ptr++ = c;
- *tty->flip.flag_buf_ptr++ = TTY_NORMAL;
+ tty_insert_flip_char(tty, c, TTY_NORMAL);
i++;
}
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.16-rc1/drivers/serial/mcfserial.c linux-2.6.16-rc1/drivers/serial/mcfserial.c
--- linux.vanilla-2.6.16-rc1/drivers/serial/mcfserial.c 2006-01-17 15:52:54.000000000 +0000
+++ linux-2.6.16-rc1/drivers/serial/mcfserial.c 2006-01-19 00:58:47.000000000 +0000
@@ -350,8 +350,7 @@
}
tty_insert_flip_char(tty, ch, flag);
}
-
- schedule_work(&tty->flip.work);
+ tty_flip_buffer_push(tty);
return;
}
reply other threads:[~2006-01-19 9:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1137663620.8471.9.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®