Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19639
b: refs/heads/master
c: 8145916
h: refs/heads/master
i:
  19637: 706757e
  19635: f575cc1
  19631: eb19ce3
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Feb 3, 2006
1 parent e0ca8af commit 6e1789a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84542838a3829f34630c589c1eb570656c455a1c
refs/heads/master: 8145916996b91d42b8bb4b0fcd508af295222c7c
25 changes: 10 additions & 15 deletions trunk/arch/v850/kernel/simcons.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,28 +117,23 @@ late_initcall(simcons_tty_init);
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;
pfd.events = POLLIN;

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;
}
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/xtensa/platform-iss/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ static void rs_poll(unsigned long priv)

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++;
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/serial/mcfserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,7 @@ static inline void receive_chars(struct mcf_serial *info)
}
tty_insert_flip_char(tty, ch, flag);
}

schedule_work(&tty->flip.work);
tty_flip_buffer_push(tty);
return;
}

Expand Down

0 comments on commit 6e1789a

Please sign in to comment.