From: Russell King Date: Tue, 5 Feb 2008 06:27:52 +0000 (-0800) Subject: serial: avoid stalling suspend if serial port won't drain X-Git-Tag: v2.6.25-rc1~1021 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8c6bfa39d6bd7347f43937c8767ae145b61bcb4;p=pandora-kernel.git 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 Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed