[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211020104709.k6oqo2gmegiwfre4@vireshk-i7>
Date: Wed, 20 Oct 2021 16:17:09 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Vincent Whitchurch <vincent.whitchurch@...s.com>
Cc: Jie Deng <jie.deng@...el.com>, "wsa@...nel.org" <wsa@...nel.org>,
"virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
kernel <kernel@...s.com>
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
Powered by blists - more mailing lists