| 434 | } |
| 435 | |
| 436 | static int |
| 437 | sfc_try_start(struct sfc_adapter *sa) |
| 438 | { |
| 439 | const efx_nic_cfg_t *encp; |
| 440 | int rc; |
| 441 | |
| 442 | sfc_log_init(sa, "entry"); |
| 443 | |
| 444 | SFC_ASSERT(sfc_adapter_is_locked(sa)); |
| 445 | SFC_ASSERT(sa->state == SFC_ETHDEV_STARTING); |
| 446 | |
| 447 | sfc_log_init(sa, "set FW subvariant"); |
| 448 | rc = sfc_set_fw_subvariant(sa); |
| 449 | if (rc != 0) |
| 450 | goto fail_set_fw_subvariant; |
| 451 | |
| 452 | sfc_log_init(sa, "set resource limits"); |
| 453 | rc = sfc_set_drv_limits(sa); |
| 454 | if (rc != 0) |
| 455 | goto fail_set_drv_limits; |
| 456 | |
| 457 | sfc_log_init(sa, "init nic"); |
| 458 | rc = efx_nic_init(sa->nic); |
| 459 | if (rc != 0) |
| 460 | goto fail_nic_init; |
| 461 | |
| 462 | sfc_log_init(sa, "reconfigure NIC DMA"); |
| 463 | rc = efx_nic_dma_reconfigure(sa->nic); |
| 464 | if (rc != 0) { |
| 465 | sfc_err(sa, "cannot reconfigure NIC DMA: %s", rte_strerror(rc)); |
| 466 | goto fail_nic_dma_reconfigure; |
| 467 | } |
| 468 | |
| 469 | encp = efx_nic_cfg_get(sa->nic); |
| 470 | |
| 471 | /* |
| 472 | * Refresh (since it may change on NIC reset/restart) a copy of |
| 473 | * supported tunnel encapsulations in shared memory to be used |
| 474 | * on supported Rx packet type classes get. |
| 475 | */ |
| 476 | sa->priv.shared->tunnel_encaps = |
| 477 | encp->enc_tunnel_encapsulations_supported; |
| 478 | |
| 479 | if (encp->enc_tunnel_encapsulations_supported != 0) { |
| 480 | sfc_log_init(sa, "apply tunnel config"); |
| 481 | rc = efx_tunnel_reconfigure(sa->nic); |
| 482 | if (rc != 0) |
| 483 | goto fail_tunnel_reconfigure; |
| 484 | } |
| 485 | |
| 486 | rc = sfc_intr_start(sa); |
| 487 | if (rc != 0) |
| 488 | goto fail_intr_start; |
| 489 | |
| 490 | rc = sfc_ev_start(sa); |
| 491 | if (rc != 0) |
| 492 | goto fail_ev_start; |
| 493 |
no test coverage detected