* Reconfigure the NIC for the extend ctrl BAR. * * Write the update word to the BAR and ping the reconfig queue. Then poll * until the firmware has acknowledged the update by zeroing the update word. * * @param hw * Device to reconfigure. * @param ctrl_ext * The value for the first word of extend ctrl field in the BAR config. * @param update * The value for the update field in the
| 122 | * - (-EIO) if I/O err and fail to reconfigure the device. |
| 123 | */ |
| 124 | int |
| 125 | nfp_ext_reconfig(struct nfp_hw *hw, |
| 126 | uint32_t ctrl_ext, |
| 127 | uint32_t update) |
| 128 | { |
| 129 | int ret; |
| 130 | |
| 131 | rte_spinlock_lock(&hw->reconfig_lock); |
| 132 | |
| 133 | nn_cfg_writel(hw, NFP_NET_CFG_CTRL_WORD1, ctrl_ext); |
| 134 | nn_cfg_writel(hw, NFP_NET_CFG_UPDATE, update); |
| 135 | |
| 136 | rte_wmb(); |
| 137 | |
| 138 | ret = nfp_reconfig_real(hw, update); |
| 139 | |
| 140 | rte_spinlock_unlock(&hw->reconfig_lock); |
| 141 | |
| 142 | if (ret != 0) { |
| 143 | PMD_DRV_LOG(ERR, "Error nfp ext reconfig: ctrl_ext=%#08x update=%#08x", |
| 144 | ctrl_ext, update); |
| 145 | return -EIO; |
| 146 | } |
| 147 | |
| 148 | return 0; |
| 149 | } |
| 150 | |
| 151 | void |
| 152 | nfp_read_mac(struct nfp_hw *hw) |
no test coverage detected