Re: [PATCH 2.4] serial closing_wait and close_delay

From: Marcelo Tosatti
Date: Mon Dec 13 2004 - 09:30:43 EST


On Tue, Nov 30, 2004 at 07:06:02PM +0000, Ian Abbott wrote:
> 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.

OK, it seems Russell's fix is simpler (and I'm not familiar with the code).

I'll wait for that one to settle down.

> 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.

Can you please split this part of the patch? (and send as a separate patch
to me CC Alan and Russell).

Thanks

>
> -- Ian.
>
> Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/