Messages in this thread | | | Date | Wed, 20 Oct 2021 16:17:09 +0530 | From | Viresh Kumar <> | Subject | Re: [PATCH 2/2] i2c: virtio: fix completion handling |
| |
On 20-10-21, 12:38, Vincent Whitchurch wrote: > I don't quite understand how that would be safe since > virtqueue_add_sgs() can fail after a few iterations and all queued > request buffers can have FAIL_NEXT set. In such a case, we would end up > waiting forever with your proposed change, wouldn't we?
Good point. I didn't think of that earlier.
I think a good simple way of handling this is counting the number of buffers sent and received. Once they match, we are done. That shouldn't break anything else I believe.
-- viresh
| |