1.\" $NetBSD: ahd.4,v 1.2 2004/12/27 14:21:22 wiz Exp $ 2.\" 3.\" Copyright (c) 1995, 1996, 1997, 1998, 2000 4.\" Justin T. Gibbs. All rights reserved. 5.\" Copyright (c) 2002 6.\" Scott Long. All rights reserved. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. The name of the author may not be used to endorse or promote products 17.\" derived from this software without specific prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29.\" 30.\" $FreeBSD: /repoman/r/ncvs/src/share/man/man4/ahd.4,v 1.5 2004/07/04 14:17:41 simon Exp $ 31.\" 32.Dd July 4, 2004 33.Dt AHD 4 34.Os 35.Sh NAME 36.Nm ahd 37.Nd Adaptec PCI/PCI-X Ultra320 SCSI host adapter driver 38.Sh SYNOPSIS 39For one or more PCI/PCI-X cards: 40.\".Bd -ragged -offset indent -compact 41.Cd "ahd* at pci? dev ? function ?" 42.Pp 43To compile in debugging code: 44.Bd -ragged -offset indent -compact 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 50.if 0 \{ 51To configure one or more controllers to assume the target role: 52.Bd -ragged -offset indent -compact 53.Cd options AHD_TMODE_ENABLE=<bitmask of units> 54.Ed 55.Pp 56\} 57.ie 0 \{ 58For one or more 59.Tn SCSI 60busses: 61.Bd -ragged -offset indent -compact 62.Cd device scbus 63.Ed 64\} 65\{For 66.Tn SCSI 67busses: 68.Cd scsibus* at ahd?\} 69.Sh DESCRIPTION 70This driver provides access to the 71.Tn SCSI 72bus(ses) connected to Adaptec 73.Tn AIC79xx 74host adapter chips. 75.Pp 76Driver features include support for narrow and wide busses, 77fast, ultra, ultra2, ultra160, and ultra320 synchronous transfers, 78packetized transfers, tagged queueing, 79.ie 0 \{ 512 SCB's, and target mode. 80\} 81\{and 512 SCBs.\} 82.Pp 83The 84.Dv AHD_DEBUG_OPTS 85option is used to control which diagnostic messages are printed to the 86console when 87.Dv AHD_DEBUG 88is enabled. 89Logically OR the following bits together: 90.Bl -column -offset indent Value Function 91.Em "Value Function" 920x0001 Show miscellaneous information 930x0002 Show sense data 940x0004 Show Serial EEPROM contents 950x0008 Show bus termination settings 960x0010 Show host memory usage 970x0020 Show SCSI protocol messages 980x0040 Show mode pointer of the chip register window 990x0080 Show selection timeouts 1000x0100 Show FIFO usage messages 1010x0200 Show Queue Full status 1020x0400 Show SCB queue status 1030x0800 Show inbound packet information 1040x1000 Show S/G list information 1050x2000 Enable extra diagnostic code in the firmware 106.El 107.Pp 108The 109.Dv AHD_REG_PRETTY_PRINT 110option compiles in support for human-readable bit definitions for each register 111that is printed by the debugging code. 112However, it also bloats the compiled 113size of the driver by approximately 215KB. 114.Pp 115.if 0 \{ 116Individual controllers may be configured to operate in the target role 117through the 118.Dv AHD_TMODE_ENABLE 119configuration option. 120The value assigned to this option should be a bitmap 121of all units where target mode is desired. 122For example, a value of 0x25 would enable target mode on units 0, 2, and 5. 123Note that target mode is only supported for ultra160 speeds and below. 124.Pp 125Per target configuration performed in the 126.Tn SCSI-Select 127menu, accessible at boot, 128is honored by this driver. 129This includes synchronous/asynchronous transfers, 130maximum synchronous negotiation rate, 131wide transfers, 132disconnection, 133and the host adapter's 134.Tn SCSI 135ID. 136\} 137.Sh HARDWARE 138The 139.Nm 140driver supports the following: 141.Pp 142.Bl -bullet -compact 143.It 144Adaptec 145.Tn AIC7901 146host adapter chip 147.It 148Adaptec 149.Tn AIC7901A 150host adapter chip 151.It 152Adaptec 153.Tn AIC7902 154host adapter chip 155.It 156Adaptec 157.Tn 29320 158host adapter 159.It 160Adaptec 161.Tn 39320 162host adapter 163.It 164Many motherboards with on-board 165.Tn SCSI 166support 167.El 168.Sh SEE ALSO 169.Xr ahc 4 , 170.Xr cd 4 , 171.Xr ch 4 , 172.\" .Xr da 4 , 173.Xr intro 4 , 174.\" .Xr sa 4 , 175.Xr scsi 4 176.Xr sd 4 , 177.Xr ses 4 , 178.Xr st 4 179.Sh HISTORY 180The 181.Nm 182driver first appeared in 183.Fx 4.7 184and 185.Nx 2.0 . 186.Sh AUTHORS 187The 188.Nm 189driver, the 190.Tn AIC7xxx 191sequencer-code assembler, 192and the firmware running on the aic79xx chips was written by 193.An Justin T. Gibbs . 194.Nx 195porting is done by Pascal Renauld, Frank van der Linden, 196Jason Thorpe, and Allen Briggs. 197This manual page is based on the 198.Xr ahc 4 199manual page. 200.if 0 \{ 201.Sh BUGS 202The current generation of 79xx chips do not support target mode in Ultra320 203mode. 204Target mode in general has not been well tested in this driver. 205\} 206