From: "Igor Kovalenko" <igor.v.kovalenko@gmail.com>
To: qemu-devel@nongnu.org, sol10x86@cox.net
Subject: Re: [Qemu-devel] Updated PATCH: hw/rtl8139.c for Sparc (BigEndian) Hosts
Date: Wed, 14 Mar 2007 01:03:04 +0300 [thread overview]
Message-ID: <b2fa41d60703131503i298fda7cpe60a2d4ef182a62@mail.gmail.com> (raw)
In-Reply-To: <14804192.1173752663118.JavaMail.root@eastrmwml06.mgt.cox.net>
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
On 3/13/07, Ben Taylor <sol10x86@cox.net> 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
[-- Attachment #2: qemu-rtl8139-endianness-20070314-1.diff --]
[-- Type: text/x-patch, Size: 1040 bytes --]
--- hw/rtl8139.c.old 2007-03-14 00:55:03.000000000 +0300
+++ hw/rtl8139.c 2007-03-13 23:57:04.000000000 +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));
prev parent reply other threads:[~2007-03-13 22:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-13 2:24 [Qemu-devel] Updated PATCH: hw/rtl8139.c for Sparc (BigEndian) Hosts Ben Taylor
2007-03-13 22:03 ` Igor Kovalenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2fa41d60703131503i298fda7cpe60a2d4ef182a62@mail.gmail.com \
--to=igor.v.kovalenko@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=sol10x86@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).