User: | Jiri Slaby |
Error type: | Double Unlock |
Error type description: | Some lock is unlocked twice unintentionally in a sequence |
File location: | drivers/net/e1000/e1000_hw.c |
Line in file: | 5255 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2011-11-07 22:20:57 UTC |
5225 } else if (hw->eeprom.type == e1000_eeprom_flash) { 5226 e1000_commit_shadow_ram(hw); 5227 } else if (hw->eeprom.type == e1000_eeprom_ich8) { 5228 e1000_commit_shadow_ram(hw); 5229 /* Reload the EEPROM, or else modifications will not appear 5230 * until after next adapter reset. */ 5231 ctrl_ext = er32(CTRL_EXT); 5232 ctrl_ext |= E1000_CTRL_EXT_EE_RST; 5233 ew32(CTRL_EXT, ctrl_ext); 5234 msleep(10); 5235 } 5236 return E1000_SUCCESS; 5237} 5238 5239/****************************************************************************** 5240 * Parent function for writing words to the different EEPROM types. 5241 * 5242 * hw - Struct containing variables accessed by shared code 5243 * offset - offset within the EEPROM to be written to 5244 * words - number of words to write 5245 * data - 16 bit word to be written to the EEPROM 5246 * 5247 * If e1000_update_eeprom_checksum is not called after this function, the 5248 * EEPROM will most likely contain an invalid checksum. 5249 *****************************************************************************/ 5250s32 e1000_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) 5251{ 5252 s32 ret; 5253 spin_lock(&e1000_eeprom_lock); 5254 ret = e1000_do_write_eeprom(hw, offset, words, data); 5255 spin_unlock(&e1000_eeprom_lock); 5256 return ret; 5257} 5258 5259 5260static s32 e1000_do_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) 5261{ 5262 struct e1000_eeprom_info *eeprom = &hw->eeprom; 5263 s32 status = 0; 5264 5265 DEBUGFUNC("e1000_write_eeprom");