Files
linux/drivers
Hendrik Brueckner 3feebbb549 hvc_console: Fix loop if put_char() returns 0
If put_char() routine of a hvc console backend returns 0, then the
hvc console starts looping in the following scenarios:

1. hvc_console_print()
	If put_char() returns 0 then the while loop may loop forever.
	I have added the missing check for 0 to throw away console messages.

2. khvcd may loop:
	The thread calls hvc_poll() --> hvc_push()... if there are still
	buffered data then the HVC_POLL_WRITE bit is set and causes the
	khvcd thread to loop (if yield() returns immediately).

	However, instead of looping, the khvcd thread could sleep for
	MIN_TIMEOUT (doing the same as for get_chars()).
	The MIN_TIMEOUT is set if hvc_push() was not able to write
	data to the backend. If data has been written, the timeout is
	set to 0 to immediately re-schedule hvc_poll().

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> (virtio_console)
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-10-22 10:59:55 +11:00
..
2008-10-15 11:31:54 +11:00
2008-10-20 08:52:40 -07:00
2008-10-17 14:41:09 -07:00
2008-10-21 15:52:04 +11:00
2008-08-26 00:19:28 +10:00
2008-10-16 11:21:38 -07:00
2008-10-20 08:52:34 -07:00
2008-10-20 09:03:12 -07:00
2008-10-21 15:52:04 +11:00
2008-10-16 11:21:30 -07:00
2008-10-21 15:49:55 +11:00
2008-10-16 11:21:49 -07:00
2008-09-03 15:55:32 -07:00
2008-10-20 08:52:36 -07:00
2008-10-20 11:32:09 -07:00