[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 3/4] e1000: move e1000_autoneg_timer() to after s
From: |
Gabriel L. Somlo |
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 |
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 <address@hidden>
---
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