AHD(4)
π AHD(4) β Kernel Interfaces Manual π
okay so bestie, gather round, because we're talking about ahd(4) β the Adaptec PCI/PCI-X Ultra320 SCSI host adapter driver. yes it's a mouthful. no you don't have to memorise it. let's go β¨
πΈ NAME πΈ
ahd β the Adaptec PCI/PCI-X Ultra320 SCSI host adapter driver. that's it, that's the name, she's iconic π
π¦ SYNOPSIS π¦
so like, if you wanna compile this driver into the kernel, you drop these lines into your kernel configuration file:
device pci
device scbus
device ahd
and if you're feeling extra and want the debugging code compiled in too:
options AHD_DEBUG
options AHD_DEBUG_OPTS=<bitmask of options>
options AHD_REG_PRETTY_PRINT
OR β and this is the low-effort slay route β you can just load the driver as a module at boot time by putting this line in loader.conf(5):
ahd_load="YES"
main character energy honestly π«Ά
π DESCRIPTION π
This driver gives you access to the SCSI bus(es) that are connected to Adaptec AIC79xx host adapter chips. literally its whole job π
Driver features include support for:
- narrow and wide busses
- fast, ultra, ultra2, ultra160, and ultra320 synchronous transfers
- packetized transfers
- tagged queueing
- 512 SCB's
- target mode
so many features. she's booked and busy π₯
π§ the AHD_DEBUG_OPTS situation
The AHD_DEBUG_OPTS option is what controls which diagnostic messages get printed to the console when AHD_DEBUG is enabled. to pick your messages, logically OR the following bits together:
0x0001β Show miscellaneous information0x0002β Show sense data0x0004β Show Serial EEPROM contents0x0008β Show bus termination settings0x0010β Show host memory usage0x0020β Show SCSI protocol messages0x0040β Show mode pointer of the chip register window0x0080β Show selection timeouts0x0100β Show FIFO usage messages0x0200β Show Queue Full status0x0400β Show SCB queue status0x0800β Show inbound packet information0x1000β Show S/G list information0x2000β Enable extra diagnostic code in the firmware
π the AHD_REG_PRETTY_PRINT situation
The AHD_REG_PRETTY_PRINT option compiles in support for human-readable bit definitions for each register that the debugging code prints. gorgeous, readable, a dream π
however. it also bloats the compiled size of the driver by approximately 215KB. so likeβ¦ she's pretty but she's thicc π pick your battles.
π per target configuration
Anything you set up per target in the SCSI-Select menu (accessible at boot) is honored by this driver. that includes:
- synchronous/asynchronous transfers
- maximum synchronous negotiation rate
- wide transfers
- disconnection
- the host adapter's SCSI ID
β¨ CONFIGURATION OPTIONS β¨
Wanna statically configure one or more controllers to assume the target role? okay bestie:
options AHD_TMODE_ENABLE <bitmask of units>
The value you assign to this option should be a bitmap of all units where you want target mode. for example:
- a value of
0x25would enable target mode on units 0, 2, and 5 - a value of
0x8aenables it for units 1, 3, and 7
ngl the note here is important: controllers can also be dynamically configured through a device hint, which is documented below π
π BOOT OPTIONS π
The following options are switchable by setting values in /boot/device.hints.
They are:
hint.ahd.N.tmode_enableβ a hint to define whether the SCSI target mode is enabled (0β disabled,1β enabled).
that's the whole list, she's short and sweet π
π₯ HARDWARE π₯
The ahd driver supports the following PCI/PCI-X parallel SCSI controllers:
- Adaptec AIC7901 host adapter chip
- Adaptec AIC7901A host adapter chip
- Adaptec AIC7902 host adapter chip
- Adaptec 29320 host adapter
- Adaptec 39320 host adapter
- Many motherboards with on-board SCSI support
if you own one of these, congrats, you're in the club π
π SEE ALSO π
ahc(4), cd(4), da(4), sa(4), scsi(4)
go read those too, iykyk π
π¦ HISTORY π¦
The ahd driver first appeared in FreeBSD 4.7. vintage. she's got lore π
π AUTHORS π
The ahd driver, the AIC7xxx sequencer-code assembler, and the firmware running on the aic79xx chips was written by Justin T. Gibbs. legend behavior fr fr π
This manual page is based on the ahc(4) manual page. giving credit where credit is due π
π BUGS π
okay so, the serious stuff, no jokes here:
- The current generation of 79xx chips do not support target mode in Ultra320 mode.
- Target mode in general has not been well tested in this driver.
so if you're relying on target mode, bestie, be careful β it's not a well-tested path π
and that's the whole page!! mwah π this was the AHD(4) page from the Kernel Interfaces Manual, and it's stamped Debian, dated September 29, 2025. go forth and SCSI responsibly π¦β¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1995, 1996, 1997, 1998, 2000 Justin T. Gibbs. All rights reserved
- Copyright (c) 2002 Scott Long. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms