]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/ahc.4
sys/{x86,amd64}: remove one of doubled ;s
[FreeBSD/FreeBSD.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$
28 .\"
29 .Dd February 15, 2017
30 .Dt AHC 4
31 .Os
32 .Sh NAME
33 .Nm ahc
34 .Nd Adaptec VL/ISA/PCI SCSI host adapter driver
35 .Sh SYNOPSIS
36 To compile this driver into the kernel,
37 place the following lines in your
38 kernel configuration file:
39 .Bd -ragged -offset indent
40 .Cd "device scbus"
41 .Cd "device ahc"
42 .Pp
43 For one or more PCI cards:
44 .Cd "device pci"
45 .Pp
46 To allow PCI adapters to use memory mapped I/O if enabled:
47 .Cd options AHC_ALLOW_MEMIO
48 .Pp
49 To configure one or more controllers to assume the target role:
50 .Cd options AHC_TMODE_ENABLE <bitmask of units>
51 .Ed
52 .Pp
53 Alternatively, to load the driver as a
54 module at boot time, place the following lines in
55 .Xr loader.conf 5 :
56 .Bd -literal -offset indent
57 ahc_load="YES"
58 ahc_isa_load="YES"
59 ahc_pci_load="YES"
60 .Ed
61 .Sh DESCRIPTION
62 This driver provides access to the
63 .Tn SCSI
64 bus(es) connected to the Adaptec AIC77xx and AIC78xx
65 host adapter chips.
66 .Pp
67 Driver features include support for twin and wide busses,
68 fast, ultra or ultra2 synchronous transfers depending on controller type,
69 tagged queueing, SCB paging, and target mode.
70 .Pp
71 Memory mapped I/O can be enabled for PCI devices with the
72 .Dq Dv AHC_ALLOW_MEMIO
73 configuration option.
74 Memory mapped I/O is more efficient than the alternative, programmed I/O.
75 Most PCI BIOSes will map devices so that either technique for communicating
76 with the card is available.
77 In some cases,
78 usually when the PCI device is sitting behind a PCI->PCI bridge,
79 the BIOS may fail to properly initialize the chip for memory mapped I/O.
80 The typical symptom of this problem is a system hang if memory mapped I/O
81 is attempted.
82 Most modern motherboards perform the initialization correctly and work fine
83 with this option enabled.
84 .Pp
85 Individual controllers may be configured to operate in the target role
86 through the
87 .Dq Dv AHC_TMODE_ENABLE
88 configuration option.
89 The value assigned to this option should be a bitmap
90 of all units where target mode is desired.
91 For example, a value of 0x25, would enable target mode on units 0, 2, and 5.
92 A value of 0x8a enables it for units 1, 3, and 7.
93 .Pp
94 Per target configuration performed in the
95 .Tn SCSI-Select
96 menu, accessible at boot
97 is honored by this driver.
98 This includes synchronous/asynchronous transfers,
99 maximum synchronous negotiation rate,
100 wide transfers,
101 disconnection,
102 the host adapter's SCSI ID.
103 For systems that store non-volatile settings in a system specific manner
104 rather than a serial eeprom directly connected to the aic7xxx controller,
105 the
106 .Tn BIOS
107 must be enabled for the driver to access this information.
108 This restriction applies to
109 many chip-down motherboard configurations.
110 .Pp
111 Performance and feature sets vary throughout the aic7xxx product line.
112 The following table provides a comparison of the different chips supported
113 by the
114 .Nm
115 driver.
116 Note that wide and twin channel features, although always supported
117 by a particular chip, may be disabled in a particular motherboard or card
118 design.
119 .Bd -ragged -offset indent
120 .Bl -column "aic7895CX" "MIPSX" "PCI/64X" "MaxSyncX" "MaxWidthX" "SCBsX" "2 3 4 5 6 7 8X"
121 .It Em "Chip" Ta "MIPS" Ta "Bus" Ta "MaxSync" Ta "MaxWidth" Ta "SCBs" Ta "Features"
122 .It "aic7770" Ta "10" Ta "VL" Ta "10MHz" Ta "16Bit" Ta "4" Ta "1"
123 .It "aic7850" Ta "10" Ta "PCI/32" Ta "10MHz" Ta "8Bit" Ta "3" Ta ""
124 .It "aic7860" Ta "10" Ta "PCI/32" Ta "20MHz" Ta "8Bit" Ta "3" Ta ""
125 .It "aic7870" Ta "10" Ta "PCI/32" Ta "10MHz" Ta "16Bit" Ta "16" Ta ""
126 .It "aic7880" Ta "10" Ta "PCI/32" Ta "20MHz" Ta "16Bit" Ta "16" Ta ""
127 .It "aic7890" Ta "20" Ta "PCI/32" Ta "40MHz" Ta "16Bit" Ta "16" Ta "3 4 5 6 7 8"
128 .It "aic7891" Ta "20" Ta "PCI/64" Ta "40MHz" Ta "16Bit" Ta "16" Ta "3 4 5 6 7 8"
129 .It "aic7892" Ta "20" Ta "PCI/64" Ta "80MHz" Ta "16Bit" Ta "16" Ta "3 4 5 6 7 8"
130 .It "aic7895" Ta "15" Ta "PCI/32" Ta "20MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5"
131 .It "aic7895C" Ta "15" Ta "PCI/32" Ta "20MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 8"
132 .It "aic7896" Ta "20" Ta "PCI/32" Ta "40MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 6 7 8"
133 .It "aic7897" Ta "20" Ta "PCI/64" Ta "40MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 6 7 8"
134 .It "aic7899" Ta "20" Ta "PCI/64" Ta "80MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 6 7 8"
135 .El
136 .Pp
137 .Bl -enum -compact
138 .It
139 Multiplexed Twin Channel Device - One controller servicing two busses.
140 .It
141 Multi-function Twin Channel Device - Two controllers on one chip.
142 .It
143 Command Channel Secondary DMA Engine - Allows scatter gather list and
144 SCB prefetch.
145 .It
146 64 Byte SCB Support - SCSI CDB is embedded in the SCB to eliminate an extra DMA.
147 .It
148 Block Move Instruction Support - Doubles the speed of certain sequencer
149 operations.
150 .It
151 .Sq Bayonet
152 style Scatter Gather Engine - Improves S/G prefetch performance.
153 .It
154 Queuing Registers - Allows queueing of new transactions without pausing the
155 sequencer.
156 .It
157 Multiple Target IDs - Allows the controller to respond to selection as a
158 target on multiple SCSI IDs.
159 .El
160 .Ed
161 .Sh HARDWARE
162 The
163 .Nm
164 driver supports the following
165 .Tn SCSI
166 host adapter chips and
167 .Tn SCSI
168 controller cards:
169 .Pp
170 .Bl -bullet -compact
171 .It
172 Adaptec
173 .Tn AIC7770
174 host adapter chip
175 .It
176 Adaptec
177 .Tn AIC7850
178 host adapter chip
179 .It
180 Adaptec
181 .Tn AIC7860
182 host adapter chip
183 .It
184 Adaptec
185 .Tn AIC7870
186 host adapter chip
187 .It
188 Adaptec
189 .Tn AIC7880
190 host adapter chip
191 .It
192 Adaptec
193 .Tn AIC7890
194 host adapter chip
195 .It
196 Adaptec
197 .Tn AIC7891
198 host adapter chip
199 .It
200 Adaptec
201 .Tn AIC7892
202 host adapter chip
203 .It
204 Adaptec
205 .Tn AIC7895
206 host adapter chip
207 .It
208 Adaptec
209 .Tn AIC7896
210 host adapter chip
211 .It
212 Adaptec
213 .Tn AIC7897
214 host adapter chip
215 .It
216 Adaptec
217 .Tn AIC7899
218 host adapter chip
219 .It
220 Adaptec
221 .Tn 274X(W)
222 .It
223 Adaptec
224 .Tn 274X(T)
225 .It
226 Adaptec
227 .Tn 2910
228 .It
229 Adaptec
230 .Tn 2915
231 .It
232 Adaptec
233 .Tn 2920C
234 .It
235 Adaptec
236 .Tn 2930C
237 .It
238 Adaptec
239 .Tn 2930U2
240 .It
241 Adaptec
242 .Tn 2940
243 .It
244 Adaptec
245 .Tn 2940J
246 .It
247 Adaptec
248 .Tn 2940N
249 .It
250 Adaptec
251 .Tn 2940U
252 .It
253 Adaptec
254 .Tn 2940AU
255 .It
256 Adaptec
257 .Tn 2940UW
258 .It
259 Adaptec
260 .Tn 2940UW Dual
261 .It
262 Adaptec
263 .Tn 2940UW Pro
264 .It
265 Adaptec
266 .Tn 2940U2W
267 .It
268 Adaptec
269 .Tn 2940U2B
270 .It
271 Adaptec
272 .Tn 2950U2W
273 .It
274 Adaptec
275 .Tn 2950U2B
276 .It
277 Adaptec
278 .Tn 19160B
279 .It
280 Adaptec
281 .Tn 29160B
282 .It
283 Adaptec
284 .Tn 29160N
285 .It
286 Adaptec
287 .Tn 3940
288 .It
289 Adaptec
290 .Tn 3940U
291 .It
292 Adaptec
293 .Tn 3940AU
294 .It
295 Adaptec
296 .Tn 3940UW
297 .It
298 Adaptec
299 .Tn 3940AUW
300 .It
301 Adaptec
302 .Tn 3940U2W
303 .It
304 Adaptec
305 .Tn 3950U2
306 .It
307 Adaptec
308 .Tn 3960
309 .It
310 Adaptec
311 .Tn 39160
312 .It
313 Adaptec
314 .Tn 3985
315 .It
316 Adaptec
317 .Tn 4944UW
318 .It
319 Many motherboards with on-board
320 .Tn SCSI
321 support
322 .El
323 .Sh SCSI CONTROL BLOCKS (SCBs)
324 Every transaction sent to a device on the SCSI bus is assigned a
325 .Sq SCSI Control Block
326 (SCB).
327 The SCB contains all of the information required by the
328 controller to process a transaction.
329 The chip feature table lists
330 the number of SCBs that can be stored in on-chip memory.
331 All chips
332 with model numbers greater than or equal to 7870 allow for the on chip
333 SCB space to be augmented with external SRAM up to a maximum of 255 SCBs.
334 Very few Adaptec controller configurations have external SRAM.
335 .Pp
336 If external SRAM is not available, SCBs are a limited resource.
337 Using the SCBs in a straight forward manner would only allow the driver to
338 handle as many concurrent transactions as there are physical SCBs.
339 To fully utilize the SCSI bus and the devices on it,
340 requires much more concurrency.
341 The solution to this problem is
342 .Em SCB Paging ,
343 a concept similar to memory paging.
344 SCB paging takes advantage of
345 the fact that devices usually disconnect from the SCSI bus for long
346 periods of time without talking to the controller.
347 The SCBs for disconnected transactions are only of use to the controller
348 when the transfer is resumed.
349 When the host queues another transaction
350 for the controller to execute, the controller firmware will use a
351 free SCB if one is available.
352 Otherwise, the state of the most recently
353 disconnected (and therefore most likely to stay disconnected) SCB is
354 saved, via dma, to host memory, and the local SCB reused to start
355 the new transaction.
356 This allows the controller to queue up to
357 255 transactions regardless of the amount of SCB space.
358 Since the
359 local SCB space serves as a cache for disconnected transactions, the
360 more SCB space available, the less host bus traffic consumed saving
361 and restoring SCB data.
362 .Sh SEE ALSO
363 .Xr ahd 4 ,
364 .Xr cd 4 ,
365 .Xr da 4 ,
366 .Xr sa 4 ,
367 .Xr scsi 4
368 .Sh HISTORY
369 The
370 .Nm
371 driver appeared in
372 .Fx 2.0 .
373 .Sh AUTHORS
374 The
375 .Nm
376 driver, the
377 .Tn AIC7xxx
378 sequencer-code assembler,
379 and the firmware running on the aic7xxx chips was written by
380 .An Justin T. Gibbs .
381 .Sh BUGS
382 Some Quantum drives (at least the Empire 2100 and 1080s) will not run on an
383 .Tn AIC7870
384 Rev B in synchronous mode at 10MHz.
385 Controllers with this problem have a
386 42 MHz clock crystal on them and run slightly above 10MHz.
387 This confuses the drive and hangs the bus.
388 Setting a maximum synchronous negotiation rate of 8MHz in the
389 .Tn SCSI-Select
390 utility will allow normal operation.
391 .Pp
392 Although the Ultra2 and Ultra160 products have sufficient instruction
393 ram space to support both the initiator and target roles concurrently,
394 this configuration is disabled in favor of allowing the target role
395 to respond on multiple target ids.
396 A method for configuring dual role mode should be provided.
397 .Pp
398 Tagged Queuing is not supported in target mode.
399 .Pp
400 Reselection in target mode fails to function correctly on all high
401 voltage differential boards as shipped by Adaptec.
402 Information on
403 how to modify HVD board to work correctly in target mode is available
404 from Adaptec.