[PATCH 6/9] virtio: fix support for big-endian clients

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With virtio 1.0 everything is little endian. Add back the Version 1.0
check that got lost during porting virtio to barebox.

Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>
---
 include/linux/virtio_config.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index e6fc31f627fc..f33cfdacaa2c 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -203,7 +203,8 @@ static inline bool virtio_has_dma_quirk(const struct virtio_device *vdev)
 
 static inline bool virtio_is_little_endian(struct virtio_device *vdev)
 {
-	return virtio_legacy_is_little_endian();
+	return virtio_has_feature(vdev, VIRTIO_F_VERSION_1) ||
+		virtio_legacy_is_little_endian();
 }
 
 
-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux