1.\" 2.\" Copyright (c) 1995, 1996, 1997, 1998, 2000 3.\" Justin T. Gibbs. All rights reserved. 4.\" Copyright (c) 2002 5.\" Scott Long. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. The name of the author may not be used to endorse or promote products 16.\" derived from this software without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28.\" 29.Dd July 4, 2004 30.Dt AHD 4 31.Os 32.Sh NAME 33.Nm ahd 34.Nd Adaptec PCI/PCI-X Ultra320 SCSI host adapter driver 35.Sh SYNOPSIS 36To compile this driver into the kernel, 37place the following lines in your 38kernel configuration file: 39.Bd -ragged -offset indent 40.Cd "device pci" 41.Cd "device scbus" 42.Cd "device ahd" 43.Pp 44To compile in debugging code: 45.Cd options AHD_DEBUG 46.Cd options AHD_DEBUG_OPTS=<bitmask of options> 47.Cd options AHD_REG_PRETTY_PRINT 48.Ed 49.Pp 50Alternatively, to load the driver as a 51module at boot time, place the following line in 52.Xr loader.conf 5 : 53.Bd -literal -offset indent 54ahd_load="YES" 55.Ed 56.Sh DESCRIPTION 57This driver provides access to the 58.Tn SCSI 59bus(es) connected to Adaptec 60.Tn AIC79xx 61host adapter chips. 62.Pp 63Driver features include support for narrow and wide busses, 64fast, ultra, ultra2, ultra160, and ultra320 synchronous transfers, 65packetized transfers, tagged queueing, 512 SCB's, and target mode. 66.Pp 67The 68.Dv AHD_DEBUG_OPTS 69option is used to control which diagnostic messages are printed to the 70console when 71.Dv AHD_DEBUG 72is enabled. 73Logically OR the following bits together: 74.Bl -column -offset indent Value Function 75.Em "Value Function" 760x0001 Show miscellaneous information 770x0002 Show sense data 780x0004 Show Serial EEPROM contents 790x0008 Show bus termination settings 800x0010 Show host memory usage 810x0020 Show SCSI protocol messages 820x0040 Show mode pointer of the chip register window 830x0080 Show selection timeouts 840x0100 Show FIFO usage messages 850x0200 Show Queue Full status 860x0400 Show SCB queue status 870x0800 Show inbound packet information 880x1000 Show S/G list information 890x2000 Enable extra diagnostic code in the firmware 90.El 91.Pp 92The 93.Dv AHD_REG_PRETTY_PRINT 94option compiles in support for human-readable bit definitions for each register 95that is printed by the debugging code. 96However, it also bloats the compiled 97size of the driver by approximately 215KB. 98.Pp 99Per target configuration performed in the 100.Tn SCSI-Select 101menu, accessible at boot, 102is honored by this driver. 103This includes synchronous/asynchronous transfers, 104maximum synchronous negotiation rate, 105wide transfers, 106disconnection, 107and the host adapter's 108.Tn SCSI 109ID. 110.El 111.Ed 112.Sh CONFIGURATION OPTIONS 113To statically configure one or more controllers to assume the target role: 114.Pp 115.Cd options AHD_TMODE_ENABLE <bitmask of units> 116.Bd -ragged -offset indent 117The value assigned to this option should be a bitmap of all units where target 118mode is desired. For example, a value of 0x25, would enable target mode on 119units 0, 2, and 5. A value of 0x8a enables it for units 1, 3, and 7. 120.Pp 121Note that controllers can be dynamically configured through a device hint 122documented below. 123 124.Sh BOOT OPTIONS 125The following options are switchable by setting values in 126.Pa /boot/device.hints . 127.Pp 128They are: 129.Bl -tag -width indent 130.It Va hint.ahd. Ns Ar N Ns Va .tmode_enable 131A hint to define whether the SCSI target mode is enabled (0 -- disabled, 1 -- enabled). 132.El 133.Ed 134.Sh HARDWARE 135The 136.Nm 137driver supports the following: 138.Pp 139.Bl -bullet -compact 140.It 141Adaptec 142.Tn AIC7901 143host adapter chip 144.It 145Adaptec 146.Tn AIC7901A 147host adapter chip 148.It 149Adaptec 150.Tn AIC7902 151host adapter chip 152.It 153Adaptec 154.Tn 29320 155host adapter 156.It 157Adaptec 158.Tn 39320 159host adapter 160.It 161Many motherboards with on-board 162.Tn SCSI 163support 164.El 165.Sh SEE ALSO 166.Xr ahc 4 , 167.Xr cd 4 , 168.Xr da 4 , 169.Xr sa 4 , 170.Xr scsi 4 171.Sh HISTORY 172The 173.Nm 174driver first appeared in 175.Fx 4.7 . 176.Sh AUTHORS 177The 178.Nm 179driver, the 180.Tn AIC7xxx 181sequencer-code assembler, 182and the firmware running on the aic79xx chips was written by 183.An Justin T. Gibbs . 184This manual page is based on the 185.Xr ahc 4 186manual page. 187.Sh BUGS 188The current generation of 79xx chips do not support target mode in Ultra320 189mode. 190Target mode in general has not been well tested in this driver. 191