Files
erofs-linux/drivers/virtio
Ying Gao 528d92bfc0 virtio_input: Improve freeze handling
When executing suspend to ram, if lacking the operations
to reset device and free unused buffers before deleting
a vq, resource leaks and inconsistent device status will
appear.

According to chapter "3.3.1 Driver Requirements: Device Cleanup:"
of virtio-specification:
  Driver MUST ensure a virtqueue isn’t live
  (by device reset) before removing exposed
  buffers.

Therefore, modify the virtinput_freeze function to reset the
device and delete the unused buffers before deleting the
virtqueue, just like virtinput_remove does.

Co-developed-by: Ying Xu <[email protected]>
Signed-off-by: Ying Xu <[email protected]>
Co-developed-by: Junnan Wu <[email protected]>
Signed-off-by: Junnan Wu <[email protected]>
Signed-off-by: Ying Gao <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
2025-08-26 03:38:19 -04:00
..
2025-05-27 10:27:54 -04:00
2025-05-27 10:27:54 -04:00
2025-08-01 09:11:07 -04:00
2025-05-27 10:27:54 -04:00