On Thu, Dec 24, 2020 at 04:10:43PM +0800, Jie Deng wrote:
> +\begin{lstlisting}
> +struct virtio_i2c_out_hdr {
> +        le16 addr;
> +        le16 padding;
> +        le32 flags;
> +};
> +\end{lstlisting}
> +
> +\begin{lstlisting}
> +struct virtio_i2c_in_hdr {
> +        u8 status;
> +};
> +\end{lstlisting}
> +
> +\begin{lstlisting}
> +struct virtio_i2c_req {
> +        struct virtio_i2c_out_hdr out_hdr;
> +        u8 write_buf[];
> +        u8 read_buf[];
> +        struct virtio_i2c_in_hdr in_hdr;
> +};
> +\end{lstlisting}

I didn't notice that the written and read fields were removed. Does this
mean that struct virtio_i2c_req can either be read or write, but not
read+write?

This makes sense if virtqueue buffers can be grouped together so
bi-directional transfers can be described using multiple buffers. Just
wanted to check if I understand this correctly.

Thanks,
Stefan

Attachment: signature.asc
Description: PGP signature

Reply via email to