On 2020/9/7 13:40, Jason Wang wrote:
The status is not from i2c_msg.
+struct virtio_i2c_msg {
+ struct virtio_i2c_hdr hdr;
+ char *buf;
+ u8 status;
Any reason for separating status out of virtio_i2c_hdr?
You meant ic2_hdr? You embed status in virtio_i2c_msg anyway.
The "i2c_msg" structure defined in i2c.h.
So I put it out of virtio_i2c_hdr.
Something like status or response is pretty common in virtio request (e.g net or scsi), if no special reason, it's better to keep it in the hdr.
Mainly based on IN or OUT.
The buf can be an OUT or an IN scatterlist depending on write or read.
The status is a result from the backend which is defined as an IN scatterlis.
_______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization