Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/thunderbolt/router.c
| Show First 20 Lines • Show All 381 Lines • ▼ Show 20 Lines | while (retries-- >= 0) { | ||||
| if (error) | if (error) | ||||
| break; | break; | ||||
| error = msleep(cmd, &sc->mtx, 0, "tbtcfg", cmd->timeout * hz); | error = msleep(cmd, &sc->mtx, 0, "tbtcfg", cmd->timeout * hz); | ||||
| if (error != EWOULDBLOCK) | if (error != EWOULDBLOCK) | ||||
| break; | break; | ||||
| sc->inflight_cmd = NULL; | sc->inflight_cmd = NULL; | ||||
| tb_debug(sc, DBG_ROUTER, "Config command timed out, retries=%d\n", retries); | tb_debug(sc, DBG_ROUTER, "Config command timed out, retries=%d\n", retries); | ||||
| /* | |||||
| * TODO We might want to check if the done (DD) bit is set in | |||||
| * the ring memory but we didn't get an interrupt. | |||||
| */ | |||||
| } | } | ||||
| if (cmd->ev != 0) | if (cmd->ev != 0) | ||||
| error = EINVAL; | error = EINVAL; | ||||
| router_free_cmd(sc, cmd); | router_free_cmd(sc, cmd); | ||||
| mtx_unlock(&sc->mtx); | mtx_unlock(&sc->mtx); | ||||
| return (error); | return (error); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 542 Lines • Show Last 20 Lines | |||||