/** * e1000e_reset - bring the hardware into a known good state * * This function boots the hardware and enables some settings that * require a configuration cycle of the hardware - those cannot be * set/changed during runtime. After reset the device needs to be * properly configured for Rx, Tx etc. */ void e1000e_reset(struct e1000_adapter *adapter) { struct e1000_mac_info *mac = &adapter->hw.mac; struct e1000_fc_info *fc = &adapter->hw.fc; u32 pba = adapter->pba; struct e1000_hw *hw = &adapter->hw; /* Reset Packet Buffer Allocation to default */ ew32(PBA, pba); hw->fc.requested_mode = e1000_fc_none; fc->current_mode = fc->requested_mode; /* Allow time for pending master requests to run */ mac->ops.reset_hw(hw); /* * For parts with AMT enabled, let the firmware know * that the network interface is in control */ if (adapter->flags & FLAG_HAS_AMT) e1000e_get_hw_control(adapter); ew32(WUC, 0); if (adapter->flags2 & FLAG2_HAS_PHY_WAKEUP) e1e_wphy(&adapter->hw, BM_WUC, 0); if (mac->ops.init_hw(hw)) DBG("Hardware Error\n"); /* additional part of the flow-control workaround above */ if (hw->mac.type == e1000_pchlan) ew32(FCRTV_PCH, 0x1000); e1000e_reset_adaptive(hw); e1000e_get_phy_info(hw); if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN) && !(adapter->flags & FLAG_SMART_POWER_DOWN)) { u16 phy_data = 0; /* * speed up time to link by disabling smart power down, ignore * the return value of this function because there is nothing * different we would do if it failed */ e1e_rphy(hw, IGP02E1000_PHY_POWER_MGMT, &phy_data); phy_data &= ~IGP02E1000_PM_SPD; e1e_wphy(hw, IGP02E1000_PHY_POWER_MGMT, phy_data); } }
void IntelMausi::intelEnable() { struct e1000_hw *hw = &adapterData.hw; e1000_phy_hw_reset(hw); if (hw->mac.type >= e1000_pch2lan) e1000_resume_workarounds_pchlan(hw); e1000e_power_up_phy(&adapterData); //intelInitManageabilityPt(&adapterData); /* If AMT is enabled, let the firmware know that the network * interface is now open and reset the part to a known state. */ if (adapterData.flags & FLAG_HAS_AMT) { e1000e_get_hw_control(&adapterData); } intelReset(&adapterData); #if DISABLED_CODE /* DMA latency requirement to workaround jumbo issue */ pm_qos_add_request(&adapter->netdev->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, PM_QOS_DEFAULT_VALUE); #endif /* DISABLED_CODE */ intelConfigure(&adapterData); /* From here on the code is the same as e1000e_up() */ clear_bit(__E1000_DOWN, &adapterData.state); intelEnableIRQ(intrMask); adapterData.tx_hang_recheck = false; hw->mac.get_link_status = true; }