All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Cornelia Huck" <cohuck@redhat.com>,
	"Jie Deng" <jie.deng@intel.com>, "Wolfram Sang" <wsa@kernel.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"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>
Subject: Re: [PATCH V2] virtio: i2c: Allow zero-length transactions
Date: Wed, 1 Sep 2021 11:52:31 +0530	[thread overview]
Message-ID: <20210901062231.e5dqa3w4yjs62g7c@vireshk-i7> (raw)
In-Reply-To: <20210831195916-mutt-send-email-mst@kernel.org>

On 31-08-21, 20:03, Michael S. Tsirkin wrote:
> But if you are doing it like this, then I think we should
> have conformance clauses that require that the flag
> is consistent with the buffer.

Something like this will work ?

diff --git a/virtio-i2c.tex b/virtio-i2c.tex
index ae344b2bc822..c7335372a8bb 100644
--- a/virtio-i2c.tex
+++ b/virtio-i2c.tex
@@ -145,6 +145,12 @@ \subsubsection{Device Operation: Operation Status}\label{sec:Device Types / I2C
 A driver MUST NOT use \field{buf}, for a read request, if the final
 \field{status} returned from the device is VIRTIO_I2C_MSG_ERR.

+A driver MUST set the \field{VIRTIO_I2C_FLAGS_M_RD} flag for a read operation,
+where the buffer is write-only for the device.
+
+A driver MUST NOT set the \field{VIRTIO_I2C_FLAGS_M_RD} flag for a write
+operation, where the buffer is read-only for the device.
+
 A driver MUST queue the requests in order if multiple requests are going to
 be sent at a time.

-- 
viresh


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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16  9:47 [PATCH V2] virtio: i2c: Allow zero-length transactions Viresh Kumar
2021-08-16 14:45 ` Michael S. Tsirkin
2021-08-17  3:53   ` Viresh Kumar
2021-08-17  6:47     ` Michael S. Tsirkin
2021-08-17 10:43       ` Viresh Kumar
2021-08-18  2:38         ` [virtio-dev] " Jie Deng
2021-08-18  3:26           ` Viresh Kumar
2021-08-18  8:03             ` Arnd Bergmann
2021-08-18  8:09               ` Viresh Kumar
2021-08-23  7:31                 ` Viresh Kumar
2021-09-01  0:03 ` Michael S. Tsirkin
2021-09-01  6:22   ` Viresh Kumar [this message]
2021-09-01  7:22     ` Michael S. Tsirkin

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=20210901062231.e5dqa3w4yjs62g7c@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=bill.mills@linaro.org \
    --cc=cohuck@redhat.com \
    --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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.