Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/mps/mps.c
Show First 20 Lines • Show All 3,097 Lines • ▼ Show 20 Lines | while ((cm->cm_flags & MPS_CM_FLAGS_COMPLETE) == 0) { | ||||
if (cur_time.tv_sec > timeout) { | if (cur_time.tv_sec > timeout) { | ||||
error = EWOULDBLOCK; | error = EWOULDBLOCK; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
if (error == EWOULDBLOCK) { | if (error == EWOULDBLOCK) { | ||||
if (cm->cm_timeout_handler == NULL) { | |||||
mps_dprint(sc, MPS_FAULT, "Calling Reinit from %s, timeout=%d," | mps_dprint(sc, MPS_FAULT, "Calling Reinit from %s, timeout=%d," | ||||
" elapsed=%jd\n", __func__, timeout, | " elapsed=%jd\n", __func__, timeout, | ||||
(intmax_t)cur_time.tv_sec); | (intmax_t)cur_time.tv_sec); | ||||
rc = mps_reinit(sc); | rc = mps_reinit(sc); | ||||
mps_dprint(sc, MPS_FAULT, "Reinit %s\n", (rc == 0) ? "success" : | mps_dprint(sc, MPS_FAULT, "Reinit %s\n", (rc == 0) ? "success" : | ||||
"failed"); | "failed"); | ||||
} else | |||||
cm->cm_timeout_handler(sc, cm); | |||||
if (sc->mps_flags & MPS_FLAGS_REALLOCATED) { | if (sc->mps_flags & MPS_FLAGS_REALLOCATED) { | ||||
/* | /* | ||||
* Tell the caller that we freed the command in a | * Tell the caller that we freed the command in a | ||||
* reinit. | * reinit. | ||||
*/ | */ | ||||
*cmp = NULL; | *cmp = NULL; | ||||
} | } | ||||
error = ETIMEDOUT; | error = ETIMEDOUT; | ||||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |