mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] isdn-tty driver not HZ aware
@ 2002-12-02 18:45 Christian Borntraeger
  0 siblings, 0 replies; only message in thread
From: Christian Borntraeger @ 2002-12-02 18:45 UTC (permalink / raw)
  To: kai.germaschewski; +Cc: Linux Kernel

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

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.

--- drivers/isdn/i4l/isdn_tty.c.org	2002-11-27 22:36:16.000000000 +0000
+++ drivers/isdn/i4l/isdn_tty.c	2002-12-01 19:03:15.000000000 +0000
@@ -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 |

[-- Attachment #2: isdn.patch --]
[-- Type: application/octet-stream, Size: 762 bytes --]

--- drivers/isdn/i4l/isdn_tty.c.org	2002-11-27 22:36:16.000000000 +0000
+++ drivers/isdn/i4l/isdn_tty.c	2002-12-01 19:03:15.000000000 +0000
@@ -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 |

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-02 18:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-02 18:45 [PATCH] isdn-tty driver not HZ aware Christian Borntraeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®