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_read_nvm_eerd - Reads EEPROM using EERD register
41 * @offset: offset of word in the EEPROM to read
42 * @words: number of words to read
43 * @data: word read from the EEPROM
49 struct igc_nvm_info *nvm = &hw->nvm; in igc_read_nvm_eerd()
56 if (offset >= nvm->word_size || (words > (nvm->word_size - offset)) || in igc_read_nvm_eerd()
58 hw_dbg("nvm parameter(s) out of bounds\n"); in igc_read_nvm_eerd()
59 ret_val = -IGC_ERR_NVM; in igc_read_nvm_eerd()
60 goto out; in igc_read_nvm_eerd()
75 out: in igc_read_nvm_eerd()
80 * igc_read_mac_addr - Read device MAC address
93 hw->mac.perm_addr[i] = (u8)(rar_low >> (i * 8)); in igc_read_mac_addr()
96 hw->mac.perm_addr[i + 4] = (u8)(rar_high >> (i * 8)); in igc_read_mac_addr()
99 hw->mac.addr[i] = hw->mac.perm_addr[i]; in igc_read_mac_addr()
105 * igc_validate_nvm_checksum - Validate EEPROM checksum
118 ret_val = hw->nvm.ops.read(hw, i, 1, &nvm_data); in igc_validate_nvm_checksum()
120 hw_dbg("NVM Read Error\n"); in igc_validate_nvm_checksum()
121 goto out; in igc_validate_nvm_checksum()
128 ret_val = -IGC_ERR_NVM; in igc_validate_nvm_checksum()
129 goto out; in igc_validate_nvm_checksum()
132 out: in igc_validate_nvm_checksum()
137 * igc_update_nvm_checksum - Update EEPROM checksum
151 ret_val = hw->nvm.ops.read(hw, i, 1, &nvm_data); in igc_update_nvm_checksum()
153 hw_dbg("NVM Read Error while updating checksum.\n"); in igc_update_nvm_checksum()
154 goto out; in igc_update_nvm_checksum()
158 checksum = (u16)NVM_SUM - checksum; in igc_update_nvm_checksum()
159 ret_val = hw->nvm.ops.write(hw, NVM_CHECKSUM_REG, 1, &checksum); in igc_update_nvm_checksum()
163 out: in igc_update_nvm_checksum()