All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jie Deng <jie.deng@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	virtio-comment@lists.oasis-open.org,
	virtio-dev@lists.oasis-open.org
Cc: mst@redhat.com
Subject: Re: [virtio-comment] [PATCH v3] virtio-i2c: add the device specification
Date: Thu, 29 Oct 2020 15:38:09 +0800	[thread overview]
Message-ID: <a9dfc607-5cdf-555e-142d-41d5dc7b59d6@intel.com> (raw)
In-Reply-To: <f0a25b9d-c1e7-21e8-0944-9fa5796adfca@redhat.com>


On 2020/10/29 4:10, Paolo Bonzini wrote:
> On 27/10/20 07:00, Jie Deng wrote:
>> +The driver queues requests to the virtqueue, and they are used by the
>> +device. The request is the representation of one segment of an I2C
>> +transaction. Each request is of form:
>> +
>> +\begin{lstlisting}
>> +struct virtio_i2c_req {
>> +        le16 addr;
>> +        le16 flags;
>> +        le16 len;
>> +        u8 buf[];
>> +        u8 status;
>> +};
>> +\end{lstlisting}
> Hi,
>
> one extremely common two-segment I2C transaction is not reproducible
> with virtio-i2c.  This is when a write is followed by a read: the master
> starts off the transmission with a write, then sends a second START,
> then continues with a read from the same address.
>
> Would it make sense to define the request like
>
> struct virtio_i2c_req {
> 	le16 addr;
> 	le16 written;
> 	le16 read;
> 	u8 bufwrite[];
> 	u8 status;
> 	u8 bufread[];
> };
>
> instead?
>
> Thanks,
>
> Paolo
>
Hi Paolo,

I'm not sure why this two-segment I2C transaction is not reproducible ?

my understanding is that we don't need to care about the 
START/STOP/RESTART conditions
between virtio-i2c frontend and backend. These conditions only make 
sense when data
is exchanged between master and slave devices, rather than virtio 
frontend and backend.

Only the backend may need to consider these conditions when doing device 
emulation and
exchanging data with its slave devices. It has nothing to do with the 
frontend.

Is my understanding correct ?

Thanks


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


  reply	other threads:[~2020-10-29  7:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27  6:00 [virtio-comment] [PATCH v3] virtio-i2c: add the device specification Jie Deng
2020-10-27 12:20 ` [virtio-comment] " Michael S. Tsirkin
2020-10-28  7:54   ` Jie Deng
2020-10-28 11:27     ` Michael S. Tsirkin
2020-10-29  2:20       ` Jie Deng
2020-10-28 20:10 ` [virtio-comment] " Paolo Bonzini
2020-10-29  7:38   ` Jie Deng [this message]
2020-11-04  8:05   ` Jie Deng

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=a9dfc607-5cdf-555e-142d-41d5dc7b59d6@intel.com \
    --to=jie.deng@intel.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=virtio-dev@lists.oasis-open.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.