Russell King c8c6bfa39d serial: avoid stalling suspend if serial port won't drain
Some ports seem to be unable to drain their transmitters on shut down.  Such a
problem can occur if the port is programmed for hardware imposed flow control,
characters are in the FIFO but the CTS signal is inactive.

Normally, this isn't a problem because most places where we wait for the
transmitter to drain have a time-out.  However, there is no timeout in the
suspend path.

Give a port 30ms to drain; this is an arbitary value chosen to avoid long
delays if there are many such ports in the system, while giving a reasonable
chance for a single port to drain.  Should a port not drain within this
timeout, issue a warning.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:10 -08:00
..
2008-02-03 17:06:17 +02:00
2008-02-03 17:08:11 +02:00
2008-02-03 16:29:12 +02:00
2008-02-03 17:12:34 +02:00
2008-02-03 15:42:53 +02:00
2008-01-30 13:14:02 -06:00
2008-02-03 17:15:20 +02:00
2008-02-03 17:16:28 +02:00
2008-02-04 23:50:03 +11:00
2008-02-03 17:18:59 +02:00
2008-02-03 17:21:01 +02:00
2008-02-03 17:22:34 +02:00
2008-02-03 17:23:36 +02:00
2008-02-03 17:24:37 +02:00
2008-02-03 15:42:53 +02:00
2008-02-02 15:08:04 -08:00
2008-01-31 11:25:51 +11:00
2008-02-03 15:42:53 +02:00
2008-02-03 17:30:25 +02:00
2008-02-03 17:31:49 +02:00
2008-02-04 23:50:13 +11:00