Skip to contentSkip to conversation

isdn-tty driver not HZ aware

PATCH New Christian Borntraeger 1 participant 1 message Dec 2, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 isdn-tty driver not HZ aware

This patch makes isdn_tty HZ aware.
The first change changes 3000 jiffies (now 3 seconds) to 30 seconds according to the comment.
I dont know, if the second change (schedule_timeout(50);) has to be half a second but this was the value used in 2.4.

isdn/i4l/isdn_tty.c renamed from isdn/i4l/isdn_tty.c.org +2 -2
@@ -1876,7 +1876,7 @@
 	 * line status register.
 	 */
 	if (info->flags & ISDN_ASYNC_INITIALIZED) {
-		tty_wait_until_sent(tty, 3000);	/* 30 seconds timeout */
+		tty_wait_until_sent(tty, 30 * HZ);	/* 30 seconds timeout */
 		/*
 		 * Before we drop DTR, make sure the UART transmitter
 		 * has completely drained; this is especially
@@ -1901,7 +1901,7 @@
 	tty->closing = 0;
 	if (info->blocked_open) {
 		set_current_state(TASK_INTERRUPTIBLE);
-		schedule_timeout(50);
+		schedule_timeout(HZ/2);
 		wake_up_interruptible(&info->open_wait);
 	}
 	info->flags &= ~(ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CALLOUT_ACTIVE |
isdn/i4l/isdn_tty.c renamed from isdn/i4l/isdn_tty.c.org +2 -2
@@ -1876,7 +1876,7 @@
 	 * line status register.
 	 */
 	if (info->flags & ISDN_ASYNC_INITIALIZED) {
-		tty_wait_until_sent(tty, 3000);	/* 30 seconds timeout */
+		tty_wait_until_sent(tty, 30 * HZ);	/* 30 seconds timeout */
 		/*
 		 * Before we drop DTR, make sure the UART transmitter
 		 * has completely drained; this is especially
@@ -1901,7 +1901,7 @@
 	tty->closing = 0;
 	if (info->blocked_open) {
 		set_current_state(TASK_INTERRUPTIBLE);
-		schedule_timeout(50);
+		schedule_timeout(HZ/2);
 		wake_up_interruptible(&info->open_wait);
 	}
 	info->flags &= ~(ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CALLOUT_ACTIVE |