From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtzr7-0002n4-JW for qemu-devel@nongnu.org; Mon, 09 Jun 2014 09:43:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wtzr1-0002tS-K7 for qemu-devel@nongnu.org; Mon, 09 Jun 2014 09:43:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtzr1-0002tK-B4 for qemu-devel@nongnu.org; Mon, 09 Jun 2014 09:43:15 -0400 From: Stefan Hajnoczi Date: Mon, 9 Jun 2014 15:43:02 +0200 Message-Id: <1402321386-17773-2-git-send-email-stefanha@redhat.com> In-Reply-To: <1402321386-17773-1-git-send-email-stefanha@redhat.com> References: <1402321386-17773-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 1/5] net: xilinx_ethlite: Fix Rx-pong interrupt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Peter Crosthwaite , Stefan Hajnoczi From: Peter Crosthwaite There is no CTRL_I bit in the pong buffer control register. The CTRL_I bit from the ping buffer masks both ping and pong buffers. Fix. Signed-off-by: Peter Crosthwaite Signed-off-by: Stefan Hajnoczi --- hw/net/xilinx_ethlite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c index 5a434f6..1b177b3 100644 --- a/hw/net/xilinx_ethlite.c +++ b/hw/net/xilinx_ethlite.c @@ -196,8 +196,9 @@ static ssize_t eth_rx(NetClientState *nc, const uint8_t *buf, size_t size) memcpy(&s->regs[rxbase + R_RX_BUF0], buf, size); s->regs[rxbase + R_RX_CTRL0] |= CTRL_S; - if (s->regs[rxbase + R_RX_CTRL0] & CTRL_I) + if (s->regs[R_RX_CTRL0] & CTRL_I) { eth_pulse_irq(s); + } /* If c_rx_pingpong was set flip buffers. */ s->rxbuf ^= s->c_rx_pingpong; -- 1.9.3