Re: [PATCH] remoteproc: remoteproc_virtio: reset vdev before removing it

From: Shah, Tanmay

Date: Wed Sep 30 2026 - 18:01:30 EST




On 9/27/2026 3:55 AM, Francesco Valla wrote:
> Hi Tanmay,
>
> On Thu, Sep 24, 2026 at 01:59:02PM -0700, Tanmay Shah wrote:
>> The virtio device is removed when the remoteproc device is removed. The
>> driver should issue reset on the virtio device so the remote can do
>> corresponding cleanup.
>>
>
> Shouldn't be the driver, and not the transport, the one that calls
> virtio_reset_device()?
>

Hello Francesco,

Thanks for your reviews. I will look into it.

Tanmay

>> Fixes: 7a186941626d ("remoteproc: remove the single rpmsg vdev limitation")
>> Signed-off-by: Tanmay Shah <tanmay.shah@xxxxxxx>
>> ---
>> drivers/remoteproc/remoteproc_virtio.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
>> index d5e9ff045a28..1cb0ee0ea656 100644
>> --- a/drivers/remoteproc/remoteproc_virtio.c
>> +++ b/drivers/remoteproc/remoteproc_virtio.c
>> @@ -469,6 +469,8 @@ static int rproc_remove_virtio_dev(struct device *dev, void *data)
>> {
>> struct virtio_device *vdev = dev_to_virtio(dev);
>>
>> + virtio_reset_device(vdev);
>> +
>> unregister_virtio_device(vdev);
>> return 0;
>> }
>>
>> base-commit: 5f639b3018c0026a5341949724b4b921cf3a3d5d
>> --
>> 2.43.0
>>