4884 udelay(5);
4885 retry_count += 5;
4886
4887 e1000_standby_eeprom(hw);
4888 } while (retry_count < EEPROM_MAX_RETRY_SPI);
4889
4890
4891
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
4903
4904
4905
4906
4907
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
4923 DEBUGFUNC("e1000_read_eeprom");
4924