z80pack: fix wakeup on console 2 and console 3
authorAlan Cox <alan@linux.intel.com>
Sat, 9 Jan 2016 21:15:22 +0000 (21:15 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 9 Jan 2016 21:15:22 +0000 (21:15 +0000)
Fixes the "must telnet before starting fuzix" bug

Kernel/dev/z80pack/devtty.c

index 10b7169..eac9dbc 100644 (file)
@@ -78,12 +78,12 @@ void tty_pollirq(void)
         c = tty3data;
         tty_inproc(3, c);
     }
-    if ((ttypoll & 2) && (tty2stat & 2)) {
-        ttypoll &= ~2;
+    if ((ttypoll & 4) && (tty2stat & 2)) {
+        ttypoll &= ~4;
         wakeup(&ttydata[2]);
     }
-    if ((ttypoll & 4) && (tty3stat & 2)) {
-        ttypoll &= ~4;
+    if ((ttypoll & 8) && (tty3stat & 2)) {
+        ttypoll &= ~8;
         wakeup(&ttydata[3]);
     }
 }