public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Russell King <rmk+lkml@arm.linux.org.uk>
Subject: Re: [PATCH 2.4] serial closing_wait and close_delay
Date: Mon, 13 Dec 2004 09:56:40 -0200	[thread overview]
Message-ID: <20041213115640.GI24597@logos.cnet> (raw)
In-Reply-To: <41ACC49A.20807@mev.co.uk>

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@mev.co.uk>

  parent reply	other threads:[~2004-12-13 14:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-30 19:06 [PATCH 2.4] serial closing_wait and close_delay Ian Abbott
2004-11-30 18:57 ` Alan Cox
2004-12-01  9:32   ` Ian Abbott
2004-12-01 10:48 ` Russell King
2004-12-13 11:56 ` Marcelo Tosatti [this message]
2004-12-16 13:17   ` Ian Abbott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041213115640.GI24597@logos.cnet \
    --to=marcelo.tosatti@cyclades.com \
    --cc=abbotti@mev.co.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox