| 608 | } |
| 609 | |
| 610 | void |
| 611 | sfc_stop(struct sfc_adapter *sa) |
| 612 | { |
| 613 | sfc_log_init(sa, "entry"); |
| 614 | |
| 615 | SFC_ASSERT(sfc_adapter_is_locked(sa)); |
| 616 | |
| 617 | switch (sa->state) { |
| 618 | case SFC_ETHDEV_STARTED: |
| 619 | break; |
| 620 | case SFC_ETHDEV_CONFIGURED: |
| 621 | sfc_notice(sa, "already stopped"); |
| 622 | return; |
| 623 | default: |
| 624 | sfc_err(sa, "stop in unexpected state %u", sa->state); |
| 625 | SFC_ASSERT(B_FALSE); |
| 626 | return; |
| 627 | } |
| 628 | |
| 629 | sa->state = SFC_ETHDEV_STOPPING; |
| 630 | |
| 631 | sfc_repr_proxy_stop(sa); |
| 632 | sfc_flow_stop(sa); |
| 633 | sfc_tx_stop(sa); |
| 634 | sfc_rx_stop(sa); |
| 635 | sfc_port_stop(sa); |
| 636 | sfc_tbls_stop(sa); |
| 637 | sfc_ev_stop(sa); |
| 638 | sfc_intr_stop(sa); |
| 639 | efx_nic_fini(sa->nic); |
| 640 | |
| 641 | sa->state = SFC_ETHDEV_CONFIGURED; |
| 642 | sfc_log_init(sa, "done"); |
| 643 | } |
| 644 | |
| 645 | static int |
| 646 | sfc_restart(struct sfc_adapter *sa) |
no test coverage detected