OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [PATCH v2] virtio-i2c: add the device specification


On 2020/10/26 9:22, Jie Deng wrote:

On 2020/10/24 0:00, Michael S. Tsirkin wrote:

On Fri, Oct 23, 2020 at 02:51:25PM +0800, Jie Deng wrote:
+
+The driver queues requests to the virtqueues, 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}
+
+The \field{addr} is the address of the I2C slave device.
+
+The first bit of \field{flags} indicates whether it is a read or write request. +It means a read request if the first bit of \field{flags} is set, otherwise
+it is a write request. The rest bits of \field{flags} are reserved.


So how does one creates a multi-segment transaction then?

The I2C doesn't support segments numbering and sorting.
So if one creates a multi-segment transaction, then he/she should keep the segments in order.

Thanks.

What about adding following requirement to the spec ?

"A driver MUST keep the requests in order if a multi-segment transaction is going to be sent." "A device MUST guarantee the requests being handled in order if a multi-segment transaction is received."

Thanks.



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]