155131267SScott Long.\" 255131267SScott Long.\" Copyright (c) 1995, 1996, 1997, 1998, 2000 355131267SScott Long.\" Justin T. Gibbs. All rights reserved. 455131267SScott Long.\" Copyright (c) 2002 555131267SScott Long.\" Scott Long. All rights reserved. 655131267SScott Long.\" 755131267SScott Long.\" Redistribution and use in source and binary forms, with or without 855131267SScott Long.\" modification, are permitted provided that the following conditions 955131267SScott Long.\" are met: 1055131267SScott Long.\" 1. Redistributions of source code must retain the above copyright 1155131267SScott Long.\" notice, this list of conditions and the following disclaimer. 1255131267SScott Long.\" 2. Redistributions in binary form must reproduce the above copyright 1355131267SScott Long.\" notice, this list of conditions and the following disclaimer in the 1455131267SScott Long.\" documentation and/or other materials provided with the distribution. 1555131267SScott Long.\" 3. The name of the author may not be used to endorse or promote products 1655131267SScott Long.\" derived from this software without specific prior written permission. 1755131267SScott Long.\" 1855131267SScott Long.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1955131267SScott Long.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2055131267SScott Long.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2155131267SScott Long.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2255131267SScott Long.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2355131267SScott Long.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2455131267SScott Long.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2555131267SScott Long.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2655131267SScott Long.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2755131267SScott Long.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2855131267SScott Long.\" 2955131267SScott Long.\" $FreeBSD$ 3055131267SScott Long.\" 3169f9d7b1SSimon L. B. Nielsen.Dd July 4, 2004 3255131267SScott Long.Dt AHD 4 3355131267SScott Long.Os 3455131267SScott Long.Sh NAME 3555131267SScott Long.Nm ahd 3655131267SScott Long.Nd Adaptec PCI/PCI-X Ultra320 SCSI host adapter driver 3755131267SScott Long.Sh SYNOPSIS 3855131267SScott LongFor one or more PCI/PCI-X cards: 39a2931c09SRuslan Ermilov.Bd -ragged -offset indent -compact 4055131267SScott Long.Cd device pci 415bd24c43SScott Long.Cd device ahd 42a2931c09SRuslan Ermilov.Ed 4355131267SScott Long.Pp 44a2931c09SRuslan ErmilovTo compile in debugging code: 45a2931c09SRuslan Ermilov.Bd -ragged -offset indent -compact 4655131267SScott Long.Cd options AHD_DEBUG 475bd24c43SScott Long.Cd options AHD_DEBUG_OPTS=<bitmask of options> 4855131267SScott Long.Cd options AHD_REG_PRETTY_PRINT 49a2931c09SRuslan Ermilov.Ed 5055131267SScott Long.Pp 5155131267SScott LongTo configure one or more controllers to assume the target role: 52a2931c09SRuslan Ermilov.Bd -ragged -offset indent -compact 535bd24c43SScott Long.Cd options AHD_TMODE_ENABLE=<bitmask of units> 54a2931c09SRuslan Ermilov.Ed 5555131267SScott Long.Pp 56a2931c09SRuslan ErmilovFor one or more 57a2931c09SRuslan Ermilov.Tn SCSI 58a2931c09SRuslan Ermilovbusses: 59a2931c09SRuslan Ermilov.Bd -ragged -offset indent -compact 6055131267SScott Long.Cd device scbus 61a2931c09SRuslan Ermilov.Ed 6255131267SScott Long.Sh DESCRIPTION 6355131267SScott LongThis driver provides access to the 6455131267SScott Long.Tn SCSI 6555131267SScott Longbus(es) connected to Adaptec 6669f9d7b1SSimon L. B. Nielsen.Tn AIC79xx 6755131267SScott Longhost adapter chips. 6855131267SScott Long.Pp 6955131267SScott LongDriver features include support for narrow and wide busses, 7055131267SScott Longfast, ultra, ultra2, ultra160, and ultra320 synchronous transfers, 7155131267SScott Longpacketized transfers, tagged queueing, 512 SCB's, and target mode. 7255131267SScott Long.Pp 7355131267SScott LongThe 74a2931c09SRuslan Ermilov.Dv AHD_DEBUG_OPTS 7555131267SScott Longoption is used to control which diagnostic messages are printed to the 7655131267SScott Longconsole when 77a2931c09SRuslan Ermilov.Dv AHD_DEBUG 78a2931c09SRuslan Ermilovis enabled. 79a2931c09SRuslan ErmilovLogically OR the following bits together: 80a2931c09SRuslan Ermilov.Bl -column -offset indent Value Function 8155131267SScott Long.Em "Value Function" 8257bd0fc6SJens Schweikhardt0x0001 Show miscellaneous information 8355131267SScott Long0x0002 Show sense data 8455131267SScott Long0x0004 Show Serial EEPROM contents 8555131267SScott Long0x0008 Show bus termination settings 8655131267SScott Long0x0010 Show host memory usage 8755131267SScott Long0x0020 Show SCSI protocol messages 8855131267SScott Long0x0040 Show mode pointer of the chip register window 8955131267SScott Long0x0080 Show selection timeouts 9055131267SScott Long0x0100 Show FIFO usage messages 9155131267SScott Long0x0200 Show Queue Full status 9255131267SScott Long0x0400 Show SCB queue status 9355131267SScott Long0x0800 Show inbound packet information 9455131267SScott Long0x1000 Show S/G list information 9555131267SScott Long0x2000 Enable extra diagnostic code in the firmware 9655131267SScott Long.El 9755131267SScott Long.Pp 9855131267SScott LongThe 99a2931c09SRuslan Ermilov.Dv AHD_REG_PRETTY_PRINT 10055131267SScott Longoption compiles in support for human-readable bit definitions for each register 101a2931c09SRuslan Ermilovthat is printed by the debugging code. 102a2931c09SRuslan ErmilovHowever, it also bloats the compiled 10355131267SScott Longsize of the driver by approximately 215KB. 10455131267SScott Long.Pp 10555131267SScott LongIndividual controllers may be configured to operate in the target role 10655131267SScott Longthrough the 107a2931c09SRuslan Ermilov.Dv AHD_TMODE_ENABLE 108a2931c09SRuslan Ermilovconfiguration option. 109a2931c09SRuslan ErmilovThe value assigned to this option should be a bitmap 11055131267SScott Longof all units where target mode is desired. 111a2931c09SRuslan ErmilovFor example, a value of 0x25 would enable target mode on units 0, 2, and 5. 11257bd0fc6SJens SchweikhardtNote that target mode is only supported for ultra160 speeds and below. 11355131267SScott Long.Pp 11455131267SScott LongPer target configuration performed in the 11555131267SScott Long.Tn SCSI-Select 11655131267SScott Longmenu, accessible at boot, 11755131267SScott Longis honored by this driver. 11855131267SScott LongThis includes synchronous/asynchronous transfers, 11955131267SScott Longmaximum synchronous negotiation rate, 12055131267SScott Longwide transfers, 12155131267SScott Longdisconnection, 122a2931c09SRuslan Ermilovand the host adapter's 123a2931c09SRuslan Ermilov.Tn SCSI 124a2931c09SRuslan ErmilovID. 12569f9d7b1SSimon L. B. Nielsen.Sh HARDWARE 12669f9d7b1SSimon L. B. NielsenThe 12769f9d7b1SSimon L. B. Nielsen.Nm 12869f9d7b1SSimon L. B. Nielsendriver supports the following: 12969f9d7b1SSimon L. B. Nielsen.Pp 13069f9d7b1SSimon L. B. Nielsen.Bl -bullet -compact 13169f9d7b1SSimon L. B. Nielsen.It 13269f9d7b1SSimon L. B. NielsenAdaptec 13369f9d7b1SSimon L. B. Nielsen.Tn AIC7901 13469f9d7b1SSimon L. B. Nielsenhost adapter chip 13569f9d7b1SSimon L. B. Nielsen.It 13669f9d7b1SSimon L. B. NielsenAdaptec 13769f9d7b1SSimon L. B. Nielsen.Tn AIC7901A 13869f9d7b1SSimon L. B. Nielsenhost adapter chip 13969f9d7b1SSimon L. B. Nielsen.It 14069f9d7b1SSimon L. B. NielsenAdaptec 14169f9d7b1SSimon L. B. Nielsen.Tn AIC7902 14269f9d7b1SSimon L. B. Nielsenhost adapter chip 14369f9d7b1SSimon L. B. Nielsen.It 14469f9d7b1SSimon L. B. NielsenAdaptec 14569f9d7b1SSimon L. B. Nielsen.Tn 29320 14669f9d7b1SSimon L. B. Nielsenhost adapter 14769f9d7b1SSimon L. B. Nielsen.It 14869f9d7b1SSimon L. B. NielsenAdaptec 14969f9d7b1SSimon L. B. Nielsen.Tn 39320 15069f9d7b1SSimon L. B. Nielsenhost adapter 15169f9d7b1SSimon L. B. Nielsen.It 15269f9d7b1SSimon L. B. NielsenMany motherboards with on-board 15369f9d7b1SSimon L. B. Nielsen.Tn SCSI 15469f9d7b1SSimon L. B. Nielsensupport 15569f9d7b1SSimon L. B. Nielsen.El 1565bd24c43SScott Long.Sh BUGS 1575bd24c43SScott LongThe current generation of 79xx chips do not support target mode in Ultra320 1585bd24c43SScott Longmode. 1595bd24c43SScott LongTarget mode in general has not been well tested in this driver. 16055131267SScott Long.Sh SEE ALSO 16155131267SScott Long.Xr ahc 4 , 16255131267SScott Long.Xr cd 4 , 16355131267SScott Long.Xr da 4 , 16455131267SScott Long.Xr sa 4 , 16555131267SScott Long.Xr scsi 4 16655131267SScott Long.Sh AUTHORS 16755131267SScott LongThe 16855131267SScott Long.Nm 16955131267SScott Longdriver, the 17055131267SScott Long.Tn AIC7xxx 17155131267SScott Longsequencer-code assembler, 17255131267SScott Longand the firmware running on the aic79xx chips was written by 17355131267SScott Long.An Justin T. Gibbs . 17455131267SScott LongThis manual page is based on the 17555131267SScott Long.Xr ahc 4 17655131267SScott Longmanual page. 17755131267SScott Long.Sh HISTORY 17855131267SScott LongThe 17955131267SScott Long.Nm 18055131267SScott Longdriver first appeared in 18155131267SScott Long.Fx 4.7 . 182