hwrng: virtio - always add a pending request
authorLaurent Vivier <lvivier@redhat.com>
Thu, 28 Oct 2021 10:11:11 +0000 (12:11 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 1 Nov 2021 09:26:47 +0000 (05:26 -0400)
commit9a4b612d675b03f7fc9fa1957ca399c8223f3954
treeeb4288b405a7821130982fc69ace34f1f76d8d36
parent5c8e933050044d6dd2a000f9a5756ae73cbe7c44
hwrng: virtio - always add a pending request

If we ensure we have already some data available by enqueuing
again the buffer once data are exhausted, we can return what we
have without waiting for the device answer.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Link: https://lore.kernel.org/r/20211028101111.128049-5-lvivier@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/char/hw_random/virtio-rng.c