| 13 | #include "hsi_struct_def_dpdk.h" |
| 14 | |
| 15 | void bnxt_wait_for_device_shutdown(struct bnxt *bp) |
| 16 | { |
| 17 | uint32_t val, timeout; |
| 18 | |
| 19 | /* if HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ERR_RECOVER_RELOAD is set |
| 20 | * in HWRM_FUNC_QCAPS command, wait for FW_STATUS to set |
| 21 | * the SHUTDOWN bit in health register |
| 22 | */ |
| 23 | if (!(bp->recovery_info && |
| 24 | (bp->fw_cap & BNXT_FW_CAP_ERR_RECOVER_RELOAD))) |
| 25 | return; |
| 26 | |
| 27 | /* Driver has to wait for fw_reset_max_msecs or shutdown bit which comes |
| 28 | * first for FW to collect crash dump. |
| 29 | */ |
| 30 | timeout = bp->fw_reset_max_msecs; |
| 31 | |
| 32 | /* Driver has to poll for shutdown bit in fw_status register |
| 33 | * |
| 34 | * 1. in case of hot fw upgrade, this bit will be set after all |
| 35 | * function drivers unregistered with fw. |
| 36 | * 2. in case of fw initiated error recovery, this bit will be |
| 37 | * set after fw has collected the core dump |
| 38 | */ |
| 39 | do { |
| 40 | val = bnxt_read_fw_status_reg(bp, BNXT_FW_STATUS_REG); |
| 41 | if (val & BNXT_FW_STATUS_SHUTDOWN) |
| 42 | return; |
| 43 | |
| 44 | rte_delay_ms(100); |
| 45 | timeout -= 100; |
| 46 | } while (timeout); |
| 47 | } |
| 48 | |
| 49 | static void |
| 50 | bnxt_process_default_vnic_change(struct bnxt *bp, |
no test coverage detected