Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/mpr/mpr.c
Show First 20 Lines • Show All 3,809 Lines • ▼ Show 20 Lines | while ((cm->cm_flags & MPR_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) { | |||||
mpr_dprint(sc, MPR_FAULT, "Calling Reinit from %s, timeout=%d," | mpr_dprint(sc, MPR_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 = mpr_reinit(sc); | rc = mpr_reinit(sc); | ||||
mpr_dprint(sc, MPR_FAULT, "Reinit %s\n", (rc == 0) ? "success" : | mpr_dprint(sc, MPR_FAULT, "Reinit %s\n", (rc == 0) ? "success" : | ||||
"failed"); | "failed"); | ||||
} else | |||||
cm->cm_timeout_handler(sc, cm); | |||||
if (sc->mpr_flags & MPR_FLAGS_REALLOCATED) { | if (sc->mpr_flags & MPR_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 191 Lines • Show Last 20 Lines |