[PATCH 2.4] serial closing_wait and close_delay
From: Ian Abbott (abbotti_at_mev.co.uk)
Date: 11/30/04
- Previous message: Alan Cox: "Re: [patch 6/6] s390: qeth network driver."
- Next in thread: Alan Cox: "Re: [PATCH 2.4] serial closing_wait and close_delay"
- Reply: Alan Cox: "Re: [PATCH 2.4] serial closing_wait and close_delay"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Nov 2004 19:06:02 +0000 To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Dear Marcelo,
This patch should fix various problems with the closing_wait and
close_delay serial parameters, but I can only test the standard serial
driver.
There are various scaling problems when HZ != 100:
* In several drivers, the values set by TIOCSSERIAL are scaled by
HZ/100, but the values got by TIOCGSERIAL are not scaled back.
* Invariably, the scaled closing_wait value is compared with an unscaled
constant ASYNC_CLOSING_WAIT_NONE or the same value by another name
(depending on the specific driver).
My patch stores the values set by TIOCSSERIAL without scaling and scales
the values by HZ/100 at the point of use. (This is not as bad as it
sounds, as each value is scaled once per 'close'.) There seems to be a
general consensus amongst the serial drivers that the closing_wait and
close_delay values from the user are in units of .01 seconds.
There is another problem, not related to HZ scaling:
* In several drivers, the closing_wait and close_delay values are
written to a struct serial_state by TIOCSSERIAL, but the values used in
the close routine are read from a struct async_struct, with no code to
transfer of values between the two structures. My patch ignores the
members in struct async_struct and uses the values from struct serial_state.
-- Ian.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- text/x-patch attachment: serial-closing-wait.patch
- Previous message: Alan Cox: "Re: [patch 6/6] s390: qeth network driver."
- Next in thread: Alan Cox: "Re: [PATCH 2.4] serial closing_wait and close_delay"
- Reply: Alan Cox: "Re: [PATCH 2.4] serial closing_wait and close_delay"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|