diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2018-03-27 17:51:45 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2018-03-27 17:51:45 +0000 |
| commit | 73d68d7b942279aa256dfbc442ea16322082c72d (patch) | |
| tree | 26bc23d46dd060495b1bcb6976a801005e3eccc4 /sys/dev/aacraid | |
| parent | e39f3309856ded30f5dd3eec33927db08c91d904 (diff) | |
Notes
Diffstat (limited to 'sys/dev/aacraid')
| -rw-r--r-- | sys/dev/aacraid/aacraid.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/dev/aacraid/aacraid.c b/sys/dev/aacraid/aacraid.c index 5a4854e6130b..b51a1822ec0e 100644 --- a/sys/dev/aacraid/aacraid.c +++ b/sys/dev/aacraid/aacraid.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #define AAC_DRIVERNAME "aacraid" #include "opt_aacraid.h" +#include "opt_compat.h" /* #include <stddef.h> */ #include <sys/param.h> @@ -46,7 +47,9 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/kernel.h> #include <sys/kthread.h> +#include <sys/proc.h> #include <sys/sysctl.h> +#include <sys/sysent.h> #include <sys/poll.h> #include <sys/ioccom.h> @@ -3382,7 +3385,19 @@ aac_getnext_aif(struct aac_softc *sc, caddr_t arg) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); mtx_lock(&sc->aac_io_lock); - if ((error = copyin(arg, &agf, sizeof(agf))) == 0) { +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) { + struct get_adapter_fib_ioctl32 agf32; + error = copyin(arg, &agf32, sizeof(agf32)); + if (error == 0) { + agf.AdapterFibContext = agf32.AdapterFibContext; + agf.Wait = agf32.Wait; + agf.AifFib = (caddr_t)(uintptr_t)agf32.AifFib; + } + } else +#endif + error = copyin(arg, &agf, sizeof(agf)); + if (error == 0) { for (ctx = sc->fibctx; ctx; ctx = ctx->next) { if (agf.AdapterFibContext == ctx->unique) break; |
