diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-19 18:20:28 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-19 18:20:28 +0000 |
commit | 290a0933c0488a5072bed5458b1b9fe4dc84cba4 (patch) | |
tree | eec9280876270d2de15f05b694695308667cdf81 /hw/rtl8139.c | |
parent | 63a654bb39bd6d154a535c535190b1f3a9d27699 (diff) |
Fix big endian host operation, by Ben Taylor and Igor Kovalenko.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2509 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/rtl8139.c')
-rw-r--r-- | hw/rtl8139.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 94fc2fca3b..6ca275a3dc 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -1192,7 +1192,10 @@ static void rtl8139_reset(RTL8139State *s) 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) @@ -2455,12 +2458,12 @@ static void rtl8139_TxAddr_write(RTL8139State *s, uint32_t txAddrOffset, uint32_ { 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)); |