]> git.baikalelectronics.ru Git - uboot.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)
commitf4d9cad45465a326baf1eff35598f28599ea15af
treed4e4664fc161fb2f7056b1dc9899590b8a389e0c
parentb9b4bb7a4fe613ba9ae8feb0e1f16913953270ae
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