User: | Jiri Slaby |
Error type: | Double Lock |
Error type description: | Some lock is locked twice unintentionally in a sequence |
File location: | drivers/net/e1000/e1000_hw.c |
Line in file: | 4912 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2011-11-07 22:19:59 UTC |
4882 break; 4883 4884 udelay(5); 4885 retry_count += 5; 4886 4887 e1000_standby_eeprom(hw); 4888 } while (retry_count < EEPROM_MAX_RETRY_SPI); 4889 4890 /* ATMEL SPI write time could vary from 0-20mSec on 3.3V devices (and 4891 * only 0-5mSec on 5V devices) 4892 */ 4893 if (retry_count >= EEPROM_MAX_RETRY_SPI) { 4894 DEBUGOUT("SPI EEPROM Status error\n"); 4895 return -E1000_ERR_EEPROM; 4896 } 4897 4898 return E1000_SUCCESS; 4899} 4900 4901/****************************************************************************** 4902 * Reads a 16 bit word from the EEPROM. 4903 * 4904 * hw - Struct containing variables accessed by shared code 4905 * offset - offset of word in the EEPROM to read 4906 * data - word read from the EEPROM 4907 * words - number of words to read 4908 *****************************************************************************/ 4909s32 e1000_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) 4910{ 4911 s32 ret; 4912 spin_lock(&e1000_eeprom_lock); 4913 ret = e1000_do_read_eeprom(hw, offset, words, data); 4914 spin_unlock(&e1000_eeprom_lock); 4915 return ret; 4916} 4917 4918static s32 e1000_do_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) 4919{ 4920 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4921 u32 i = 0; 4922