-int
-ark_udm_stop(struct ark_udm_t *udm, const int wait)
-{
- int cnt = 0;
-
- udm->cfg.command = 2;
-
- while (wait && (udm->cfg.stop_flushed & 0x01) == 0) {
- if (cnt++ > 1000)
- return 1;
-
- usleep(10);
- }
- return 0;
-}
-
-int
-ark_udm_reset(struct ark_udm_t *udm)
-{
- int status;
-
- status = ark_udm_stop(udm, 1);
- if (status != 0) {
- ARK_PMD_LOG(NOTICE, "%s stop failed doing forced reset\n",
- __func__);
- udm->cfg.command = 4;
- usleep(10);
- udm->cfg.command = 3;
- status = ark_udm_stop(udm, 0);
- ARK_PMD_LOG(INFO, "%s stop status %d post failure"
- " and forced reset\n",
- __func__, status);
- } else {
- udm->cfg.command = 3;
- }
-
- return status;
-}
-
-void
-ark_udm_start(struct ark_udm_t *udm)
-{
- udm->cfg.command = 1;
-}
-
-void
-ark_udm_stats_reset(struct ark_udm_t *udm)
-{
- udm->pcibp.pci_clear = 1;
- udm->tlp_ps.tlp_clear = 1;
-}
-