Re: [PATCH v2 1/4] virtio: add virtio_device_shutdown() helper
From: David Hildenbrand (Arm)
Date: Wed Jun 24 2026 - 10:57:21 EST
On 6/24/26 16:08, Denis V. Lunev wrote:
> The generic virtio bus .shutdown handler, virtio_dev_shutdown(), breaks
> and resets a device once it has established that the driver has no
> .shutdown of its own. A driver that does implement .shutdown, to quiesce
> its own activity first, still needs the same break and reset afterwards
> and would otherwise have to open code it.
>
> Factor the break + synchronize_cbs + reset sequence out of
> virtio_dev_shutdown() into an exported virtio_device_shutdown() helper so
> such drivers can reuse it instead of duplicating the core logic.
>
> No functional change.
>
> Signed-off-by: Denis V. Lunev <den@xxxxxxxxxx>
> ---
Reviewed-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
--
Cheers,
David