patch-2.4.19 linux-2.4.19/drivers/s390/char/tubtty.c

Next file: linux-2.4.19/drivers/s390/misc/chandev.c
Previous file: linux-2.4.19/drivers/s390/char/tubio.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/drivers/s390/char/tubtty.c linux-2.4.19/drivers/s390/char/tubtty.c
@@ -603,12 +603,20 @@
 static void
 tty3270_bh(void *data)
 {
-	long flags;
 	tub_t *tubp;
+	ioinfo_t *ioinfop;
+	long flags;
 	struct tty_struct *tty;
 
-	tubp = data;
-	TUBLOCK(tubp->irq, flags);
+	ioinfop = ioinfo[(tubp = data)->irq];
+	while (TUBTRYLOCK(tubp->irq, flags) == 0) {
+		if (ioinfop->ui.flags.unready == 1)
+			return;
+	}
+	if (ioinfop->ui.flags.unready == 1 ||
+	    ioinfop->ui.flags.ready == 0)
+		goto do_unlock;
+
 	tubp->flags &= ~TUB_BHPENDING;
 	tty = tubp->tty;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)