this patch replaces 2 numeric values with a HZ-related version in the ctc
driver of the S/390.
Its obvious that the first one is wrong, but I am not sure if the value of the
timeout is important for the 2nd change. Nevertheless the HZ value has
changed, so should the timeout.
There are some changes neccessary in some other serial drivers.
If there is interest, I will send patches for them as well.
cheers
Christian
--- drivers/s390/net/ctctty.org 2002-11-27 22:36:02.000000000 +0000
+++ drivers/s390/net/ctctty.c 2002-12-01 17:45:09.000000000 +0000
@@ -1094,7 +1094,7 @@
* line status register.
*/
if (info->flags & CTC_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
@@ -1119,7 +1119,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 &= ~(CTC_ASYNC_NORMAL_ACTIVE | CTC_ASYNC_CLOSING);
--- drivers/s390/net/ctctty.org 2002-11-27 22:36:02.000000000 +0000
+++ drivers/s390/net/ctctty.c 2002-12-01 17:45:09.000000000 +0000
@@ -1094,7 +1094,7 @@
* line status register.
*/
if (info->flags & CTC_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
@@ -1119,7 +1119,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 &= ~(CTC_ASYNC_NORMAL_ACTIVE | CTC_ASYNC_CLOSING);
Christian Borntraeger wrote:
> this patch replaces 2 numeric values with a HZ-related version in the ctc
> driver of the S/390.
Thanks, I will integrate this in the s390 cvs tree and submit it
with the next arch updates. Note that HZ has not changed for s390
systems and probably never will (at least it won't go /higher/ than
100, maybe lower), so the patch does not make a functional difference.
Arnd <><