qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Gabriel L. Somlo" <gsomlo@gmail.com>
To: qemu-devel@nongnu.org
Cc: romain@dolbeau.org, mst@redhat.com, agraf@suse.de,
	stefanha@redhat.com, pbonzini@redhat.com, afaerber@suse.de
Subject: [Qemu-devel] [PATCH v2 3/4] e1000: move e1000_autoneg_timer() to after set_ics()
Date: Thu, 19 Jun 2014 11:55:35 -0400	[thread overview]
Message-ID: <1403193336-32101-4-git-send-email-somlo@cmu.edu> (raw)
In-Reply-To: <1403193336-32101-1-git-send-email-somlo@cmu.edu>

Enable calling set_ics() from within e1000_autoneg_timer() without
the need for a forward declaration.

This patch contains no functional changes.

Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---
 hw/net/e1000.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index d6ef802..fd9b9be 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -204,18 +204,6 @@ set_phy_ctrl(E1000State *s, int index, uint16_t val)
     }
 }
 
-static void
-e1000_autoneg_timer(void *opaque)
-{
-    E1000State *s = opaque;
-    if (!qemu_get_queue(s->nic)->link_down) {
-        e1000_link_up(s);
-        s->phy_reg[PHY_LP_ABILITY] |= MII_LPAR_LPACK;
-        s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
-        DBGOUT(PHY, "Auto negotiation is completed\n");
-    }
-}
-
 static void (*phyreg_writeops[])(E1000State *, int, uint16_t) = {
     [PHY_CTRL] = set_phy_ctrl,
 };
@@ -347,6 +335,18 @@ set_ics(E1000State *s, int index, uint32_t val)
     set_interrupt_cause(s, 0, val | s->mac_reg[ICR]);
 }
 
+static void
+e1000_autoneg_timer(void *opaque)
+{
+    E1000State *s = opaque;
+    if (!qemu_get_queue(s->nic)->link_down) {
+        e1000_link_up(s);
+        s->phy_reg[PHY_LP_ABILITY] |= MII_LPAR_LPACK;
+        s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
+        DBGOUT(PHY, "Auto negotiation is completed\n");
+    }
+}
+
 static int
 rxbufsize(uint32_t v)
 {
-- 
1.9.3

  parent reply	other threads:[~2014-06-19 15:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 15:55 [Qemu-devel] [PATCH v2 0/4] e1000: link auto-negotiation fixes Gabriel L. Somlo
2014-06-19 15:55 ` [Qemu-devel] [PATCH v2 1/4] e1000: emulate auto-negotiation during external link status change Gabriel L. Somlo
2014-06-19 16:26   ` Michael S. Tsirkin
2014-06-19 15:55 ` [Qemu-devel] [PATCH v2 2/4] e1000: improve auto-negotiation reporting via mii-tool Gabriel L. Somlo
2014-06-19 15:55 ` Gabriel L. Somlo [this message]
2014-06-19 15:55 ` [Qemu-devel] [PATCH v2 4/4] e1000: signal guest on successful link auto-negotiation Gabriel L. Somlo
2014-06-19 16:29 ` [Qemu-devel] [PATCH v2 0/4] e1000: link auto-negotiation fixes Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403193336-32101-4-git-send-email-somlo@cmu.edu \
    --to=gsomlo@gmail.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=romain@dolbeau.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).