Lines Matching +full:0 +full:pointer

11  * @hw: pointer to the HW structure
22 int ret_code = 0; in i40e_init_nvm()
52 * @hw: pointer to the HW structure
62 u64 time_left = 0; in i40e_acquire_nvm()
63 int ret_code = 0; in i40e_acquire_nvm()
69 0, &time_left, NULL); in i40e_acquire_nvm()
89 access, 0, &time_left, in i40e_acquire_nvm()
98 hw->nvm.hw_semaphore_timeout = 0; in i40e_acquire_nvm()
111 * @hw: pointer to the HW structure
117 u32 total_delay = 0; in i40e_release_nvm()
118 int ret_code = 0; in i40e_release_nvm()
123 ret_code = i40e_aq_release_resource(hw, I40E_NVM_RESOURCE_ID, 0, NULL); in i40e_release_nvm()
133 0, NULL); in i40e_release_nvm()
140 * @hw: pointer to the HW structure
150 for (wait_cnt = 0; wait_cnt < I40E_SRRD_SRCTL_ATTEMPTS; wait_cnt++) { in i40e_poll_sr_srctl_done_bit()
153 ret_code = 0; in i40e_poll_sr_srctl_done_bit()
165 * @hw: pointer to the HW structure
166 * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
204 "NVM read error: Couldn't access Shadow RAM address: 0x%x\n", in i40e_read_nvm_word_srctl()
213 * @hw: pointer to the HW structure.
214 * @module_pointer: module pointer location in words from the NVM beginning
230 memset(&cmd_details, 0, sizeof(cmd_details)); in i40e_read_nvm_aq()
235 * the NVM resource yet (we cannot get the module pointer value). in i40e_read_nvm_aq()
264 * @hw: pointer to the HW structure
265 * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
275 ret_code = i40e_read_nvm_aq(hw, 0x0, offset, 1, data, true); in i40e_read_nvm_word_aq()
283 * @hw: pointer to the HW structure
284 * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
303 * @hw: pointer to the HW structure
304 * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
312 int ret_code = 0; in i40e_read_nvm_word()
329 * @hw: Pointer to the HW structure
330 * @module_ptr: Pointer to module in words with respect to NVM beginning
334 * @data_ptr: Pointer to memory location where resulting buffer will be stored
343 u16 specific_ptr = 0; in i40e_read_nvm_module_data()
344 u16 ptr_value = 0; in i40e_read_nvm_module_data()
345 u32 offset = 0; in i40e_read_nvm_module_data()
348 if (module_ptr != 0) { in i40e_read_nvm_module_data()
357 #define I40E_NVM_INVALID_PTR_VAL 0x7FFF in i40e_read_nvm_module_data()
358 #define I40E_NVM_INVALID_VAL 0xFFFF in i40e_read_nvm_module_data()
360 /* Pointer not initialized */ in i40e_read_nvm_module_data()
363 i40e_debug(hw, I40E_DEBUG_ALL, "Pointer not initialized.\n"); in i40e_read_nvm_module_data()
369 /* Pointer points outside of the Shared RAM mapped area */ in i40e_read_nvm_module_data()
371 "Reading nvm data failed. Pointer points outside of the Shared RAM mapped area.\n"); in i40e_read_nvm_module_data()
403 * @hw: pointer to the HW structure
404 * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF).
415 int ret_code = 0; in i40e_read_nvm_buffer_srctl()
419 for (word = 0; word < *words; word++) { in i40e_read_nvm_buffer_srctl()
434 * @hw: pointer to the HW structure
435 * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF).
447 u16 words_read = 0; in i40e_read_nvm_buffer_aq()
450 u16 i = 0; in i40e_read_nvm_buffer_aq()
469 ret_code = i40e_read_nvm_aq(hw, 0x0, offset, read_size, in i40e_read_nvm_buffer_aq()
481 for (i = 0; i < *words; i++) in i40e_read_nvm_buffer_aq()
491 * @hw: pointer to the HW structure
492 * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF).
511 * @hw: pointer to the HW structure
512 * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF).
523 int ret_code = 0; in i40e_read_nvm_buffer()
541 * @hw: pointer to the HW structure.
542 * @module_pointer: module pointer location in words from the NVM beginning
557 memset(&cmd_details, 0, sizeof(cmd_details)); in i40e_write_nvm_aq()
562 * the NVM resource yet (we cannot get the module pointer value). in i40e_write_nvm_aq()
584 data, last_command, 0, in i40e_write_nvm_aq()
592 * @hw: pointer to hardware structure
593 * @checksum: pointer to the checksum
604 u16 pcie_alt_module = 0; in i40e_calc_nvm_checksum()
605 u16 checksum_local = 0; in i40e_calc_nvm_checksum()
606 u16 vpd_module = 0; in i40e_calc_nvm_checksum()
609 u16 i = 0; in i40e_calc_nvm_checksum()
617 /* read pointer to VPD area */ in i40e_calc_nvm_checksum()
624 /* read pointer to PCIe Alt Auto-load module */ in i40e_calc_nvm_checksum()
635 for (i = 0; i < hw->nvm.sr_size; i++) { in i40e_calc_nvm_checksum()
637 if ((i % I40E_SR_SECTOR_SIZE_IN_WORDS) == 0) { in i40e_calc_nvm_checksum()
675 * @hw: pointer to hardware structure
690 ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD, in i40e_update_nvm_checksum()
699 * @hw: pointer to hardware structure
708 u16 checksum_local = 0; in i40e_validate_nvm_checksum()
709 u16 checksum_sr = 0; in i40e_validate_nvm_checksum()
710 int ret_code = 0; in i40e_validate_nvm_checksum()
806 * @hw: pointer to hardware structure
807 * @cmd: pointer to nvm update command
808 * @bytes: pointer to the data buffer
809 * @perrno: pointer to return error code
821 *perrno = 0; in i40e_nvmupd_command()
826 …UG_NVM, "%s state %d nvm_release_on_hold %d opc 0x%04x cmd 0x%08x config 0x%08x offset 0x%08x data… in i40e_nvmupd_command()
848 bytes[0] = hw->nvmupd_state; in i40e_nvmupd_command()
851 bytes[1] = 0; in i40e_nvmupd_command()
859 return 0; in i40e_nvmupd_command()
896 if (cmd->offset == 0xffff) { in i40e_nvmupd_command()
898 status = 0; in i40e_nvmupd_command()
921 * @hw: pointer to hardware structure
922 * @cmd: pointer to nvm update command buffer
923 * @bytes: pointer to the data buffer
924 * @perrno: pointer to return error code
934 int status = 0; in i40e_nvmupd_state_init()
1060 * @hw: pointer to hardware structure
1061 * @cmd: pointer to nvm update command buffer
1062 * @bytes: pointer to the data buffer
1063 * @perrno: pointer to return error code
1073 int status = 0; in i40e_nvmupd_state_reading()
1102 * @hw: pointer to hardware structure
1103 * @cmd: pointer to nvm update command buffer
1104 * @bytes: pointer to the data buffer
1105 * @perrno: pointer to return error code
1116 int status = 0; in i40e_nvmupd_state_writing()
1222 * @hw: pointer to the hardware structure
1227 "NVMUPD: clearing wait on opcode 0x%04x\n", in i40e_nvmupd_clear_wait_state()
1234 hw->nvm_wait_opcode = 0; in i40e_nvmupd_clear_wait_state()
1257 * @hw: pointer to the hardware structure
1274 * @hw: pointer to hardware structure
1275 * @cmd: pointer to nvm update command buffer
1276 * @perrno: pointer to return error code
1319 if (module == 0xf) in i40e_nvmupd_validate_command()
1321 else if (module == 0) in i40e_nvmupd_validate_command()
1357 if (module == 0) in i40e_nvmupd_validate_command()
1369 * @hw: pointer to hardware structure
1370 * @cmd: pointer to nvm update command buffer
1371 * @bytes: pointer to the data buffer
1372 * @perrno: pointer to return error code
1382 u32 buff_size = 0; in i40e_nvmupd_exec_aq()
1389 if (cmd->offset == 0xffff) in i40e_nvmupd_exec_aq()
1390 return 0; in i40e_nvmupd_exec_aq()
1392 memset(&cmd_details, 0, sizeof(cmd_details)); in i40e_nvmupd_exec_aq()
1396 memset(&hw->nvm_wb_desc, 0, aq_desc_len); in i40e_nvmupd_exec_aq()
1428 memset(&hw->nvm_aq_event_desc, 0, aq_desc_len); in i40e_nvmupd_exec_aq()
1453 * @hw: pointer to hardware structure
1454 * @cmd: pointer to nvm update command buffer
1455 * @bytes: pointer to the data buffer
1456 * @perrno: pointer to return error code
1509 if (remainder > 0) { in i40e_nvmupd_get_aq_result()
1517 return 0; in i40e_nvmupd_get_aq_result()
1522 * @hw: pointer to hardware structure
1523 * @cmd: pointer to nvm update command buffer
1524 * @bytes: pointer to the data buffer
1525 * @perrno: pointer to return error code
1551 return 0; in i40e_nvmupd_get_aq_event()
1556 * @hw: pointer to hardware structure
1557 * @cmd: pointer to nvm update command buffer
1558 * @bytes: pointer to the data buffer
1559 * @perrno: pointer to return error code
1576 memset(&cmd_details, 0, sizeof(cmd_details)); in i40e_nvmupd_nvm_read()
1583 "i40e_nvmupd_nvm_read mod 0x%x off 0x%x len 0x%x\n", in i40e_nvmupd_nvm_read()
1596 * @hw: pointer to hardware structure
1597 * @cmd: pointer to nvm update command buffer
1598 * @perrno: pointer to return error code
1608 int status = 0; in i40e_nvmupd_nvm_erase()
1615 memset(&cmd_details, 0, sizeof(cmd_details)); in i40e_nvmupd_nvm_erase()
1622 "i40e_nvmupd_nvm_erase mod 0x%x off 0x%x len 0x%x\n", in i40e_nvmupd_nvm_erase()
1635 * @hw: pointer to hardware structure
1636 * @cmd: pointer to nvm update command buffer
1637 * @bytes: pointer to the data buffer
1638 * @perrno: pointer to return error code
1649 int status = 0; in i40e_nvmupd_nvm_write()
1657 memset(&cmd_details, 0, sizeof(cmd_details)); in i40e_nvmupd_nvm_write()
1665 "i40e_nvmupd_nvm_write mod 0x%x off 0x%x len 0x%x\n", in i40e_nvmupd_nvm_write()