]> git.baikalelectronics.ru Git - kernel.git/commit
tty: hvc: hvc_write() fix break condition
authorNicholas Piggin <npiggin@gmail.com>
Sun, 9 Sep 2018 05:39:16 +0000 (15:39 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Sep 2018 16:04:31 +0000 (18:04 +0200)
commite23473b8a92cdecc8dd8332160139bdc856b884b
tree2a34c7484d8288d850e3343244f46a570bf851ce
parentb35fd498089a3ddc0f7d1bfbe3a74294c2f49ee4
tty: hvc: hvc_write() fix break condition

Commit e242d343e613 ("tty: hvc: hvc_write() may sleep") broke the
termination condition in case the driver stops accepting characters.
This can result in unnecessary polling of the busy driver.

Restore it by testing the hvc_push return code.

Tested-by: Matteo Croce <mcroce@redhat.com>
Tested-by: Jason Gunthorpe <jgg@mellanox.com>
Tested-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/hvc/hvc_console.c