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,

Do you have any comments on Paolo's proposal ?

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to