
On Thu, 30 Mar 2023 at 03:26, Ying-Chun Liu (PaulLiu) paul.liu@linaro.org wrote:
From: Will Deacon willdeacon@google.com
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/+/5ed54ccd83cbffd0...
drivers/virtio/virtio_pci_modern.c | 38 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org