]> git.dujemihanovic.xyz Git - u-boot.git/commit
virtio: pci: Tear down VQs in virtio_pci_reset()
authorWill Deacon <willdeacon@google.com>
Wed, 29 Mar 2023 14:24:56 +0000 (22:24 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 25 Apr 2023 15:53:15 +0000 (11:53 -0400)
commitda4e8bb09d6ea33618335106ea6a1fc515128123
treed4e4664fc161fb2f7056b1dc9899590b8a389e0c
parent7804306c800112390a35af9c777bda86465a7be5
virtio: pci: Tear down VQs in virtio_pci_reset()

The pages backing the virtqueues for virtio PCI devices are not freed
on reset, despite the virtqueue structure being freed as part of the
driver '->priv_auto' destruction at ->remove() time.

Call virtio_pci_del_vqs() from virtio_pci_reset() to free the virtqueue
pages before freeing the virtqueue structure itself.

Signed-off-by: Will Deacon <willdeacon@google.com>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/5ed54ccd83cbffd0d8719ce650604b4e44b5b0d8
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/virtio/virtio_pci_modern.c