xref: /freebsd/share/man/man4/ahd.4 (revision a4128aad8503277614f2d214011ef60a19447b83)
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.Sh CONFIGURATION OPTIONS
111To statically configure one or more controllers to assume the target role:
112.Pp
113.Cd options AHD_TMODE_ENABLE <bitmask of units>
114.Bd -ragged -offset indent
115The value assigned to this option should be a bitmap of all units where target
116mode is desired. For example, a value of 0x25, would enable target mode on
117units 0, 2, and 5. A value of 0x8a enables it for units 1, 3, and 7.
118.Pp
119Note that controllers can be dynamically configured through a device hint
120documented below.
121
122.Ed
123.Sh BOOT OPTIONS
124The following options are switchable by setting values in
125.Pa /boot/device.hints .
126.Pp
127They are:
128.Bl -tag -width indent
129.It Va hint.ahd. Ns Ar N Ns Va .tmode_enable
130A hint to define whether the SCSI target mode is enabled (0 -- disabled, 1 -- enabled).
131.El
132.Sh HARDWARE
133The
134.Nm
135driver supports the following:
136.Pp
137.Bl -bullet -compact
138.It
139Adaptec
140.Tn AIC7901
141host adapter chip
142.It
143Adaptec
144.Tn AIC7901A
145host adapter chip
146.It
147Adaptec
148.Tn AIC7902
149host adapter chip
150.It
151Adaptec
152.Tn 29320
153host adapter
154.It
155Adaptec
156.Tn 39320
157host adapter
158.It
159Many motherboards with on-board
160.Tn SCSI
161support
162.El
163.Sh SEE ALSO
164.Xr ahc 4 ,
165.Xr cd 4 ,
166.Xr da 4 ,
167.Xr sa 4 ,
168.Xr scsi 4
169.Sh HISTORY
170The
171.Nm
172driver first appeared in
173.Fx 4.7 .
174.Sh AUTHORS
175The
176.Nm
177driver, the
178.Tn AIC7xxx
179sequencer-code assembler,
180and the firmware running on the aic79xx chips was written by
181.An Justin T. Gibbs .
182This manual page is based on the
183.Xr ahc 4
184manual page.
185.Sh BUGS
186The current generation of 79xx chips do not support target mode in Ultra320
187mode.
188Target mode in general has not been well tested in this driver.
189