diff options
author | HP van Braam <hp@tmm.cx> | 2024-05-04 14:40:15 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2024-05-04 14:40:38 +0000 |
commit | 6279646f47d3f6b916d1c9272f9db39134783ab4 (patch) | |
tree | 0420cc8bdb7706409fd5894a67b506de632ec5f8 /share | |
parent | 34db47a9dbc76c09019e2bfa37d23e28e477a506 (diff) | |
download | src-6279646f47d3f6b916d1c9272f9db39134783ab4.tar.gz src-6279646f47d3f6b916d1c9272f9db39134783ab4.zip |
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
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man4/ahc.4 | 68 | ||||
-rw-r--r-- | share/man/man4/ahd.4 | 36 |
2 files changed, 63 insertions, 41 deletions
diff --git a/share/man/man4/ahc.4 b/share/man/man4/ahc.4 index a666885f8f4a..7d5e092089bb 100644 --- a/share/man/man4/ahc.4 +++ b/share/man/man4/ahc.4 @@ -40,12 +40,6 @@ kernel configuration file: .Pp For one or more PCI cards: .Cd "device pci" -.Pp -To allow PCI adapters to use memory mapped I/O if enabled: -.Cd options AHC_ALLOW_MEMIO -.Pp -To configure one or more controllers to assume the target role: -.Cd options AHC_TMODE_ENABLE <bitmask of units> .Ed .Pp Alternatively, to load the driver as a @@ -66,29 +60,6 @@ Driver features include support for twin and wide busses, fast, ultra or ultra2 synchronous transfers depending on controller type, tagged queueing, SCB paging, and target mode. .Pp -Memory mapped I/O can be enabled for PCI devices with the -.Dq Dv AHC_ALLOW_MEMIO -configuration option. -Memory mapped I/O is more efficient than the alternative, programmed I/O. -Most PCI BIOSes will map devices so that either technique for communicating -with the card is available. -In some cases, -usually when the PCI device is sitting behind a PCI->PCI bridge, -the BIOS may fail to properly initialize the chip for memory mapped I/O. -The typical symptom of this problem is a system hang if memory mapped I/O -is attempted. -Most modern motherboards perform the initialization correctly and work fine -with this option enabled. -.Pp -Individual controllers may be configured to operate in the target role -through the -.Dq Dv AHC_TMODE_ENABLE -configuration option. -The value assigned to this option should be a bitmap -of all units where target mode is desired. -For example, a value of 0x25, would enable target mode on units 0, 2, and 5. -A value of 0x8a enables it for units 1, 3, and 7. -.Pp Per target configuration performed in the .Tn SCSI-Select menu, accessible at boot @@ -156,6 +127,45 @@ Multiple Target IDs - Allows the controller to respond to selection as a target on multiple SCSI IDs. .El .Ed +.Sh CONFIGURATION OPTIONS +.Pp +To allow PCI adapters to use memory mapped I/O if enabled: +.Pp +.Cd options AHC_ALLOW_MEMIO +.Bd -ragged -offset indent +Memory mapped I/O is more efficient than the alternative, programmed I/O. +Most PCI BIOSes will map devices so that either technique for communicating +with the card is available. In some cases, usually when the PCI device is +sitting behind a PCI->PCI bridge, the BIOS may fail to properly initialize +the chip for memory mapped I/O. The typical symptom of this problem is a +system hang if memory mapped I/O is attempted. +.Pp +Most modern motherboards perform the initialization correctly and work fine +with this option enabled. +.Ed +.Pp +To statically configure one or more controllers to assume the target role: +.Pp +.Cd options AHC_TMODE_ENABLE <bitmask of units> +.Bd -ragged -offset indent +The value assigned to this option should be a bitmap of all units where target +mode is desired. For example, a value of 0x25, would enable target mode on +units 0, 2, and 5. A value of 0x8a enables it for units 1, 3, and 7. +.Pp +Note that controllers can be dynamically configured through a device hint +documented below. +.El +.Ed +.Sh BOOT OPTIONS +The following options are switchable by setting values in +.Pa /boot/device.hints . +.Pp +They are: +.Bl -tag -width indent +.It Va hint.ahc. Ns Ar N Ns Va .tmode_enable +A hint to define whether the SCSI target mode is enabled (0 -- disabled, 1 -- enabled). +.El +.Ed .Sh HARDWARE The .Nm diff --git a/share/man/man4/ahd.4 b/share/man/man4/ahd.4 index cf04863ce1c8..e7f9b73f085a 100644 --- a/share/man/man4/ahd.4 +++ b/share/man/man4/ahd.4 @@ -45,9 +45,6 @@ To compile in debugging code: .Cd options AHD_DEBUG .Cd options AHD_DEBUG_OPTS=<bitmask of options> .Cd options AHD_REG_PRETTY_PRINT -.Pp -To configure one or more controllers to assume the target role: -.Cd options AHD_TMODE_ENABLE=<bitmask of units> .Ed .Pp Alternatively, to load the driver as a @@ -99,15 +96,6 @@ that is printed by the debugging code. However, it also bloats the compiled size of the driver by approximately 215KB. .Pp -Individual controllers may be configured to operate in the target role -through the -.Dv AHD_TMODE_ENABLE -configuration option. -The value assigned to this option should be a bitmap -of all units where target mode is desired. -For example, a value of 0x25 would enable target mode on units 0, 2, and 5. -Note that target mode is only supported for ultra160 speeds and below. -.Pp Per target configuration performed in the .Tn SCSI-Select menu, accessible at boot, @@ -119,6 +107,30 @@ disconnection, and the host adapter's .Tn SCSI ID. +.El +.Ed +.Sh CONFIGURATION OPTIONS +To statically configure one or more controllers to assume the target role: +.Pp +.Cd options AHD_TMODE_ENABLE <bitmask of units> +.Bd -ragged -offset indent +The value assigned to this option should be a bitmap of all units where target +mode is desired. For example, a value of 0x25, would enable target mode on +units 0, 2, and 5. A value of 0x8a enables it for units 1, 3, and 7. +.Pp +Note that controllers can be dynamically configured through a device hint +documented below. + +.Sh BOOT OPTIONS +The following options are switchable by setting values in +.Pa /boot/device.hints . +.Pp +They are: +.Bl -tag -width indent +.It Va hint.ahd. Ns Ar N Ns Va .tmode_enable +A hint to define whether the SCSI target mode is enabled (0 -- disabled, 1 -- enabled). +.El +.Ed .Sh HARDWARE The .Nm |