1Notes for CPQFCTS driver for Compaq Tachyon TS
2Fibre Channel Host Bus Adapter, PCI 64-bit, 66MHz
3for Linux (RH 6.1, 6.2 kernel 2.2.12-32, 2.2.14-5)
4SMP tested
5Tested in single and dual HBA configuration, 32 and 64bit busses,
633 and 66MHz.  Only supports FC-AL.
7SEST size 512 Exchanges (simultaneous I/Os) limited by module kmalloc() 
8	max of 128k bytes contiguous.
9
10Ver 2.1.1  Oct 18, 2001
11   * reinitialize Cmnd->SCp.sent_command (used to identify commands as
12     passthrus) on calling scsi_done, since the scsi mid layer does not
13     use (or reinitialize) this field to prevent subsequent comands from
14     having it set incorrectly. 
15
16Ver 2.1.0  Aug 27, 2001
17   * Revise driver to use new kernel 2.4.x PCI DMA API, instead of 
18     virt_to_bus().  (enables driver to work w/ ia64 systems with >2Gb RAM.)
19     Rework main scatter-gather code to handle cases where SG element
20     lengths are larger than 0x7FFFF bytes and use as many scatter 
21     gather pages as necessary. (Steve Cameron)
22   * Makefile changes to bring cpqfc into line w/ rest of SCSI drivers
23     (thanks to Keith Owens)
24
25Ver 2.0.5  Aug 06, 2001
26   * Reject non-existent luns in the driver rather than letting the 
27     hardware do it.  (some HW behaves differently than others in this area.)
28   * Changed Makefile to rely on "make dep" instead of explicit dependencies
29   * ifdef'ed out fibre channel analyzer triggering debug code
30   * fixed a jiffies wrapping issue
31
32Ver 2.0.4  Aug 01, 2001
33   * Incorporated fix for target device reset from Steeleye
34   * Fixed passthrough ioctl so it doesn't hang.
35   * Fixed hang in launch_FCworker_thread() that occurred on some machines.
36   * Avoid problem when number of volumes in a single cabinet > 8
37
38Ver 2.0.2  July 23, 2001
39   Changed the semiphore changes so the driver would compile in 2.4.7. 
40   This version is for 2.4.7 and beyond. 
41 
42Ver 2.0.1  May 	7, 2001
43   Merged version 1.3.6 fixes into version 2.0.0.   
44
45Ver 2.0.0  May   7, 2001
46  Fixed problem so spinlock is being initialized to UNLOCKED. 
47  Fixed updated driver so it compiles in the 2.4 tree. 
48 
49 Ver 1.3.6  Feb  27, 2001
50   Added Target_Device_Reset function for SCSI error handling
51   Fixed problem with not reseting addressing mode after implicit logout
52 
53
54Ver 1.3.4  Sep   7, 2000
55  Added Modinfo information
56  Fixed problem with statically linking the driver
57
58Ver 1.3.3, Aug  23, 2000
59  Fixed device/function number in ioctl
60
61Ver 1.3.2, July 27, 2000
62  Add include for Alpha compile on 2.2.14 kernel (cpq*i2c.c)
63  Change logic for different FCP-RSP sense_buffer location for HSG80 target
64  And search for Agilent Tachyon XL2 HBAs (not finished! - in test)
65
66Tested with 
67(storage):
68           Compaq RA-4x000, RAID firmware ver 2.40 - 2.54
69           Seagate FC drives model ST39102FC, rev 0006
70           Hitachi DK31CJ-72FC rev J8A8
71           IBM DDYF-T18350R rev F60K
72           Compaq FC-SCSI bridge w/ DLT 35/70 Gb DLT (tape)
73(servers):
74           Compaq PL-1850R
75           Compaq PL-6500 Xeon (400MHz)
76	   Compaq PL-8500 (500MHz, 66MHz, 64bit PCI)
77           Compaq Alpha DS20 (RH 6.1)
78(hubs):
79           Vixel Rapport 1000 (7-port "dumb")
80	   Gadzoox Gibralter (12-port "dumb")
81	   Gadzoox Capellix 2000, 3000 
82(switches):
83           Brocade 2010, 2400, 2800, rev 2.0.3a (& later)
84           Gadzoox 3210 (Fabric blade beta)
85           Vixel 7100 (Fabric beta firmare - known hot plug issues)
86using "qa_test" (esp. io_test script) suite modified from Unix tests.
87	
88Installation:
89copy file cpqfcTS.patch to /usr/src/linux
90patch -p1 < cpqfcTS.patch
91make menuconfig
92  (select SCSI low-level, Compaq FC HBA)
93make dep
94make modules
95make modules_install
96
97e.g. insmod -f cpqfc
98
99Due to Fabric/switch delays, driver requires 4 seconds 
100to initialize.  If adapters are found, there will be a entries at
101/proc/scsi/cpqfcTS/*
102
103sample contents of startup messages
104
105*************************
106 scsi_register allocating 3596 bytes for CPQFCHBA
107 ioremap'd Membase: c887e600
108  HBA Tachyon RevId 1.2
109Allocating 119808 for 576 Exchanges @ c0dc0000
110Allocating 112904 for LinkQ @ c0c20000 (576 elements)
111Allocating 110600 for TachSEST for 512 Exchanges
112  cpqfcTS: writing IMQ BASE 7C0000h    PI 7C4000h
113  cpqfcTS: SEST c0e40000(virt): Wrote base E40000h @ c887e740
114cpqfcTS: New FC port 0000E8h WWN: 500507650642499D SCSI Chan/Trgt 0/0
115cpqfcTS: New FC port 0000EFh WWN: 50000E100000D5A6 SCSI Chan/Trgt 0/1
116cpqfcTS: New FC port 0000E4h WWN: 21000020370097BB SCSI Chan/Trgt 0/2
117cpqfcTS: New FC port 0000E2h WWN: 2100002037009946 SCSI Chan/Trgt 0/3
118cpqfcTS: New FC port 0000E1h WWN: 21000020370098FE SCSI Chan/Trgt 0/4
119cpqfcTS: New FC port 0000E0h WWN: 21000020370097B2 SCSI Chan/Trgt 0/5
120cpqfcTS: New FC port 0000DCh WWN: 2100002037006CC1 SCSI Chan/Trgt 0/6
121cpqfcTS: New FC port 0000DAh WWN: 21000020370059F6 SCSI Chan/Trgt 0/7
122cpqfcTS: New FC port 00000Fh WWN: 500805F1FADB0E20 SCSI Chan/Trgt 0/8
123cpqfcTS: New FC port 000008h WWN: 500805F1FADB0EBA SCSI Chan/Trgt 0/9
124cpqfcTS: New FC port 000004h WWN: 500805F1FADB1EB9 SCSI Chan/Trgt 0/10
125cpqfcTS: New FC port 000002h WWN: 500805F1FADB1ADE SCSI Chan/Trgt 0/11
126cpqfcTS: New FC port 000001h WWN: 500805F1FADBA2CA SCSI Chan/Trgt 0/12
127scsi4 : Compaq FibreChannel HBA Tachyon TS HPFC-5166A/1.2: WWN 500508B200193F50
128 on PCI bus 0 device 0xa0fc irq 5 IObaseL 0x3400, MEMBASE 0xc6ef8600
129PCI bus width 32 bits, bus speed 33 MHz
130FCP-SCSI Driver v1.3.0
131GBIC detected: Short-wave.  LPSM 0h Monitor
132scsi : 5 hosts.
133  Vendor: IBM       Model: DDYF-T18350R      Rev: F60K
134  Type:   Direct-Access                      ANSI SCSI revision: 03
135Detected scsi disk sdb at scsi4, channel 0, id 0, lun 0
136  Vendor: HITACHI   Model: DK31CJ-72FC       Rev: J8A8
137  Type:   Direct-Access                      ANSI SCSI revision: 02
138Detected scsi disk sdc at scsi4, channel 0, id 1, lun 0
139  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
140  Type:   Direct-Access                      ANSI SCSI revision: 02
141Detected scsi disk sdd at scsi4, channel 0, id 2, lun 0
142  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
143  Type:   Direct-Access                      ANSI SCSI revision: 02
144Detected scsi disk sde at scsi4, channel 0, id 3, lun 0
145  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
146  Type:   Direct-Access                      ANSI SCSI revision: 02
147Detected scsi disk sdf at scsi4, channel 0, id 4, lun 0
148  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
149  Type:   Direct-Access                      ANSI SCSI revision: 02
150Detected scsi disk sdg at scsi4, channel 0, id 5, lun 0
151  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
152  Type:   Direct-Access                      ANSI SCSI revision: 02
153Detected scsi disk sdh at scsi4, channel 0, id 6, lun 0
154  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
155  Type:   Direct-Access                      ANSI SCSI revision: 02
156Detected scsi disk sdi at scsi4, channel 0, id 7, lun 0
157  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.48
158  Type:   Direct-Access                      ANSI SCSI revision: 02
159Detected scsi disk sdj at scsi4, channel 0, id 8, lun 0
160  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.48
161  Type:   Direct-Access                      ANSI SCSI revision: 02
162Detected scsi disk sdk at scsi4, channel 0, id 8, lun 1
163  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.40
164  Type:   Direct-Access                      ANSI SCSI revision: 02
165Detected scsi disk sdl at scsi4, channel 0, id 9, lun 0
166  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.40
167  Type:   Direct-Access                      ANSI SCSI revision: 02
168Detected scsi disk sdm at scsi4, channel 0, id 9, lun 1
169  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.54
170  Type:   Direct-Access                      ANSI SCSI revision: 02
171Detected scsi disk sdn at scsi4, channel 0, id 10, lun 0
172  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.54
173  Type:   Direct-Access                      ANSI SCSI revision: 02
174Detected scsi disk sdo at scsi4, channel 0, id 11, lun 0
175  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.54
176  Type:   Direct-Access                      ANSI SCSI revision: 02
177Detected scsi disk sdp at scsi4, channel 0, id 11, lun 1
178  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.54
179  Type:   Direct-Access                      ANSI SCSI revision: 02
180Detected scsi disk sdq at scsi4, channel 0, id 12, lun 0
181  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.54
182  Type:   Direct-Access                      ANSI SCSI revision: 02
183Detected scsi disk sdr at scsi4, channel 0, id 12, lun 1
184resize_dma_pool: unknown device type 12
185resize_dma_pool: unknown device type 12
186SCSI device sdb: hdwr sector= 512 bytes. Sectors= 35843670 [17501 MB] [17.5 GB]
187 sdb: sdb1
188SCSI device sdc: hdwr sector= 512 bytes. Sectors= 144410880 [70513 MB] [70.5 GB]
189 sdc: sdc1
190SCSI device sdd: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
191 sdd: sdd1
192SCSI device sde: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
193 sde: sde1
194SCSI device sdf: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
195 sdf: sdf1
196SCSI device sdg: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
197 sdg: sdg1
198SCSI device sdh: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
199 sdh: sdh1
200SCSI device sdi: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
201 sdi: sdi1
202SCSI device sdj: hdwr sector= 512 bytes. Sectors= 2056160 [1003 MB] [1.0 GB]
203 sdj: sdj1
204SCSI device sdk: hdwr sector= 512 bytes. Sectors= 2052736 [1002 MB] [1.0 GB]
205 sdk: sdk1
206SCSI device sdl: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
207 sdl: sdl1
208SCSI device sdm: hdwr sector= 512 bytes. Sectors= 8380320 [4091 MB] [4.1 GB]
209 sdm: sdm1
210SCSI device sdn: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
211 sdn: sdn1
212SCSI device sdo: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
213 sdo: sdo1
214SCSI device sdp: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
215 sdp: sdp1
216SCSI device sdq: hdwr sector= 512 bytes. Sectors= 2056160 [1003 MB] [1.0 GB]
217 sdq: sdq1
218SCSI device sdr: hdwr sector= 512 bytes. Sectors= 2052736 [1002 MB] [1.0 GB]
219 sdr: sdr1
220
221*************************
222
223If a GBIC of type Short-wave, Long-wave, or Copper is detected, it will
224print out; otherwise, "none" is displayed.  If the cabling is correct
225and a loop circuit is completed, you should see "Monitor"; otherwise, 
226"LoopFail" (on open circuit) or some LPSM number/state with bit 3 set.
227
228
229ERRATA:
2301. Normally, Linux Scsi queries FC devices with INQUIRY strings.  All LUNs
231found according to INQUIRY should get READ commands at sector 0 to find
232partition table, etc.  Older kernels only query the first 4 devices.  Some
233Linux kernels only look for one LUN per target (i.e. FC device).
234
2352. Physically removing a device, or a malfunctioning system which hides a
236device, leads to a 30-second timeout and subsequent _abort call.  
237In some process contexts, this will hang the kernel (crashing the system).
238Single bit errors in frames and virtually all hot plugging events are 
239gracefully handled with internal driver timer and Abort processing.
240
2413. Some SCSI drives with error conditions will not handle the 7 second timeout
242in this software driver, leading to infinite retries on timed out SCSI commands.
243The 7 secs balances the need to quickly recover from lost frames (esp. on sequence
244initiatives) and time needed by older/slower/error-state drives in responding.
245This can be easily changed in "Exchanges[].timeOut".
246
2474. Due to the nature of FC soft addressing, there is no assurance that the 
248same LUNs (drives) will have the same path (e.g. /dev/sdb1) from one boot to
249next.  Dynamic soft address changes (i.e. 24-bit FC port_id) are
250supported during run time (e.g. due to hot plug event) by the use of WWN to
251SCSI Nexus (channel/target/LUN) mapping.
252
2535. Compaq RA4x00 firmware version 2.54 and later supports SSP (Selective 
254Storage Presentation), which maps LUNs to a WWN.  If RA4x00 firmware prior
2552.54 (e.g. older controller) is used, or the FC HBA is replaced (another WWN
256is used), logical volumes on the RA4x00 will no longer be visible.
257
258
259Send questions/comments to:
260Amy Vanzant-Hodge (fibrechannel@compaq.com)
261
262