set_phy_ctrl(E1000State *s, int index, uint16_t val)

{

    /*

     * QEMU 1.3 does not support link auto-negotiation emulation, so if we

     * migrate during auto negotiation, after migration the link will be

     * down.

     */

    if (!(s->compat_flags & E1000_FLAG_AUTONEG)) {

        return;

    }

    if ((val & MII_CR_AUTO_NEG_EN) && (val & MII_CR_RESTART_AUTO_NEG)) {

        e1000_link_down(s);

        DBGOUT(PHY, "Start link auto negotiation\n");

        timer_mod(s->autoneg_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500);

    }

}

set_phy_ctrl(E1000State *s, int index, uint16_t val)

{

    









    if (!(s->compat_flags & E1000_FLAG_AUTONEG)) {

        return;

    }

    if ((val & MII_CR_AUTO_NEG_EN) && (val & MII_CR_RESTART_AUTO_NEG)) {

        e1000_link_down(s);

        DBGOUT(PHY, "Start link auto negotiation\n");

        timer_mod(s->autoneg_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500);

    }

}

FUNC_0(E1000State *VAR_0, int VAR_1, uint16_t VAR_2)

{

    









    if (!(VAR_0->compat_flags & E1000_FLAG_AUTONEG)) {

        return;

    }

    if ((VAR_2 & MII_CR_AUTO_NEG_EN) && (VAR_2 & MII_CR_RESTART_AUTO_NEG)) {

        e1000_link_down(VAR_0);

        DBGOUT(PHY, "Start link auto negotiation\n");

        timer_mod(VAR_0->autoneg_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500);

    }

}

FUNC_0(E1000State *VAR_0, int VAR_1, uint16_t VAR_2)
{ if (!(VAR_0->compat_flags & E1000_FLAG_AUTONEG)) { return; } if ((VAR_2 & MII_CR_AUTO_NEG_EN) && (VAR_2 & MII_CR_RESTART_AUTO_NEG)) { e1000_link_down(VAR_0); DBGOUT(PHY, "Start link auto negotiation\n"); timer_mod(VAR_0->autoneg_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500); } }