freebsd-skq/sys/modules/aacraid/Makefile
luporl 16433c4d9a [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

22 lines
460 B
Makefile

# $FreeBSD$
.PATH: ${SRCTOP}/sys/dev/aacraid
.if ${MACHINE_CPUARCH} == "i386"
SUBDIR= aacraid_linux
.endif
KMOD= aacraid
SRCS= aacraid.c aacraid_pci.c aacraid_cam.c
.if ${MACHINE_CPUARCH} == "powerpc"
SRCS+= aacraid_endian.c
.endif
SRCS+= opt_scsi.h opt_cam.h opt_aacraid.h
SRCS+= device_if.h bus_if.h pci_if.h
# To enable debug output from the driver, uncomment these two lines.
#CFLAGS+= -DAACRAID_DEBUG=2
#SRCS+= aacraid_debug.c
.include <bsd.kmod.mk>