27a7a1add3238cf4ddb67d4e3226735cec2a0b00
[dragonfly.git] / share / man / man4 / ahd.4
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 .\" $FreeBSD: src/share/man/man4/ahd.4,v 1.6.2.1 2006/06/05 19:30:28 brueffer Exp $
30 .\" $DragonFly: src/share/man/man4/ahd.4,v 1.7 2007/09/26 20:59:44 swildner Exp $
31 .\"
32 .Dd July 7, 2007
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
39 To compile this driver into the kernel,
40 place the following lines in your
41 kernel configuration file:
42 .Bd -ragged -offset indent
43 .Cd "device pci"
44 .Cd "device scbus"
45 .Cd "device ahd"
46 .Pp
47 To compile in debugging code:
48 .Cd options AHD_DEBUG
49 .Cd options AHD_DEBUG_OPTS=<bitmask of options>
50 .Cd options AHD_REG_PRETTY_PRINT
51 .Pp
52 To configure one or more controllers to assume the target role:
53 .Cd options AHD_TMODE_ENABLE=<bitmask of units>
54 .Ed
55 .Pp
56 Alternatively, to load the driver as a
57 module at boot time, place the following line in
58 .Xr loader.conf 5 :
59 .Bd -literal -offset indent
60 ahd_load="YES"
61 .Ed
62 .Sh DESCRIPTION
63 This driver provides access to the
64 .Tn SCSI
65 bus(es) connected to Adaptec
66 .Tn AIC79xx
67 host adapter chips.
68 .Pp
69 Driver features include support for narrow and wide busses,
70 fast, ultra, ultra2, ultra160, and ultra320 synchronous transfers,
71 packetized transfers, tagged queueing, 512 SCB's, and target mode.
72 .Pp
73 The
74 .Dv AHD_DEBUG_OPTS
75 option is used to control which diagnostic messages are printed to the
76 console when
77 .Dv AHD_DEBUG
78 is enabled.
79 Logically OR the following bits together:
80 .Bl -column -offset indent ".Em Value" ".Em Function"
81 .It Em Value Ta Em Function
82 .It 0x00001 Ta Show miscellaneous information
83 .It 0x00002 Ta Show sense data
84 .\"0x00004 XXX: AHD_SHOW_RECOVERY
85 .It 0x00008 Ta Show Serial EEPROM contents
86 .It 0x00010 Ta Show bus termination settings
87 .It 0x00020 Ta Show host memory usage
88 .It 0x00040 Ta Show SCSI protocol messages
89 .It 0x00080 Ta Show mode pointer of the chip register window
90 .It 0x00100 Ta Show selection timeouts
91 .It 0x00200 Ta Show FIFO usage messages
92 .It 0x00400 Ta Show Queue Full status
93 .\"0x00800 XXX: AHD_SHOW_DV
94 .\"0x01000 XXX: AHD_SHOW_MASKED_ERRORS
95 .It 0x02000 Ta Show SCB queue status
96 .It 0x04000 Ta Show inbound packet information
97 .It 0x08000 Ta Show S/G list information
98 .\"0x10000 XXX: AHD_SHOW_INT_COALESCING
99 .It 0x20000 Ta Enable extra diagnostic code in the firmware
100 .El
101 .Pp
102 The
103 .Dv AHD_REG_PRETTY_PRINT
104 option compiles in support for human-readable bit definitions for each register
105 that is printed by the debugging code.
106 However, it also bloats the compiled
107 size of the driver by approximately 215KB.
108 .Pp
109 Individual controllers may be configured to operate in the target role
110 through the
111 .Dv AHD_TMODE_ENABLE
112 configuration option.
113 The value assigned to this option should be a bitmap
114 of all units where target mode is desired.
115 For example, a value of 0x25 would enable target mode on units 0, 2, and 5.
116 Note that target mode is only supported for ultra160 speeds and below.
117 .Pp
118 Per target configuration performed in the
119 .Tn SCSI-Select
120 menu, accessible at boot,
121 is honored by this driver.
122 This includes synchronous/asynchronous transfers,
123 maximum synchronous negotiation rate,
124 wide transfers,
125 disconnection,
126 and the host adapter's
127 .Tn SCSI
128 ID.
129 .Sh HARDWARE
130 The
131 .Nm
132 driver supports the following:
133 .Pp
134 .Bl -bullet -compact
135 .It
136 Adaptec
137 .Tn AIC7901
138 host adapter chip
139 .It
140 Adaptec
141 .Tn AIC7901A
142 host adapter chip
143 .It
144 Adaptec
145 .Tn AIC7902
146 host adapter chip
147 .It
148 Adaptec
149 .Tn 29320
150 host adapter
151 .It
152 Adaptec
153 .Tn 39320
154 host adapter
155 .It
156 Many motherboards with on-board
157 .Tn SCSI
158 support
159 .El
160 .Sh SEE ALSO
161 .Xr ahc 4 ,
162 .Xr cd 4 ,
163 .Xr da 4 ,
164 .Xr sa 4 ,
165 .Xr scsi 4
166 .Sh HISTORY
167 The
168 .Nm
169 driver first appeared in
170 .Fx 4.7 .
171 .Sh AUTHORS
172 The
173 .Nm
174 driver, the
175 .Tn AIC7xxx
176 sequencer-code assembler,
177 and the firmware running on the aic79xx chips was written by
178 .An Justin T. Gibbs .
179 This manual page is based on the
180 .Xr ahc 4
181 manual page.
182 .Sh BUGS
183 The current generation of 79xx chips do not support target mode in Ultra320
184 mode.
185 Target mode in general has not been well tested in this driver.