Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6673cd0b authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky
Browse files

s390/3215: partially revert tty close handling fix



Partially revert ae289dc1 "s390/3215: fix tty close handling", since this
leads sometimes to hanging agetty processes and therefore systems that get
stuck while starting.

This was magically fixed (bisected) by a common code patch from Alan Cox:
36b3c070 "tty: Move the handling of the tty release logic", however it was
unrelated.

Since the removed code worked for a decade, nobody knows anymore why it was
in there in the first place and debugging the observed hang is non-trivial
(at least for me :) ), let's just re-add the removed code before we see
other side effects.

Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 93f3b2ee
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -44,6 +44,7 @@
#define RAW3215_NR_CCWS	    3
#define RAW3215_NR_CCWS	    3
#define RAW3215_TIMEOUT	    HZ/10     /* time for delayed output */
#define RAW3215_TIMEOUT	    HZ/10     /* time for delayed output */


#define RAW3215_FIXED	    1	      /* 3215 console device is not be freed */
#define RAW3215_WORKING	    4	      /* set if a request is being worked on */
#define RAW3215_WORKING	    4	      /* set if a request is being worked on */
#define RAW3215_THROTTLED   8	      /* set if reading is disabled */
#define RAW3215_THROTTLED   8	      /* set if reading is disabled */
#define RAW3215_STOPPED	    16	      /* set if writing is disabled */
#define RAW3215_STOPPED	    16	      /* set if writing is disabled */
@@ -630,7 +631,8 @@ static void raw3215_shutdown(struct raw3215_info *raw)
	DECLARE_WAITQUEUE(wait, current);
	DECLARE_WAITQUEUE(wait, current);
	unsigned long flags;
	unsigned long flags;


	if (!(raw->port.flags & ASYNC_INITIALIZED))
	if (!(raw->port.flags & ASYNC_INITIALIZED) ||
	    (raw->flags & RAW3215_FIXED))
		return;
		return;
	/* Wait for outstanding requests, then free irq */
	/* Wait for outstanding requests, then free irq */
	spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
	spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
@@ -927,6 +929,8 @@ static int __init con3215_init(void)
	dev_set_drvdata(&cdev->dev, raw);
	dev_set_drvdata(&cdev->dev, raw);
	cdev->handler = raw3215_irq;
	cdev->handler = raw3215_irq;


	raw->flags |= RAW3215_FIXED;

	/* Request the console irq */
	/* Request the console irq */
	if (raw3215_startup(raw) != 0) {
	if (raw3215_startup(raw) != 0) {
		raw3215_free_info(raw);
		raw3215_free_info(raw);