render / rpms / qemu

Forked from rpms/qemu 7 months ago
Clone

Blame 0031-pcnet-pci-mark-I-O-and-MMIO-as-LITTLE_ENDIAN.patch

298366
From 76f698948781a148d336ff9032159f6c7c9eccd2 Mon Sep 17 00:00:00 2001
298366
From: Aurelien Jarno <aurelien@aurel32.net>
298366
Date: Wed, 28 Aug 2013 14:17:39 +0200
298366
Subject: [PATCH] pcnet-pci: mark I/O and MMIO as LITTLE_ENDIAN
298366
298366
Now that the memory subsystem is propagating the endianness correctly,
298366
the pcnet-pci device should have its I/O ports and MMIO memory marked
298366
as LITTLE_ENDIAN, as PCI devices are little endian.
298366
298366
This makes the pcnet-pci NIC to work again on big endian MIPS Malta
298366
(default NIC).
298366
298366
Cc: qemu-stable@nongnu.org
298366
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
298366
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
298366
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
298366
(cherry picked from commit a26405b350c0d31d5ef53f3b459aeb6eaaf50db0)
298366
298366
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
298366
---
298366
 hw/net/pcnet-pci.c | 4 ++--
298366
 1 file changed, 2 insertions(+), 2 deletions(-)
298366
298366
diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c
298366
index 2c2301c..23fc33c 100644
298366
--- a/hw/net/pcnet-pci.c
298366
+++ b/hw/net/pcnet-pci.c
298366
@@ -134,7 +134,7 @@ static void pcnet_ioport_write(void *opaque, hwaddr addr,
298366
 static const MemoryRegionOps pcnet_io_ops = {
298366
     .read = pcnet_ioport_read,
298366
     .write = pcnet_ioport_write,
298366
-    .endianness = DEVICE_NATIVE_ENDIAN,
298366
+    .endianness = DEVICE_LITTLE_ENDIAN,
298366
 };
298366
 
298366
 static void pcnet_mmio_writeb(void *opaque, hwaddr addr, uint32_t val)
298366
@@ -256,7 +256,7 @@ static const MemoryRegionOps pcnet_mmio_ops = {
298366
         .read = { pcnet_mmio_readb, pcnet_mmio_readw, pcnet_mmio_readl },
298366
         .write = { pcnet_mmio_writeb, pcnet_mmio_writew, pcnet_mmio_writel },
298366
     },
298366
-    .endianness = DEVICE_NATIVE_ENDIAN,
298366
+    .endianness = DEVICE_LITTLE_ENDIAN,
298366
 };
298366
 
298366
 static void pci_physical_memory_write(void *dma_opaque, hwaddr addr,