aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mps/mps_user.c
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2018-02-06 21:01:38 +0000
committerScott Long <scottl@FreeBSD.org>2018-02-06 21:01:38 +0000
commit964107031b45bfdae417fc22847e41463c6918c3 (patch)
tree7c99c013cb8af09c91ac48ba7e279be41b426a93 /sys/dev/mps/mps_user.c
parent1ce07411fae8986f3acc293c9fb9ebee5211056a (diff)
Notes
Diffstat (limited to 'sys/dev/mps/mps_user.c')
-rw-r--r--sys/dev/mps/mps_user.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/mps/mps_user.c b/sys/dev/mps/mps_user.c
index 6104373f5162..a4535d06ab43 100644
--- a/sys/dev/mps/mps_user.c
+++ b/sys/dev/mps/mps_user.c
@@ -420,7 +420,7 @@ mpi_init_sge(struct mps_command *cm, void *req, void *sge)
{
int off, space;
- space = (int)cm->cm_sc->facts->IOCRequestFrameSize * 4;
+ space = (int)cm->cm_sc->reqframesz;
off = (uintptr_t)sge - (uintptr_t)req;
KASSERT(off < space, ("bad pointers %p %p, off %d, space %d",
@@ -688,7 +688,7 @@ mps_user_command(struct mps_softc *sc, struct mps_usr_command *cmd)
mps_dprint(sc, MPS_USER, "%s: req %p %d rpl %p %d\n", __func__,
cmd->req, cmd->req_len, cmd->rpl, cmd->rpl_len);
- if (cmd->req_len > (int)sc->facts->IOCRequestFrameSize * 4) {
+ if (cmd->req_len > (int)sc->reqframesz) {
err = EINVAL;
goto RetFreeUnlocked;
}
@@ -821,7 +821,7 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data)
if (err != 0)
goto RetFreeUnlocked;
- if (data->RequestSize > (int)sc->facts->IOCRequestFrameSize * 4) {
+ if (data->RequestSize > (int)sc->reqframesz) {
err = EINVAL;
goto RetFreeUnlocked;
}