Re: [PATCH v2 2/2] i2c: virtio: fix completion handling

From: Vincent Whitchurch
Date: Thu Dec 02 2021 - 10:34:41 EST


On Thu, Nov 11, 2021 at 05:57:30PM +0100, Michael S. Tsirkin wrote:
> On Thu, Nov 11, 2021 at 05:04:12PM +0100, Vincent Whitchurch wrote:
> > - wait_for_completion(&vi->completion);
> > + /*
> > + * We only need to wait for the last one since the device is required
> > + * to complete requests in order.
> > + */
>
> Hmm the spec only says:
>
> A device MUST guarantee the requests in the virtqueue being processed in order
> if multiple requests are received at a time.
>
> it does not seem to require using the buffers in order.
> In any case, just waiting for all of them in a loop
> seems cleaner and likely won't take longer ...

Thank you, I've fixed this in v3.