diff options
author | Gabriel L. Somlo <gsomlo@gmail.com> | 2014-06-19 11:55:35 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-06-23 17:38:00 +0300 |
commit | d52aec95453838f2957c0cbf6ef79c51d161e87f (patch) | |
tree | 5af327f8b12022f2726581d16afe9d5377caf589 /hw/net | |
parent | 39bb8ee737595e9b264d075dfcd7d86f4d3f1133 (diff) | |
download | qemu-d52aec95453838f2957c0cbf6ef79c51d161e87f.tar.gz qemu-d52aec95453838f2957c0cbf6ef79c51d161e87f.tar.bz2 qemu-d52aec95453838f2957c0cbf6ef79c51d161e87f.zip |
e1000: move e1000_autoneg_timer() to after set_ics()
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>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r-- | hw/net/e1000.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/hw/net/e1000.c b/hw/net/e1000.c index d20f8c8ff2..8ee5225062 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -204,19 +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"); - set_ics(s, 0, E1000_ICS_LSC); /* signal link status change to guest */ - } -} - static void (*phyreg_writeops[])(E1000State *, int, uint16_t) = { [PHY_CTRL] = set_phy_ctrl, }; @@ -348,6 +335,19 @@ 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"); + set_ics(s, 0, E1000_ICS_LSC); /* signal link status change to guest */ + } +} + static int rxbufsize(uint32_t v) { |