xref: /netbsd/share/man/man4/ahc.4 (revision bf9ec67e)
1.\"	$NetBSD: ahc.4,v 1.20 2002/02/13 08:17:30 ross Exp $
2.\"
3.\" Copyright (c) 1995, 1996, 1997, 1998, 2000
4.\" 	Justin T. Gibbs.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. The name of the author may not be used to endorse or promote products
15.\"    derived from this software without specific prior written permission.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27.\"
28.\" $FreeBSD: src/share/man/man4/ahc.4,v 1.22 2000/02/14 16:40:58 gibbs Exp $
29.\"
30.Dd February 13, 2000
31.Dt AHC 4
32.Os
33.\".Os FreeBSD
34.Sh NAME
35.Nm ahc
36.Nd Adaptec VL/EISA/PCI/CardBus SCSI host adapter driver
37.Sh SYNOPSIS
38.ie 0 \{
39For one or more VL/EISA cards:
40.Cd device eisa
41.Cd device ahc
42\}
43\{For VL cards:
44.Cd ahc0 at isa? port ? irq ?
45.Pp
46For EISA cards:
47.Cd ahc* at eisa? slot ?\}
48.Pp
49.ie 0 \{
50For one or more PCI cards:
51.Cd device pci
52.Cd device ahc
53\}
54\{For PCI cards:
55.Cd ahc* at pci? dev ? function ?
56.Pp
57For CardBus cards:
58.Cd ahc* at cardbus? dev ? function ?\}
59.Pp
60To allow PCI adapters to use memory mapped I/O if enabled:
61.Cd options AHC_ALLOW_MEMIO
62.Pp
63.if 0 \{
64To configure one or more controllers to assume the target role:
65.Cd options AHC_TMODE_ENABLE \*[Lt]bitmask of units\*[Gt]
66.Pp
67\}
68.ie 0 \{
69For one or more SCSI busses:
70.Cd device scbus0 at ahc0
71\}
72\{For
73.Tn SCSI
74busses:
75.Cd scsibus* at ahc?\}
76.Sh DESCRIPTION
77.ie 0 \{
78This driver provides access to the
79.Tn SCSI
80bus(es) connected to Adaptec
81.Tn AIC7770 ,
82.Tn AIC7850 ,
83.Tn AIC7860 ,
84.Tn AIC7870 ,
85.Tn AIC7880 ,
86.Tn AIC7890 ,
87.Tn AIC7891 ,
88.Tn AIC7892 ,
89.Tn AIC7895 ,
90.Tn AIC7896 ,
91.Tn AIC7897
92and
93.Tn AIC7899
94host adapter chips.
95These chips are found on many motherboards as well as the following
96Adaptec SCSI controller cards:
97.Tn 274X(W) ,
98.Tn 274X(T) ,
99.Tn 284X ,
100.Tn 2910 ,
101.Tn 2915 ,
102.Tn 2920C ,
103.Tn 2930C ,
104.Tn 2930U2 ,
105.Tn 2940 ,
106.Tn 2940U ,
107.Tn 2940AU ,
108.Tn 2940UW ,
109.Tn 2940UW Dual ,
110.Tn 2940UW Pro ,
111.Tn 2940U2W ,
112.Tn 2940U2B ,
113.Tn 2950U2W ,
114.Tn 2950U2B ,
115.Tn 19160B ,
116.Tn 29160B ,
117.Tn 29160N ,
118.Tn 3940 ,
119.Tn 3940U ,
120.Tn 3940AU ,
121.Tn 3940UW ,
122.Tn 3940AUW ,
123.Tn 3940U2W ,
124.Tn 3950U2 ,
125.Tn 3960 ,
126.Tn 39160 ,
127.Tn 3985 ,
128and
129.Tn 4944UW .
130\}
131\{The
132.Nm
133device driver supports
134.Tn SCSI
135controllers based on
136.Tn Adaptec
137.Tn AIC77xx
138and
139.Tn AIC78xx
140.Tn SCSI
141host adapter chips found on many motherboards as well as
142.Tn Adaptec
143.Tn SCSI
144controller cards.\}
145.Pp
146Driver features include support for twin and wide busses,
147fast, ultra or ultra2 synchronous transfers depending on controller type,
148.ie 0 \{
149tagged queuing, SCB paging, and target mode.
150\}
151\{
152tagged queuing and SCB paging.\}
153.Pp
154Memory mapped I/O can be enabled for PCI devices with the
155.Dq Dv AHC_ALLOW_MEMIO
156configuration option.
157Memory mapped I/O is more efficient than the alternative, programmed I/O.
158Most PCI BIOSes will map devices so that either technique for communicating
159with the card is available.
160In some cases,
161usually when the PCI device is sitting behind a PCI-\*[Gt]PCI bridge,
162the BIOS may fail to properly initialize the chip for memory mapped I/O.
163The typical symptom of this problem is a system hang if memory mapped I/O
164is attempted.
165Most modern motherboards perform the initialization correctly and work fine
166with this option enabled.
167.Pp
168.if 0 \{
169Individual controllers may be configured to operate in the target role
170through the
171.Dq Dv AHC_TMODE_ENABLE
172configuration option.  The value assigned to this option should be a bitmap
173of all units where target mode is desired.
174For example, a value of 0x25, would enable target mode on units 0, 2, and 5.
175.Pp
176\}
177Per target configuration performed in the
178.Tn SCSI-Select
179menu, accessible at boot
180in
181.No non- Ns Tn EISA
182models,
183or through an
184.Tn EISA
185configuration utility for
186.Tn EISA
187models,
188is honored by this driver.
189This includes synchronous/asynchronous transfers,
190maximum synchronous negotiation rate,
191wide transfers,
192disconnection,
193the host adapter's SCSI ID,
194and,
195in the case of
196.Tn EISA
197Twin Channel controllers,
198the primary channel selection.
199For systems that store non-volatile settings in a system specific manner
200rather than a serial eeprom directly connected to the aic7xxx controller,
201the
202.Tn BIOS
203must be enabled for the driver to access this information.
204This restriction applies to all
205.Tn EISA
206and many motherboard configurations.
207.Pp
208Note that I/O addresses are determined automatically by the probe routines,
209but care should be taken when using a 284x
210.Pq Tn VESA No local bus controller
211in an
212.Tn EISA
213system.  The jumpers setting the I/O area for the 284x should match the
214.Tn EISA
215slot into which the card is inserted to prevent conflicts with other
216.Tn EISA
217cards.
218.Pp
219Performance and feature sets vary throughout the aic7xxx product line.
220The following table provides a comparison of the different chips supported
221by the
222.Nm
223driver.  Note that wide and twin channel features, although always supported
224by a particular chip, may be disabled in a particular motherboard or card
225design.
226.Pp
227.Bd -filled -offset indent
228.Bl -column "aic7770 " "10 " "EISA/VL  " "10MHz " "16bit " "SCBs " Features
229.Em "Chip       MIPS    Bus      MaxSync   MaxWidth  SCBs  Features"
230aic7770     10    EISA/VL    10MHz     16Bit     4    1
231aic7850     10    PCI/32     10MHz      8Bit     3
232aic7860     10    PCI/32     20MHz      8Bit     3
233aic7870     10    PCI/32     10MHz     16Bit    16
234aic7880     10    PCI/32     20MHz     16Bit    16
235aic7890     20    PCI/32     40MHz     16Bit    16        3 4 5 6 7 8
236aic7891     20    PCI/64     40MHz     16Bit    16        3 4 5 6 7 8
237aic7892     20    PCI/64     80MHz     16Bit    16        3 4 5 6 7 8
238aic7895     15    PCI/32     20MHz     16Bit    16      2 3 4 5
239aic7895C    15    PCI/32     20MHz     16Bit    16      2 3 4 5     8
240aic7896     20    PCI/32     40MHz     16Bit    16      2 3 4 5 6 7 8
241aic7897     20    PCI/64     40MHz     16Bit    16      2 3 4 5 6 7 8
242aic7899     20    PCI/64     80MHz     16Bit    16      2 3 4 5 6 7 8
243.El
244.Bl -enum -compact
245.It
246Multiplexed Twin Channel Device - One controller servicing two busses.
247.It
248Multi-function Twin Channel Device - Two controllers on one chip.
249.It
250Command Channel Secondary DMA Engine - Allows scatter gather list and
251SCB prefetch.
252.It
25364 Byte SCB Support - SCSI CDB is embedded in the SCB to eliminate an extra DMA.
254.It
255Block Move Instruction Support - Doubles the speed of certain sequencer
256operations.
257.It
258.Sq Bayonet
259style Scatter Gather Engine - Improves S/G prefetch performance.
260.It
261Queuing Registers - Allows queuing of new transactions without pausing the
262sequencer.
263.It
264Multiple Target IDs - Allows the controller to respond to selection as a
265target on multiple SCSI IDs.
266.El
267.Ed
268.Sh HARDWARE
269Supported
270.Tn SCSI
271controllers include:
272.Pp
273.Bl -item -offset indent
274.It
275.Tn Adaptec AHA-2742W
276EISA Fast Wide SCSI adapter
277.It
278.Tn Adaptec AHA-274xAT
279EISA dual channel Fast SCSI adapter
280.It
281.Tn Adaptec AHA-284x
282VL Fast SCSI adapter
283.It
284.Tn Adaptec AHA-2910
285PCI Fast SCSI adapter (no SCSI BIOS)
286.It
287.Tn Adaptec AHA-2915
288PCI Fast SCSI adapter (no SCSI BIOS)
289.It
290.Tn Adaptec AHA-2920C
291PCI Fast SCSI adapter
292.Bl -item -offset indent
293.It
294Note:
295Adaptec AHA-2920/A which use the Future Domain's chips are not supported
296by this driver.
297.El
298.It
299.Tn Adaptec AHA-2930C
300PCI Ultra SCSI adapter
301.It
302.Tn Adaptec AHA-2930U2
303PCI Ultra2 Wide LVD SCSI adapter
304.It
305.Tn Adaptec AHA-2940
306PCI Fast SCSI adapter
307.It
308.Tn Adaptec AHA-2940U
309PCI Ultra SCSI adapter
310.It
311.Tn Adaptec AHA-2940AU
312PCI Ultra SCSI adapter
313.It
314.Tn Adaptec AHA-2940UW
315PCI Ultra Wide SCSI adapter
316.It
317.Tn Adaptec AHA-2940UW Dual
318PCI dual channel Ultra Wide SCSI adapter
319.It
320.Tn Adaptec AHA-2940UW Pro
321PCI Ultra Wide SCSI adapter
322.It
323.Tn Adaptec AHA-2940U2W
324PCI Ultra2 Wide LVD SCSI adapter
325.It
326.Tn Adaptec AHA-2940U2B
327PCI Ultra2 Wide LVD SCSI adapter
328.It
329.Tn Adaptec AHA-2944W
330PCI Fast Wide Differential SCSI adapter
331.It
332.Tn Adaptec AHA-2944UW
333PCI Ultra Wide Differential SCSI adapter
334.It
335.Tn Adaptec AHA-2950U2W
336.It
337.Tn Adaptec AHA-2950U2B
33864bit PCI Ultra2 Wide LVD SCSI adapter
339.It
340.Tn Adaptec AHA-19160B
341PCI Ultra160 Wide LVD SCSI adapter
342.It
343.Tn Adaptec AHA-29160N
344PCI Ultra160 Wide LVD SCSI adapter
345.It
346.Tn Adaptec AHA-29160B
34764bit PCI Ultra160 Wide LVD SCSI adapter
348.It
349.Tn Adaptec AHA-3940
350PCI dual channel Fast SCSI adapter
351.It
352.Tn Adaptec AHA-3940U
353PCI dual channel Ultra SCSI adapter
354.It
355.Tn Adaptec AHA-3940AU
356PCI dual channel Ultra SCSI adapter
357.It
358.Tn Adaptec AHA-3940UW
359PCI dual channel Ultra Wide SCSI adapter
360.It
361.Tn Adaptec AHA-3940AUW
362PCI dual channel Ultra Wide SCSI adapter
363.It
364.Tn Adaptec AHA-3940U2W
365PCI dual channel Ultra2 Wide LVD SCSI adapter
366.It
367.Tn Adaptec AHA-3950U2
36864bit PCI dual channel Ultra2 Wide LVD SCSI adapter
369.It
370.Tn Adaptec AHA-3960
37164bit PCI dual channel Ultra160 Wide LVD SCSI adapter
372.It
373.Tn Adaptec AHA-3985
374PCI dual channel Fast SCSI RAID adapter
375.It
376.Tn Adaptec AHA-39160
37764bit PCI dual channel Ultra160 Wide LVD SCSI adapter
378.It
379.Tn Adaptec AHA-4944UW
380PCI quad channel PCI Ultra Wide Differential SCSI adapter
381.It
382Other SCSI controllers based on the
383.Tn Adaptec
384.Tn AIC7770 ,
385.Tn AIC7850 ,
386.Tn AIC7860 ,
387.Tn AIC7870 ,
388.Tn AIC7880 ,
389.Tn AIC7890 ,
390.Tn AIC7891 ,
391.Tn AIC7892 ,
392.Tn AIC7895 ,
393.Tn AIC7896 ,
394.Tn AIC7897
395and
396.Tn AIC7899
397.Tn SCSI
398host adapter chips.
399.El
400.Sh SCSI CONTROL BLOCKS (SCBs)
401Every transaction sent to a device on the SCSI bus is assigned a
402.Sq SCSI Control Block
403(SCB).  The SCB contains all of the information required by the
404controller to process a transaction.  The chip feature table lists
405the number of SCBs that can be stored in on-chip memory.  All chips
406with model numbers greater than or equal to 7870 allow for the on chip
407SCB space to be augmented with external SRAM up to a maximum of 255 SCBs.
408Very few Adaptec controller configurations have external SRAM.
409.Pp
410If external SRAM is not available, SCBs are a limited resource.
411Using the SCBs in a straight forward manner would only allow the driver to
412handle as many concurrent transactions as there are physical SCBs.
413To fully utilize the SCSI bus and the devices on it,
414requires much more concurrency.
415The solution to this problem is
416.Em SCB Paging ,
417a concept similar to memory paging.  SCB paging takes advantage of
418the fact that devices usually disconnect from the SCSI bus for long
419periods of time without talking to the controller.  The SCBs
420for disconnected transactions are only of use to the controller
421when the transfer is resumed.  When the host queues another transaction
422for the controller to execute, the controller firmware will use a
423free SCB if one is available.  Otherwise, the state of the most recently
424disconnected (and therefor most likely to stay disconnected) SCB is
425saved, via dma, to host memory, and the local SCB reused to start
426the new transaction.  This allows the controller to queue up to
427255 transactions regardless of the amount of SCB space.  Since the
428local SCB space serves as a cache for disconnected transactions, the
429more SCB space available, the less host bus traffic consumed saving
430and restoring SCB data.
431.Sh SEE ALSO
432.Xr aha 4 ,
433.Xr ahb 4 ,
434.Xr cd 4 ,
435.Xr ch 4 ,
436.Xr intro 4 ,
437.Xr scsi 4 ,
438.Xr sd 4 ,
439.Xr st 4
440.Sh HISTORY
441The
442.Nm
443driver appeared in
444.Fx 2.0
445and
446.Nx 1.1 .
447.Sh AUTHORS
448The
449.Nm
450driver, the
451.Tn AIC7xxx
452sequencer-code assembler,
453and the firmware running on the aic7xxx chips was written by
454.An Justin T. Gibbs .
455.Nx
456porting is done by Stefan Grefen, Charles M. Hannum,
457Michael Graff, Jason R. Thorpe, Pete Bentley,
458Frank van der Linden and Noriyuki Soda.
459.Sh BUGS
460Some
461.Tn Quantum
462drives (at least the Empire 2100 and 1080s) will not run on an
463.Tn AIC7870
464Rev B in synchronous mode at 10MHz.  Controllers with this problem have a
46542 MHz clock crystal on them and run slightly above 10MHz.  This confuses
466the drive and hangs the bus.  Setting a maximum synchronous negotiation rate
467of 8MHz in the
468.Tn SCSI-Select
469utility will allow normal operation.
470.Pp
471Double Transition clocking is not yet supported for Ultra160 controllers.
472This limits these controllers to 40MHz or 80MB/s.
473.Pp
474.ie 0 \{
475Although the Ultra2 and Ultra160 products have sufficient instruction
476ram space to support both the initiator and target roles concurrently,
477this configuration is disabled in favor of allowing the target role
478to respond on multiple target ids.  A method for configuring dual
479role mode should be provided.
480.Pp
481Tagged Queuing is not supported in target mode.
482.Pp
483Reselection in target mode fails to function correctly on all high
484voltage differential boards as shipped by Adaptec.  Information on
485how to modify HVD board to work correctly in target mode is available
486from Adaptec.
487\}
488\{Target mode is not supported on
489.Nx
490version of this driver.\}
491