Patchwork [PULL,v2,5/5] ne2000: mark I/O as LITTLE_ENDIAN

login
register
mail settings
Submitter Stefan Hajnoczi
Date Sept. 6, 2013, 3:33 p.m.
Message ID <1378481624-20964-6-git-send-email-stefanha@redhat.com>
Download mbox | patch
Permalink /patch/273230/
State New
Headers show

Comments

Stefan Hajnoczi - Sept. 6, 2013, 3:33 p.m.
From: Aurelien Jarno <aurelien@aurel32.net>

Now that the memory subsystem is propagating the endianness correctly,
the ne2000 device should have its I/O ports marked as LITTLE_ENDIAN, as
PCI devices are little endian.

This makes the ne2000 NIC to work again on PowerPC.

Cc: qemu-stable@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/net/ne2000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c
index 31afd28..c961258 100644
--- a/hw/net/ne2000.c
+++ b/hw/net/ne2000.c
@@ -693,7 +693,7 @@  static void ne2000_write(void *opaque, hwaddr addr,
 static const MemoryRegionOps ne2000_ops = {
     .read = ne2000_read,
     .write = ne2000_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 /***********************************************************/