Lines Matching +full:read +full:- +full:out

1 // SPDX-License-Identifier: GPL-2.0
8 * igc_poll_eerd_eewr_done - Poll for EEPROM read/write completion
12 * Polls the EEPROM status bit for either read or write completion based
17 s32 ret_val = -IGC_ERR_NVM; in igc_poll_eerd_eewr_done()
39 * igc_acquire_nvm - Generic request for access to EEPROM
44 * EEPROM access and return -IGC_ERR_NVM (-1).
60 timeout--; in igc_acquire_nvm()
67 ret_val = -IGC_ERR_NVM; in igc_acquire_nvm()
74 * igc_release_nvm - Release exclusive access to EEPROM
89 * igc_read_nvm_eerd - Reads EEPROM using EERD register
91 * @offset: offset of word in the EEPROM to read
92 * @words: number of words to read
93 * @data: word read from the EEPROM
99 struct igc_nvm_info *nvm = &hw->nvm; in igc_read_nvm_eerd()
106 if (offset >= nvm->word_size || (words > (nvm->word_size - offset)) || in igc_read_nvm_eerd()
108 hw_dbg("nvm parameter(s) out of bounds\n"); in igc_read_nvm_eerd()
109 ret_val = -IGC_ERR_NVM; in igc_read_nvm_eerd()
110 goto out; in igc_read_nvm_eerd()
125 out: in igc_read_nvm_eerd()
130 * igc_read_mac_addr - Read device MAC address
143 hw->mac.perm_addr[i] = (u8)(rar_low >> (i * 8)); in igc_read_mac_addr()
146 hw->mac.perm_addr[i + 4] = (u8)(rar_high >> (i * 8)); in igc_read_mac_addr()
149 hw->mac.addr[i] = hw->mac.perm_addr[i]; in igc_read_mac_addr()
155 * igc_validate_nvm_checksum - Validate EEPROM checksum
168 ret_val = hw->nvm.ops.read(hw, i, 1, &nvm_data); in igc_validate_nvm_checksum()
170 hw_dbg("NVM Read Error\n"); in igc_validate_nvm_checksum()
171 goto out; in igc_validate_nvm_checksum()
178 ret_val = -IGC_ERR_NVM; in igc_validate_nvm_checksum()
179 goto out; in igc_validate_nvm_checksum()
182 out: in igc_validate_nvm_checksum()
187 * igc_update_nvm_checksum - Update EEPROM checksum
201 ret_val = hw->nvm.ops.read(hw, i, 1, &nvm_data); in igc_update_nvm_checksum()
203 hw_dbg("NVM Read Error while updating checksum.\n"); in igc_update_nvm_checksum()
204 goto out; in igc_update_nvm_checksum()
208 checksum = (u16)NVM_SUM - checksum; in igc_update_nvm_checksum()
209 ret_val = hw->nvm.ops.write(hw, NVM_CHECKSUM_REG, 1, &checksum); in igc_update_nvm_checksum()
213 out: in igc_update_nvm_checksum()