diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2018-03-14 21:11:41 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2018-03-14 21:11:41 +0000 |
| commit | f287c3e4d332919117611581381d81fe1539909f (patch) | |
| tree | 73bd2a5120234cb62fec60730359188ec4978eac /sys/dev/aacraid | |
| parent | eee6300f1aad4cec495e20b734b5c2b7f468e944 (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 920dbc6df930..192556440fda 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> @@ -3381,7 +3384,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; |
