Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/e1000_i210.c
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | |||||
* will also specify which port we're acquiring the lock for. | * will also specify which port we're acquiring the lock for. | ||||
**/ | **/ | ||||
s32 e1000_acquire_swfw_sync_i210(struct e1000_hw *hw, u16 mask) | s32 e1000_acquire_swfw_sync_i210(struct e1000_hw *hw, u16 mask) | ||||
{ | { | ||||
u32 swfw_sync; | u32 swfw_sync; | ||||
u32 swmask = mask; | u32 swmask = mask; | ||||
u32 fwmask = mask << 16; | u32 fwmask = mask << 16; | ||||
s32 ret_val = E1000_SUCCESS; | s32 ret_val = E1000_SUCCESS; | ||||
/* Uhh the following line should read 'FIXME: this is a blazing tire fire' */ | |||||
s32 i = 0, timeout = 200; /* FIXME: find real value to use here */ | s32 i = 0, timeout = 200; /* FIXME: find real value to use here */ | ||||
DEBUGFUNC("e1000_acquire_swfw_sync_i210"); | DEBUGFUNC("e1000_acquire_swfw_sync_i210"); | ||||
ASSERT_NO_LOCKS(); | |||||
while (i < timeout) { | while (i < timeout) { | ||||
if (e1000_get_hw_semaphore_i210(hw)) { | if (e1000_get_hw_semaphore_i210(hw)) { | ||||
ret_val = -E1000_ERR_SWFW_SYNC; | ret_val = -E1000_ERR_SWFW_SYNC; | ||||
goto out; | goto out; | ||||
} | } | ||||
swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); | swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); | ||||
▲ Show 20 Lines • Show All 830 Lines • Show Last 20 Lines |