ne2000: mark I/O as LITTLE_ENDIAN
PATCH 1/1 ne2000: mark I/O as LITTLE_ENDIAN
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.
--- hw/net/ne2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/ne2000.c +1 -1
@@ -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 , };/***********************************************************/
Signature · 1 line
1.7.10.4
Quoted 18 lines · Aurelien Jarno
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 Stefan Hajnoczi <[email protected]>Signed-off-by Aurelien Jarno <[email protected]>--- hw/net/ne2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/net/ne2000.c +0
-0
hw/net/ne2000.c static void ne2000_write(void *opaque, hwaddr addr, · line 697
Quoted 6 lines
hw/net/ne2000.c +1
-1@@ -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 , };
This is also used by hw/net/ne2000-isa.c:isa_ne2000_realizefn(). Is it correct to explicitly say little-endian there?
Stefan Hajnoczi
AppliedQuoted 14 lines · Stefan Hajnoczi
Quoted 13 lines · Aurelien Jarno
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 Stefan Hajnoczi <[email protected]>Signed-off-by Aurelien Jarno <[email protected]>--- hw/net/ne2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
hw/net/ne2000.c static void ne2000_write(void *opaque, hwaddr addr, · line 697
Quoted 11 lines
hw/net/ne2000.c +1
-1@@ -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 , };This is also used by hw/net/ne2000-isa.c:isa_ne2000_realizefn(). Is it correct to explicitly say little-endian there?
Paolo has confirmed that ISA devices should be little-endian anyway.
Thanks, applied to my net tree.
Stefan