From: Jan Kiszka <jan.kiszka@web.de>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>,
Alex Williamson <alex.williamson@hp.com>,
"Edgar E. Iglesias" <edgar.iglesias@axis.com>
Subject: [Qemu-devel] [PATCH] Fix xilinx_ethlite breakage by 4f1c942b7f
Date: Thu, 11 Jun 2009 11:42:26 +0200 [thread overview]
Message-ID: <4A30D182.3020509@web.de> (raw)
In-Reply-To: <4A30C276.6030106@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2251 bytes --]
Gerd Hoffmann wrote:
> Hi,
>
>> git://git.et.redhat.com/qemu-net.git queue
>
> Breaks full build (i.e. all targets).
>
Namely the new xilinx_ethlite used by mircoblaze. This fixes it for me,
hopefully in the right way.
Jan
------------>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
hw/xilinx_ethlite.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/xilinx_ethlite.c b/hw/xilinx_ethlite.c
index 780e9c0..77cd6fb 100644
--- a/hw/xilinx_ethlite.c
+++ b/hw/xilinx_ethlite.c
@@ -160,28 +160,28 @@ static CPUWriteMemoryFunc *eth_write[] = {
NULL, NULL, ð_writel,
};
-static int eth_can_rx(void *opaque)
+static int eth_can_rx(VLANClientState *vc)
{
- struct xlx_ethlite *s = opaque;
+ struct xlx_ethlite *s = vc->opaque;
int r;
r = !(s->regs[R_RX_CTRL0] & CTRL_S);
qemu_log("%s %d\n", __func__, r);
return r;
}
-static void eth_rx(void *opaque, const uint8_t *buf, int size)
+static ssize_t eth_rx(VLANClientState *vc, const uint8_t *buf, size_t size)
{
- struct xlx_ethlite *s = opaque;
+ struct xlx_ethlite *s = vc->opaque;
unsigned int rxbase = s->rxbuf * (0x800 / 4);
int i;
/* DA filter. */
if (!(buf[0] & 0x80) && memcmp(&s->macaddr[0], buf, 6))
- return;
+ return size;
if (s->regs[rxbase + R_RX_CTRL0] & CTRL_S) {
D(qemu_log("ethlite lost packet %x\n", s->regs[R_RX_CTRL0]));
- return;
+ return -1;
}
D(qemu_log("%s %d rxbase=%x\n", __func__, size, rxbase));
@@ -199,7 +199,7 @@ static void eth_rx(void *opaque, const uint8_t *buf, int size)
/* If c_rx_pingpong was set flip buffers. */
s->rxbuf ^= s->c_rx_pingpong;
- return;
+ return size;
}
static void eth_cleanup(VLANClientState *vc)
@@ -223,7 +223,7 @@ static void xilinx_ethlite_init(SysBusDevice *dev)
qdev_get_macaddr(&dev->qdev, s->macaddr);
s->vc = qdev_get_vlan_client(&dev->qdev,
- eth_rx, eth_can_rx, eth_cleanup, s);
+ eth_can_rx, eth_rx, NULL, eth_cleanup, s);
}
static void xilinx_ethlite_register(void)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2009-06-11 9:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 15:19 [Qemu-devel] Networking patches queue Mark McLoughlin
2009-05-28 15:28 ` [Qemu-devel] " Anthony Liguori
2009-05-28 15:51 ` Jan Kiszka
2009-05-28 16:57 ` Mark McLoughlin
2009-05-28 20:26 ` Anthony Liguori
2009-05-28 17:01 ` Glauber Costa
2009-05-28 17:19 ` Jan Kiszka
2009-05-28 19:10 ` Jan Kiszka
2009-05-28 15:51 ` Mark McLoughlin
2009-05-28 15:56 ` Anthony Liguori
2009-05-28 16:52 ` Mark McLoughlin
2009-05-31 20:58 ` Dor Laor
2009-06-09 21:43 ` Mark McLoughlin
2009-06-10 23:08 ` Anthony Liguori
2009-06-11 1:27 ` Anthony Liguori
2009-06-11 8:34 ` Mark McLoughlin
2009-06-11 8:38 ` Gerd Hoffmann
2009-06-11 9:42 ` Jan Kiszka [this message]
2009-06-11 10:48 ` [Qemu-devel] Re: [PATCH] Fix xilinx_ethlite breakage by 4f1c942b7f Mark McLoughlin
2009-06-11 11:48 ` [Qemu-devel] Re: Networking patches queue Paul Brook
2009-06-11 12:50 ` Anthony Liguori
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=4A30D182.3020509@web.de \
--to=jan.kiszka@web.de \
--cc=alex.williamson@hp.com \
--cc=aliguori@us.ibm.com \
--cc=edgar.iglesias@axis.com \
--cc=kraxel@redhat.com \
--cc=markmc@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).