aic7xxx: make target mode enable a device hint
authorHP van Braam <hp@tmm.cx>
Sat, 4 May 2024 14:40:15 +0000 (08:40 -0600)
committerWarner Losh <imp@FreeBSD.org>
Sat, 4 May 2024 14:40:38 +0000 (08:40 -0600)
commit6279646f47d3f6b916d1c9272f9db39134783ab4
tree0420cc8bdb7706409fd5894a67b506de632ec5f8
parent34db47a9dbc76c09019e2bfa37d23e28e477a506
aic7xxx: make target mode enable a device hint

Previously it was only possible to enable target mode for these drivers
by rebuilding the kernel with AHC_TMODE_ENABLE or AHD_TMODE_ENABLE and a
bitmask of which units to statically enable for target mode.

There is no space-savings in the driver by not having AHC_TMODE_ENABLE
set, so in addition to the compile time option lets also introduce some
tunables:

hint.ahc.<unit>.tmode_enable=0/1
hint.ahd.<unit>.tmode_enable=0/1

For compatibility the old behavior is retained, but it can be overridden
with tunables

Signed-off-by: HP van Braam <hp@tmm.cx>
Reviewed by: imp, mav
Pull Request: https://github.com/freebsd/freebsd-src/pull/1208
share/man/man4/ahc.4
share/man/man4/ahd.4
sys/dev/aic7xxx/aic79xx.c
sys/dev/aic7xxx/aic7xxx.c