]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
pcnet-pci: mark I/O and MMIO as LITTLE_ENDIAN
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 28 Aug 2013 12:17:39 +0000 (14:17 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 25 Sep 2013 03:51:04 +0000 (22:51 -0500)
Now that the memory subsystem is propagating the endianness correctly,
the pcnet-pci device should have its I/O ports and MMIO memory marked
as LITTLE_ENDIAN, as PCI devices are little endian.

This makes the pcnet-pci NIC to work again on big endian MIPS Malta
(default NIC).

Cc: qemu-stable@nongnu.org
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit a26405b350c0d31d5ef53f3b459aeb6eaaf50db0)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/net/pcnet-pci.c

index 2c2301c3601399bc0ba5d6b541152962e88b2021..23fc33c63446924941ac336683c0045ee674da8a 100644 (file)
@@ -134,7 +134,7 @@ static void pcnet_ioport_write(void *opaque, hwaddr addr,
 static const MemoryRegionOps pcnet_io_ops = {
     .read = pcnet_ioport_read,
     .write = pcnet_ioport_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 static void pcnet_mmio_writeb(void *opaque, hwaddr addr, uint32_t val)
@@ -256,7 +256,7 @@ static const MemoryRegionOps pcnet_mmio_ops = {
         .read = { pcnet_mmio_readb, pcnet_mmio_readw, pcnet_mmio_readl },
         .write = { pcnet_mmio_writeb, pcnet_mmio_writew, pcnet_mmio_writel },
     },
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 static void pci_physical_memory_write(void *dma_opaque, hwaddr addr,