On 3/13/07, Ben Taylor [EMAIL PROTECTED] wrote:
Patch 1: qemu-rtl8139-bigend.diff
This fixes the big-endian problem with the hw/rtl8139.c on a Sparc host.
I updated the patch to remove one extra le32 conversion found in
rtl8139_TxAddr_read
which is called from i/o read callback.
--
Kind regards,
Igor V. Kovalenko
--- hw/rtl8139.c.old 2007-03-14 00:55:03.0 +0300
+++ hw/rtl8139.c 2007-03-13 23:57:04.0 +0300
@@ -1194,7 +1194,10 @@
s-eeprom.contents[1] = 0x10ec;
s-eeprom.contents[2] = 0x8139;
#endif
-memcpy(s-eeprom.contents[7], s-macaddr, 6);
+
+s-eeprom.contents[7] = s-macaddr[0] | s-macaddr[1] 8;
+s-eeprom.contents[8] = s-macaddr[2] | s-macaddr[3] 8;
+s-eeprom.contents[9] = s-macaddr[4] | s-macaddr[5] 8;
/* mark all status registers as owned by host */
for (i = 0; i 4; ++i)
@@ -2457,12 +2460,12 @@
{
DEBUG_PRINT((RTL8139: TxAddr write offset=0x%x val=0x%08x\n, txAddrOffset, val));
-s-TxAddr[txAddrOffset/4] = le32_to_cpu(val);
+s-TxAddr[txAddrOffset/4] = val;
}
static uint32_t rtl8139_TxAddr_read(RTL8139State *s, uint32_t txAddrOffset)
{
-uint32_t ret = cpu_to_le32(s-TxAddr[txAddrOffset/4]);
+uint32_t ret = s-TxAddr[txAddrOffset/4];
DEBUG_PRINT((RTL8139: TxAddr read offset=0x%x val=0x%08x\n, txAddrOffset, ret));
___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel