* Replace DragonFly with Dx.
[dragonfly.git] / share / man / man4 / ahc.4
1 .\"
2 .\" Copyright (c) 1995, 1996, 1997, 1998, 2000
3 .\"     Justin T. Gibbs.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. The name of the author may not be used to endorse or promote products
14 .\"    derived from this software without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 .\"
27 .\" $FreeBSD: src/share/man/man4/ahc.4,v 1.22.2.8 2002/01/21 17:38:18 scottl Exp $
28 .\" $DragonFly: src/share/man/man4/ahc.4,v 1.2 2003/06/17 04:36:58 dillon Exp $
29 .\"
30 .Dd February 13, 2000
31 .Dt AHC 4
32 .Os
33 .Sh NAME
34 .Nm ahc
35 .Nd Adaptec VL/EISA/PCI SCSI host adapter driver
36 .Sh SYNOPSIS
37 For one or more VL/EISA cards:
38 .Cd device eisa
39 .Cd device ahc
40 .Pp
41 For one or more PCI cards:
42 .Cd device pci
43 .Cd device ahc
44 .Pp
45 To allow PCI adapters to use memory mapped I/O if enabled:
46 .Cd options AHC_ALLOW_MEMIO
47 .Pp
48 To configure one or more controllers to assume the target role:
49 .Cd options AHC_TMODE_ENABLE <bitmask of units>
50 .Pp
51 For one or more SCSI busses:
52 .Cd device scbus0 at ahc0
53 .Sh DESCRIPTION
54 This driver provides access to the
55 .Tn SCSI
56 bus(es) connected to Adaptec
57 .Tn AIC7770 ,
58 .Tn AIC7850 ,
59 .Tn AIC7860 ,
60 .Tn AIC7870 ,
61 .Tn AIC7880 ,
62 .Tn AIC7890 ,
63 .Tn AIC7891 ,
64 .Tn AIC7892 ,
65 .Tn AIC7895 ,
66 .Tn AIC7896 ,
67 .Tn AIC7897
68 and
69 .Tn AIC7899
70 host adapter chips.
71 These chips are found on many motherboards as well as the following
72 Adaptec SCSI controller cards:
73 .Tn 274X(W) ,
74 .Tn 274X(T) ,
75 .Tn 284X ,
76 .Tn 2910 ,
77 .Tn 2915 ,
78 .Tn 2920 ,
79 .Tn 2930C ,
80 .Tn 2930U2 ,
81 .Tn 2940 ,
82 .Tn 2940U ,
83 .Tn 2940AU ,
84 .Tn 2940UW ,
85 .Tn 2940UW Dual ,
86 .Tn 2940UW Pro ,
87 .Tn 2940U2W ,
88 .Tn 2940U2B ,
89 .Tn 2950U2W ,
90 .Tn 2950U2B ,
91 .Tn 19160B ,
92 .Tn 29160B ,
93 .Tn 29160N ,
94 .Tn 3940 ,
95 .Tn 3940U ,
96 .Tn 3940AU ,
97 .Tn 3940UW ,
98 .Tn 3940AUW ,
99 .Tn 3940U2W ,
100 .Tn 3950U2 ,
101 .Tn 3960 ,
102 .Tn 39160 ,
103 .Tn 3985 ,
104 and
105 .Tn 4944UW .
106 .Pp
107 Driver features include support for twin and wide busses,
108 fast, ultra or ultra2 synchronous transfers depending on controller type,
109 tagged queueing, SCB paging, and target mode.
110 .Pp
111 Memory mapped I/O can be enabled for PCI devices with the
112 .Dq Dv AHC_ALLOW_MEMIO
113 configuration option.
114 Memory mapped I/O is more efficient than the alternative, programmed I/O.
115 Most PCI BIOSes will map devices so that either technique for communicating
116 with the card is available.
117 In some cases,
118 usually when the PCI device is sitting behind a PCI->PCI bridge,
119 the BIOS may fail to properly initialize the chip for memory mapped I/O.
120 The typical symptom of this problem is a system hang if memory mapped I/O
121 is attempted.
122 Most modern motherboards perform the initialization correctly and work fine
123 with this option enabled.
124 .Pp
125 Individual controllers may be configured to operate in the target role
126 through the
127 .Dq Dv AHC_TMODE_ENABLE
128 configuration option.  The value assigned to this option should be a bitmap
129 of all units where target mode is desired.
130 For example, a value of 0x25, would enable target mode on units 0, 2, and 5.
131 .Pp
132 Per target configuration performed in the
133 .Tn SCSI-Select
134 menu, accessible at boot
135 in
136 .No non- Ns Tn EISA
137 models,
138 or through an
139 .Tn EISA
140 configuration utility for
141 .Tn EISA
142 models,
143 is honored by this driver.
144 This includes synchronous/asynchronous transfers,
145 maximum synchronous negotiation rate,
146 wide transfers,
147 disconnection,
148 the host adapter's SCSI ID,
149 and,
150 in the case of
151 .Tn EISA
152 Twin Channel controllers,
153 the primary channel selection.
154 For systems that store non-volatile settings in a system specific manner
155 rather than a serial eeprom directly connected to the aic7xxx controller,
156 the
157 .Tn BIOS
158 must be enabled for the driver to access this information.
159 This restriction applies to all
160 .Tn EISA
161 and many motherboard configurations.
162 .Pp
163 Note that I/O addresses are determined automatically by the probe routines,
164 but care should be taken when using a 284x
165 .Pq Tn VESA No local bus controller
166 in an
167 .Tn EISA
168 system.  The jumpers setting the I/O area for the 284x should match the
169 .Tn EISA
170 slot into which the card is inserted to prevent conflicts with other
171 .Tn EISA
172 cards.
173 .Pp
174 Performance and feature sets vary throughout the aic7xxx product line.
175 The following table provides a comparison of the different chips supported
176 by the
177 .Nm
178 driver.  Note that wide and twin channel features, although always supported
179 by a particular chip, may be disabled in a particular motherboard or card
180 design.
181 .Pp
182 .Bd -ragged -offset indent
183 .Bl -column "aic7770 " "10 " "EISA/VL  " "10MHz " "16bit " "SCBs " Features
184 .Em "Chip       MIPS    Bus      MaxSync   MaxWidth  SCBs  Features"
185 aic7770     10    EISA/VL    10MHz     16Bit     4    1
186 aic7850     10    PCI/32     10MHz      8Bit     3
187 aic7860     10    PCI/32     20MHz      8Bit     3
188 aic7870     10    PCI/32     10MHz     16Bit    16
189 aic7880     10    PCI/32     20MHz     16Bit    16
190 aic7890     20    PCI/32     40MHz     16Bit    16        3 4 5 6 7 8
191 aic7891     20    PCI/64     40MHz     16Bit    16        3 4 5 6 7 8
192 aic7892     20    PCI/64     80MHz     16Bit    16        3 4 5 6 7 8
193 aic7895     15    PCI/32     20MHz     16Bit    16      2 3 4 5
194 aic7895C    15    PCI/32     20MHz     16Bit    16      2 3 4 5     8
195 aic7896     20    PCI/32     40MHz     16Bit    16      2 3 4 5 6 7 8
196 aic7897     20    PCI/64     40MHz     16Bit    16      2 3 4 5 6 7 8
197 aic7899     20    PCI/64     80MHz     16Bit    16      2 3 4 5 6 7 8
198 .El
199 .Pp
200 .Bl -enum -compact
201 .It
202 Multiplexed Twin Channel Device - One controller servicing two busses.
203 .It
204 Multi-function Twin Channel Device - Two controllers on one chip.
205 .It
206 Command Channel Secondary DMA Engine - Allows scatter gather list and
207 SCB prefetch.
208 .It
209 64 Byte SCB Support - SCSI CDB is embedded in the SCB to eliminate an extra DMA.
210 .It
211 Block Move Instruction Support - Doubles the speed of certain sequencer
212 operations.
213 .It
214 .Sq Bayonet
215 style Scatter Gather Engine - Improves S/G prefetch performance.
216 .It
217 Queuing Registers - Allows queueing of new transactions without pausing the
218 sequencer.
219 .It
220 Multiple Target IDs - Allows the controller to respond to selection as a
221 target on multiple SCSI IDs.
222 .El
223 .Ed
224 .Sh SCSI CONTROL BLOCKS (SCBs)
225 Every transaction sent to a device on the SCSI bus is assigned a
226 .Sq SCSI Control Block
227 (SCB).  The SCB contains all of the information required by the
228 controller to process a transaction.  The chip feature table lists
229 the number of SCBs that can be stored in on-chip memory.  All chips
230 with model numbers greater than or equal to 7870 allow for the on chip
231 SCB space to be augmented with external SRAM up to a maximum of 255 SCBs.
232 Very few Adaptec controller configurations have external SRAM.
233 .Pp
234 If external SRAM is not available, SCBs are a limited resource.
235 Using the SCBs in a straight forward manner would only allow the dirver to
236 handle as many concurrent transactions as there are physical SCBs.
237 To fully utilize the SCSI bus and the devices on it,
238 requires much more concurrency.
239 The solution to this problem is
240 .Em SCB Paging ,
241 a concept similar to memory paging.  SCB paging takes advantage of
242 the fact that devices usually disconnect from the SCSI bus for long
243 periods of time without talking to the controller.  The SCBs
244 for disconnected transactions are only of use to the controller
245 when the transfer is resumed.  When the host queues another transaction
246 for the controller to execute, the controller firmware will use a
247 free SCB if one is available.  Otherwise, the state of the most recently
248 disconnected (and therefore most likely to stay disconnected) SCB is
249 saved, via dma, to host memory, and the local SCB reused to start
250 the new transaction.  This allows the controller to queue up to
251 255 transactions regardless of the amount of SCB space.  Since the
252 local SCB space serves as a cache for disconnected transactions, the
253 more SCB space available, the less host bus traffic consumed saving
254 and restoring SCB data.
255 .Sh BUGS
256 Some Quantum drives (at least the Empire 2100 and 1080s) will not run on an
257 .Tn AIC7870
258 Rev B in synchronous mode at 10MHz.  Controllers with this problem have a
259 42 MHz clock crystal on them and run slightly above 10MHz.  This confuses
260 the drive and hangs the bus.  Setting a maximum synchronous negotiation rate
261 of 8MHz in the
262 .Tn SCSI-Select
263 utility will allow normal operation.
264 .Pp
265 Although the Ultra2 and Ultra160 products have sufficient instruction
266 ram space to support both the initiator and target roles concurrently,
267 this configuration is disabled in favor of allowing the target role
268 to respond on multiple target ids.  A method for configuring dual
269 role mode should be provided.
270 .Pp
271 Tagged Queuing is not supported in target mode.
272 .Pp
273 Reselection in target mode fails to function correctly on all high
274 voltage differential boards as shipped by Adaptec.  Information on
275 how to modify HVD board to work correctly in target mode is available
276 from Adaptec.
277 .Sh SEE ALSO
278 .Xr aha 4 ,
279 .Xr ahb 4 ,
280 .Xr cd 4 ,
281 .Xr da 4 ,
282 .Xr sa 4 ,
283 .Xr scsi 4
284 .Sh AUTHORS
285 The
286 .Nm
287 driver, the
288 .Tn AIC7xxx
289 sequencer-code assembler,
290 and the firmware running on the aic7xxx chips was written by
291 .An Justin T. Gibbs .
292 .Sh HISTORY
293 The
294 .Nm
295 driver appeared in
296 .Fx 2.0 .