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
..
2007-10-17 08:42:52 -07:00
2008-02-04 13:14:06 +00:00
2007-10-19 11:53:42 -07:00
2006-12-08 08:28:57 -08:00
2007-11-14 18:45:46 -08:00
2007-11-14 18:45:46 -08:00
2006-12-07 08:39:41 -08:00
2008-02-03 14:47:38 +02:00
2007-11-29 09:24:53 -08:00
2008-02-01 21:00:01 +11:00
2008-02-03 17:29:25 +02:00
2006-12-08 08:28:57 -08:00
2006-12-08 08:28:57 -08:00
2007-02-14 08:09:52 -08:00
2006-12-08 08:28:57 -08:00
2007-09-11 17:21:19 -07:00
2006-12-08 08:28:57 -08:00
2007-07-18 08:38:22 -07:00
2007-07-18 08:38:22 -07:00