Re: [PATCH 3/3] virtio: Add Qualcomm VirtIO transport wrapper
From: Stjepan Poljak
Date: Fri Nov 27 2026 - 08:20:40 EST
On Thu, Nov 26, 2026 at 11:54:01AM +0530, Jayant Shekhar wrote:
[...]
> +static int dcp_virtio_transport_suspend(struct device *dev)
> +{
[...]
> + ret = virtio_device_freeze(&transport->mmio.vdev);
[...]
> + ret = dcp_ipcc_enable_irq_wake(&transport->ipcc);
[...]
> + ret = dcp_ipcc_send_power_notify(&transport->ipcc);
Hi Jayant,
I've been trying to review this patch and got a bit confused by the
.suspend implementation. Why is the notify needed here?
The rest of the code seems to imply that a power notify means "wake DCP if
needed" (e.g. "It wakes DCP during power transitions" in virtio_qcom_dcp_ipcc.c),
so how does that fit into .suspend? Does firmware treat the power notify here
differently?
[...]
> + complete(&ipcc->power_notify_done);
> + if (ipcc->resp_vq)
> + vring_interrupt(0, ipcc->resp_vq);
As far as I could tell from your comments, rings from IPCC (separate from
power notify) are needed when resp queues are ready. But why if we already
have a virtio interrupt? I kind of assumed that this is what was meant in
.suspend when you enable IRQ wake, that we may need it to wake the host,
but while suspended the queues are already deleted and resp_vq is NULL?
I think this also addresses the race Sashiko reported: this seems redundant
or I don't understand this mechanism fully...
Thanks,
Stjepan