freebsd-dev/sys
Leandro Lupori d8c51c6f74 [aacraid] Port driver to big-endian
Port aacraid driver to big-endian (BE) hosts.

The immediate goal of this change is to make it possible to use the
aacraid driver on PowerPC64 machines that have Adaptec Series 8 SAS
controllers.

Adapters supported by this driver expect FIB contents in little-endian
(LE) byte order. All FIBs have a fixed header part as well as a data
part that depends on the command being issued to the controller.

In this way, on BE hosts, the FIB header and all FIB data structures
used in aacraid.c and aacraid_cam.c need to be converted to LE before
being sent to the adapter and converted to BE when coming from it.

The functions to convert each struct are on aacraid_endian.c.
For little-endian (LE) targets, they are macros that expand
to nothing.
In some cases, when only a few fields of a large structure are used,
the fields are converted inline, by the code using them.

PR:		237463
Reviewed by:	jhibbits
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D23887
2020-03-05 20:04:41 +00:00
..
amd64 [aacraid] Port driver to big-endian 2020-03-05 20:04:41 +00:00
arm arm: zynq: An SPI driver for Zynq platforms 2020-02-28 10:57:23 +00:00
arm64 Mark the arm64 machdep.h as kernel only 2020-03-05 10:52:16 +00:00
bsm vfs: add realpathat syscall 2020-02-20 16:58:19 +00:00
cam All paths lead to xpt_done, so move it after the switch. 2020-03-05 06:21:00 +00:00
cddl Remove vfs.zfs.top_maxinflight tunable/sysctl. 2020-03-05 19:43:43 +00:00
compat Move compat.linux.map_sched_prio sysctl definition to linux_mib.c so it is 2020-03-05 14:41:27 +00:00
conf [aacraid] Port driver to big-endian 2020-03-05 20:04:41 +00:00
contrib Retire macros: 2020-03-02 23:25:02 +00:00
crypto Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
ddb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
dev [aacraid] Port driver to big-endian 2020-03-05 20:04:41 +00:00
dts arm: zynq: An SPI driver for Zynq platforms 2020-02-28 10:57:23 +00:00
fs nullfs: don't pre lock exclusive in nullfs_root 2020-03-04 19:52:00 +00:00
gdb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
geom Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
gnu dts: Update our copy for arm, arm64 and riscv dts to Linux 5.5 2020-02-28 15:42:51 +00:00
i386 Finish removal of bktr 2020-03-01 20:37:42 +00:00
isa sc(4) md bits: stop setting sc->kbd entirely 2019-12-30 02:07:55 +00:00
kern buffer pager: deref ucred immediately after read. 2020-03-05 15:52:34 +00:00
kgssapi
libkern Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
mips Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
modules [aacraid] Port driver to big-endian 2020-03-05 20:04:41 +00:00
net Implement optional table entry limits for if_llatbl. 2020-03-04 17:17:02 +00:00
net80211 Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
netgraph Fix spelling of "dropped". 2020-03-04 22:32:40 +00:00
netinet When using automatically generated flow labels and using TCP SYN 2020-03-04 16:41:25 +00:00
netinet6 ip6: retire in6_selectroute_fib() as promised 8 years ago 2020-03-03 13:48:12 +00:00
netipsec Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
netpfil Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
netsmb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nfs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nfsclient
nfsserver
nlm Remove stale FreeBSD_version checks. 2020-03-01 23:01:37 +00:00
ofed Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
opencrypto Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
powerpc [aacraid] Port driver to big-endian 2020-03-05 20:04:41 +00:00
riscv riscv: Add a GENERIC-NODEBUG (copied from amd64) 2020-02-27 20:26:37 +00:00
rpc Remove obsolete old-freebsd version compat shim. 2020-03-01 23:01:51 +00:00
security In r358471, we interrupted the case block that would eventually lead 2020-03-03 01:46:35 +00:00
sys Remove an #include erroneously added in r358432. 2020-03-04 22:23:24 +00:00
teken
tests Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tools vfs: stop null checking routines in vop wrappers 2020-01-26 00:41:38 +00:00
ufs fd: move vnodes out of filedesc into a dedicated structure 2020-03-01 21:53:46 +00:00
vm Introduce kern_mmap_req(). 2020-03-04 21:27:12 +00:00
x86 Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
xdr typo: s/impelmentation/implementation/. 2020-02-07 15:14:29 +00:00
xen Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (16 of many) 2020-02-25 19:04:39 +00:00
Makefile Remove sparc64 kernel support 2020-02-03 17:35:11 +00:00