Re: [PATCH v3 3/3] virtio-spi: Add virtio SPI driver.

Hillf Danton
2024-12-23T11:01:08Z

On Tue, 26 Mar 2024 12:28:12 +0100 Harald Mommer <Harald.Mommer@opensynergy.com>
> + /* Prepare sending of virtio message */
> + reinit_completion(&spi_req->completion);
> +
Why is reinit needed, given init?

> + ret = virtqueue_add_sgs(priv->vq, sgs, outcnt, incnt, spi_req,
> + GFP_KERNEL);
> + if (ret)
> + goto msg_done;
> +
> + /* Simple implementation: There can be only one transfer in flight */
> + virtqueue_kick(priv->vq);
> +
> + wait_for_completion(&priv->spi_req.completion);