[PATCH] HVCS fix to replace yield with tty_wait_until_sent in hvcs_close
Following the same advice you gave in a recent hvc_console patch I have modified HVCS to remove a while() { yield(); } from hvcs_close() which may cause problems where real time scheduling is concerned and replaced it with tty_wait_until_sent() which uses a real wait queue and is the proper method for blocking a tty operation while waiting for data to be sent. This patch has been tested to verify that all the paths of code that were changed were hit during the code run and performed as expected including hotplug remove of hvcs adapters and hangup of ttys. - Replaced yield() in hvcs_close() with tty_wait_until_sent() to prevent possible lockup with realtime scheduling. - Removed hvcs_final_close() and reordered cleanup operations to prevent discarding of pending data during an hvcs_close() call. - Removed spinlock protection of hvcs_struct data members in hvcs_write_room() and hvcs_chars_in_buffer() because they aren't needed. Signed-off-by: Ryan S. Arnold <rsa@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment