Skip to content
Commit 6e7f6b82 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Greg Kroah-Hartman
Browse files

tty: hvc: hvc_poll() fix read loop hang

Commit ec97eaad

 ("tty: hvc: hvc_poll() break hv read loop") causes
the virtio console to hang at times (e.g., if you paste a bunch of
characters to it.

The reason is that get_chars must return 0 before we can be sure the
driver will kick or poll input again, but this change only scheduled a
poll if get_chars had returned a full count. Change this to poll on
any > 0 count.

Reported-by: default avatarMatteo Croce <mcroce@redhat.com>
Reported-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Tested-by: default avatarMatteo Croce <mcroce@redhat.com>
Tested-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Tested-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 11da3a7f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment