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