X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=drivers%2Fnet%2Fbnx2x%2Fecore_sp.c;h=43194095bcf1a95699c7cb01643ae6032f464ec6;hb=8d53e9f3c6001dcb2865f6e894da5b54e1418f88;hp=6d2bb815c47d061ae259fcb9057c73e61f8af9ce;hpb=e2bea7436061ca2e7e14bfcfdc5870f2555c3965;p=deb_dpdk.git diff --git a/drivers/net/bnx2x/ecore_sp.c b/drivers/net/bnx2x/ecore_sp.c index 6d2bb815..43194095 100644 --- a/drivers/net/bnx2x/ecore_sp.c +++ b/drivers/net/bnx2x/ecore_sp.c @@ -291,25 +291,33 @@ static int ecore_state_wait(struct bnx2x_softc *sc, int state, cnt *= 20; ECORE_MSG(sc, "waiting for state to become %d", state); + /* being over protective to remind bnx2x_intr_legacy() to + * process RAMROD + */ + rte_atomic32_set(&sc->scan_fp, 1); ECORE_MIGHT_SLEEP(); while (cnt--) { - bnx2x_intr_legacy(sc, 1); + bnx2x_intr_legacy(sc); if (!ECORE_TEST_BIT(state, pstate)) { #ifdef ECORE_STOP_ON_ERROR ECORE_MSG(sc, "exit (cnt %d)", 5000 - cnt); #endif + rte_atomic32_set(&sc->scan_fp, 0); return ECORE_SUCCESS; } ECORE_WAIT(sc, delay_us); - if (sc->panic) + if (sc->panic) { + rte_atomic32_set(&sc->scan_fp, 0); return ECORE_IO; + } } /* timeout! */ PMD_DRV_LOG(ERR, sc, "timeout waiting for state %d", state); + rte_atomic32_set(&sc->scan_fp, 0); #ifdef ECORE_STOP_ON_ERROR ecore_panic(); #endif