[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210702065625.qielhnfyrlvrtrkk@vireshk-i7>
Date: Fri, 2 Jul 2021 12:26:25 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Jie Deng <jie.deng@...el.com>
Cc: Wolfram Sang <wsa@...nel.org>, linux-i2c@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, mst@...hat.com, arnd@...db.de,
jasowang@...hat.com, andriy.shevchenko@...ux.intel.com,
yu1.wang@...el.com, shuo.a.liu@...el.com, conghui.chen@...el.com,
stefanha@...hat.com
Subject: Re: [PATCH v11] i2c: virtio: add a virtio i2c frontend driver
On 02-07-21, 14:52, Jie Deng wrote:
> This is not efficient. If adding the ith request to the queue fails, we can
> still send
>
> the requests before it.
Not really. Normally the requests which are sent together by clients, are linked
together, like a state machine. So if the first one is sent, but not the second
one, then there is not going to be any meaningful result of that.
The i2c core doesn't club requests together from different clients in a single
i2c_transfer() call. So you must assume i2c_transfer(), irrespective of the
number of underlying messages in it, as atomic. If you fail, the client is going
to retry everything again or assume it failed completely.
> We don't need to know if it fails here (adding to
> the queue)
>
> or there (later in the host). The "master_xfer" just need to return final
> number of
>
> messages successfully processed.
No, that isn't going to help and it is rather inefficient, trying to send
transfer when we already know part of it failed.
--
viresh
Powered by blists - more mailing lists