From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MEgnr-0003GX-Fw for qemu-devel@nongnu.org; Thu, 11 Jun 2009 05:42:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MEgnl-0003Eq-Ui for qemu-devel@nongnu.org; Thu, 11 Jun 2009 05:42:34 -0400 Received: from [199.232.76.173] (port=44619 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEgnl-0003En-Qr for qemu-devel@nongnu.org; Thu, 11 Jun 2009 05:42:29 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:50057) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MEgnl-0000XP-6z for qemu-devel@nongnu.org; Thu, 11 Jun 2009 05:42:29 -0400 Message-ID: <4A30D182.3020509@web.de> Date: Thu, 11 Jun 2009 11:42:26 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1243523971.4046.206.camel@blaa> <1244583818.7164.19.camel@blaa> <4A30C276.6030106@redhat.com> In-Reply-To: <4A30C276.6030106@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCBE639B1DA4967A9B628D038" Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH] Fix xilinx_ethlite breakage by 4f1c942b7f List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Mark McLoughlin , Anthony Liguori , qemu-devel , Alex Williamson , "Edgar E. Iglesias" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCBE639B1DA4967A9B628D038 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Gerd Hoffmann wrote: > Hi, >=20 >> git://git.et.redhat.com/qemu-net.git queue >=20 > Breaks full build (i.e. all targets). >=20 Namely the new xilinx_ethlite used by mircoblaze. This fixes it for me, hopefully in the right way. Jan ------------> Signed-off-by: Jan Kiszka --- 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[] =3D { NULL, NULL, ð_writel, }; =20 -static int eth_can_rx(void *opaque) +static int eth_can_rx(VLANClientState *vc) { - struct xlx_ethlite *s =3D opaque; + struct xlx_ethlite *s =3D vc->opaque; int r; r =3D !(s->regs[R_RX_CTRL0] & CTRL_S); qemu_log("%s %d\n", __func__, r); return r; } =20 -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 si= ze) { - struct xlx_ethlite *s =3D opaque; + struct xlx_ethlite *s =3D vc->opaque; unsigned int rxbase =3D s->rxbuf * (0x800 / 4); int i; =20 /* DA filter. */ if (!(buf[0] & 0x80) && memcmp(&s->macaddr[0], buf, 6)) - return; + return size; =20 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; } =20 D(qemu_log("%s %d rxbase=3D%x\n", __func__, size, rxbase)); @@ -199,7 +199,7 @@ static void eth_rx(void *opaque, const uint8_t *buf, = int size) =20 /* If c_rx_pingpong was set flip buffers. */ s->rxbuf ^=3D s->c_rx_pingpong; - return; + return size; } =20 static void eth_cleanup(VLANClientState *vc) @@ -223,7 +223,7 @@ static void xilinx_ethlite_init(SysBusDevice *dev) =20 qdev_get_macaddr(&dev->qdev, s->macaddr); s->vc =3D qdev_get_vlan_client(&dev->qdev, - eth_rx, eth_can_rx, eth_cleanup, s); + eth_can_rx, eth_rx, NULL, eth_cleanup, = s); } =20 static void xilinx_ethlite_register(void) --------------enigCBE639B1DA4967A9B628D038 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkow0YIACgkQniDOoMHTA+lGqACePvMtVgZTc2F51j6U1aBUQ21U 0IwAn2X2jVJbfG/+he6SObEEXtXYGId7 =qDQf -----END PGP SIGNATURE----- --------------enigCBE639B1DA4967A9B628D038--