 /* Wait for FW to finish PHY configuration. */ ret_val = e1000_get_phy_cfg_done(hw);  return ret_val; 
e1000_phy_hw_reset(struct e1000_hw *hw){    uint32_t ctrl, ctrl_ext;    uint32_t led_ctrl;    DEBUGFUNC("e1000_phy_hw_reset");    DEBUGOUT("Resetting Phy...\n");    if(hw->mac_type > e1000_82543) {        /* Read the device control register and assert the E1000_CTRL_PHY_RST         * bit. Then, take it out of reset.         */        ctrl = E1000_READ_REG(hw, CTRL);        E1000_WRITE_REG(hw, CTRL, ctrl | E1000_CTRL_PHY_RST);        E1000_WRITE_FLUSH(hw);        msec_delay(10);        E1000_WRITE_REG(hw, CTRL, ctrl);        E1000_WRITE_FLUSH(hw);    } else {        /* Read the Extended Device Control Register, assert the PHY_RESET_DIR         * bit to put the PHY into reset. Then, take it out of reset.         */        ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);        ctrl_ext |= E1000_CTRL_EXT_SDP4_DIR;        ctrl_ext &= ~E1000_CTRL_EXT_SDP4_DATA;        E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext);        E1000_WRITE_FLUSH(hw);        msec_delay(10);        ctrl_ext |= E1000_CTRL_EXT_SDP4_DATA;        E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext);        E1000_WRITE_FLUSH(hw);    }    udelay(150);    if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) {        /* Configure activity LED after PHY reset */        led_ctrl = E1000_READ_REG(hw, LEDCTL);        led_ctrl &= IGP_ACTIVITY_LED_MASK;        led_ctrl |= (IGP_ACTIVITY_LED_ENABLE | IGP_LED3_MODE);        E1000_WRITE_REG(hw, LEDCTL, led_ctrl);    }}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2d7edb923a823660b081bd4c660300ee19adca8d/e1000_hw.c/buggy/drivers/net/e1000/e1000_hw.c