From patchwork Tue Nov 19 12:41:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 292377 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7D6BA2C0119 for ; Tue, 19 Nov 2013 23:42:43 +1100 (EST) Received: from localhost ([::1]:48738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vikdc-0005O3-UT for incoming@patchwork.ozlabs.org; Tue, 19 Nov 2013 07:42:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vikd7-0005Eh-By for qemu-devel@nongnu.org; Tue, 19 Nov 2013 07:42:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vikd2-0006rb-Du for qemu-devel@nongnu.org; Tue, 19 Nov 2013 07:42:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vikd2-0006rU-5y for qemu-devel@nongnu.org; Tue, 19 Nov 2013 07:42:04 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAJCfu6P028109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 19 Nov 2013 07:41:56 -0500 Received: from localhost (ovpn-112-44.ams2.redhat.com [10.36.112.44]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rAJCfsqr006061; Tue, 19 Nov 2013 07:41:55 -0500 From: Stefan Hajnoczi To: Date: Tue, 19 Nov 2013 13:41:47 +0100 Message-Id: <1384864908-29868-2-git-send-email-stefanha@redhat.com> In-Reply-To: <1384864908-29868-1-git-send-email-stefanha@redhat.com> References: <1384864908-29868-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Sebastian Huber , Stefan Hajnoczi , Anthony Liguori Subject: [Qemu-devel] [PULL for-1.7 1/2] smc91c111: Fix receive starvation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Sebastian Huber In case the smc91c111 interface signals that it cannot receive more packets the packets are queued and further reception will be disabled. In case the interface is again ready to receive packets notify the upper layer. Signed-off-by: Sebastian Huber Signed-off-by: Stefan Hajnoczi --- hw/net/smc91c111.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c index f5963e2..a8e29b3 100644 --- a/hw/net/smc91c111.c +++ b/hw/net/smc91c111.c @@ -185,6 +185,7 @@ static void smc91c111_release_packet(smc91c111_state *s, int packet) s->allocated &= ~(1 << packet); if (s->tx_alloc == 0x80) smc91c111_tx_alloc(s); + qemu_flush_queued_packets(qemu_get_queue(s->nic)); } /* Flush the TX FIFO. */