Discussion of the implementations of VIRTIO specification
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jie Deng <jie.deng@intel.com>, Wolfram Sang <wsa@kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: "Viresh Kumar" <viresh.kumar@linaro.org>,
	"Vincent Guittot" <vincent.guittot@linaro.org>,
	"Jason Wang" <jasowang@redhat.com>,
	"Bill Mills" <bill.mills@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	virtio-dev@lists.oasis-open.org, stratos-dev@op-lists.linaro.org,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Arnd Bergmann" <arnd@kernel.org>
Subject: [virtio-dev] Re: [PATCH V3] virtio: i2c: Allow zero-length transactions
Date: Wed, 22 Sep 2021 10:09:34 +0200	[thread overview]
Message-ID: <87ilytf2v5.fsf@redhat.com> (raw)
In-Reply-To: <8d35aa1c925ab7cd2452f790ea84e78ff905db00.1630481293.git.viresh.kumar@linaro.org>

On Wed, Sep 01 2021, Viresh Kumar <viresh.kumar@linaro.org> wrote:

> The I2C protocol allows zero-length requests with no data, like the
> SMBus Quick command, where the command is inferred based on the
> read/write flag itself.
>
> In order to allow such a request, allocate another bit,
> VIRTIO_I2C_FLAGS_M_RD(1), in the flags to pass the request type, as read
> or write. This was earlier done using the read/write permission to the
> buffer itself.
>
> This still won't work well if multiple buffers are passed for the same
> request, i.e. the write-read requests, as the VIRTIO_I2C_FLAGS_M_RD flag
> can only be used with a single buffer.
>
> Coming back to it, there is no need to send multiple buffers with a
> single request. All we need, is a way to group several requests
> together, which we can already do based on the
> VIRTIO_I2C_FLAGS_FAIL_NEXT flag.
>
> Remove support for multiple buffers within a single request.
>
> Since we are at very early stage of development currently, we can do
> these modifications without addition of new features or versioning of
> the protocol.

I'm a bit worried about this statement. While we have not done a formal
release of the standard since i2c has been added, it still has been out
there already, and this is an incompatible change (even if it is one
that makes sense.)

So, I'm a bit torn between just going with this and adding a feature bit
(that can be mandatory so we don't need to drag the old implementation
around.) But I'm also worried whether there are more incompatible
changes expected in the near future; if there are, I'd be more
comfortable if we could just hold off until everyone agrees things are
stable.


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  reply	other threads:[~2021-09-22  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  7:35 [PATCH V3] virtio: i2c: Allow zero-length transactions Viresh Kumar
2021-09-22  8:09 ` Cornelia Huck [this message]
2021-10-04  6:10   ` [virtio-dev] " Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilytf2v5.fsf@redhat.com \
    --to=cohuck@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=arnd@kernel.org \
    --cc=bill.mills@linaro.org \
    --cc=jasowang@redhat.com \
    --cc=jie.deng@intel.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=stratos-dev@op-lists.linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox