Force the physical port down to clear the possible DMA error */
| 1203 | |
| 1204 | /* Force the physical port down to clear the possible DMA error */ |
| 1205 | static int |
| 1206 | nfp_net_force_port_down(struct nfp_pf_dev *pf_dev, |
| 1207 | struct nfp_eth_table *nfp_eth_table, |
| 1208 | struct nfp_cpp *cpp) |
| 1209 | { |
| 1210 | int ret; |
| 1211 | uint32_t i; |
| 1212 | uint32_t id; |
| 1213 | uint32_t index; |
| 1214 | uint32_t count; |
| 1215 | |
| 1216 | count = nfp_net_get_port_num(pf_dev, nfp_eth_table); |
| 1217 | for (i = 0; i < count; i++) { |
| 1218 | id = nfp_function_id_get(pf_dev, i); |
| 1219 | index = nfp_eth_table->ports[id].index; |
| 1220 | ret = nfp_eth_set_configured(cpp, index, 0); |
| 1221 | if (ret < 0) |
| 1222 | return ret; |
| 1223 | } |
| 1224 | |
| 1225 | return 0; |
| 1226 | } |
| 1227 | |
| 1228 | static int |
| 1229 | nfp_pf_init(struct rte_pci_device *pci_dev) |
no test coverage detected