From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZNI6-0002no-19 for qemu-devel@nongnu.org; Mon, 06 May 2013 11:25:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZNI2-0001Wz-CN for qemu-devel@nongnu.org; Mon, 06 May 2013 11:25:25 -0400 From: Alexander Graf Date: Mon, 6 May 2013 17:25:17 +0200 Message-Id: <1367853917-2015-10-git-send-email-agraf@suse.de> In-Reply-To: <1367853917-2015-1-git-send-email-agraf@suse.de> References: <1367853917-2015-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 9/9] spapr_llan: fix device reenabling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc@nongnu.org Cc: blauwirbel@gmail.com, Alexey Kardashevskiy , anthony@codemonkey.ws, qemu-devel@nongnu.org, aurelien@aurel32.net From: Alexey Kardashevskiy Normally, the "tap" device is polled by QEMU if a guest NIC can receive packets. If a guest NIC is stopped during transfer (rmmod or ifdown), it may still have packets in a queue which have to be send to the guest before QEMU enables polling of a "tap" interface via tap_update_fd_handler(). However the spapr_llan device was missing the qemu_flush_queued_packets() call so the tap_send_completed() callback was never called and therefore "tap" interface polling was not enabled ever. The patch fixes this problem. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Alexander Graf --- hw/net/spapr_llan.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c index 3150add..03a09f2 100644 --- a/hw/net/spapr_llan.c +++ b/hw/net/spapr_llan.c @@ -336,6 +336,8 @@ static target_ulong h_register_logical_lan(PowerPCCPU *cpu, spapr_vio_dma_set(sdev, VLAN_BD_ADDR(rec_queue), 0, VLAN_BD_LEN(rec_queue)); dev->isopen = 1; + qemu_flush_queued_packets(qemu_get_queue(dev->nic)); + return H_SUCCESS; } -- 1.6.0.2