Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/e1000_82543.c
Show First 20 Lines • Show All 894 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* e1000_reset_hw_82543 - Reset hardware | * e1000_reset_hw_82543 - Reset hardware | ||||
* @hw: pointer to the HW structure | * @hw: pointer to the HW structure | ||||
* | * | ||||
* This resets the hardware into a known state. | * This resets the hardware into a known state. | ||||
**/ | **/ | ||||
static s32 e1000_reset_hw_82543(struct e1000_hw *hw) | static s32 e1000_reset_hw_82543(struct e1000_hw *hw) | ||||
{ | { | ||||
u32 ctrl, icr; | u32 ctrl; | ||||
s32 ret_val = E1000_SUCCESS; | s32 ret_val = E1000_SUCCESS; | ||||
DEBUGFUNC("e1000_reset_hw_82543"); | DEBUGFUNC("e1000_reset_hw_82543"); | ||||
DEBUGOUT("Masking off all interrupts\n"); | DEBUGOUT("Masking off all interrupts\n"); | ||||
E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); | E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); | ||||
E1000_WRITE_REG(hw, E1000_RCTL, 0); | E1000_WRITE_REG(hw, E1000_RCTL, 0); | ||||
Show All 25 Lines | static s32 e1000_reset_hw_82543(struct e1000_hw *hw) | ||||
* After MAC reset, force reload of NVM to restore power-on | * After MAC reset, force reload of NVM to restore power-on | ||||
* settings to device. | * settings to device. | ||||
*/ | */ | ||||
hw->nvm.ops.reload(hw); | hw->nvm.ops.reload(hw); | ||||
msec_delay(2); | msec_delay(2); | ||||
/* Masking off and clearing any pending interrupts */ | /* Masking off and clearing any pending interrupts */ | ||||
E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); | E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); | ||||
icr = E1000_READ_REG(hw, E1000_ICR); | E1000_READ_REG(hw, E1000_ICR); | ||||
return ret_val; | return ret_val; | ||||
} | } | ||||
/** | /** | ||||
* e1000_init_hw_82543 - Initialize hardware | * e1000_init_hw_82543 - Initialize hardware | ||||
* @hw: pointer to the HW structure | * @hw: pointer to the HW structure | ||||
* | * | ||||
▲ Show 20 Lines • Show All 643 Lines • Show Last 20 Lines |