From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxegp-0004oJ-03 for qemu-devel@nongnu.org; Thu, 19 Jun 2014 11:55:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wxegj-0001DH-9e for qemu-devel@nongnu.org; Thu, 19 Jun 2014 11:55:50 -0400 Received: from mail-qc0-x22d.google.com ([2607:f8b0:400d:c01::22d]:54654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxegi-0001D4-OD for qemu-devel@nongnu.org; Thu, 19 Jun 2014 11:55:45 -0400 Received: by mail-qc0-f173.google.com with SMTP id l6so2332765qcy.18 for ; Thu, 19 Jun 2014 08:55:44 -0700 (PDT) From: "Gabriel L. Somlo" Date: Thu, 19 Jun 2014 11:55:35 -0400 Message-Id: <1403193336-32101-4-git-send-email-somlo@cmu.edu> In-Reply-To: <1403193336-32101-1-git-send-email-somlo@cmu.edu> References: <1403193336-32101-1-git-send-email-somlo@cmu.edu> Subject: [Qemu-devel] [PATCH v2 3/4] e1000: move e1000_autoneg_timer() to after set_ics() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: romain@dolbeau.org, mst@redhat.com, agraf@suse.de, stefanha@redhat.com, pbonzini@redhat.com, afaerber@suse.de 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 --- 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