| 1344 | } |
| 1345 | |
| 1346 | void |
| 1347 | sfc_unprobe(struct sfc_adapter *sa) |
| 1348 | { |
| 1349 | efx_nic_t *enp = sa->nic; |
| 1350 | |
| 1351 | sfc_log_init(sa, "entry"); |
| 1352 | |
| 1353 | SFC_ASSERT(sfc_adapter_is_locked(sa)); |
| 1354 | |
| 1355 | sfc_log_init(sa, "unprobe nic"); |
| 1356 | efx_nic_unprobe(enp); |
| 1357 | |
| 1358 | sfc_mcdi_fini(sa); |
| 1359 | |
| 1360 | /* |
| 1361 | * Make sure there is no pending alarm to restart since we are |
| 1362 | * going to free device private which is passed as the callback |
| 1363 | * opaque data. A new alarm cannot be scheduled since MCDI is |
| 1364 | * shut down. |
| 1365 | */ |
| 1366 | rte_eal_alarm_cancel(sfc_restart_if_required, sa); |
| 1367 | |
| 1368 | sfc_mae_clear_switch_port(sa->mae.switch_domain_id, |
| 1369 | sa->mae.switch_port_id); |
| 1370 | |
| 1371 | sfc_log_init(sa, "destroy nic"); |
| 1372 | sa->nic = NULL; |
| 1373 | efx_nic_destroy(enp); |
| 1374 | |
| 1375 | sfc_mem_bar_fini(sa); |
| 1376 | |
| 1377 | sfc_flow_fini(sa); |
| 1378 | sa->state = SFC_ETHDEV_UNINITIALIZED; |
| 1379 | } |
| 1380 | |
| 1381 | uint32_t |
| 1382 | sfc_register_logtype(const struct rte_pci_addr *pci_addr, |
no test coverage detected