Lines Matching refs:ret_code

19 	int ret_code = 0;  in i40e_init_nvm()  local
40 ret_code = I40E_ERR_NVM_BLANK_MODE; in i40e_init_nvm()
44 return ret_code; in i40e_init_nvm()
60 int ret_code = 0; in i40e_acquire_nvm() local
65 ret_code = i40e_aq_request_resource(hw, I40E_NVM_RESOURCE_ID, access, in i40e_acquire_nvm()
73 if (ret_code) in i40e_acquire_nvm()
76 access, time_left, ret_code, hw->aq.asq_last_status); in i40e_acquire_nvm()
78 if (ret_code && time_left) { in i40e_acquire_nvm()
84 ret_code = i40e_aq_request_resource(hw, in i40e_acquire_nvm()
88 if (!ret_code) { in i40e_acquire_nvm()
94 if (ret_code) { in i40e_acquire_nvm()
98 time_left, ret_code, hw->aq.asq_last_status); in i40e_acquire_nvm()
103 return ret_code; in i40e_acquire_nvm()
114 int ret_code = I40E_SUCCESS; in i40e_release_nvm() local
120 ret_code = i40e_aq_release_resource(hw, I40E_NVM_RESOURCE_ID, 0, NULL); in i40e_release_nvm()
125 while ((ret_code == I40E_ERR_ADMIN_QUEUE_TIMEOUT) && in i40e_release_nvm()
128 ret_code = i40e_aq_release_resource(hw, in i40e_release_nvm()
143 int ret_code = I40E_ERR_TIMEOUT; in i40e_poll_sr_srctl_done_bit() local
150 ret_code = 0; in i40e_poll_sr_srctl_done_bit()
155 if (ret_code == I40E_ERR_TIMEOUT) in i40e_poll_sr_srctl_done_bit()
157 return ret_code; in i40e_poll_sr_srctl_done_bit()
171 int ret_code = I40E_ERR_TIMEOUT; in i40e_read_nvm_word_srctl() local
178 ret_code = I40E_ERR_PARAM; in i40e_read_nvm_word_srctl()
183 ret_code = i40e_poll_sr_srctl_done_bit(hw); in i40e_read_nvm_word_srctl()
184 if (!ret_code) { in i40e_read_nvm_word_srctl()
191 ret_code = i40e_poll_sr_srctl_done_bit(hw); in i40e_read_nvm_word_srctl()
192 if (!ret_code) { in i40e_read_nvm_word_srctl()
199 if (ret_code) in i40e_read_nvm_word_srctl()
205 return ret_code; in i40e_read_nvm_word_srctl()
225 int ret_code = I40E_ERR_NVM; in i40e_read_nvm_aq() local
251 ret_code = i40e_aq_read_nvm(hw, module_pointer, in i40e_read_nvm_aq()
256 return ret_code; in i40e_read_nvm_aq()
270 int ret_code = I40E_ERR_TIMEOUT; in i40e_read_nvm_word_aq() local
272 ret_code = i40e_read_nvm_aq(hw, 0x0, offset, 1, data, true); in i40e_read_nvm_word_aq()
275 return ret_code; in i40e_read_nvm_word_aq()
309 int ret_code = 0; in i40e_read_nvm_word() local
312 ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); in i40e_read_nvm_word()
313 if (ret_code) in i40e_read_nvm_word()
314 return ret_code; in i40e_read_nvm_word()
316 ret_code = __i40e_read_nvm_word(hw, offset, data); in i40e_read_nvm_word()
321 return ret_code; in i40e_read_nvm_word()
412 int ret_code = 0; in i40e_read_nvm_buffer_srctl() local
418 ret_code = i40e_read_nvm_word_srctl(hw, index, &data[word]); in i40e_read_nvm_buffer_srctl()
419 if (ret_code) in i40e_read_nvm_buffer_srctl()
426 return ret_code; in i40e_read_nvm_buffer_srctl()
446 int ret_code; in i40e_read_nvm_buffer_aq() local
466 ret_code = i40e_read_nvm_aq(hw, 0x0, offset, read_size, in i40e_read_nvm_buffer_aq()
468 if (ret_code) in i40e_read_nvm_buffer_aq()
483 return ret_code; in i40e_read_nvm_buffer_aq()
520 int ret_code = 0; in i40e_read_nvm_buffer() local
523 ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); in i40e_read_nvm_buffer()
524 if (!ret_code) { in i40e_read_nvm_buffer()
525 ret_code = i40e_read_nvm_buffer_aq(hw, offset, words, in i40e_read_nvm_buffer()
530 ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data); in i40e_read_nvm_buffer()
533 return ret_code; in i40e_read_nvm_buffer()
552 int ret_code = I40E_ERR_NVM; in i40e_write_nvm_aq() local
578 ret_code = i40e_aq_update_nvm(hw, module_pointer, in i40e_write_nvm_aq()
584 return ret_code; in i40e_write_nvm_aq()
604 int ret_code; in i40e_calc_nvm_checksum() local
608 ret_code = i40e_allocate_virt_mem(hw, &vmem, in i40e_calc_nvm_checksum()
610 if (ret_code) in i40e_calc_nvm_checksum()
615 ret_code = __i40e_read_nvm_word(hw, I40E_SR_VPD_PTR, &vpd_module); in i40e_calc_nvm_checksum()
616 if (ret_code) { in i40e_calc_nvm_checksum()
617 ret_code = I40E_ERR_NVM_CHECKSUM; in i40e_calc_nvm_checksum()
622 ret_code = __i40e_read_nvm_word(hw, I40E_SR_PCIE_ALT_AUTO_LOAD_PTR, in i40e_calc_nvm_checksum()
624 if (ret_code) { in i40e_calc_nvm_checksum()
625 ret_code = I40E_ERR_NVM_CHECKSUM; in i40e_calc_nvm_checksum()
637 ret_code = __i40e_read_nvm_buffer(hw, i, &words, data); in i40e_calc_nvm_checksum()
638 if (ret_code) { in i40e_calc_nvm_checksum()
639 ret_code = I40E_ERR_NVM_CHECKSUM; in i40e_calc_nvm_checksum()
667 return ret_code; in i40e_calc_nvm_checksum()
681 int ret_code; in i40e_update_nvm_checksum() local
684 ret_code = i40e_calc_nvm_checksum(hw, &checksum); in i40e_update_nvm_checksum()
685 if (!ret_code) { in i40e_update_nvm_checksum()
687 ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD, in i40e_update_nvm_checksum()
691 return ret_code; in i40e_update_nvm_checksum()
707 int ret_code = 0; in i40e_validate_nvm_checksum() local
714 ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); in i40e_validate_nvm_checksum()
715 if (ret_code) in i40e_validate_nvm_checksum()
716 return ret_code; in i40e_validate_nvm_checksum()
717 ret_code = i40e_calc_nvm_checksum(hw, &checksum_local); in i40e_validate_nvm_checksum()
720 if (ret_code) in i40e_validate_nvm_checksum()
721 return ret_code; in i40e_validate_nvm_checksum()
727 ret_code = I40E_ERR_NVM_CHECKSUM; in i40e_validate_nvm_checksum()
733 return ret_code; in i40e_validate_nvm_checksum()