From patchwork Thu Sep 15 06:14:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Fleytman X-Patchwork-Id: 9332833 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B3A3B6077F for ; Thu, 15 Sep 2016 06:16:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2ABA2929C for ; Thu, 15 Sep 2016 06:16:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94F80292A0; Thu, 15 Sep 2016 06:16:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 006022929C for ; Thu, 15 Sep 2016 06:16:49 +0000 (UTC) Received: from localhost ([::1]:60060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkPya-0003lK-Kr for patchwork-qemu-devel@patchwork.kernel.org; Thu, 15 Sep 2016 02:16:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkPxz-0003l6-8X for qemu-devel@nongnu.org; Thu, 15 Sep 2016 02:16:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkPxx-0001BX-2p for qemu-devel@nongnu.org; Thu, 15 Sep 2016 02:16:10 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkPxw-00017Q-Sw for qemu-devel@nongnu.org; Thu, 15 Sep 2016 02:16:09 -0400 Received: by mail-wm0-f66.google.com with SMTP id 133so3447139wmq.2 for ; Wed, 14 Sep 2016 23:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eTU2BNAYy9r9DNoHKrggUVZcRcYp9n+ICNRC5ha/lLs=; b=l2EAu4ErveddRhdu+FtY0/kxrq7pTp2+11aSymouDkzw2aYM+5zpfAdFeNk+2OlDVd mlZIoAxuYe/jL4FZvOKMUbmmrGWsDcnu1i6RXBAG36ZPhayheCwawzK9LWixrfm8c9Lp oVxpCZSRDVeIaTobfm5NxTc3BejvpI+0d9Zv6xhN3m4DU1FobM0TfjGout+X7XhS1Dj1 tZuEM3ZORZo0wUU6U8nyP8qiDm9zHJ5VQh8rTwsONFVetUSBVGvnO3VMwp6RvS/zhHaJ 1cYaGw1+Y0buP7vzE5qQDGrRSsEOP/gbKMqJahwNzRJie5ZHYMQ8MiO6NwIhtL721gew oB/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eTU2BNAYy9r9DNoHKrggUVZcRcYp9n+ICNRC5ha/lLs=; b=EDSLqZKFYDi7QiOwLstpImCpk/vTnTfZqIXmp8cE/WB7/QQ+qOc0S+R5EMsMrpDbCe 30tP23D8GuNeWZLgA+RTZ/ioIi5azNr+vVUr88TCZ2+4kvXOTzPI8tADCB98bbvynLY+ +soGTdQYWGubdEMv89LnIyxu+H2TOP+3S5PSBf5PesqfRs5AZB1nlgjFH9Lh6szAquHv gteiiNPvnXmiotZM3tNin3WLFTMKxbp1+PRv2Ze6NOsHrT1MmEmMN7gvbm/4mAh6Nk1L 1GMwsqwWtkXUI4kdGNQovUUvFFyuWCz8PzlWYUQJbiIeQeVx5r78YVyW8oluB7lH5J3c DTjw== X-Gm-Message-State: AE9vXwP02iR5u63VeKHQqeENv6iYxqaxUKJ0ybb+v2Xrgjsmq7UziuFB6NQDbVffekOovQ== X-Received: by 10.28.161.133 with SMTP id k127mr1117946wme.103.1473920087184; Wed, 14 Sep 2016 23:14:47 -0700 (PDT) Received: from bark.daynix ([141.226.163.133]) by smtp.gmail.com with ESMTPSA id jd4sm1732011wjb.6.2016.09.14.23.14.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Sep 2016 23:14:46 -0700 (PDT) From: Dmitry Fleytman To: qemu-devel@nongnu.org Date: Thu, 15 Sep 2016 09:14:25 +0300 Message-Id: <1473920070-21938-3-git-send-email-dmitry@daynix.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473920070-21938-1-git-send-email-dmitry@daynix.com> References: <1473920070-21938-1-git-send-email-dmitry@daynix.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.66 Subject: [Qemu-devel] [PATCH 2/7] e1000e: Flush receive queues on link up X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yan Vugenfirer , Jason Wang , Shmulik Ladkani Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Dmitry Fleytman --- hw/net/e1000e_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index ade4d25..a9603e0 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -1807,6 +1807,7 @@ e1000e_core_set_link_status(E1000ECore *core) core->autoneg_timer); } else { e1000x_update_regs_on_link_up(core->mac, core->phy[0]); + e1000e_start_recv(core); } } @@ -2187,6 +2188,8 @@ e1000e_autoneg_timer(void *opaque) E1000ECore *core = opaque; if (!qemu_get_queue(core->owner_nic)->link_down) { e1000x_update_regs_on_autoneg_done(core->mac, core->phy[0]); + e1000e_start_recv(core); + e1000e_update_flowctl_status(core); /* signal link status change to the guest */ e1000e_set_interrupt_cause(core, E1000_ICR_LSC);