xref: /freebsd/share/man/man4/ahd.4 (revision d21e322d563e0fd1f92c22205c2ced4bcd22dc23)
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.\"
2969f9d7b1SSimon L. B. Nielsen.Dd July 4, 2004
3055131267SScott Long.Dt AHD 4
3155131267SScott Long.Os
3255131267SScott Long.Sh NAME
3355131267SScott Long.Nm ahd
3455131267SScott Long.Nd Adaptec PCI/PCI-X Ultra320 SCSI host adapter driver
3555131267SScott Long.Sh SYNOPSIS
362d431ba6SChristian BruefferTo compile this driver into the kernel,
372d431ba6SChristian Bruefferplace the following lines in your
382d431ba6SChristian Bruefferkernel configuration file:
392d431ba6SChristian Brueffer.Bd -ragged -offset indent
402d431ba6SChristian Brueffer.Cd "device pci"
412d431ba6SChristian Brueffer.Cd "device scbus"
422d431ba6SChristian Brueffer.Cd "device ahd"
4355131267SScott Long.Pp
44a2931c09SRuslan ErmilovTo compile in debugging code:
4555131267SScott Long.Cd options AHD_DEBUG
465bd24c43SScott Long.Cd options AHD_DEBUG_OPTS=<bitmask of options>
4755131267SScott Long.Cd options AHD_REG_PRETTY_PRINT
48a2931c09SRuslan Ermilov.Ed
4955131267SScott Long.Pp
502d431ba6SChristian BruefferAlternatively, to load the driver as a
512d431ba6SChristian Brueffermodule at boot time, place the following line in
522d431ba6SChristian Brueffer.Xr loader.conf 5 :
532d431ba6SChristian Brueffer.Bd -literal -offset indent
542d431ba6SChristian Bruefferahd_load="YES"
55a2931c09SRuslan Ermilov.Ed
5655131267SScott Long.Sh DESCRIPTION
5755131267SScott LongThis driver provides access to the
5855131267SScott Long.Tn SCSI
5955131267SScott Longbus(es) connected to Adaptec
6069f9d7b1SSimon L. B. Nielsen.Tn AIC79xx
6155131267SScott Longhost adapter chips.
6255131267SScott Long.Pp
6355131267SScott LongDriver features include support for narrow and wide busses,
6455131267SScott Longfast, ultra, ultra2, ultra160, and ultra320 synchronous transfers,
6555131267SScott Longpacketized transfers, tagged queueing, 512 SCB's, and target mode.
6655131267SScott Long.Pp
6755131267SScott LongThe
68a2931c09SRuslan Ermilov.Dv AHD_DEBUG_OPTS
6955131267SScott Longoption is used to control which diagnostic messages are printed to the
7055131267SScott Longconsole when
71a2931c09SRuslan Ermilov.Dv AHD_DEBUG
72a2931c09SRuslan Ermilovis enabled.
73a2931c09SRuslan ErmilovLogically OR the following bits together:
74a2931c09SRuslan Ermilov.Bl -column -offset indent Value Function
7555131267SScott Long.Em "Value	Function"
7657bd0fc6SJens Schweikhardt0x0001	Show miscellaneous information
7755131267SScott Long0x0002	Show sense data
7855131267SScott Long0x0004	Show Serial EEPROM contents
7955131267SScott Long0x0008	Show bus termination settings
8055131267SScott Long0x0010	Show host memory usage
8155131267SScott Long0x0020	Show SCSI protocol messages
8255131267SScott Long0x0040	Show mode pointer of the chip register window
8355131267SScott Long0x0080	Show selection timeouts
8455131267SScott Long0x0100	Show FIFO usage messages
8555131267SScott Long0x0200	Show Queue Full status
8655131267SScott Long0x0400	Show SCB queue status
8755131267SScott Long0x0800	Show inbound packet information
8855131267SScott Long0x1000	Show S/G list information
8955131267SScott Long0x2000	Enable extra diagnostic code in the firmware
9055131267SScott Long.El
9155131267SScott Long.Pp
9255131267SScott LongThe
93a2931c09SRuslan Ermilov.Dv AHD_REG_PRETTY_PRINT
9455131267SScott Longoption compiles in support for human-readable bit definitions for each register
95a2931c09SRuslan Ermilovthat is printed by the debugging code.
96a2931c09SRuslan ErmilovHowever, it also bloats the compiled
9755131267SScott Longsize of the driver by approximately 215KB.
9855131267SScott Long.Pp
9955131267SScott LongPer target configuration performed in the
10055131267SScott Long.Tn SCSI-Select
10155131267SScott Longmenu, accessible at boot,
10255131267SScott Longis honored by this driver.
10355131267SScott LongThis includes synchronous/asynchronous transfers,
10455131267SScott Longmaximum synchronous negotiation rate,
10555131267SScott Longwide transfers,
10655131267SScott Longdisconnection,
107a2931c09SRuslan Ermilovand the host adapter's
108a2931c09SRuslan Ermilov.Tn SCSI
109a2931c09SRuslan ErmilovID.
1106279646fSHP van Braam.Sh CONFIGURATION OPTIONS
1116279646fSHP van BraamTo statically configure one or more controllers to assume the target role:
1126279646fSHP van Braam.Pp
1136279646fSHP van Braam.Cd options AHD_TMODE_ENABLE <bitmask of units>
1146279646fSHP van Braam.Bd -ragged -offset indent
1156279646fSHP van BraamThe value assigned to this option should be a bitmap of all units where target
1166279646fSHP van Braammode is desired. For example, a value of 0x25, would enable target mode on
1176279646fSHP van Braamunits 0, 2, and 5. A value of 0x8a enables it for units 1, 3, and 7.
1186279646fSHP van Braam.Pp
1196279646fSHP van BraamNote that controllers can be dynamically configured through a device hint
1206279646fSHP van Braamdocumented below.
1216279646fSHP van Braam
122*d21e322dSGraham Percival.Ed
1236279646fSHP van Braam.Sh BOOT OPTIONS
1246279646fSHP van BraamThe following options are switchable by setting values in
1256279646fSHP van Braam.Pa /boot/device.hints .
1266279646fSHP van Braam.Pp
1276279646fSHP van BraamThey are:
1286279646fSHP van Braam.Bl -tag -width indent
1296279646fSHP van Braam.It Va hint.ahd. Ns Ar N Ns Va .tmode_enable
1306279646fSHP van BraamA hint to define whether the SCSI target mode is enabled (0 -- disabled, 1 -- enabled).
1316279646fSHP van Braam.El
13269f9d7b1SSimon L. B. Nielsen.Sh HARDWARE
13369f9d7b1SSimon L. B. NielsenThe
13469f9d7b1SSimon L. B. Nielsen.Nm
13569f9d7b1SSimon L. B. Nielsendriver supports the following:
13669f9d7b1SSimon L. B. Nielsen.Pp
13769f9d7b1SSimon L. B. Nielsen.Bl -bullet -compact
13869f9d7b1SSimon L. B. Nielsen.It
13969f9d7b1SSimon L. B. NielsenAdaptec
14069f9d7b1SSimon L. B. Nielsen.Tn AIC7901
14169f9d7b1SSimon L. B. Nielsenhost adapter chip
14269f9d7b1SSimon L. B. Nielsen.It
14369f9d7b1SSimon L. B. NielsenAdaptec
14469f9d7b1SSimon L. B. Nielsen.Tn AIC7901A
14569f9d7b1SSimon L. B. Nielsenhost adapter chip
14669f9d7b1SSimon L. B. Nielsen.It
14769f9d7b1SSimon L. B. NielsenAdaptec
14869f9d7b1SSimon L. B. Nielsen.Tn AIC7902
14969f9d7b1SSimon L. B. Nielsenhost adapter chip
15069f9d7b1SSimon L. B. Nielsen.It
15169f9d7b1SSimon L. B. NielsenAdaptec
15269f9d7b1SSimon L. B. Nielsen.Tn 29320
15369f9d7b1SSimon L. B. Nielsenhost adapter
15469f9d7b1SSimon L. B. Nielsen.It
15569f9d7b1SSimon L. B. NielsenAdaptec
15669f9d7b1SSimon L. B. Nielsen.Tn 39320
15769f9d7b1SSimon L. B. Nielsenhost adapter
15869f9d7b1SSimon L. B. Nielsen.It
15969f9d7b1SSimon L. B. NielsenMany motherboards with on-board
16069f9d7b1SSimon L. B. Nielsen.Tn SCSI
16169f9d7b1SSimon L. B. Nielsensupport
16269f9d7b1SSimon L. B. Nielsen.El
16355131267SScott Long.Sh SEE ALSO
16455131267SScott Long.Xr ahc 4 ,
16555131267SScott Long.Xr cd 4 ,
16655131267SScott Long.Xr da 4 ,
16755131267SScott Long.Xr sa 4 ,
16855131267SScott Long.Xr scsi 4
1699cbda590SRuslan Ermilov.Sh HISTORY
1709cbda590SRuslan ErmilovThe
1719cbda590SRuslan Ermilov.Nm
1729cbda590SRuslan Ermilovdriver first appeared in
1739cbda590SRuslan Ermilov.Fx 4.7 .
17455131267SScott Long.Sh AUTHORS
17555131267SScott LongThe
17655131267SScott Long.Nm
17755131267SScott Longdriver, the
17855131267SScott Long.Tn AIC7xxx
17955131267SScott Longsequencer-code assembler,
18055131267SScott Longand the firmware running on the aic79xx chips was written by
18155131267SScott Long.An Justin T. Gibbs .
18255131267SScott LongThis manual page is based on the
18355131267SScott Long.Xr ahc 4
18455131267SScott Longmanual page.
1859cbda590SRuslan Ermilov.Sh BUGS
1869cbda590SRuslan ErmilovThe current generation of 79xx chips do not support target mode in Ultra320
1879cbda590SRuslan Ermilovmode.
1889cbda590SRuslan ErmilovTarget mode in general has not been well tested in this driver.
189