aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /Documentation/scsi
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'Documentation/scsi')
-rw-r--r--Documentation/scsi/00-INDEX70
-rw-r--r--Documentation/scsi/53c700.txt154
-rw-r--r--Documentation/scsi/BusLogic.txt566
-rw-r--r--Documentation/scsi/ChangeLog.1992-19972023
-rw-r--r--Documentation/scsi/ChangeLog.ips122
-rw-r--r--Documentation/scsi/ChangeLog.megaraid349
-rw-r--r--Documentation/scsi/ChangeLog.ncr53c8xx495
-rw-r--r--Documentation/scsi/ChangeLog.sym53c8xx593
-rw-r--r--Documentation/scsi/ChangeLog.sym53c8xx_2144
-rw-r--r--Documentation/scsi/FlashPoint.txt163
-rw-r--r--Documentation/scsi/LICENSE.FlashPoint60
-rw-r--r--Documentation/scsi/Mylex.txt5
-rw-r--r--Documentation/scsi/NinjaSCSI.txt130
-rw-r--r--Documentation/scsi/aha152x.txt183
-rw-r--r--Documentation/scsi/aic79xx.txt516
-rw-r--r--Documentation/scsi/aic7xxx.txt414
-rw-r--r--Documentation/scsi/aic7xxx_old.txt511
-rw-r--r--Documentation/scsi/cpqfc.txt272
-rw-r--r--Documentation/scsi/dc395x.txt102
-rw-r--r--Documentation/scsi/dpti.txt83
-rw-r--r--Documentation/scsi/dtc3x80.txt43
-rw-r--r--Documentation/scsi/g_NCR5380.txt63
-rw-r--r--Documentation/scsi/ibmmca.txt1402
-rw-r--r--Documentation/scsi/in2000.txt202
-rw-r--r--Documentation/scsi/megaraid.txt70
-rw-r--r--Documentation/scsi/ncr53c7xx.txt40
-rw-r--r--Documentation/scsi/ncr53c8xx.txt1854
-rw-r--r--Documentation/scsi/osst.txt219
-rw-r--r--Documentation/scsi/ppa.txt16
-rw-r--r--Documentation/scsi/qla2xxx.revision.notes457
-rw-r--r--Documentation/scsi/qlogicfas.txt79
-rw-r--r--Documentation/scsi/qlogicisp.txt30
-rw-r--r--Documentation/scsi/scsi-generic.txt101
-rw-r--r--Documentation/scsi/scsi.txt44
-rw-r--r--Documentation/scsi/scsi_mid_low_api.txt1546
-rw-r--r--Documentation/scsi/st.txt499
-rw-r--r--Documentation/scsi/sym53c500_cs.txt23
-rw-r--r--Documentation/scsi/sym53c8xx_2.txt1059
-rw-r--r--Documentation/scsi/tmscsim.txt449
39 files changed, 15151 insertions, 0 deletions
diff --git a/Documentation/scsi/00-INDEX b/Documentation/scsi/00-INDEX
new file mode 100644
index 000000000000..f9cb5bdcce41
--- /dev/null
+++ b/Documentation/scsi/00-INDEX
@@ -0,0 +1,70 @@
100-INDEX
2 - this file
353c700.txt
4 - info on driver for 53c700 based adapters
5AM53C974.txt
6 - info on driver for AM53c974 based adapters
7BusLogic.txt
8 - info on driver for adapters with BusLogic chips
9ChangeLog
10 - Changes to scsi files, if not listed elsewhere
11ChangeLog.ips
12 - IBM ServeRAID driver Changelog
13ChangeLog.ncr53c8xx
14 - Changes to ncr53c8xx driver
15ChangeLog.sym53c8xx
16 - Changes to sym53c8xx driver
17ChangeLog.sym53c8xx_2
18 - Changes to second generation of sym53c8xx driver
19FlashPoint.txt
20 - info on driver for BusLogic FlashPoint adapters
21LICENSE.FlashPoint
22 - Licence of the Flashpoint driver
23Mylex.txt
24 - info on driver for Mylex adapters
25NinjaSCSI.txt
26 - info on WorkBiT NinjaSCSI-32/32Bi driver
27aha152x.txt
28 - info on driver for Adaptec AHA152x based adapters
29aic7xxx.txt
30 - info on driver for Adaptec controllers
31aic7xxx_old.txt
32 - info on driver for Adaptec controllers, old generation
33cpqfc.txt
34 - info on driver for Compaq Tachyon TS adapters
35dpti.txt
36 - info on driver for DPT SmartRAID and Adaptec I2O RAID based adapters
37dtc3x80.txt
38 - info on driver for DTC 2x80 based adapters
39g_NCR5380.txt
40 - info on driver for NCR5380 and NCR53c400 based adapters
41ibmmca.txt
42 - info on driver for IBM adapters with MCA bus
43in2000.txt
44 - info on in2000 driver
45ncr53c7xx.txt
46 - info on driver for NCR53c7xx based adapters
47ncr53c8xx.txt
48 - info on driver for NCR53c8xx based adapters
49osst.txt
50 - info on driver for OnStream SC-x0 SCSI tape
51ppa.txt
52 - info on driver for IOmega zip drive
53qlogicfas.txt
54 - info on driver for QLogic FASxxx based adapters
55qlogicisp.txt
56 - info on driver for QLogic ISP 1020 based adapters
57scsi-generic.txt
58 - info on the sg driver for generic (non-disk/CD/tape) SCSI devices.
59scsi.txt
60 - short blurb on using SCSI support as a module.
61scsi_mid_low_api.txt
62 - info on API between SCSI layer and low level drivers
63st.txt
64 - info on scsi tape driver
65sym53c500_cs.txt
66 - info on PCMCIA driver for Symbios Logic 53c500 based adapters
67sym53c8xx_2.txt
68 - info on second generation driver for sym53c8xx based adapters
69tmscsim.txt
70 - info on driver for AM53c974 based adapters
diff --git a/Documentation/scsi/53c700.txt b/Documentation/scsi/53c700.txt
new file mode 100644
index 000000000000..0da681d497a2
--- /dev/null
+++ b/Documentation/scsi/53c700.txt
@@ -0,0 +1,154 @@
1General Description
2===================
3
4This driver supports the 53c700 and 53c700-66 chips. It also supports
5the 53c710 but only in 53c700 emulation mode. It is full featured and
6does sync (-66 and 710 only), disconnects and tag command queueing.
7
8Since the 53c700 must be interfaced to a bus, you need to wrapper the
9card detector around this driver. For an example, see the
10NCR_D700.[ch] or lasi700.[ch] files.
11
12The comments in the 53c700.[ch] files tell you which parts you need to
13fill in to get the driver working.
14
15
16Compile Time Flags
17==================
18
19The driver may be either io mapped or memory mapped. This is
20selectable by configuration flags:
21
22CONFIG_53C700_MEM_MAPPED
23
24define if the driver is memory mapped.
25
26CONFIG_53C700_IO_MAPPED
27
28define if the driver is to be io mapped.
29
30One or other of the above flags *must* be defined.
31
32Other flags are:
33
34CONFIG_53C700_LE_ON_BE
35
36define if the chipset must be supported in little endian mode on a big
37endian architecture (used for the 700 on parisc).
38
39CONFIG_53C700_USE_CONSISTENT
40
41allocate consistent memory (should only be used if your architecture
42has a mixture of consistent and inconsistent memory). Fully
43consistent or fully inconsistent architectures should not define this.
44
45
46Using the Chip Core Driver
47==========================
48
49In order to plumb the 53c700 chip core driver into a working SCSI
50driver, you need to know three things about the way the chip is wired
51into your system (or expansion card).
52
531. The clock speed of the SCSI core
542. The interrupt line used
553. The memory (or io space) location of the 53c700 registers.
56
57Optionally, you may also need to know other things, like how to read
58the SCSI Id from the card bios or whether the chip is wired for
59differential operation.
60
61Usually you can find items 2. and 3. from general spec. documents or
62even by examining the configuration of a working driver under another
63operating system.
64
65The clock speed is usually buried deep in the technical literature.
66It is required because it is used to set up both the synchronous and
67asynchronous dividers for the chip. As a general rule of thumb,
68manufacturers set the clock speed at the lowest possible setting
69consistent with the best operation of the chip (although some choose
70to drive it off the CPU or bus clock rather than going to the expense
71of an extra clock chip). The best operation clock speeds are:
72
7353c700 - 25MHz
7453c700-66 - 50MHz
7553c710 - 40Mhz
76
77Writing Your Glue Driver
78========================
79
80This will be a standard SCSI driver (I don't know of a good document
81describing this, just copy from some other driver) with at least a
82detect and release entry.
83
84In the detect routine, you need to allocate a struct
85NCR_700_Host_Parameters sized memory area and clear it (so that the
86default values for everything are 0). Then you must fill in the
87parameters that matter to you (see below), plumb the NCR_700_intr
88routine into the interrupt line and call NCR_700_detect with the host
89template and the new parameters as arguments. You should also call
90the relevant request_*_region function and place the register base
91address into the `base' pointer of the host parameters.
92
93In the release routine, you must free the NCR_700_Host_Parameters that
94you allocated, call the corresponding release_*_region and free the
95interrupt.
96
97Handling Interrupts
98-------------------
99
100In general, you should just plumb the card's interrupt line in with
101
102request_irq(irq, NCR_700_intr, <irq flags>, <driver name>, host);
103
104where host is the return from the relevant NCR_700_detect() routine.
105
106You may also write your own interrupt handling routine which calls
107NCR_700_intr() directly. However, you should only really do this if
108you have a card with more than one chip on it and you can read a
109register to tell which set of chips wants the interrupt.
110
111Settable NCR_700_Host_Parameters
112--------------------------------
113
114The following are a list of the user settable parameters:
115
116clock: (MANDATORY)
117
118Set to the clock speed of the chip in MHz.
119
120base: (MANDATORY)
121
122set to the base of the io or mem region for the register set. On 64
123bit architectures this is only 32 bits wide, so the registers must be
124mapped into the low 32 bits of memory.
125
126pci_dev: (OPTIONAL)
127
128set to the PCI board device. Leave NULL for a non-pci board. This is
129used for the pci_alloc_consistent() and pci_map_*() functions.
130
131dmode_extra: (OPTIONAL, 53c710 only)
132
133extra flags for the DMODE register. These are used to control bus
134output pins on the 710. The settings should be a combination of
135DMODE_FC1 and DMODE_FC2. What these pins actually do is entirely up
136to the board designer. Usually it is safe to ignore this setting.
137
138differential: (OPTIONAL)
139
140set to 1 if the chip drives a differential bus.
141
142force_le_on_be: (OPTIONAL, only if CONFIG_53C700_LE_ON_BE is set)
143
144set to 1 if the chip is operating in little endian mode on a big
145endian architecture.
146
147chip710: (OPTIONAL)
148
149set to 1 if the chip is a 53c710.
150
151burst_disable: (OPTIONAL, 53c710 only)
152
153disable 8 byte bursting for DMA transfers.
154
diff --git a/Documentation/scsi/BusLogic.txt b/Documentation/scsi/BusLogic.txt
new file mode 100644
index 000000000000..98023baa0f0d
--- /dev/null
+++ b/Documentation/scsi/BusLogic.txt
@@ -0,0 +1,566 @@
1 BusLogic MultiMaster and FlashPoint SCSI Driver for Linux
2
3 Version 2.0.15 for Linux 2.0
4 Version 2.1.15 for Linux 2.1
5
6 PRODUCTION RELEASE
7
8 17 August 1998
9
10 Leonard N. Zubkoff
11 Dandelion Digital
12 lnz@dandelion.com
13
14 Copyright 1995-1998 by Leonard N. Zubkoff <lnz@dandelion.com>
15
16
17 INTRODUCTION
18
19BusLogic, Inc. designed and manufactured a variety of high performance SCSI
20host adapters which share a common programming interface across a diverse
21collection of bus architectures by virtue of their MultiMaster ASIC technology.
22BusLogic was acquired by Mylex Corporation in February 1996, but the products
23supported by this driver originated under the BusLogic name and so that name is
24retained in the source code and documentation.
25
26This driver supports all present BusLogic MultiMaster Host Adapters, and should
27support any future MultiMaster designs with little or no modification. More
28recently, BusLogic introduced the FlashPoint Host Adapters, which are less
29costly and rely on the host CPU, rather than including an onboard processor.
30Despite not having an onboard CPU, the FlashPoint Host Adapters perform very
31well and have very low command latency. BusLogic has recently provided me with
32the FlashPoint Driver Developer's Kit, which comprises documentation and freely
33redistributable source code for the FlashPoint SCCB Manager. The SCCB Manager
34is the library of code that runs on the host CPU and performs functions
35analogous to the firmware on the MultiMaster Host Adapters. Thanks to their
36having provided the SCCB Manager, this driver now supports the FlashPoint Host
37Adapters as well.
38
39My primary goals in writing this completely new BusLogic driver for Linux are
40to achieve the full performance that BusLogic SCSI Host Adapters and modern
41SCSI peripherals are capable of, and to provide a highly robust driver that can
42be depended upon for high performance mission critical applications. All of
43the major performance features can be configured from the Linux kernel command
44line or at module initialization time, allowing individual installations to
45tune driver performance and error recovery to their particular needs.
46
47The latest information on Linux support for BusLogic SCSI Host Adapters, as
48well as the most recent release of this driver and the latest firmware for the
49BT-948/958/958D, will always be available from my Linux Home Page at URL
50"http://www.dandelion.com/Linux/".
51
52Bug reports should be sent via electronic mail to "lnz@dandelion.com". Please
53include with the bug report the complete configuration messages reported by the
54driver and SCSI subsystem at startup, along with any subsequent system messages
55relevant to SCSI operations, and a detailed description of your system's
56hardware configuration.
57
58Mylex has been an excellent company to work with and I highly recommend their
59products to the Linux community. In November 1995, I was offered the
60opportunity to become a beta test site for their latest MultiMaster product,
61the BT-948 PCI Ultra SCSI Host Adapter, and then again for the BT-958 PCI Wide
62Ultra SCSI Host Adapter in January 1996. This was mutually beneficial since
63Mylex received a degree and kind of testing that their own testing group cannot
64readily achieve, and the Linux community has available high performance host
65adapters that have been well tested with Linux even before being brought to
66market. This relationship has also given me the opportunity to interact
67directly with their technical staff, to understand more about the internal
68workings of their products, and in turn to educate them about the needs and
69potential of the Linux community.
70
71More recently, Mylex has reaffirmed the company's interest in supporting the
72Linux community, and I am now working on a Linux driver for the DAC960 PCI RAID
73Controllers. Mylex's interest and support is greatly appreciated.
74
75Unlike some other vendors, if you contact Mylex Technical Support with a
76problem and are running Linux, they will not tell you that your use of their
77products is unsupported. Their latest product marketing literature even states
78"Mylex SCSI host adapters are compatible with all major operating systems
79including: ... Linux ...".
80
81Mylex Corporation is located at 34551 Ardenwood Blvd., Fremont, California
8294555, USA and can be reached at 510/796-6100 or on the World Wide Web at
83http://www.mylex.com. Mylex HBA Technical Support can be reached by electronic
84mail at techsup@mylex.com, by Voice at 510/608-2400, or by FAX at 510/745-7715.
85Contact information for offices in Europe and Japan is available on the Web
86site.
87
88
89 DRIVER FEATURES
90
91o Configuration Reporting and Testing
92
93 During system initialization, the driver reports extensively on the host
94 adapter hardware configuration, including the synchronous transfer parameters
95 requested and negotiated with each target device. AutoSCSI settings for
96 Synchronous Negotiation, Wide Negotiation, and Disconnect/Reconnect are
97 reported for each target device, as well as the status of Tagged Queuing.
98 If the same setting is in effect for all target devices, then a single word
99 or phrase is used; otherwise, a letter is provided for each target device to
100 indicate the individual status. The following examples
101 should clarify this reporting format:
102
103 Synchronous Negotiation: Ultra
104
105 Synchronous negotiation is enabled for all target devices and the host
106 adapter will attempt to negotiate for 20.0 mega-transfers/second.
107
108 Synchronous Negotiation: Fast
109
110 Synchronous negotiation is enabled for all target devices and the host
111 adapter will attempt to negotiate for 10.0 mega-transfers/second.
112
113 Synchronous Negotiation: Slow
114
115 Synchronous negotiation is enabled for all target devices and the host
116 adapter will attempt to negotiate for 5.0 mega-transfers/second.
117
118 Synchronous Negotiation: Disabled
119
120 Synchronous negotiation is disabled and all target devices are limited to
121 asynchronous operation.
122
123 Synchronous Negotiation: UFSNUUU#UUUUUUUU
124
125 Synchronous negotiation to Ultra speed is enabled for target devices 0
126 and 4 through 15, to Fast speed for target device 1, to Slow speed for
127 target device 2, and is not permitted to target device 3. The host
128 adapter's SCSI ID is represented by the "#".
129
130 The status of Wide Negotiation, Disconnect/Reconnect, and Tagged Queuing
131 are reported as "Enabled", Disabled", or a sequence of "Y" and "N" letters.
132
133o Performance Features
134
135 BusLogic SCSI Host Adapters directly implement SCSI-2 Tagged Queuing, and so
136 support has been included in the driver to utilize tagged queuing with any
137 target devices that report having the tagged queuing capability. Tagged
138 queuing allows for multiple outstanding commands to be issued to each target
139 device or logical unit, and can improve I/O performance substantially. In
140 addition, BusLogic's Strict Round Robin Mode is used to optimize host adapter
141 performance, and scatter/gather I/O can support as many segments as can be
142 effectively utilized by the Linux I/O subsystem. Control over the use of
143 tagged queuing for each target device as well as individual selection of the
144 tagged queue depth is available through driver options provided on the kernel
145 command line or at module initialization time. By default, the queue depth
146 is determined automatically based on the host adapter's total queue depth and
147 the number, type, speed, and capabilities of the target devices found. In
148 addition, tagged queuing is automatically disabled whenever the host adapter
149 firmware version is known not to implement it correctly, or whenever a tagged
150 queue depth of 1 is selected. Tagged queuing is also disabled for individual
151 target devices if disconnect/reconnect is disabled for that device.
152
153o Robustness Features
154
155 The driver implements extensive error recovery procedures. When the higher
156 level parts of the SCSI subsystem request that a timed out command be reset,
157 a selection is made between a full host adapter hard reset and SCSI bus reset
158 versus sending a bus device reset message to the individual target device
159 based on the recommendation of the SCSI subsystem. Error recovery strategies
160 are selectable through driver options individually for each target device,
161 and also include sending a bus device reset to the specific target device
162 associated with the command being reset, as well as suppressing error
163 recovery entirely to avoid perturbing an improperly functioning device. If
164 the bus device reset error recovery strategy is selected and sending a bus
165 device reset does not restore correct operation, the next command that is
166 reset will force a full host adapter hard reset and SCSI bus reset. SCSI bus
167 resets caused by other devices and detected by the host adapter are also
168 handled by issuing a soft reset to the host adapter and re-initialization.
169 Finally, if tagged queuing is active and more than one command reset occurs
170 in a 10 minute interval, or if a command reset occurs within the first 10
171 minutes of operation, then tagged queuing will be disabled for that target
172 device. These error recovery options improve overall system robustness by
173 preventing individual errant devices from causing the system as a whole to
174 lock up or crash, and thereby allowing a clean shutdown and restart after the
175 offending component is removed.
176
177o PCI Configuration Support
178
179 On PCI systems running kernels compiled with PCI BIOS support enabled, this
180 driver will interrogate the PCI configuration space and use the I/O port
181 addresses assigned by the system BIOS, rather than the ISA compatible I/O
182 port addresses. The ISA compatible I/O port address is then disabled by the
183 driver. On PCI systems it is also recommended that the AutoSCSI utility be
184 used to disable the ISA compatible I/O port entirely as it is not necessary.
185 The ISA compatible I/O port is disabled by default on the BT-948/958/958D.
186
187o /proc File System Support
188
189 Copies of the host adapter configuration information together with updated
190 data transfer and error recovery statistics are available through the
191 /proc/scsi/BusLogic/<N> interface.
192
193o Shared Interrupts Support
194
195 On systems that support shared interrupts, any number of BusLogic Host
196 Adapters may share the same interrupt request channel.
197
198
199 SUPPORTED HOST ADAPTERS
200
201The following list comprises the supported BusLogic SCSI Host Adapters as of
202the date of this document. It is recommended that anyone purchasing a BusLogic
203Host Adapter not in the following table contact the author beforehand to verify
204that it is or will be supported.
205
206FlashPoint Series PCI Host Adapters:
207
208FlashPoint LT (BT-930) Ultra SCSI-3
209FlashPoint LT (BT-930R) Ultra SCSI-3 with RAIDPlus
210FlashPoint LT (BT-920) Ultra SCSI-3 (BT-930 without BIOS)
211FlashPoint DL (BT-932) Dual Channel Ultra SCSI-3
212FlashPoint DL (BT-932R) Dual Channel Ultra SCSI-3 with RAIDPlus
213FlashPoint LW (BT-950) Wide Ultra SCSI-3
214FlashPoint LW (BT-950R) Wide Ultra SCSI-3 with RAIDPlus
215FlashPoint DW (BT-952) Dual Channel Wide Ultra SCSI-3
216FlashPoint DW (BT-952R) Dual Channel Wide Ultra SCSI-3 with RAIDPlus
217
218MultiMaster "W" Series Host Adapters:
219
220BT-948 PCI Ultra SCSI-3
221BT-958 PCI Wide Ultra SCSI-3
222BT-958D PCI Wide Differential Ultra SCSI-3
223
224MultiMaster "C" Series Host Adapters:
225
226BT-946C PCI Fast SCSI-2
227BT-956C PCI Wide Fast SCSI-2
228BT-956CD PCI Wide Differential Fast SCSI-2
229BT-445C VLB Fast SCSI-2
230BT-747C EISA Fast SCSI-2
231BT-757C EISA Wide Fast SCSI-2
232BT-757CD EISA Wide Differential Fast SCSI-2
233BT-545C ISA Fast SCSI-2
234BT-540CF ISA Fast SCSI-2
235
236MultiMaster "S" Series Host Adapters:
237
238BT-445S VLB Fast SCSI-2
239BT-747S EISA Fast SCSI-2
240BT-747D EISA Differential Fast SCSI-2
241BT-757S EISA Wide Fast SCSI-2
242BT-757D EISA Wide Differential Fast SCSI-2
243BT-545S ISA Fast SCSI-2
244BT-542D ISA Differential Fast SCSI-2
245BT-742A EISA SCSI-2 (742A revision H)
246BT-542B ISA SCSI-2 (542B revision H)
247
248MultiMaster "A" Series Host Adapters:
249
250BT-742A EISA SCSI-2 (742A revisions A - G)
251BT-542B ISA SCSI-2 (542B revisions A - G)
252
253AMI FastDisk Host Adapters that are true BusLogic MultiMaster clones are also
254supported by this driver.
255
256BusLogic SCSI Host Adapters are available packaged both as bare boards and as
257retail kits. The BT- model numbers above refer to the bare board packaging.
258The retail kit model numbers are found by replacing BT- with KT- in the above
259list. The retail kit includes the bare board and manual as well as cabling and
260driver media and documentation that are not provided with bare boards.
261
262
263 FLASHPOINT INSTALLATION NOTES
264
265o RAIDPlus Support
266
267 FlashPoint Host Adapters now include RAIDPlus, Mylex's bootable software
268 RAID. RAIDPlus is not supported on Linux, and there are no plans to support
269 it. The MD driver in Linux 2.0 provides for concatenation (LINEAR) and
270 striping (RAID-0), and support for mirroring (RAID-1), fixed parity (RAID-4),
271 and distributed parity (RAID-5) is available separately. The built-in Linux
272 RAID support is generally more flexible and is expected to perform better
273 than RAIDPlus, so there is little impetus to include RAIDPlus support in the
274 BusLogic driver.
275
276o Enabling UltraSCSI Transfers
277
278 FlashPoint Host Adapters ship with their configuration set to "Factory
279 Default" settings that are conservative and do not allow for UltraSCSI speed
280 to be negotiated. This results in fewer problems when these host adapters
281 are installed in systems with cabling or termination that is not sufficient
282 for UltraSCSI operation, or where existing SCSI devices do not properly
283 respond to synchronous transfer negotiation for UltraSCSI speed. AutoSCSI
284 may be used to load "Optimum Performance" settings which allow UltraSCSI
285 speed to be negotiated with all devices, or UltraSCSI speed can be enabled on
286 an individual basis. It is recommended that SCAM be manually disabled after
287 the "Optimum Performance" settings are loaded.
288
289
290 BT-948/958/958D INSTALLATION NOTES
291
292The BT-948/958/958D PCI Ultra SCSI Host Adapters have some features which may
293require attention in some circumstances when installing Linux.
294
295o PCI I/O Port Assignments
296
297 When configured to factory default settings, the BT-948/958/958D will only
298 recognize the PCI I/O port assignments made by the motherboard's PCI BIOS.
299 The BT-948/958/958D will not respond to any of the ISA compatible I/O ports
300 that previous BusLogic SCSI Host Adapters respond to. This driver supports
301 the PCI I/O port assignments, so this is the preferred configuration.
302 However, if the obsolete BusLogic driver must be used for any reason, such as
303 a Linux distribution that does not yet use this driver in its boot kernel,
304 BusLogic has provided an AutoSCSI configuration option to enable a legacy ISA
305 compatible I/O port.
306
307 To enable this backward compatibility option, invoke the AutoSCSI utility via
308 Ctrl-B at system startup and select "Adapter Configuration", "View/Modify
309 Configuration", and then change the "ISA Compatible Port" setting from
310 "Disable" to "Primary" or "Alternate". Once this driver has been installed,
311 the "ISA Compatible Port" option should be set back to "Disable" to avoid
312 possible future I/O port conflicts. The older BT-946C/956C/956CD also have
313 this configuration option, but the factory default setting is "Primary".
314
315o PCI Slot Scanning Order
316
317 In systems with multiple BusLogic PCI Host Adapters, the order in which the
318 PCI slots are scanned may appear reversed with the BT-948/958/958D as
319 compared to the BT-946C/956C/956CD. For booting from a SCSI disk to work
320 correctly, it is necessary that the host adapter's BIOS and the kernel agree
321 on which disk is the boot device, which requires that they recognize the PCI
322 host adapters in the same order. The motherboard's PCI BIOS provides a
323 standard way of enumerating the PCI host adapters, which is used by the Linux
324 kernel. Some PCI BIOS implementations enumerate the PCI slots in order of
325 increasing bus number and device number, while others do so in the opposite
326 direction.
327
328 Unfortunately, Microsoft decided that Windows 95 would always enumerate the
329 PCI slots in order of increasing bus number and device number regardless of
330 the PCI BIOS enumeration, and requires that their scheme be supported by the
331 host adapter's BIOS to receive Windows 95 certification. Therefore, the
332 factory default settings of the BT-948/958/958D enumerate the host adapters
333 by increasing bus number and device number. To disable this feature, invoke
334 the AutoSCSI utility via Ctrl-B at system startup and select "Adapter
335 Configuration", "View/Modify Configuration", press Ctrl-F10, and then change
336 the "Use Bus And Device # For PCI Scanning Seq." option to OFF.
337
338 This driver will interrogate the setting of the PCI Scanning Sequence option
339 so as to recognize the host adapters in the same order as they are enumerated
340 by the host adapter's BIOS.
341
342o Enabling UltraSCSI Transfers
343
344 The BT-948/958/958D ship with their configuration set to "Factory Default"
345 settings that are conservative and do not allow for UltraSCSI speed to be
346 negotiated. This results in fewer problems when these host adapters are
347 installed in systems with cabling or termination that is not sufficient for
348 UltraSCSI operation, or where existing SCSI devices do not properly respond
349 to synchronous transfer negotiation for UltraSCSI speed. AutoSCSI may be
350 used to load "Optimum Performance" settings which allow UltraSCSI speed to be
351 negotiated with all devices, or UltraSCSI speed can be enabled on an
352 individual basis. It is recommended that SCAM be manually disabled after the
353 "Optimum Performance" settings are loaded.
354
355
356 DRIVER OPTIONS
357
358BusLogic Driver Options may be specified either via the Linux Kernel Command
359Line or via the Loadable Kernel Module Installation Facility. Driver Options
360for multiple host adapters may be specified either by separating the option
361strings by a semicolon, or by specifying multiple "BusLogic=" strings on the
362command line. Individual option specifications for a single host adapter are
363separated by commas. The Probing and Debugging Options apply to all host
364adapters whereas the remaining options apply individually only to the
365selected host adapter.
366
367The BusLogic Driver Probing Options comprise the following:
368
369IO:<integer>
370
371 The "IO:" option specifies an ISA I/O Address to be probed for a non-PCI
372 MultiMaster Host Adapter. If neither "IO:" nor "NoProbeISA" options are
373 specified, then the standard list of BusLogic MultiMaster ISA I/O Addresses
374 will be probed (0x330, 0x334, 0x230, 0x234, 0x130, and 0x134). Multiple
375 "IO:" options may be specified to precisely determine the I/O Addresses to
376 be probed, but the probe order will always follow the standard list.
377
378NoProbe
379
380 The "NoProbe" option disables all probing and therefore no BusLogic Host
381 Adapters will be detected.
382
383NoProbeISA
384
385 The "NoProbeISA" option disables probing of the standard BusLogic ISA I/O
386 Addresses and therefore only PCI MultiMaster and FlashPoint Host Adapters
387 will be detected.
388
389NoProbePCI
390
391 The "NoProbePCI" options disables the interrogation of PCI Configuration
392 Space and therefore only ISA Multimaster Host Adapters will be detected, as
393 well as PCI Multimaster Host Adapters that have their ISA Compatible I/O
394 Port set to "Primary" or "Alternate".
395
396NoSortPCI
397
398 The "NoSortPCI" option forces PCI MultiMaster Host Adapters to be
399 enumerated in the order provided by the PCI BIOS, ignoring any setting of
400 the AutoSCSI "Use Bus And Device # For PCI Scanning Seq." option.
401
402MultiMasterFirst
403
404 The "MultiMasterFirst" option forces MultiMaster Host Adapters to be probed
405 before FlashPoint Host Adapters. By default, if both FlashPoint and PCI
406 MultiMaster Host Adapters are present, this driver will probe for
407 FlashPoint Host Adapters first unless the BIOS primary disk is controlled
408 by the first PCI MultiMaster Host Adapter, in which case MultiMaster Host
409 Adapters will be probed first.
410
411FlashPointFirst
412
413 The "FlashPointFirst" option forces FlashPoint Host Adapters to be probed
414 before MultiMaster Host Adapters.
415
416The BusLogic Driver Tagged Queuing Options allow for explicitly specifying
417the Queue Depth and whether Tagged Queuing is permitted for each Target
418Device (assuming that the Target Device supports Tagged Queuing). The Queue
419Depth is the number of SCSI Commands that are allowed to be concurrently
420presented for execution (either to the Host Adapter or Target Device). Note
421that explicitly enabling Tagged Queuing may lead to problems; the option to
422enable or disable Tagged Queuing is provided primarily to allow disabling
423Tagged Queuing on Target Devices that do not implement it correctly. The
424following options are available:
425
426QueueDepth:<integer>
427
428 The "QueueDepth:" or QD:" option specifies the Queue Depth to use for all
429 Target Devices that support Tagged Queuing, as well as the maximum Queue
430 Depth for devices that do not support Tagged Queuing. If no Queue Depth
431 option is provided, the Queue Depth will be determined automatically based
432 on the Host Adapter's Total Queue Depth and the number, type, speed, and
433 capabilities of the detected Target Devices. For Host Adapters that
434 require ISA Bounce Buffers, the Queue Depth is automatically set by default
435 to BusLogic_TaggedQueueDepthBB or BusLogic_UntaggedQueueDepthBB to avoid
436 excessive preallocation of DMA Bounce Buffer memory. Target Devices that
437 do not support Tagged Queuing always have their Queue Depth set to
438 BusLogic_UntaggedQueueDepth or BusLogic_UntaggedQueueDepthBB, unless a
439 lower Queue Depth option is provided. A Queue Depth of 1 automatically
440 disables Tagged Queuing.
441
442QueueDepth:[<integer>,<integer>...]
443
444 The "QueueDepth:[...]" or "QD:[...]" option specifies the Queue Depth
445 individually for each Target Device. If an <integer> is omitted, the
446 associated Target Device will have its Queue Depth selected automatically.
447
448TaggedQueuing:Default
449
450 The "TaggedQueuing:Default" or "TQ:Default" option permits Tagged Queuing
451 based on the firmware version of the BusLogic Host Adapter and based on
452 whether the Queue Depth allows queuing multiple commands.
453
454TaggedQueuing:Enable
455
456 The "TaggedQueuing:Enable" or "TQ:Enable" option enables Tagged Queuing for
457 all Target Devices on this Host Adapter, overriding any limitation that
458 would otherwise be imposed based on the Host Adapter firmware version.
459
460TaggedQueuing:Disable
461
462 The "TaggedQueuing:Disable" or "TQ:Disable" option disables Tagged Queuing
463 for all Target Devices on this Host Adapter.
464
465TaggedQueuing:<Target-Spec>
466
467 The "TaggedQueuing:<Target-Spec>" or "TQ:<Target-Spec>" option controls
468 Tagged Queuing individually for each Target Device. <Target-Spec> is a
469 sequence of "Y", "N", and "X" characters. "Y" enables Tagged Queuing, "N"
470 disables Tagged Queuing, and "X" accepts the default based on the firmware
471 version. The first character refers to Target Device 0, the second to
472 Target Device 1, and so on; if the sequence of "Y", "N", and "X" characters
473 does not cover all the Target Devices, unspecified characters are assumed
474 to be "X".
475
476The BusLogic Driver Miscellaneous Options comprise the following:
477
478BusSettleTime:<seconds>
479
480 The "BusSettleTime:" or "BST:" option specifies the Bus Settle Time in
481 seconds. The Bus Settle Time is the amount of time to wait between a Host
482 Adapter Hard Reset which initiates a SCSI Bus Reset and issuing any SCSI
483 Commands. If unspecified, it defaults to BusLogic_DefaultBusSettleTime.
484
485InhibitTargetInquiry
486
487 The "InhibitTargetInquiry" option inhibits the execution of an Inquire
488 Target Devices or Inquire Installed Devices command on MultiMaster Host
489 Adapters. This may be necessary with some older Target Devices that do not
490 respond correctly when Logical Units above 0 are addressed.
491
492The BusLogic Driver Debugging Options comprise the following:
493
494TraceProbe
495
496 The "TraceProbe" option enables tracing of Host Adapter Probing.
497
498TraceHardwareReset
499
500 The "TraceHardwareReset" option enables tracing of Host Adapter Hardware
501 Reset.
502
503TraceConfiguration
504
505 The "TraceConfiguration" option enables tracing of Host Adapter
506 Configuration.
507
508TraceErrors
509
510 The "TraceErrors" option enables tracing of SCSI Commands that return an
511 error from the Target Device. The CDB and Sense Data will be printed for
512 each SCSI Command that fails.
513
514Debug
515
516 The "Debug" option enables all debugging options.
517
518The following examples demonstrate setting the Queue Depth for Target Devices
5191 and 2 on the first host adapter to 7 and 15, the Queue Depth for all Target
520Devices on the second host adapter to 31, and the Bus Settle Time on the
521second host adapter to 30 seconds.
522
523Linux Kernel Command Line:
524
525 linux BusLogic=QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30
526
527LILO Linux Boot Loader (in /etc/lilo.conf):
528
529 append = "BusLogic=QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30"
530
531INSMOD Loadable Kernel Module Installation Facility:
532
533 insmod BusLogic.o \
534 'BusLogic="QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30"'
535
536NOTE: Module Utilities 2.1.71 or later is required for correct parsing
537 of driver options containing commas.
538
539
540 DRIVER INSTALLATION
541
542This distribution was prepared for Linux kernel version 2.0.35, but should be
543compatible with 2.0.4 or any later 2.0 series kernel.
544
545To install the new BusLogic SCSI driver, you may use the following commands,
546replacing "/usr/src" with wherever you keep your Linux kernel source tree:
547
548 cd /usr/src
549 tar -xvzf BusLogic-2.0.15.tar.gz
550 mv README.* LICENSE.* BusLogic.[ch] FlashPoint.c linux/drivers/scsi
551 patch -p0 < BusLogic.patch (only for 2.0.33 and below)
552 cd linux
553 make config
554 make zImage
555
556Then install "arch/i386/boot/zImage" as your standard kernel, run lilo if
557appropriate, and reboot.
558
559
560 BUSLOGIC ANNOUNCEMENTS MAILING LIST
561
562The BusLogic Announcements Mailing List provides a forum for informing Linux
563users of new driver releases and other announcements regarding Linux support
564for BusLogic SCSI Host Adapters. To join the mailing list, send a message to
565"buslogic-announce-request@dandelion.com" with the line "subscribe" in the
566message body.
diff --git a/Documentation/scsi/ChangeLog.1992-1997 b/Documentation/scsi/ChangeLog.1992-1997
new file mode 100644
index 000000000000..dc88ee2ab73d
--- /dev/null
+++ b/Documentation/scsi/ChangeLog.1992-1997
@@ -0,0 +1,2023 @@
1Sat Jan 18 15:51:45 1997 Richard Henderson <rth@tamu.edu>
2
3 * Don't play with usage_count directly, instead hand around
4 the module header and use the module macros.
5
6Fri May 17 00:00:00 1996 Leonard N. Zubkoff <lnz@dandelion.com>
7
8 * BusLogic Driver Version 2.0.3 Released.
9
10Tue Apr 16 21:00:00 1996 Leonard N. Zubkoff <lnz@dandelion.com>
11
12 * BusLogic Driver Version 1.3.2 Released.
13
14Sun Dec 31 23:26:00 1995 Leonard N. Zubkoff <lnz@dandelion.com>
15
16 * BusLogic Driver Version 1.3.1 Released.
17
18Fri Nov 10 15:29:49 1995 Leonard N. Zubkoff <lnz@dandelion.com>
19
20 * Released new BusLogic driver.
21
22Wed Aug 9 22:37:04 1995 Andries Brouwer <aeb@cwi.nl>
23
24 As a preparation for new device code, separated the various
25 functions the request->dev field had into the device proper,
26 request->rq_dev and a status field request->rq_status.
27
28 The 2nd argument of bios_param is now a kdev_t.
29
30Wed Jul 19 10:43:15 1995 Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
31
32 * scsi.c (scsi_proc_info): /proc/scsi/scsi now also lists all
33 attached devices.
34
35 * scsi_proc.c (proc_print_scsidevice): Added. Used by scsi.c and
36 eata_dma_proc.c to produce some device info for /proc/scsi.
37
38 * eata_dma.c (eata_queue)(eata_int_handler)(eata_scsi_done):
39 Changed handling of internal SCSI commands send to the HBA.
40
41
42Wed Jul 19 10:09:17 1995 Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
43
44 * Linux 1.3.11 released.
45
46 * eata_dma.c (eata_queue)(eata_int_handler): Added code to do
47 command latency measurements if requested by root through
48 /proc/scsi interface.
49 Throughout Use HZ constant for time references.
50
51 * eata_pio.c: Use HZ constant for time references.
52
53 * aic7xxx.c, aic7xxx.h, aic7xxx_asm.c: Changed copyright from BSD
54 to GNU style.
55
56 * scsi.h: Added READ_12 command opcode constant
57
58Wed Jul 19 09:25:30 1995 Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
59
60 * Linux 1.3.10 released.
61
62 * scsi_proc.c (dispatch_scsi_info): Removed unused variable.
63
64Wed Jul 19 09:25:30 1995 Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
65
66 * Linux 1.3.9 released.
67
68 * scsi.c Blacklist concept expanded to 'support' more device
69 deficiencies. blacklist[] renamed to device_list[]
70 (scan_scsis): Code cleanup.
71
72 * scsi_debug.c (scsi_debug_proc_info): Added support to control
73 device lockup simulation via /proc/scsi interface.
74
75
76Wed Jul 19 09:22:34 1995 Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
77
78 * Linux 1.3.7 released.
79
80 * scsi_proc.c: Fixed a number of bugs in directory handling
81
82Wed Jul 19 09:18:28 1995 Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
83
84 * Linux 1.3.5 released.
85
86 * Native wide, multichannel and /proc/scsi support now in official
87 kernel distribution.
88
89 * scsi.c/h, hosts.c/h et al reindented to increase readability
90 (especially on 80 column wide terminals).
91
92 * scsi.c, scsi_proc.c, ../../fs/proc/inode.c: Added
93 /proc/scsi/scsi which allows root to scan for hotplugged devices.
94
95 * scsi.c (scsi_proc_info): Added, to support /proc/scsi/scsi.
96 (scan_scsis): Added some 'spaghetti' code to allow scanning for
97 single devices.
98
99
100Thu Jun 20 15:20:27 1995 Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
101
102 * proc.c: Renamed to scsi_proc.c
103
104Mon Jun 12 20:32:45 1995 Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
105
106 * Linux 1.3.0 released.
107
108Mon May 15 19:33:14 1995 Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
109
110 * scsi.c: Added native multichannel and wide scsi support.
111
112 * proc.c (dispatch_scsi_info) (build_proc_dir_hba_entries):
113 Updated /proc/scsi interface.
114
115Thu May 4 17:58:48 1995 Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
116
117 * sd.c (requeue_sd_request): Zero out the scatterlist only if
118 scsi_malloc returned memory for it.
119
120 * eata_dma.c (register_HBA) (eata_queue): Add support for
121 large scatter/gather tables and set use_clustering accordingly
122
123 * hosts.c: Make use_clustering changeable in the Scsi_Host structure.
124
125Wed Apr 12 15:25:52 1995 Eric Youngdale (eric@andante)
126
127 * Linux 1.2.5 released.
128
129 * buslogic.c: Update to version 1.15 (From Leonard N. Zubkoff).
130 Fixed interrupt routine to avoid races when handling multiple
131 complete commands per interrupt. Seems to come up with faster
132 cards.
133
134 * eata_dma.c: Update to 2.3.5r. Modularize. Improved error handling
135 throughout and fixed bug interrupt routine which resulted in shifted
136 status bytes. Added blink LED state checks for ISA and EISA HBAs.
137 Memory management bug seems to have disappeared ==> increasing
138 C_P_L_CURRENT_MAX to 16 for now. Decreasing C_P_L_DIV to 3 for
139 performance reasons.
140
141 * scsi.c: If we get a FMK, EOM, or ILI when attempting to scan
142 the bus, assume that it was just noise on the bus, and ignore
143 the device.
144
145 * scsi.h: Update and add a bunch of missing commands which we
146 were never using.
147
148 * sd.c: Use restore_flags in do_sd_request - this may result in
149 latency conditions, but it gets rid of races and crashes.
150 Do not save flags again when searching for a second command to
151 queue.
152
153 * st.c: Use bytes, not STP->buffer->buffer_size when reading
154 from tape.
155
156
157Tue Apr 4 09:42:08 1995 Eric Youngdale (eric@andante)
158
159 * Linux 1.2.4 released.
160
161 * st.c: Fix typo - restoring wrong flags.
162
163Wed Mar 29 06:55:12 1995 Eric Youngdale (eric@andante)
164
165 * Linux 1.2.3 released.
166
167 * st.c: Perform some waiting operations with interrupts off.
168 Is this correct???
169
170Wed Mar 22 10:34:26 1995 Eric Youngdale (eric@andante)
171
172 * Linux 1.2.2 released.
173
174 * aha152x.c: Modularize. Add support for PCMCIA.
175
176 * eata.c: Update to version 2.0. Fixed bug preventing media
177 detection. If scsi_register_host returns NULL, fail gracefully.
178
179 * scsi.c: Detect as NEC (for photo-cd purposes) for the 84
180 and 25 models as "NEC_OLDCDR".
181
182 * scsi.h: Add define for NEC_OLDCDR
183
184 * sr.c: Add handling for NEC_OLDCDR. Treat as unknown.
185
186 * u14-34f.c: Update to version 2.0. Fixed same bug as in
187 eata.c.
188
189
190Mon Mar 6 11:11:20 1995 Eric Youngdale (eric@andante)
191
192 * Linux 1.2.0 released. Yeah!!!
193
194 * Minor spelling/punctuation changes throughout. Nothing
195 substantive.
196
197Mon Feb 20 21:33:03 1995 Eric Youngdale (eric@andante)
198
199 * Linux 1.1.95 released.
200
201 * qlogic.c: Update to version 0.41.
202
203 * seagate.c: Change some message to be more descriptive about what
204 we detected.
205
206 * sr.c: spelling/whitespace changes.
207
208Mon Feb 20 21:33:03 1995 Eric Youngdale (eric@andante)
209
210 * Linux 1.1.94 released.
211
212Mon Feb 20 08:57:17 1995 Eric Youngdale (eric@andante)
213
214 * Linux 1.1.93 released.
215
216 * hosts.h: Change io_port to long int from short.
217
218 * 53c7,8xx.c: crash on AEN fixed, SCSI reset is no longer a NOP,
219 NULL pointer panic on odd UDCs fixed, two bugs in diagnostic output
220 fixed, should initialize correctly if left running, now loadable,
221 new memory allocation, extraneous diagnostic output suppressed,
222 splx() replaced with save/restore flags. [ Drew ]
223
224 * hosts.c, hosts.h, scsi_ioctl.c, sd.c, sd_ioctl.c, sg.c, sr.c,
225 sr_ioctl.c: Add special junk at end that Emacs will use for
226 formatting the file.
227
228 * qlogic.c: Update to v0.40a. Improve parity handling.
229
230 * scsi.c: Add Hitachi DK312C to blacklist. Change "};" to "}" in
231 many places. Use scsi_init_malloc to get command block - may
232 need this to be dma compatible for some host adapters.
233 Restore interrupts after unregistering a host.
234
235 * sd.c: Use sti instead of restore flags - causes latency problems.
236
237 * seagate.c: Use controller_type to determine string used when
238 registering irq.
239
240 * sr.c: More photo-cd hacks to make sure we get the xa stuff right.
241 * sr.h, sr.c: Change is_xa to xa_flags field.
242
243 * st.c: Disable retries for write operations.
244
245Wed Feb 15 10:52:56 1995 Eric Youngdale (eric@andante)
246
247 * Linux 1.1.92 released.
248
249 * eata.c: Update to 1.17.
250
251 * eata_dma.c: Update to 2.31a. Add more support for /proc/scsi.
252 Continuing modularization. Less crashes because of the bug in the
253 memory management ==> increase C_P_L_CURRENT_MAX to 10
254 and decrease C_P_L_DIV to 4.
255
256 * hosts.c: If we remove last host registered, reuse host number.
257 When freeing memory from host being deregistered, free extra_bytes
258 too.
259
260 * scsi.c (scan_scsis): memset(SDpnt, 0) and set SCmd.device to SDpnt.
261 Change memory allocation to work around bugs in __get_dma_pages.
262 Do not free host if usage count is not zero (for modules).
263
264 * sr_ioctl.c: Increase IOCTL_TIMEOUT to 3000.
265
266 * st.c: Allow for ST_EXTRA_DEVS in st data structures.
267
268 * u14-34f.c: Update to 1.17.
269
270Thu Feb 9 10:11:16 1995 Eric Youngdale (eric@andante)
271
272 * Linux 1.1.91 released.
273
274 * eata.c: Update to 1.16. Use wish_block instead of host->block.
275
276 * hosts.c: Initialize wish_block to 0.
277
278 * hosts.h: Add wish_block.
279
280 * scsi.c: Use wish_block as indicator that the host should be added
281 to block list.
282
283 * sg.c: Add SG_EXTRA_DEVS to number of slots.
284
285 * u14-34f.c: Use wish_block.
286
287Tue Feb 7 11:46:04 1995 Eric Youngdale (eric@andante)
288
289 * Linux 1.1.90 released.
290
291 * eata.c: Change naming from eata_* to eata2x_*. Now at vers 1.15.
292 Update interrupt handler to take pt_regs as arg. Allow blocking
293 even if loaded as module. Initialize target_time_out array.
294 Do not put sti(); in timing loop.
295
296 * hosts.c: Do not reuse host numbers.
297 Use scsi_make_blocked_list to generate blocking list.
298
299 * script_asm.pl: Beats me. Don't know perl. Something to do with
300 phase index.
301
302 * scsi.c (scsi_make_blocked_list): New function - code copied from
303 hosts.c.
304
305 * scsi.c: Update code to disable photo CD for Toshiba cdroms.
306 Use just manufacturer name, not model number.
307
308 * sr.c: Fix setting density for Toshiba drives.
309
310 * u14-34f.c: Clear target_time_out array during reset.
311
312Wed Feb 1 09:20:45 1995 Eric Youngdale (eric@andante)
313
314 * Linux 1.1.89 released.
315
316 * Makefile, u14-34f.c: Modularize.
317
318 * Makefile, eata.c: Modularize. Now version 1.14
319
320 * NCR5380.c: Update interrupt handler with new arglist. Minor
321 cleanups.
322
323 * eata_dma.c: Begin to modularize. Add hooks for /proc/scsi.
324 New version 2.3.0a. Add code in interrupt handler to allow
325 certain CDROM drivers to be detected which return a
326 CHECK_CONDITION during SCSI bus scan. Add opcode check to get
327 all DATA IN and DATA OUT phases right. Utilize HBA_interpret flag.
328 Improvements in HBA identification. Various other minor stuff.
329
330 * hosts.c: Initialize ->dma_channel and ->io_port when registering
331 a new host.
332
333 * qlogic.c: Modularize and add PCMCIA support.
334
335 * scsi.c: Add Hitachi to blacklist.
336
337 * scsi.c: Change default to no lun scan (too many problem devices).
338
339 * scsi.h: Define QUEUE_FULL condition.
340
341 * sd.c: Do not check for non-existent partition until after
342 new media check.
343
344 * sg.c: Undo previous change which was wrong.
345
346 * sr_ioctl.c: Increase IOCTL_TIMEOUT to 2000.
347
348 * st.c: Patches from Kai - improve filemark handling.
349
350Tue Jan 31 17:32:12 1995 Eric Youngdale (eric@andante)
351
352 * Linux 1.1.88 released.
353
354 * Throughout - spelling/grammar fixups.
355
356 * scsi.c: Make sure that all buffers are 16 byte aligned - some
357 drivers (buslogic) need this.
358
359 * scsi.c (scan_scsis): Remove message printed.
360
361 * scsi.c (scsi_init): Move message here.
362
363Mon Jan 30 06:40:25 1995 Eric Youngdale (eric@andante)
364
365 * Linux 1.1.87 released.
366
367 * sr.c: Photo-cd related changes. (Gerd Knorr??).
368
369 * st.c: Changes from Kai related to EOM detection.
370
371Mon Jan 23 23:53:10 1995 Eric Youngdale (eric@andante)
372
373 * Linux 1.1.86 released.
374
375 * 53c7,8xx.h: Change SG size to 127.
376
377 * eata_dma: Update to version 2.10i. Remove bug in the registration
378 of multiple HBAs and channels. Minor other improvements and stylistic
379 changes.
380
381 * scsi.c: Test for Toshiba XM-3401TA and exclude from detection
382 as toshiba drive - photo cd does not work with this drive.
383
384 * sr.c: Update photocd code.
385
386Mon Jan 23 23:53:10 1995 Eric Youngdale (eric@andante)
387
388 * Linux 1.1.85 released.
389
390 * st.c, st_ioctl.c, sg.c, sd_ioctl.c, scsi_ioctl.c, hosts.c:
391 include linux/mm.h
392
393 * qlogic.c, buslogic.c, aha1542.c: Include linux/module.h.
394
395Sun Jan 22 22:08:46 1995 Eric Youngdale (eric@andante)
396
397 * Linux 1.1.84 released.
398
399 * Makefile: Support for loadable QLOGIC boards.
400
401 * aha152x.c: Update to version 1.8 from Juergen.
402
403 * eata_dma.c: Update from Michael Neuffer.
404 Remove hard limit of 2 commands per lun and make it better
405 configurable. Improvements in HBA identification.
406
407 * in2000.c: Fix biosparam to support large disks.
408
409 * qlogic.c: Minor changes (change sti -> restore_flags).
410
411Wed Jan 18 23:33:09 1995 Eric Youngdale (eric@andante)
412
413 * Linux 1.1.83 released.
414
415 * aha1542.c(aha1542_intr_handle): Use arguments handed down to find
416 which irq.
417
418 * buslogic.c: Likewise.
419
420 * eata_dma.c: Use min of 2 cmd_per_lun for OCS_enabled boards.
421
422 * scsi.c: Make RECOVERED_ERROR a SUGGEST_IS_OK.
423
424 * sd.c: Fail if we are opening a non-existent partition.
425
426 * sr.c: Bump SR_TIMEOUT to 15000.
427 Do not probe for media size at boot time(hard on changers).
428 Flag device as needing sector size instead.
429
430 * sr_ioctl.c: Remove CDROMMULTISESSION_SYS ioctl.
431
432 * ultrastor.c: Fix bug in call to ultrastor_interrupt (wrong #args).
433
434Mon Jan 16 07:18:23 1995 Eric Youngdale (eric@andante)
435
436 * Linux 1.1.82 released.
437
438 Throughout.
439 - Change all interrupt handlers to accept new calling convention.
440 In particular, we now receive the irq number as one of the arguments.
441
442 * More minor spelling corrections in some of the new files.
443
444 * aha1542.c, buslogic.c: Clean up interrupt handler a little now
445 that we receive the irq as an arg.
446
447 * aha274x.c: s/snarf_region/request_region/
448
449 * eata.c: Update to version 1.12. Fix some comments and display a
450 message if we cannot reserve the port addresses.
451
452 * u14-34f.c: Update to version 1.13. Fix some comments and display a
453 message if we cannot reserve the port addresses.
454
455 * eata_dma.c: Define get_board_data function (send INQUIRY command).
456 Use to improve detection of variants of different DPT boards. Change
457 version subnumber to "0g".
458
459 * fdomain.c: Update to version 5.26. Improve detection of some boards
460 repackaged by IBM.
461
462 * scsi.c (scsi_register_host): Change "name" to const char *.
463
464 * sr.c: Fix problem in set mode command for Toshiba drives.
465
466 * sr.c: Fix typo from patch 81.
467
468Fri Jan 13 12:54:46 1995 Eric Youngdale (eric@andante)
469
470 * Linux 1.1.81 released. Codefreeze for 1.2 release announced.
471
472 Big changes here.
473
474 * eata_dma.*: New files from Michael Neuffer.
475 (neuffer@goofy.zdv.uni-mainz.de). Should support
476 all eata/dpt cards.
477
478 * hosts.c, Makefile: Add eata_dma.
479
480 * README.st: Document MTEOM.
481
482 Patches from me (ERY) to finish support for low-level loadable scsi.
483 It now works, and is actually useful.
484
485 * Throughout - add new argument to scsi_init_malloc that takes an
486 additional parameter. This is used as a priority to kmalloc,
487 and you can specify the GFP_DMA flag if you need DMA-able memory.
488
489 * Makefile: For source files that are loadable, always add name
490 to SCSI_SRCS. Fill in modules: target.
491
492 * hosts.c: Change next_host to next_scsi_host, and make global.
493 Print hosts after we have identified all of them. Use info()
494 function if present, otherwise use name field.
495
496 * hosts.h: Change attach function to return int, not void.
497 Define number of device slots to allow for loadable devices.
498 Define tags to tell scsi module code what type of module we
499 are loading.
500
501 * scsi.c: Fix scan_scsis so that it can be run by a user process.
502 Do not use waiting loops - use up and down mechanism as long
503 as current != task[0].
504
505 * scsi.c(scan_scsis): Do not use stack variables for I/O - this
506 could be > 16Mb if we are loading a module at runtime (i.e. use
507 scsi_init_malloc to get some memory we know will be safe).
508
509 * scsi.c: Change dma freelist to be a set of pages. This allows
510 us to dynamically adjust the size of the list by adding more pages
511 to the pagelist. Fix scsi_malloc and scsi_free accordingly.
512
513 * scsi_module.c: Fix include.
514
515 * sd.c: Declare detach function. Increment/decrement module usage
516 count as required. Fix init functions to allow loaded devices.
517 Revalidate all new disks so we get the partition tables. Define
518 detach function.
519
520 * sr.c: Likewise.
521
522 * sg.c: Declare detach function. Allow attachment of devices on
523 loaded drivers.
524
525 * st.c: Declare detach function. Increment/decrement module usage
526 count as required.
527
528Tue Jan 10 10:09:58 1995 Eric Youngdale (eric@andante)
529
530 * Linux 1.1.79 released.
531
532 Patch from some undetermined individual who needs to get a life :-).
533
534 * sr.c: Attacked by spelling bee...
535
536 Patches from Gerd Knorr:
537
538 * sr.c: make printk messages for photoCD a little more informative.
539
540 * sr_ioctl.c: Fix CDROMMULTISESSION_SYS ioctl.
541
542Mon Jan 9 10:01:37 1995 Eric Youngdale (eric@andante)
543
544 * Linux 1.1.78 released.
545
546 * Makefile: Add empty modules: target.
547
548 * Wheee. Now change register_iomem to request_region.
549
550 * in2000.c: Bugfix - apparently this is the fix that we have
551 all been waiting for. It fixes a problem whereby the driver
552 is not stable under heavy load. Race condition and all that.
553 Patch from Peter Lu.
554
555Wed Jan 4 21:17:40 1995 Eric Youngdale (eric@andante)
556
557 * Linux 1.1.77 released.
558
559 * 53c7,8xx.c: Fix from Linus - emulate splx.
560
561 Throughout:
562
563 Change "snarf_region" with "register_iomem".
564
565 * scsi_module.c: New file. Contains support for low-level loadable
566 scsi drivers. [ERY].
567
568 * sd.c: More s/int/long/ changes.
569
570 * seagate.c: Explicitly include linux/config.h
571
572 * sg.c: Increment/decrement module usage count on open/close.
573
574 * sg.c: Be a bit more careful about the user not supplying enough
575 information for a valid command. Pass correct size down to
576 scsi_do_cmd.
577
578 * sr.c: More changes for Photo-CD. This apparently breaks NEC drives.
579
580 * sr_ioctl.c: Support CDROMMULTISESSION ioctl.
581
582
583Sun Jan 1 19:55:21 1995 Eric Youngdale (eric@andante)
584
585 * Linux 1.1.76 released.
586
587 * constants.c: Add type cast in switch statement.
588
589 * scsi.c (scsi_free): Change datatype of "offset" to long.
590 (scsi_malloc): Change a few more variables to long. Who
591 did this and why was it important? 64 bit machines?
592
593
594 Lots of changes to use save_state/restore_state instead of cli/sti.
595 Files changed include:
596
597 * aha1542.c:
598 * aha1740.c:
599 * buslogic.c:
600 * in2000.c:
601 * scsi.c:
602 * scsi_debug.c:
603 * sd.c:
604 * sr.c:
605 * st.c:
606
607Wed Dec 28 16:38:29 1994 Eric Youngdale (eric@andante)
608
609 * Linux 1.1.75 released.
610
611 * buslogic.c: Spelling fix.
612
613 * scsi.c: Add HP C1790A and C2500A scanjet to blacklist.
614
615 * scsi.c: Spelling fixup.
616
617 * sd.c: Add support for sd_hardsizes (hard sector sizes).
618
619 * ultrastor.c: Use save_flags/restore_flags instead of cli/sti.
620
621Fri Dec 23 13:36:25 1994 Eric Youngdale (eric@andante)
622
623 * Linux 1.1.74 released.
624
625 * README.st: Update from Kai Makisara.
626
627 * eata.c: New version from Dario - version 1.11.
628 use scsicam bios_param routine. Add support for 2011
629 and 2021 boards.
630
631 * hosts.c: Add support for blocking. Linked list automatically
632 generated when shpnt->block is set.
633
634 * scsi.c: Add sankyo & HP scanjet to blacklist. Add support for
635 kicking things loose when we deadlock.
636
637 * scsi.c: Recognize scanners and processors in scan_scsis.
638
639 * scsi_ioctl.h: Increase timeout to 9 seconds.
640
641 * st.c: New version from Kai - add better support for backspace.
642
643 * u14-34f.c: New version from Dario. Supports blocking.
644
645Wed Dec 14 14:46:30 1994 Eric Youngdale (eric@andante)
646
647 * Linux 1.1.73 released.
648
649 * buslogic.c: Update from Dave Gentzel. Version 1.14.
650 Add module related stuff. More fault tolerant if out of
651 DMA memory.
652
653 * fdomain.c: New version from Rik Faith - version 5.22. Add support
654 for ISA-200S SCSI adapter.
655
656 * hosts.c: Spelling.
657
658 * qlogic.c: Update to version 0.38a. Add more support for PCMCIA.
659
660 * scsi.c: Mask device type with 0x1f during scan_scsis.
661 Add support for deadlocking, err, make that getting out of
662 deadlock situations that are created when we allow the user
663 to limit requests to one host adapter at a time.
664
665 * scsi.c: Bugfix - pass pid, not SCpnt as second arg to
666 scsi_times_out.
667
668 * scsi.c: Restore interrupt state to previous value instead of using
669 cli/sti pairs.
670
671 * scsi.c: Add a bunch of module stuff (all commented out for now).
672
673 * scsi.c: Clean up scsi_dump_status.
674
675Tue Dec 6 12:34:20 1994 Eric Youngdale (eric@andante)
676
677 * Linux 1.1.72 released.
678
679 * sg.c: Bugfix - always use sg_free, since we might have big buff.
680
681Fri Dec 2 11:24:53 1994 Eric Youngdale (eric@andante)
682
683 * Linux 1.1.71 released.
684
685 * sg.c: Clear buff field when not in use. Only call scsi_free if
686 non-null.
687
688 * scsi.h: Call wake_up(&wait_for_request) when done with a
689 command.
690
691 * scsi.c (scsi_times_out): Pass pid down so that we can protect
692 against race conditions.
693
694 * scsi.c (scsi_abort): Zero timeout field if we get the
695 NOT_RUNNING message back from low-level driver.
696
697
698 * scsi.c (scsi_done): Restore cmd_len, use_sg here.
699
700 * scsi.c (request_sense): Not here.
701
702 * hosts.h: Add new forbidden_addr, forbidden_size fields. Who
703 added these and why????
704
705 * hosts.c (scsi_mem_init): Mark pages as reserved if they fall in
706 the forbidden regions. I am not sure - I think this is so that
707 we can deal with boards that do incomplete decoding of their
708 address lines for the bios chips, but I am not entirely sure.
709
710 * buslogic.c: Set forbidden_addr stuff if using a buggy board.
711
712 * aha1740.c: Test for NULL pointer in SCtmp. This should not
713 occur, but a nice message is better than a kernel segfault.
714
715 * 53c7,8xx.c: Add new PCI chip ID for 815.
716
717Fri Dec 2 11:24:53 1994 Eric Youngdale (eric@andante)
718
719 * Linux 1.1.70 released.
720
721 * ChangeLog, st.c: Spelling.
722
723Tue Nov 29 18:48:42 1994 Eric Youngdale (eric@andante)
724
725 * Linux 1.1.69 released.
726
727 * u14-34f.h: Non-functional change. [Dario].
728
729 * u14-34f.c: Use block field in Scsi_Host to prevent commands from
730 being queued to more than one host at the same time (used when
731 motherboard does not deal with multiple bus-masters very well).
732 Only when SINGLE_HOST_OPERATIONS is defined.
733 Use new cmd_per_lun field. [Dario]
734
735 * eata.c: Likewise.
736
737 * st.c: More changes from Kai. Add ready flag to indicate drive
738 status.
739
740 * README.st: Document this.
741
742 * sr.c: Bugfix (do not subtract CD_BLOCK_OFFSET) for photo-cd
743 code.
744
745 * sg.c: Bugfix - fix problem where opcode is not correctly set up.
746
747 * seagate.[c,h]: Use #defines to set driver name.
748
749 * scsi_ioctl.c: Zero buffer before executing command.
750
751 * scsi.c: Use new cmd_per_lun field in Scsi_Hosts as appropriate.
752 Add Sony CDU55S to blacklist.
753
754 * hosts.h: Add new cmd_per_lun field to Scsi_Hosts.
755
756 * hosts.c: Initialize cmd_per_lun in Scsi_Hosts from template.
757
758 * buslogic.c: Use cmd_per_lun field - initialize to different
759 values depending upon bus type (i.e. use 1 if ISA, so we do not
760 hog memory). Use other patches which got lost from 1.1.68.
761
762 * aha1542.c: Spelling.
763
764Tue Nov 29 15:43:50 1994 Eric Youngdale (eric@andante.aib.com)
765
766 * Linux 1.1.68 released.
767
768 Add support for 12 byte vendor specific commands in scsi-generics,
769 more (i.e. the last mandatory) low-level changes to support
770 loadable modules, plus a few other changes people have requested
771 lately. Changes by me (ERY) unless otherwise noted. Spelling
772 changes appear from some unknown corner of the universe.
773
774 * Throughout: Change COMMAND_SIZE() to use SCpnt->cmd_len.
775
776 * Throughout: Change info() low level function to take a Scsi_Host
777 pointer. This way the info function can return specific
778 information about the host in question, if desired.
779
780 * All low-level drivers: Add NULL in initializer for the
781 usage_count field added to Scsi_Host_Template.
782
783 * aha152x.[c,h]: Remove redundant info() function.
784
785 * aha1542.[c,h]: Likewise.
786
787 * aha1740.[c,h]: Likewise.
788
789 * aha274x.[c,h]: Likewise.
790
791 * eata.[c,h]: Likewise.
792
793 * pas16.[c,h]: Likewise.
794
795 * scsi_debug.[c,h]: Likewise.
796
797 * t128.[c,h]: Likewise.
798
799 * u14-34f.[c,h]: Likewise.
800
801 * ultrastor.[c,h]: Likewise.
802
803 * wd7000.[c,h]: Likewise.
804
805 * aha1542.c: Add support for command line options with lilo to set
806 DMA parameters, I/O port. From Matt Aarnio.
807
808 * buslogic.[c,h]: New version (1.13) from Dave Gentzel.
809
810 * hosts.h: Add new field to Scsi_Hosts "block" to allow blocking
811 all I/O to certain other cards. Helps prevent problems with some
812 ISA motherboards.
813
814 * hosts.h: Add usage_count to Scsi_Host_Template.
815
816 * hosts.h: Add n_io_port to Scsi_Host (used when releasing module).
817
818 * hosts.c: Initialize block field.
819
820 * in2000.c: Remove "static" declarations from exported functions.
821
822 * in2000.h: Likewise.
823
824 * scsi.c: Correctly set cmd_len field as required. Save and
825 change setting when doing a request_sense, restore when done.
826 Move abort timeout message. Fix panic in request_queueable to
827 print correct function name.
828
829 * scsi.c: When incrementing usage count, walk block linked list
830 for host, and or in SCSI_HOST_BLOCK bit. When decrementing usage
831 count to 0, clear this bit to allow usage to continue, wake up
832 processes waiting.
833
834
835 * scsi_ioctl.c: If we have an info() function, call it, otherwise
836 if we have a "name" field, use it, else do nothing.
837
838 * sd.c, sr.c: Clear cmd_len field prior to each command we
839 generate.
840
841 * sd.h: Add "has_part_table" bit to rscsi_disks.
842
843 * sg.[c,h]: Add support for vendor specific 12 byte commands (i.e.
844 override command length in COMMAND_SIZE).
845
846 * sr.c: Bugfix from Gerd in photocd code.
847
848 * sr.c: Bugfix in get_sectorsize - always use scsi_malloc buffer -
849 we cannot guarantee that the stack is < 16Mb.
850
851Tue Nov 22 15:40:46 1994 Eric Youngdale (eric@andante.aib.com)
852
853 * Linux 1.1.67 released.
854
855 * sr.c: Change spelling of manufactor to manufacturer.
856
857 * scsi.h: Likewise.
858
859 * scsi.c: Likewise.
860
861 * qlogic.c: Spelling corrections.
862
863 * in2000.h: Spelling corrections.
864
865 * in2000.c: Update from Bill Earnest, change from
866 jshiffle@netcom.com. Support new bios versions.
867
868 * README.qlogic: Spelling correction.
869
870Tue Nov 22 15:40:46 1994 Eric Youngdale (eric@andante.aib.com)
871
872 * Linux 1.1.66 released.
873
874 * u14-34f.c: Spelling corrections.
875
876 * sr.[h,c]: Add support for multi-session CDs from Gerd Knorr.
877
878 * scsi.h: Add manufactor field for keeping track of device
879 manufacturer.
880
881 * scsi.c: More spelling corrections.
882
883 * qlogic.h, qlogic.c, README.qlogic: New driver from Tom Zerucha.
884
885 * in2000.c, in2000.h: New driver from Brad McLean/Bill Earnest.
886
887 * fdomain.c: Spelling correction.
888
889 * eata.c: Spelling correction.
890
891Fri Nov 18 15:22:44 1994 Eric Youngdale (eric@andante.aib.com)
892
893 * Linux 1.1.65 released.
894
895 * eata.h: Update version string to 1.08.00.
896
897 * eata.c: Set sg_tablesize correctly for DPT PM2012 boards.
898
899 * aha274x.seq: Spell checking.
900
901 * README.st: Likewise.
902
903 * README.aha274x: Likewise.
904
905 * ChangeLog: Likewise.
906
907Tue Nov 15 15:35:08 1994 Eric Youngdale (eric@andante.aib.com)
908
909 * Linux 1.1.64 released.
910
911 * u14-34f.h: Update version number to 1.10.01.
912
913 * u14-34f.c: Use Scsi_Host can_queue variable instead of one from template.
914
915 * eata.[c,h]: New driver for DPT boards from Dario Ballabio.
916
917 * buslogic.c: Use can_queue field.
918
919Wed Nov 30 12:09:09 1994 Eric Youngdale (eric@andante.aib.com)
920
921 * Linux 1.1.63 released.
922
923 * sd.c: Give I/O error if we attempt 512 byte I/O to a disk with
924 1024 byte sectors.
925
926 * scsicam.c: Make sure we do read from whole disk (mask off
927 partition).
928
929 * scsi.c: Use can_queue in Scsi_Host structure.
930 Fix panic message about invalid host.
931
932 * hosts.c: Initialize can_queue from template.
933
934 * hosts.h: Add can_queue to Scsi_Host structure.
935
936 * aha1740.c: Print out warning about NULL ecbptr.
937
938Fri Nov 4 12:40:30 1994 Eric Youngdale (eric@andante.aib.com)
939
940 * Linux 1.1.62 released.
941
942 * fdomain.c: Update to version 5.20. (From Rik Faith). Support
943 BIOS version 3.5.
944
945 * st.h: Add ST_EOD symbol.
946
947 * st.c: Patches from Kai Makisara - support additional densities,
948 add support for MTFSS, MTBSS, MTWSM commands.
949
950 * README.st: Update to document new commands.
951
952 * scsi.c: Add Mediavision CDR-H93MV to blacklist.
953
954Sat Oct 29 20:57:36 1994 Eric Youngdale (eric@andante.aib.com)
955
956 * Linux 1.1.60 released.
957
958 * u14-34f.[c,h]: New driver from Dario Ballabio.
959
960 * aic7770.c, aha274x_seq.h, aha274x.seq, aha274x.h, aha274x.c,
961 README.aha274x: New files, new driver from John Aycock.
962
963
964Tue Oct 11 08:47:39 1994 Eric Youngdale (eric@andante)
965
966 * Linux 1.1.54 released.
967
968 * Add third PCI chip id. [Drew]
969
970 * buslogic.c: Set BUSLOGIC_CMDLUN back to 1 [Eric].
971
972 * ultrastor.c: Fix asm directives for new GCC.
973
974 * sr.c, sd.c: Use new end_scsi_request function.
975
976 * scsi.h(end_scsi_request): Return pointer to block if still
977 active, else return NULL if inactive. Fixes race condition.
978
979Sun Oct 9 20:23:14 1994 Eric Youngdale (eric@andante)
980
981 * Linux 1.1.53 released.
982
983 * scsi.c: Do not allocate dma bounce buffers if we have exactly
984 16Mb.
985
986Fri Sep 9 05:35:30 1994 Eric Youngdale (eric@andante)
987
988 * Linux 1.1.51 released.
989
990 * aha152x.c: Add support for disabling the parity check. Update
991 to version 1.4. [Juergen].
992
993 * seagate.c: Tweak debugging message.
994
995Wed Aug 31 10:15:55 1994 Eric Youngdale (eric@andante)
996
997 * Linux 1.1.50 released.
998
999 * aha152x.c: Add eb800 for Vtech Platinum SMP boards. [Juergen].
1000
1001 * scsi.c: Add Quantum PD1225S to blacklist.
1002
1003Fri Aug 26 09:38:45 1994 Eric Youngdale (eric@andante)
1004
1005 * Linux 1.1.49 released.
1006
1007 * sd.c: Fix bug when we were deleting the wrong entry if we
1008 get an unsupported sector size device.
1009
1010 * sr.c: Another spelling patch.
1011
1012Thu Aug 25 09:15:27 1994 Eric Youngdale (eric@andante)
1013
1014 * Linux 1.1.48 released.
1015
1016 * Throughout: Use new semantics for request_dma, as appropriate.
1017
1018 * sr.c: Print correct device number.
1019
1020Sun Aug 21 17:49:23 1994 Eric Youngdale (eric@andante)
1021
1022 * Linux 1.1.47 released.
1023
1024 * NCR5380.c: Add support for LIMIT_TRANSFERSIZE.
1025
1026 * constants.h: Add prototype for print_Scsi_Cmnd.
1027
1028 * pas16.c: Some more minor tweaks. Test for Mediavision board.
1029 Allow for disks > 1Gb. [Drew??]
1030
1031 * sr.c: Set SCpnt->transfersize.
1032
1033Tue Aug 16 17:29:35 1994 Eric Youngdale (eric@andante)
1034
1035 * Linux 1.1.46 released.
1036
1037 * Throughout: More spelling fixups.
1038
1039 * buslogic.c: Add a few more fixups from Dave. Disk translation
1040 mainly.
1041
1042 * pas16.c: Add a few patches (Drew?).
1043
1044
1045Thu Aug 11 20:45:15 1994 Eric Youngdale (eric@andante)
1046
1047 * Linux 1.1.44 released.
1048
1049 * hosts.c: Add type casts for scsi_init_malloc.
1050
1051 * scsicam.c: Add type cast.
1052
1053Wed Aug 10 19:23:01 1994 Eric Youngdale (eric@andante)
1054
1055 * Linux 1.1.43 released.
1056
1057 * Throughout: Spelling cleanups. [??]
1058
1059 * aha152x.c, NCR53*.c, fdomain.c, g_NCR5380.c, pas16.c, seagate.c,
1060 t128.c: Use request_irq, not irqaction. [??]
1061
1062 * aha1542.c: Move test for shost before we start to use shost.
1063
1064 * aha1542.c, aha1740.c, ultrastor.c, wd7000.c: Use new
1065 calling sequence for request_irq.
1066
1067 * buslogic.c: Update from Dave Gentzel.
1068
1069Tue Aug 9 09:32:59 1994 Eric Youngdale (eric@andante)
1070
1071 * Linux 1.1.42 released.
1072
1073 * NCR5380.c: Change NCR5380_print_status to static.
1074
1075 * seagate.c: A few more bugfixes. Only Drew knows what they are
1076 for.
1077
1078 * ultrastor.c: Tweak some __asm__ directives so that it works
1079 with newer compilers. [??]
1080
1081Sat Aug 6 21:29:36 1994 Eric Youngdale (eric@andante)
1082
1083 * Linux 1.1.40 released.
1084
1085 * NCR5380.c: Return SCSI_RESET_WAKEUP from reset function.
1086
1087 * aha1542.c: Reset mailbox status after a bus device reset.
1088
1089 * constants.c: Fix typo (;;).
1090
1091 * g_NCR5380.c:
1092 * pas16.c: Correct usage of NCR5380_init.
1093
1094 * scsi.c: Remove redundant (and unused variables).
1095
1096 * sd.c: Use memset to clear all of rscsi_disks before we use it.
1097
1098 * sg.c: Ditto, except for scsi_generics.
1099
1100 * sr.c: Ditto, except for scsi_CDs.
1101
1102 * st.c: Initialize STp->device.
1103
1104 * seagate.c: Fix bug. [Drew]
1105
1106Thu Aug 4 08:47:27 1994 Eric Youngdale (eric@andante)
1107
1108 * Linux 1.1.39 released.
1109
1110 * Makefile: Fix typo in NCR53C7xx.
1111
1112 * st.c: Print correct number for device.
1113
1114Tue Aug 2 11:29:14 1994 Eric Youngdale (eric@esp22)
1115
1116 * Linux 1.1.38 released.
1117
1118 Lots of changes in 1.1.38. All from Drew unless otherwise noted.
1119
1120 * 53c7,8xx.c: New file from Drew. PCI driver.
1121
1122 * 53c7,8xx.h: Likewise.
1123
1124 * 53c7,8xx.scr: Likewise.
1125
1126 * 53c8xx_d.h, 53c8xx_u.h, script_asm.pl: Likewise.
1127
1128 * scsicam.c: New file from Drew. Read block 0 on the disk and
1129 read the partition table. Attempt to deduce the geometry from
1130 the partition table if possible. Only used by 53c[7,8]xx right
1131 now, but could be used by any device for which we have no way
1132 of identifying the geometry.
1133
1134 * sd.c: Use device letters instead of sd%d in a lot of messages.
1135
1136 * seagate.c: Fix bug that resulted in lockups with some devices.
1137
1138 * sr.c (sr_open): Return -EROFS, not -EACCES if we attempt to open
1139 device for write.
1140
1141 * hosts.c, Makefile: Update for new driver.
1142
1143 * NCR5380.c, NCR5380.h, g_NCR5380.h: Update from Drew to support
1144 53C400 chip.
1145
1146 * constants.c: Define CONST_CMND and CONST_MSG. Other minor
1147 cleanups along the way. Improve handling of CONST_MSG.
1148
1149 * fdomain.c, fdomain.h: New version from Rik Faith. Update to
1150 5.18. Should now support TMC-3260 PCI card with 18C30 chip.
1151
1152 * pas16.c: Update with new irq initialization.
1153
1154 * t128.c: Update with minor cleanups.
1155
1156 * scsi.c (scsi_pid): New variable - gives each command a unique
1157 id. Add Quantum LPS5235S to blacklist. Change in_scan to
1158 in_scan_scsis and make global.
1159
1160 * scsi.h: Add some defines for extended message handling,
1161 INITIATE/RELEASE_RECOVERY. Add a few new fields to support sync
1162 transfers.
1163
1164 * scsi_ioctl.h: Add ioctl to request synchronous transfers.
1165
1166
1167Tue Jul 26 21:36:58 1994 Eric Youngdale (eric@esp22)
1168
1169 * Linux 1.1.37 released.
1170
1171 * aha1542.c: Always call aha1542_mbenable, use new udelay
1172 mechanism so we do not wait a long time if the board does not
1173 implement this command.
1174
1175 * g_NCR5380.c: Remove #include <linux/config.h> and #if
1176 defined(CONFIG_SCSI_*).
1177
1178 * seagate.c: Likewise.
1179
1180 Next round of changes to support loadable modules. Getting closer
1181 now, still not possible to do anything remotely usable.
1182
1183 hosts.c: Create a linked list of detected high level devices.
1184 (scsi_register_device): New function to insert into this list.
1185 (scsi_init): Call scsi_register_device for each of the known high
1186 level drivers.
1187
1188 hosts.h: Add prototype for linked list header. Add structure
1189 definition for device template structure which defines the linked
1190 list.
1191
1192 scsi.c: (scan_scsis): Use linked list instead of knowledge about
1193 existing high level device drivers.
1194 (scsi_dev_init): Use init functions for drivers on linked list
1195 instead of explicit list to initialize and attach devices to high
1196 level drivers.
1197
1198 scsi.h: Add new field "attached" to scsi_device - count of number
1199 of high level devices attached.
1200
1201 sd.c, sr.c, sg.c, st.c: Adjust init/attach functions to use new
1202 scheme.
1203
1204Sat Jul 23 13:03:17 1994 Eric Youngdale (eric@esp22)
1205
1206 * Linux 1.1.35 released.
1207
1208 * ultrastor.c: Change constraint on asm() operand so that it works
1209 with gcc 2.6.0.
1210
1211Thu Jul 21 10:37:39 1994 Eric Youngdale (eric@esp22)
1212
1213 * Linux 1.1.33 released.
1214
1215 * sr.c(sr_open): Do not allow opens with write access.
1216
1217Mon Jul 18 09:51:22 1994 1994 Eric Youngdale (eric@esp22)
1218
1219 * Linux 1.1.31 released.
1220
1221 * sd.c: Increase SD_TIMEOUT from 300 to 600.
1222
1223 * sr.c: Remove stray task_struct* variable that was no longer
1224 used.
1225
1226 * sr_ioctl.c: Fix typo in up() call.
1227
1228Sun Jul 17 16:25:29 1994 Eric Youngdale (eric@esp22)
1229
1230 * Linux 1.1.30 released.
1231
1232 * scsi.c (scan_scsis): Fix detection of some Toshiba CDROM drives
1233 that report themselves as disk drives.
1234
1235 * (Throughout): Use request.sem instead of request.waiting.
1236 Should fix swap problem with fdomain.
1237
1238Thu Jul 14 10:51:42 1994 Eric Youngdale (eric@esp22)
1239
1240 * Linux 1.1.29 released.
1241
1242 * scsi.c (scan_scsis): Add new devices to end of linked list, not
1243 to the beginning.
1244
1245 * scsi.h (SCSI_SLEEP): Remove brain dead hack to try to save
1246 the task state before sleeping.
1247
1248Sat Jul 9 15:01:03 1994 Eric Youngdale (eric@esp22)
1249
1250 More changes to eventually support loadable modules. Mainly
1251 we want to use linked lists instead of arrays because it is easier
1252 to dynamically add and remove things this way.
1253
1254 Quite a bit more work is needed before loadable modules are
1255 possible (and usable) with scsi, but this is most of the grunge
1256 work.
1257
1258 * Linux 1.1.28 released.
1259
1260 * scsi.c, scsi.h (allocate_device, request_queueable): Change
1261 argument from index into scsi_devices to a pointer to the
1262 Scsi_Device struct.
1263
1264 * Throughout: Change all calls to allocate_device,
1265 request_queueable to use new calling sequence.
1266
1267 * Throughout: Use SCpnt->device instead of
1268 scsi_devices[SCpnt->index]. Ugh - the pointer was there all along
1269 - much cleaner this way.
1270
1271 * scsi.c (scsi_init_malloc, scsi_free_malloc): New functions -
1272 allow us to pretend that we have a working malloc when we
1273 initialize. Use this instead of passing memory_start, memory_end
1274 around all over the place.
1275
1276 * scsi.h, st.c, sr.c, sd.c, sg.c: Change *_init1 functions to use
1277 scsi_init_malloc, remove all arguments, no return value.
1278
1279 * scsi.h: Remove index field from Scsi_Device and Scsi_Cmnd
1280 structs.
1281
1282 * scsi.c (scsi_dev_init): Set up for scsi_init_malloc.
1283 (scan_scsis): Get SDpnt from scsi_init_malloc, and refresh
1284 when we discover a device. Free pointer before returning.
1285 Change scsi_devices into a linked list.
1286
1287 * scsi.c (scan_scsis): Change to only scan one host.
1288 (scsi_dev_init): Loop over all detected hosts, and scan them.
1289
1290 * hosts.c (scsi_init_free): Change so that number of extra bytes
1291 is stored in struct, and we do not have to pass it each time.
1292
1293 * hosts.h: Change Scsi_Host_Template struct to include "next" and
1294 "release" functions. Initialize to NULL in all low level
1295 adapters.
1296
1297 * hosts.c: Rename scsi_hosts to builtin_scsi_hosts, create linked
1298 list scsi_hosts, linked together with the new "next" field.
1299
1300Wed Jul 6 05:45:02 1994 Eric Youngdale (eric@esp22)
1301
1302 * Linux 1.1.25 released.
1303
1304 * aha152x.c: Changes from Juergen - cleanups and updates.
1305
1306 * sd.c, sr.c: Use new check_media_change and revalidate
1307 file_operations fields.
1308
1309 * st.c, st.h: Add changes from Kai Makisara, dated Jun 22.
1310
1311 * hosts.h: Change SG_ALL back to 0xff. Apparently soft error
1312 in /dev/brain resulted in having this bumped up.
1313 Change first parameter in bios_param function to be Disk * instead
1314 of index into rscsi_disks.
1315
1316 * sd_ioctl.c: Pass pointer to rscsi_disks element instead of index
1317 to array.
1318
1319 * sd.h: Add struct name "scsi_disk" to typedef for Scsi_Disk.
1320
1321 * scsi.c: Remove redundant Maxtor XT8760S from blacklist.
1322 In scsi_reset, add printk when DEBUG defined.
1323
1324 * All low level drivers: Modify definitions of bios_param in
1325 appropriate way.
1326
1327Thu Jun 16 10:31:59 1994 Eric Youngdale (eric@esp22)
1328
1329 * Linux 1.1.20 released.
1330
1331 * scsi_ioctl.c: Only pass down the actual number of characters
1332 required to scsi_do_cmd, not the one rounded up to a even number
1333 of sectors.
1334
1335 * ultrastor.c: Changes from Caleb Epstein for 24f cards. Support
1336 larger SG lists.
1337
1338 * ultrastor.c: Changes from me - use scsi_register to register
1339 host. Add some consistency checking,
1340
1341Wed Jun 1 21:12:13 1994 Eric Youngdale (eric@esp22)
1342
1343 * Linux 1.1.19 released.
1344
1345 * scsi.h: Add new return code for reset() function:
1346 SCSI_RESET_PUNT.
1347
1348 * scsi.c: Make SCSI_RESET_PUNT the same as SCSI_RESET_WAKEUP for
1349 now.
1350
1351 * aha1542.c: If the command responsible for the reset is not
1352 pending, return SCSI_RESET_PUNT.
1353
1354 * aha1740.c, buslogic.c, wd7000.c, ultrastor.c: Return
1355 SCSI_RESET_PUNT instead of SCSI_RESET_SNOOZE.
1356
1357Tue May 31 19:36:01 1994 Eric Youngdale (eric@esp22)
1358
1359 * buslogic.c: Do not print out message about "must be Adaptec"
1360 if we have detected a buslogic card. Print out a warning message
1361 if we are configuring for >16Mb, since the 445S at board level
1362 D or earlier does not work right. The "D" level board can be made
1363 to work by flipping an undocumented switch, but this is too subtle.
1364
1365 Changes based upon patches in Yggdrasil distribution.
1366
1367 * sg.c, sg.h: Return sense data to user.
1368
1369 * aha1542.c, aha1740.c, buslogic.c: Do not panic if
1370 sense buffer is wrong size.
1371
1372 * hosts.c: Test for ultrastor card before any of the others.
1373
1374 * scsi.c: Allow boot-time option for max_scsi_luns=? so that
1375 buggy firmware has an easy work-around.
1376
1377Sun May 15 20:24:34 1994 Eric Youngdale (eric@esp22)
1378
1379 * Linux 1.1.15 released.
1380
1381 Post-codefreeze thaw...
1382
1383 * buslogic.[c,h]: New driver from David Gentzel.
1384
1385 * hosts.h: Add use_clustering field to explicitly say whether
1386 clustering should be used for devices attached to this host
1387 adapter. The buslogic board apparently supports large SG lists,
1388 but it is apparently faster if sd.c condenses this into a smaller
1389 list.
1390
1391 * sd.c: Use this field instead of heuristic.
1392
1393 * All host adapter include files: Add appropriate initializer for
1394 use_clustering field.
1395
1396 * scsi.h: Add #defines for return codes for the abort and reset
1397 functions. There are now a specific set of return codes to fully
1398 specify all of the possible things that the low-level adapter
1399 could do.
1400
1401 * scsi.c: Act based upon return codes from abort/reset functions.
1402
1403 * All host adapter abort/reset functions: Return new return code.
1404
1405 * Add code in scsi.c to help debug timeouts. Use #define
1406 DEBUG_TIMEOUT to enable this.
1407
1408 * scsi.c: If the host->irq field is set, use
1409 disable_irq/enable_irq before calling queuecommand if we
1410 are not already in an interrupt. Reduce races, and we
1411 can be sloppier about cli/sti in the interrupt routines now
1412 (reduce interrupt latency).
1413
1414 * constants.c: Fix some things to eliminate warnings. Add some
1415 sense descriptions that were omitted before.
1416
1417 * aha1542.c: Watch for SCRD from host adapter - if we see it, set
1418 a flag. Currently we only print out the number of pending
1419 commands that might need to be restarted.
1420
1421 * aha1542.c (aha1542_abort): Look for lost interrupts, OGMB still
1422 full, and attempt to recover. Otherwise give up.
1423
1424 * aha1542.c (aha1542_reset): Try BUS DEVICE RESET, and then pass
1425 DID_RESET back up to the upper level code for all commands running
1426 on this target (even on different LUNs).
1427
1428Sat May 7 14:54:01 1994
1429
1430 * Linux 1.1.12 released.
1431
1432 * st.c, st.h: New version from Kai. Supports boot time
1433 specification of number of buffers.
1434
1435 * wd7000.[c,h]: Updated driver from John Boyd. Now supports
1436 more than one wd7000 board in machine at one time, among other things.
1437
1438Wed Apr 20 22:20:35 1994
1439
1440 * Linux 1.1.8 released.
1441
1442 * sd.c: Add a few type casts where scsi_malloc is called.
1443
1444Wed Apr 13 12:53:29 1994
1445
1446 * Linux 1.1.4 released.
1447
1448 * scsi.c: Clean up a few printks (use %p to print pointers).
1449
1450Wed Apr 13 11:33:02 1994
1451
1452 * Linux 1.1.3 released.
1453
1454 * fdomain.c: Update to version 5.16 (Handle different FIFO sizes
1455 better).
1456
1457Fri Apr 8 08:57:19 1994
1458
1459 * Linux 1.1.2 released.
1460
1461 * Throughout: SCSI portion of cluster diffs added.
1462
1463Tue Apr 5 07:41:50 1994
1464
1465 * Linux 1.1 development tree initiated.
1466
1467 * The linux 1.0 development tree is now effectively frozen except
1468 for obvious bugfixes.
1469
1470******************************************************************
1471******************************************************************
1472******************************************************************
1473******************************************************************
1474
1475Sun Apr 17 00:17:39 1994
1476
1477 * Linux 1.0, patchlevel 9 released.
1478
1479 * fdomain.c: Update to version 5.16 (Handle different FIFO sizes
1480 better).
1481
1482Thu Apr 7 08:36:20 1994
1483
1484 * Linux 1.0, patchlevel8 released.
1485
1486 * fdomain.c: Update to version 5.15 from 5.9. Handles 3.4 bios.
1487
1488Sun Apr 3 14:43:03 1994
1489
1490 * Linux 1.0, patchlevel6 released.
1491
1492 * wd7000.c: Make stab at fixing race condition.
1493
1494Sat Mar 26 14:14:50 1994
1495
1496 * Linux 1.0, patchlevel5 released.
1497
1498 * aha152x.c, Makefile: Fix a few bugs (too much data message).
1499 Add a few more bios signatures. (Patches from Juergen).
1500
1501 * aha1542.c: Fix race condition in aha1542_out.
1502
1503Mon Mar 21 16:36:20 1994
1504
1505 * Linux 1.0, patchlevel3 released.
1506
1507 * sd.c, st.c, sr.c, sg.c: Return -ENXIO, not -ENODEV if we attempt
1508 to open a non-existent device.
1509
1510 * scsi.c: Add Chinon cdrom to blacklist.
1511
1512 * sr_ioctl.c: Check return status of verify_area.
1513
1514Sat Mar 6 16:06:19 1994
1515
1516 * Linux 1.0 released (technically a pre-release).
1517
1518 * scsi.c: Add IMS CDD521, Maxtor XT-8760S to blacklist.
1519
1520Tue Feb 15 10:58:20 1994
1521
1522 * pl15e released.
1523
1524 * aha1542.c: For 1542C, allow dynamic device scan with >1Gb turned
1525 off.
1526
1527 * constants.c: Fix typo in definition of CONSTANTS.
1528
1529 * pl15d released.
1530
1531Fri Feb 11 10:10:16 1994
1532
1533 * pl15c released.
1534
1535 * scsi.c: Add Maxtor XT-3280 and Rodime RO3000S to blacklist.
1536
1537 * scsi.c: Allow tagged queueing for scsi 3 devices as well.
1538 Some really old devices report a version number of 0. Disallow
1539 LUN != 0 for these.
1540
1541Thu Feb 10 09:48:57 1994
1542
1543 * pl15b released.
1544
1545Sun Feb 6 12:19:46 1994
1546
1547 * pl15a released.
1548
1549Fri Feb 4 09:02:17 1994
1550
1551 * scsi.c: Add Teac cdrom to blacklist.
1552
1553Thu Feb 3 14:16:43 1994
1554
1555 * pl15 released.
1556
1557Tue Feb 1 15:47:43 1994
1558
1559 * pl14w released.
1560
1561 * wd7000.c (wd_bases): Fix typo in last change.
1562
1563Mon Jan 24 17:37:23 1994
1564
1565 * pl14u released.
1566
1567 * aha1542.c: Support 1542CF/extended bios. Different from 1542C
1568
1569 * wd7000.c: Allow bios at 0xd8000 as well.
1570
1571 * ultrastor.c: Do not truncate cylinders to 1024.
1572
1573 * fdomain.c: Update to version 5.9 (add new bios signature).
1574
1575 * NCR5380.c: Update from Drew - should work a lot better now.
1576
1577Sat Jan 8 15:13:10 1994
1578
1579 * pl14o released.
1580
1581 * sr_ioctl.c: Zero reserved field before trying to set audio volume.
1582
1583Wed Jan 5 13:21:10 1994
1584
1585 * pl14m released.
1586
1587 * fdomain.c: Update to version 5.8. No functional difference???
1588
1589Tue Jan 4 14:26:13 1994
1590
1591 * pl14l released.
1592
1593 * ultrastor.c: Remove outl, inl functions (now provided elsewhere).
1594
1595Mon Jan 3 12:27:25 1994
1596
1597 * pl14k released.
1598
1599 * aha152x.c: Remove insw and outsw functions.
1600
1601 * fdomain.c: Ditto.
1602
1603Wed Dec 29 09:47:20 1993
1604
1605 * pl14i released.
1606
1607 * scsi.c: Support RECOVERED_ERROR for tape drives.
1608
1609 * st.c: Update of tape driver from Kai.
1610
1611Tue Dec 21 09:18:30 1993
1612
1613 * pl14g released.
1614
1615 * aha1542.[c,h]: Support extended BIOS stuff.
1616
1617 * scsi.c: Clean up messages about disks, so they are displayed as
1618 sda, sdb, etc instead of sd0, sd1, etc.
1619
1620 * sr.c: Force reread of capacity if disk was changed.
1621 Clear buffer before asking for capacity/sectorsize (some drives
1622 do not report this properly). Set needs_sector_size flag if
1623 drive did not return sensible sector size.
1624
1625Mon Dec 13 12:13:47 1993
1626
1627 * aha152x.c: Update to version .101 from Juergen.
1628
1629Mon Nov 29 03:03:00 1993
1630
1631 * linux 0.99.14 released.
1632
1633 * All scsi stuff moved from kernel/blk_drv/scsi to drivers/scsi.
1634
1635 * Throughout: Grammatical corrections to various comments.
1636
1637 * Makefile: fix so that we do not need to compile things we are
1638 not going to use.
1639
1640 * NCR5380.c, NCR5380.h, g_NCR5380.c, g_NCR5380.h, pas16.c,
1641 pas16.h, t128.c, t128.h: New files from Drew.
1642
1643 * aha152x.c, aha152x.h: New files from Juergen Fischer.
1644
1645 * aha1542.c: Support for more than one 1542 in the machine
1646 at the same time. Make functions static that do not need
1647 visibility.
1648
1649 * aha1740.c: Set NEEDS_JUMPSTART flag in reset function, so we
1650 know to restart the command. Change prototype of aha1740_reset
1651 to take a command pointer.
1652
1653 * constants.c: Clean up a few things.
1654
1655 * fdomain.c: Update to version 5.6. Move snarf_region. Allow
1656 board to be set at different SCSI ids. Remove support for
1657 reselection (did not work well). Set JUMPSTART flag in reset
1658 code.
1659
1660 * hosts.c: Support new low-level adapters. Allow for more than
1661 one adapter of a given type.
1662
1663 * hosts.h: Allow for more than one adapter of a given type.
1664
1665 * scsi.c: Add scsi_device_types array, if NEEDS_JUMPSTART is set
1666 after a low-level reset, start the command again. Sort blacklist,
1667 and add Maxtor MXT-1240S, XT-4170S, NEC CDROM 84, Seagate ST157N.
1668
1669 * scsi.h: Add constants for tagged queueing.
1670
1671 * Throughout: Use constants from major.h instead of hardcoded
1672 numbers for major numbers.
1673
1674 * scsi_ioctl.c: Fix bug in buffer length in ioctl_command. Use
1675 verify_area in GET_IDLUN ioctl. Add new ioctls for
1676 TAGGED_QUEUE_ENABLE, DISABLE. Only allow IOCTL_SEND_COMMAND by
1677 superuser.
1678
1679 * sd.c: Only pay attention to UNIT_ATTENTION for removable disks.
1680 Fix bug where sometimes portions of blocks would get lost
1681 resulting in processes hanging. Add messages when we spin up a
1682 disk, and fix a bug in the timing. Increase read-ahead for disks
1683 that are on a scatter-gather capable host adapter.
1684
1685 * seagate.c: Fix so that some parameters can be set from the lilo
1686 prompt. Supply jumpstart flag if we are resetting and need the
1687 command restarted. Fix so that we return 1 if we detect a card
1688 so that multiple card detection works correctly. Add yet another
1689 signature for FD cards (950). Add another signature for ST0x.
1690
1691 * sg.c, sg.h: New files from Lawrence Foard for generic scsi
1692 access.
1693
1694 * sr.c: Add type casts for (void*) so that we can do pointer
1695 arithmetic. Works with GCC without this, but it is not strictly
1696 correct. Same bugfix as was in sd.c. Increase read-ahead a la
1697 disk driver.
1698
1699 * sr_ioctl.c: Use scsi_malloc buffer instead of buffer from stack
1700 since we cannot guarantee that the stack is < 16Mb.
1701
1702 ultrastor.c: Update to support 24f properly (JFC's driver).
1703
1704 wd7000.c: Supply jumpstart flag for reset. Do not round up
1705 number of cylinders in biosparam function.
1706
1707Sat Sep 4 20:49:56 1993
1708
1709 * 0.99pl13 released.
1710
1711 * Throughout: Use check_region/snarf_region for all low-level
1712 drivers.
1713
1714 * aha1542.c: Do hard reset instead of soft (some ethercard probes
1715 screw us up).
1716
1717 * scsi.c: Add new flag ASKED_FOR_SENSE so that we can tell if we are
1718 in a loop whereby the device returns null sense data.
1719
1720 * sd.c: Add code to spin up a drive if it is not already spinning.
1721 Do this one at a time to make it easier on power supplies.
1722
1723 * sd_ioctl.c: Use sync_dev instead of fsync_dev in BLKFLSBUF ioctl.
1724
1725 * seagate.c: Switch around DATA/CONTROL lines.
1726
1727 * st.c: Change sense to unsigned.
1728
1729Thu Aug 5 11:59:18 1993
1730
1731 * 0.99pl12 released.
1732
1733 * constants.c, constants.h: New files with ascii descriptions of
1734 various conditions.
1735
1736 * Makefile: Do not try to count the number of low-level drivers,
1737 just generate the list of .o files.
1738
1739 * aha1542.c: Replace 16 with sizeof(SCpnt->sense_buffer). Add tests
1740 for addresses > 16Mb, panic if we find one.
1741
1742 * aha1740.c: Ditto with sizeof().
1743
1744 * fdomain.c: Update to version 3.18. Add new signature, register IRQ
1745 with irqaction. Use ID 7 for new board. Be more intelligent about
1746 obtaining the h/s/c numbers for biosparam.
1747
1748 * hosts.c: Do not depend upon Makefile generated count of the number
1749 of low-level host adapters.
1750
1751 * scsi.c: Use array for scsi_command_size instead of a function. Add
1752 Texel cdrom and Maxtor XT-4380S to blacklist. Allow compile time
1753 option for no-multi lun scan. Add semaphore for possible problems
1754 with handshaking, assume device is faulty until we know it not to be
1755 the case. Add DEBUG_INIT symbol to dump info as we scan for devices.
1756 Zero sense buffer so we can tell if we need to request it. When
1757 examining sense information, request sense if buffer is all zero.
1758 If RESET, request sense information to see what to do next.
1759
1760 * scsi_debug.c: Change some constants to use symbols like INT_MAX.
1761
1762 * scsi_ioctl.c (kernel_scsi_ioctl): New function -for making ioctl
1763 calls from kernel space.
1764
1765 * sd.c: Increase timeout to 300. Use functions in constants.h to
1766 display info. Use scsi_malloc buffer for READ_CAPACITY, since
1767 we cannot guarantee that a stack based buffer is < 16Mb.
1768
1769 * sd_ioctl.c: Add BLKFLSBUF ioctl.
1770
1771 * seagate.c: Add new compile time options for ARBITRATE,
1772 SLOW_HANDSHAKE, and SLOW_RATE. Update assembly loops for transferring
1773 data. Use kernel_scsi_ioctl to request mode page with geometry.
1774
1775 * sr.c: Use functions in constants.c to display messages.
1776
1777 * st.c: Support for variable block size.
1778
1779 * ultrastor.c: Do not use cache for tape drives. Set
1780 unchecked_isa_dma flag, even though this may not be needed (gets set
1781 later).
1782
1783Sat Jul 17 18:32:44 1993
1784
1785 * 0.99pl11 released. C++ compilable.
1786
1787 * Throughout: Add type casts all over the place, and use "ip" instead
1788 of "info" in the various biosparam functions.
1789
1790 * Makefile: Compile seagate.c with C++ compiler.
1791
1792 * aha1542.c: Always set ccb pointer as this gets trashed somehow on
1793 some systems. Add a few type casts. Update biosparam function a little.
1794
1795 * aha1740.c: Add a few type casts.
1796
1797 * fdomain.c: Update to version 3.17 from 3.6. Now works with
1798 TMC-18C50.
1799
1800 * scsi.c: Minor changes here and there with datatypes. Save use_sg
1801 when requesting sense information so that this can properly be
1802 restored if we retry the command. Set aside dma buffers assuming each
1803 block is 1 page, not 1Kb minix block.
1804
1805 * scsi_ioctl.c: Add a few type casts. Other minor changes.
1806
1807 * sd.c: Correctly free all scsi_malloc'd memory if we run out of
1808 dma_pool. Store blocksize information for each partition.
1809
1810 * seagate.c: Minor cleanups here and there.
1811
1812 * sr.c: Set up blocksize array for all discs. Fix bug in freeing
1813 buffers if we run out of dma pool.
1814
1815Thu Jun 2 17:58:11 1993
1816
1817 * 0.99pl10 released.
1818
1819 * aha1542.c: Support for BT 445S (VL-bus board with no dma channel).
1820
1821 * fdomain.c: Upgrade to version 3.6. Preliminary support for TNC-18C50.
1822
1823 * scsi.c: First attempt to fix problem with old_use_sg. Change
1824 NOT_READY to a SUGGEST_ABORT. Fix timeout race where time might
1825 get decremented past zero.
1826
1827 * sd.c: Add block_fsync function to dispatch table.
1828
1829 * sr.c: Increase timeout to 500 from 250. Add entry for sync in
1830 dispatch table (supply NULL). If we do not have a sectorsize,
1831 try to get it in the sd_open function. Add new function just to
1832 obtain sectorsize.
1833
1834 * sr.h: Add needs_sector_size semaphore.
1835
1836 * st.c: Add NULL for fsync in dispatch table.
1837
1838 * wd7000.c: Allow another condition for power on that are normal
1839 and do not require a panic.
1840
1841Thu Apr 22 23:10:11 1993
1842
1843 * 0.99pl9 released.
1844
1845 * aha1542.c: Use (void) instead of () in setup_mailboxes.
1846
1847 * scsi.c: Initialize transfersize and underflow fields in SCmd to 0.
1848 Do not panic for unsupported message bytes.
1849
1850 * scsi.h: Allocate 12 bytes instead of 10 for commands. Add
1851 transfersize and underflow fields.
1852
1853 * scsi_ioctl.c: Further bugfix to ioctl_probe.
1854
1855 * sd.c: Use long instead of int for last parameter in sd_ioctl.
1856 Initialize transfersize and underflow fields.
1857
1858 * sd_ioctl.c: Ditto for sd_ioctl(,,,,);
1859
1860 * seagate.c: New version from Drew. Includes new signatures for FD
1861 cards. Support for 0ws jumper. Correctly initialize
1862 scsi_hosts[hostnum].this_id. Improved handing of
1863 disconnect/reconnect, and support command linking. Use
1864 transfersize and underflow fields. Support scatter-gather.
1865
1866 * sr.c, sr_ioctl.c: Use long instead of int for last parameter in sr_ioctl.
1867 Use buffer and buflength in do_ioctl. Patches from Chris Newbold for
1868 scsi-2 audio commands.
1869
1870 * ultrastor.c: Comment out in_byte (compiler warning).
1871
1872 * wd7000.c: Change () to (void) in wd7000_enable_dma.
1873
1874Wed Mar 31 16:36:25 1993
1875
1876 * 0.99pl8 released.
1877
1878 * aha1542.c: Handle mailboxes better for 1542C.
1879 Do not truncate number of cylinders at 1024 for biosparam call.
1880
1881 * aha1740.c: Fix a few minor bugs for multiple devices.
1882 Same as above for biosparam.
1883
1884 * scsi.c: Add lockable semaphore for removable devices that can have
1885 media removal prevented. Add another signature for flopticals.
1886 (allocate_device): Fix race condition. Allow more space in dma pool
1887 for blocksizes of up to 4Kb.
1888
1889 * scsi.h: Define COMMAND_SIZE. Define a SCSI specific version of
1890 INIT_REQUEST that can run with interrupts off.
1891
1892 * scsi_ioctl.c: Make ioctl_probe function more idiot-proof. If
1893 a removable device says ILLEGAL REQUEST to a door-locking command,
1894 clear lockable flag. Add SCSI_IOCTL_GET_IDLUN ioctl. Do not attempt
1895 to lock door for devices that do not have lockable semaphore set.
1896
1897 * sd.c: Fix race condition for multiple disks. Use INIT_SCSI_REQUEST
1898 instead of INIT_REQUEST. Allow sector sizes of 1024 and 256. For
1899 removable disks that are not ready, mark them as having a media change
1900 (some drives do not report this later).
1901
1902 * seagate.c: Use volatile keyword for memory-mapped register pointers.
1903
1904 * sr.c: Fix race condition, a la sd.c. Increase the number of retries
1905 to 1. Use INIT_SCSI_REQUEST. Allow 512 byte sector sizes. Do a
1906 read_capacity when we init the device so we know the size and
1907 sectorsize.
1908
1909 * st.c: If ioctl not found in st.c, try scsi_ioctl for others.
1910
1911 * ultrastor.c: Do not truncate number of cylinders at 1024 for
1912 biosparam call.
1913
1914 * wd7000.c: Ditto.
1915 Throughout: Use COMMAND_SIZE macro to determine length of scsi
1916 command.
1917
1918
1919
1920Sat Mar 13 17:31:29 1993
1921
1922 * 0.99pl7 released.
1923
1924 Throughout: Improve punctuation in some messages, and use new
1925 verify_area syntax.
1926
1927 * aha1542.c: Handle unexpected interrupts better.
1928
1929 * scsi.c: Ditto. Handle reset conditions a bit better, asking for
1930 sense information and retrying if required.
1931
1932 * scsi_ioctl.c: Allow for 12 byte scsi commands.
1933
1934 * ultrastor.c: Update to use scatter-gather.
1935
1936Sat Feb 20 17:57:15 1993
1937
1938 * 0.99pl6 released.
1939
1940 * fdomain.c: Update to version 3.5. Handle spurious interrupts
1941 better.
1942
1943 * sd.c: Use register_blkdev function.
1944
1945 * sr.c: Ditto.
1946
1947 * st.c: Use register_chrdev function.
1948
1949 * wd7000.c: Undo previous change.
1950
1951Sat Feb 6 11:20:43 1993
1952
1953 * 0.99pl5 released.
1954
1955 * scsi.c: Fix bug in testing for UNIT_ATTENTION.
1956
1957 * wd7000.c: Check at more addresses for bios. Fix bug in biosparam
1958 (heads & sectors turned around).
1959
1960Wed Jan 20 18:13:59 1993
1961
1962 * 0.99pl4 released.
1963
1964 * scsi.c: Ignore leading spaces when looking for blacklisted devices.
1965
1966 * seagate.c: Add a few new signatures for FD cards. Another patch
1967 with SCint to fix race condition. Use recursion_depth to keep track
1968 of how many times we have been recursively called, and do not start
1969 another command unless we are on the outer level. Fixes bug
1970 with Syquest cartridge drives (used to crash kernel), because
1971 they do not disconnect with large data transfers.
1972
1973Tue Jan 12 14:33:36 1993
1974
1975 * 0.99pl3 released.
1976
1977 * fdomain.c: Update to version 3.3 (a few new signatures).
1978
1979 * scsi.c: Add CDU-541, Denon DRD-25X to blacklist.
1980 (allocate_request, request_queueable): Init request.waiting to NULL if
1981 non-buffer type of request.
1982
1983 * seagate.c: Allow controller to be overridden with CONTROLLER symbol.
1984 Set SCint=NULL when we are done, to remove race condition.
1985
1986 * st.c: Changes from Kai.
1987
1988Wed Dec 30 20:03:47 1992
1989
1990 * 0.99pl2 released.
1991
1992 * scsi.c: Blacklist back in. Remove Newbury drive as other bugfix
1993 eliminates need for it here.
1994
1995 * sd.c: Return ENODEV instead of EACCES if no such device available.
1996 (sd_init) Init blkdev_fops earlier so that sd_open is available sooner.
1997
1998 * sr.c: Same as above for sd.c.
1999
2000 * st.c: Return ENODEV instead of ENXIO if no device. Init chrdev_fops
2001 sooner, so that it is always there even if no tapes.
2002
2003 * seagate.c (controller_type): New variable to keep track of ST0x or
2004 FD. Modify signatures list to indicate controller type, and init
2005 controller_type once we find a match.
2006
2007 * wd7000.c (wd7000_set_sync): Remove redundant function.
2008
2009Sun Dec 20 16:26:24 1992
2010
2011 * 0.99pl1 released.
2012
2013 * scsi_ioctl.c: Bugfix - check dev->index, not dev->id against
2014 NR_SCSI_DEVICES.
2015
2016 * sr_ioctl.c: Verify that device exists before allowing an ioctl.
2017
2018 * st.c: Patches from Kai - change timeout values, improve end of tape
2019 handling.
2020
2021Sun Dec 13 18:15:23 1992
2022
2023 * 0.99 kernel released. Baseline for this ChangeLog.
diff --git a/Documentation/scsi/ChangeLog.ips b/Documentation/scsi/ChangeLog.ips
new file mode 100644
index 000000000000..5019f5182bf4
--- /dev/null
+++ b/Documentation/scsi/ChangeLog.ips
@@ -0,0 +1,122 @@
1IBM ServeRAID driver Change Log
2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4 5.00.01 - Sarasota ( 5i ) adapters must always be scanned first
5 - Get rid on IOCTL_NEW_COMMAND code
6 - Add Extended DCDB Commands for Tape Support in 5I
7
8 4.90.11 - Don't actually RESET unless it's physically required
9 - Remove unused compile options
10
11 4.90.08 - Data Corruption if First Scatter Gather Element is > 64K
12
13 4.90.08 - Increase Delays in Flashing ( Trombone Only - 4H )
14
15 4.90.05 - Use New PCI Architecture to facilitate Hot Plug Development
16
17 4.90.01 - Add ServeRAID Version Checking
18
19 4.80.26 - Clean up potential code problems ( Arjan's recommendations )
20
21 4.80.21 - Change memcpy() to copy_to_user() in NVRAM Page 5 IOCTL path
22
23 4.80.20 - Set max_sectors in Scsi_Host structure ( if >= 2.4.7 kernel )
24 - 5 second delay needed after resetting an i960 adapter
25
26 4.80.14 - Take all semaphores off stack
27 - Clean Up New_IOCTL path
28
29 4.80.04 - Eliminate calls to strtok() if 2.4.x or greater
30 - Adjustments to Device Queue Depth
31
32 4.80.00 - Make ia64 Safe
33
34 4.72.01 - I/O Mapped Memory release ( so "insmod ips" does not Fail )
35 - Don't Issue Internal FFDC Command if there are Active Commands
36 - Close Window for getting too many IOCTL's active
37
38 4.72.00 - Allow for a Scatter-Gather Element to exceed MAX_XFER Size
39
40 4.71.00 - Change all memory allocations to not use GFP_DMA flag
41 - Code Clean-Up for 2.4.x kernel
42
43 4.70.15 - Fix Breakup for very large ( non-SG ) requests
44
45 4.70.13 - Don't release HA Lock in ips_next() until SC taken off queue
46 - Unregister SCSI device in ips_release()
47 - Don't Send CDB's if we already know the device is not present
48
49 4.70.12 - Corrective actions for bad controller ( during initialization )
50
51 4.70.09 - Use a Common ( Large Buffer ) for Flashing from the JCRM CD
52 - Add IPSSEND Flash Support
53 - Set Sense Data for Unknown SCSI Command
54 - Use Slot Number from NVRAM Page 5
55 - Restore caller's DCDB Structure
56
57 4.20.14 - Update patch files for kernel 2.4.0-test5
58
59 4.20.13 - Fix some failure cases / reset code
60 - Hook into the reboot_notifier to flush the controller
61 cache
62
63 4.20.03 - Rename version to coincide with new release schedules
64 - Performance fixes
65 - Fix truncation of /proc files with cat
66 - Merge in changes through kernel 2.4.0test1ac21
67
68 4.10.13 - Fix for dynamic unload and proc file system
69
70 4.10.00 - Add support for ServeRAID 4M/4L
71
72 4.00.06 - Fix timeout with initial FFDC command
73
74 4.00.05 - Remove wish_block from init routine
75 - Use linux/spinlock.h instead of asm/spinlock.h for kernels
76 2.3.18 and later
77 - Sync with other changes from the 2.3 kernels
78
79 4.00.04 - Rename structures/constants to be prefixed with IPS_
80
81 4.00.03 - Add alternative passthru interface
82 - Add ability to flash ServeRAID BIOS
83
84 4.00.02 - Fix problem with PT DCDB with no buffer
85
86 4.00.01 - Add support for First Failure Data Capture
87
88 4.00.00 - Add support for ServeRAID 4
89
90 3.60.02 - Make DCDB direction based on lookup table.
91 - Only allow one DCDB command to a SCSI ID at a time.
92
93 3.60.01 - Remove bogus error check in passthru routine.
94
95 3.60.00 - Bump max commands to 128 for use with ServeRAID
96 firmware 3.60.
97 - Change version to 3.60 to coincide with ServeRAID release
98 numbering.
99
100 1.00.00 - Initial Public Release
101 - Functionally equivalent to 0.99.05
102
103 0.99.05 - Fix an oops on certain passthru commands
104
105 0.99.04 - Fix race condition in the passthru mechanism
106 -- this required the interface to the utilities to change
107 - Fix error recovery code
108
109 0.99.03 - Make interrupt routine handle all completed request on the
110 adapter not just the first one
111 - Make sure passthru commands get woken up if we run out of
112 SCBs
113 - Send all of the commands on the queue at once rather than
114 one at a time since the card will support it.
115
116 0.99.02 - Added some additional debug statements to print out
117 errors if an error occurs while trying to read/write
118 to a logical drive (IPS_DEBUG).
119
120 - Fixed read/write errors when the adapter is using an
121 8K stripe size.
122
diff --git a/Documentation/scsi/ChangeLog.megaraid b/Documentation/scsi/ChangeLog.megaraid
new file mode 100644
index 000000000000..a9356c63b800
--- /dev/null
+++ b/Documentation/scsi/ChangeLog.megaraid
@@ -0,0 +1,349 @@
1Release Date : Thu Feb 03 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com>
2Current Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module)
3Older Version : 2.20.4.4 (scsi module), 2.20.2.4 (cmm module)
4
51. Modified name of two attributes in scsi_host_template.
6 On Wed, 2005-02-02 at 10:56 -0500, Ju, Seokmann wrote:
7 > + .sdev_attrs = megaraid_device_attrs,
8 > + .shost_attrs = megaraid_class_device_attrs,
9
10 These are, perhaps, slightly confusing names.
11 The terms device and class_device have well defined meanings in the
12 generic device model, neither of which is what you mean here.
13 Why not simply megaraid_sdev_attrs and megaraid_shost_attrs?
14
15 Other than this, it looks fine to me too.
16
17Release Date : Thu Jan 27 00:01:03 EST 2005 - Atul Mukker <atulm@lsil.com>
18Current Version : 2.20.4.4 (scsi module), 2.20.2.5 (cmm module)
19Older Version : 2.20.4.3 (scsi module), 2.20.2.4 (cmm module)
20
211. Bump up the version of scsi module due to its conflict.
22
23Release Date : Thu Jan 21 00:01:03 EST 2005 - Atul Mukker <atulm@lsil.com>
24Current Version : 2.20.4.3 (scsi module), 2.20.2.5 (cmm module)
25Older Version : 2.20.4.2 (scsi module), 2.20.2.4 (cmm module)
26
271. Remove driver ioctl for logical drive to scsi address translation and
28 replace with the sysfs attribute. To remove drives and change
29 capacity, application shall now use the device attribute to get the
30 logical drive number for a scsi device. For adding newly created
31 logical drives, class device attribute would be required to uniquely
32 identify each controller.
33 - Atul Mukker <atulm@lsil.com>
34
35 "James, I've been thinking about this a little more, and you may be on
36 to something here. Let each driver add files as such:"
37
38 - Matt Domsch <Matt_Domsch@dell.com>, 12.15.2004
39 linux-scsi mailing list
40
41
42 "Then, if you simply publish your LD number as an extra parameter of
43 the device, you can look through /sys to find it."
44
45 - James Bottomley <James.Bottomley@SteelEye.com>, 01.03.2005
46 linux-scsi mailing list
47
48
49 "I don't see why not ... it's your driver, you can publish whatever
50 extra information you need as scsi_device attributes; that was one of
51 the designs of the extensible attribute system."
52
53 - James Bottomley <James.Bottomley@SteelEye.com>, 01.06.2005
54 linux-scsi mailing list
55
562. Add AMI megaraid support - Brian King <brking@charter.net>
57 PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3,
58 PCI_VENDOR_ID_AMI, PCI_SUBSYS_ID_PERC3_DC,
59
603. Make some code static - Adrian Bunk <bunk@stusta.de>
61 Date: Mon, 15 Nov 2004 03:14:57 +0100
62
63 The patch below makes some needlessly global code static.
64 -wait_queue_head_t wait_q;
65 +static wait_queue_head_t wait_q;
66
67 Signed-off-by: Adrian Bunk <bunk@stusta.de>
68
694. Added NEC ROMB support - NEC MegaRAID PCI Express ROMB controller
70 PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_MEGARAID_NEC_ROMB_2E,
71 PCI_SUBSYS_ID_NEC, PCI_SUBSYS_ID_MEGARAID_NEC_ROMB_2E,
72
735. Fixed Tape drive issue : For any Direct CDB command to physical device
74 including tape, timeout value set by driver was 10 minutes. With this
75 value, most of command will return within timeout. However, for those
76 command like ERASE or FORMAT, it takes more than an hour depends on
77 capacity of the device and the command could be terminated before it
78 completes.
79 To address this issue, the 'timeout' field in the DCDB command will
80 have NO TIMEOUT (i.e., 4) value as its timeout on DCDB command.
81
82
83
84Release Date : Thu Dec 9 19:10:23 EST 2004
85 - Sreenivas Bagalkote <sreenib@lsil.com>
86
87Current Version : 2.20.4.2 (scsi module), 2.20.2.4 (cmm module)
88Older Version : 2.20.4.1 (scsi module), 2.20.2.3 (cmm module)
89
90i. Introduced driver ioctl that returns scsi address for a given ld.
91
92 "Why can't the existing sysfs interfaces be used to do this?"
93 - Brian King (brking@us.ibm.com)
94
95 "I've looked into solving this another way, but I cannot see how
96 to get this driver-private mapping of logical drive number-> HCTL
97 without putting code something like this into the driver."
98
99 "...and by providing a mapping a function to userspace, the driver
100 is free to change its mapping algorithm in the future if necessary .."
101 - Matt Domsch (Matt_Domsch@dell.com)
102
103Release Date : Thu Dec 9 19:02:14 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
104
105Current Version : 2.20.4.1 (scsi module), 2.20.2.3 (cmm module)
106Older Version : 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
107
108i. Fix a bug in kioc's dma buffer deallocation
109
110Release Date : Thu Nov 4 18:24:56 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
111
112Current Version : 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
113Older Version : 2.20.4.0 (scsi module), 2.20.2.1 (cmm module)
114
115i. Handle IOCTL cmd timeouts more properly.
116
117ii. pci_dma_sync_{sg,single}_for_cpu was introduced into megaraid_mbox
118 incorrectly (instead of _for_device). Changed to appropriate
119 pci_dma_sync_{sg,single}_for_device.
120
121Release Date : Wed Oct 06 11:15:29 EDT 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
122Current Version : 2.20.4.0 (scsi module), 2.20.2.1 (cmm module)
123Older Version : 2.20.4.0 (scsi module), 2.20.2.0 (cmm module)
124
125i. Remove CONFIG_COMPAT around register_ioctl32_conversion
126
127Release Date : Mon Sep 27 22:15:07 EDT 2004 - Atul Mukker <atulm@lsil.com>
128Current Version : 2.20.4.0 (scsi module), 2.20.2.0 (cmm module)
129Older Version : 2.20.3.1 (scsi module), 2.20.2.0 (cmm module)
130
131i. Fix data corruption. Because of a typo in the driver, the IO packets
132 were wrongly shared by the ioctl path. This causes a whole IO command
133 to be replaced by an incoming ioctl command.
134
135Release Date : Tue Aug 24 09:43:35 EDT 2004 - Atul Mukker <atulm@lsil.com>
136Current Version : 2.20.3.1 (scsi module), 2.20.2.0 (cmm module)
137Older Version : 2.20.3.0 (scsi module), 2.20.2.0 (cmm module)
138
139i. Function reordering so that inline functions are defined before they
140 are actually used. It is now mandatory for GCC 3.4.1 (current stable)
141
142 Declare some heavy-weight functions to be non-inlined,
143 megaraid_mbox_build_cmd, megaraid_mbox_runpendq,
144 megaraid_mbox_prepare_pthru, megaraid_mbox_prepare_epthru,
145 megaraid_busywait_mbox
146
147 - Andrew Morton <akpm@osdl.org>, 08.19.2004
148 linux-scsi mailing list
149
150 "Something else to clean up after inclusion: every instance of an
151 inline function is actually rendered as a full function call, because
152 the function is always used before it is defined. Atul, please
153 re-arrange the code to eliminate the need for most (all) of the
154 function prototypes at the top of each file, and define (not just
155 declare with a prototype) each inline function before its first use"
156
157 - Matt Domsch <Matt_Domsch@dell.com>, 07.27.2004
158 linux-scsi mailing list
159
160
161ii. Display elapsed time (countdown) while waiting for FW to boot.
162
163iii. Module compilation reorder in Makefile so that unresolved symbols do
164 not occur when driver is compiled non-modular.
165
166 Patrick J. LoPresti <patl@users.sourceforge.net>, 8.22.2004
167 linux-scsi mailing list
168
169
170Release Date : Thu Aug 19 09:58:33 EDT 2004 - Atul Mukker <atulm@lsil.com>
171Current Version : 2.20.3.0 (scsi module), 2.20.2.0 (cmm module)
172Older Version : 2.20.2.0 (scsi module), 2.20.1.0 (cmm module)
173
174i. When copying the mailbox packets, copy only first 14 bytes (for 32-bit
175 mailboxes) and only first 22 bytes (for 64-bit mailboxes). This is to
176 avoid getting the stale values for busy bit. We want to set the busy
177 bit just before issuing command to the FW.
178
179ii. In the reset handling, if the reseted command is not owned by the
180 driver, do not (wrongly) print information for the "attached" driver
181 packet.
182
183iii. Have extended wait when issuing command in synchronous mode. This is
184 required for the cases where the option ROM is disabled and there is
185 no BIOS to start the controller. The FW starts to boot after receiving
186 the first command from the driver. The current driver has 1 second
187 timeout for the synchronous commands, which is far less than what is
188 actually required. We now wait up to MBOX_RESET_TIME (180 seconds) for
189 FW boot process.
190
191iv. In megaraid_mbox_product_info, clear the mailbox contents completely
192 before preparing the command for inquiry3. This is to ensure that the
193 FW does not get junk values in the command.
194
195v. Do away with the redundant LSI_CONFIG_COMPAT redefinition for
196 CONFIG_COMPAT. Replace <asm/ioctl32.h> with <linux/ioctl32.h>
197
198 - James Bottomley <James.Bottomley@SteelEye.com>, 08.17.2004
199 linux-scsi mailing list
200
201vi. Add support for 64-bit applications. Current drivers assume only
202 32-bit applications, even on 64-bit platforms. Use the "data" and
203 "buffer" fields of the mimd_t structure, instead of embedded 32-bit
204 addresses in application mailbox and passthru structures.
205
206vii. Move the function declarations for the management module from
207 megaraid_mm.h to megaraid_mm.c
208
209 - Andrew Morton <akpm@osdl.org>, 08.19.2004
210 linux-scsi mailing list
211
212viii. Change default values for MEGARAID_NEWGEN, MEGARAID_MM, and
213 MEGARAID_MAILBOX to 'n' in Kconfig.megaraid
214
215 - Andrew Morton <akpm@osdl.org>, 08.19.2004
216 linux-scsi mailing list
217
218ix. replace udelay with msleep
219
220x. Typos corrected in comments and whitespace adjustments, explicit
221 grouping of expressions.
222
223
224Release Date : Fri Jul 23 15:22:07 EDT 2004 - Atul Mukker <atulm@lsil.com>
225Current Version : 2.20.2.0 (scsi module), 2.20.1.0 (cmm module)
226Older Version : 2.20.1.0 (scsi module), 2.20.0.0 (cmm module)
227
228i. Add PCI ids for Acer ROMB 2E solution
229
230ii. Add PCI ids for I4
231
232iii. Typo corrected for subsys id for megaraid sata 300-4x
233
234iv. Remove yield() while mailbox handshake in synchronous commands
235
236
237 "My other main gripe is things like this:
238
239 + // wait for maximum 1 second for status to post
240 + for (i = 0; i < 40000; i++) {
241 + if (mbox->numstatus != 0xFF) break;
242 + udelay(25); yield();
243 + }
244
245 which litter the driver. Use of yield() in drivers is deprecated."
246
247 - James Bottomley <James.Bottomley@SteelEye.com>, 07.14.2004
248 linux-scsi mailing list
249
250v. Remove redundant __megaraid_busywait_mbox routine
251
252vi. Fix bug in the managment module, which causes a system lockup when the
253 IO module is loaded and then unloaded, followed by executing any
254 management utility. The current version of management module does not
255 handle the adapter unregister properly.
256
257 Specifically, it still keeps a reference to the unregistered
258 controllers. To avoid this, the static array adapters has been
259 replaced by a dynamic list, which gets updated every time an adapter
260 is added or removed.
261
262 Also, during unregistration of the IO module, the resources are
263 now released in the exact reverse order of the allocation time
264 sequence.
265
266
267Release Date : Fri Jun 25 18:58:43 EDT 2004 - Atul Mukker <atulm@lsil.com>
268Current Version : 2.20.1.0
269Older Version : megaraid 2.20.0.1
270
271i. Stale list pointer in adapter causes kernel panic when module
272 megaraid_mbox is unloaded
273
274
275Release Date : Thu Jun 24 20:37:11 EDT 2004 - Atul Mukker <atulm@lsil.com>
276Current Version : 2.20.0.1
277Older Version : megaraid 2.20.0.00
278
279i. Modules are not 'y' by default, but depend on current definition of
280 SCSI & PCI.
281
282ii. Redundant structure mraid_driver_t removed.
283
284iii. Miscellaneous indentation and goto/label fixes.
285 - Christoph Hellwig <hch@infradead.org>, 06.24.2004 linux-scsi
286
287iv. scsi_host_put(), do just before completing HBA shutdown.
288
289
290
291Release Date : Mon Jun 21 19:53:54 EDT 2004 - Atul Mukker <atulm@lsil.com>
292Current Version : 2.20.0.0
293Older Version : megaraid 2.20.0.rc2 and 2.00.3
294
295i. Independent module to interact with userland applications and
296 multiplex command to low level RAID module(s).
297
298 "Shared code in a third module, a "library module", is an acceptable
299 solution. modprobe automatically loads dependent modules, so users
300 running "modprobe driver1" or "modprobe driver2" would automatically
301 load the shared library module."
302
303 - Jeff Garzik <jgarzik@pobox.com> 02.25.2004 LKML
304
305 "As Jeff hinted, if your userspace<->driver API is consistent between
306 your new MPT-based RAID controllers and your existing megaraid driver,
307 then perhaps you need a single small helper module (lsiioctl or some
308 better name), loaded by both mptraid and megaraid automatically, which
309 handles registering the /dev/megaraid node dynamically. In this case,
310 both mptraid and megaraid would register with lsiioctl for each
311 adapter discovered, and lsiioctl would essentially be a switch,
312 redirecting userspace tool ioctls to the appropriate driver."
313
314 - Matt Domsch <Matt_Domsch@dell.com> 02.25.2004 LKML
315
316ii. Remove C99 initializations from pci_device id.
317
318 "pci_id_table_g would be much more readable when not using C99
319 initializers.
320 PCI table doesn't change, there's lots of users that prefer the more
321 readable variant. And it's really far less and much easier to grok
322 lines without C99 initializers."
323
324 - Christoph Hellwig <hch@infradead.org>, 05.28.2004 linux-scsi
325
326iii. Many fixes as suggested by Christoph Hellwig <hch@infradead.org> on
327 linux-scsi, 05.28.2004
328
329iv. We now support up to 32 parallel ioctl commands instead of current 1.
330 There is a conscious effort to let memory allocation not fail for ioctl
331 commands.
332
333v. Do away with internal memory management. Use pci_pool_(create|alloc)
334 instead.
335
336vi. Kill tasklet when unloading the driver.
337
338vii. Do not use "host_lock', driver has fine-grain locks now to protect all
339 data structures.
340
341viii. Optimize the build scatter-gather list routine. The callers already
342 know the data transfer address and length.
343
344ix. Better implementation of error handling and recovery. Driver now
345 performs extended errors recovery for instances like scsi cable pull.
346
347x. Disassociate the management commands with an overlaid scsi command.
348 Driver now treats the management packets as special packets and has a
349 dedicated callback routine.
diff --git a/Documentation/scsi/ChangeLog.ncr53c8xx b/Documentation/scsi/ChangeLog.ncr53c8xx
new file mode 100644
index 000000000000..7d03e9d5b5f7
--- /dev/null
+++ b/Documentation/scsi/ChangeLog.ncr53c8xx
@@ -0,0 +1,495 @@
1Sat May 12 12:00 2001 Gerard Roudier (groudier@club-internet.fr)
2 * version ncr53c8xx-3.4.3b
3 - Ensure LEDC bit in GPCNTL is cleared when reading the NVRAM.
4 Fix sent by Stig Telfer <stig@api-networks.com>.
5 - Define scsi_set_pci_device() as nil for kernel < 2.4.4.
6
7Mon Feb 12 22:30 2001 Gerard Roudier (groudier@club-internet.fr)
8 * version ncr53c8xx-3.4.3
9 - Call pci_enable_device() as AC wants this to be done.
10 - Get both the BAR cookies actual and PCI BAR values.
11 (see Changelog.sym53c8xx rev. 1.7.3 for details)
12 - Merge changes for linux-2.4 that declare the host template
13 in the driver object also when the driver is statically
14 linked with the kernel.
15
16Sun Sep 24 21:30 2000 Gerard Roudier (groudier@club-internet.fr)
17 * version ncr53c8xx-3.4.2
18 - See Changelog.sym53c8xx, driver version 1.7.2.
19
20Wed Jul 26 23:30 2000 Gerard Roudier (groudier@club-internet.fr)
21 * version ncr53c8xx-3.4.1
22 - Provide OpenFirmare path through the proc FS on PPC.
23 - Remove trailing argument #2 from a couple of #undefs.
24
25Sun Jul 09 16:30 2000 Gerard Roudier (groudier@club-internet.fr)
26 * version ncr53c8xx-3.4.0
27 - Remove the PROFILE C and SCRIPTS code.
28 This facility was not this useful and thus was not longer
29 desirable given the increasing complexity of the driver code.
30 - Merges from FreeBSD sym-1.6.2 driver:
31 * Clarify memory barriers needed by the driver for architectures
32 that implement a weak memory ordering.
33 - General cleanup:
34 Move definitions for barriers and IO/MMIO operations to the
35 sym53c8xx_defs.h header files. They are now shared by the
36 both drivers.
37 Use SCSI_NCR_IOMAPPED instead of NCR_IOMAPPED.
38
39Thu May 11 12:30 2000 Pam Delaney (pam.delaney@lsil.com)
40 * revision 3.3b
41
42Mon Apr 24 12:00 2000 Gerard Roudier (groudier@club-internet.fr)
43 * revision 3.2i
44 - Return value 1 (instead of 0) from the driver setup routine.
45 - Let the driver also attach controllers that have been set to
46 OFF in the NVRAM as it did prior to revision 3.2g.
47
48Sat Apr 1 12:00 2000 Gerard Roudier (groudier@club-internet.fr)
49 * revision 3.2h
50 - Fix a compilation problem on Alpha introduced in version 3.2g.
51 (`port' changed to `base_io').
52 - Move from `sym' to this driver a tiny change for __sparc__ that
53 applies to cache line size (? Probably from David S Miller).
54 - Make sure no data transfer will happen for Scsi_Cmnd requests
55 that supply SCSI_DATA_NONE direction (this avoids some BUG()
56 statement in the PCI code when a data buffer is also supplied).
57
58Thu Mar 16 9:30 2000 Pam Delaney (pam.delaney@lsil.com)
59 * revision 3.3b-3
60 - Added exclusion for the 53C1010 and 53C1010_66 chips
61 to the driver (change to sym53c8xx_comm.h).
62
63Mon March 6 23:15 2000 Gerard Roudier (groudier@club-internet.fr)
64 * revision 3.2g
65 - Add the file sym53c8xx_comm.h that collects code that should
66 be shared by sym53c8xx and ncr53c8xx drivers. For now, it is
67 a header file that is only included by the ncr53c8xx driver,
68 but things will be cleaned up later. This code addresses
69 notably:
70 * Chip detection and PCI related initialisations
71 * NVRAM detection and reading
72 * DMA mapping
73 * Boot setup command
74 * And some other ...
75 - Add support for the new dynamic dma mapping kernel interface.
76 Requires Linux-2.3.47 (tested with pre-2.3.47-6).
77 - Get data transfer direction from the scsi command structure
78 (Scsi_Cmnd) when this information is available.
79
80Mon March 6 23:15 2000 Gerard Roudier (groudier@club-internet.fr)
81 * revision 3.2g
82 - Add the file sym53c8xx_comm.h that collects code that should
83 be shared by sym53c8xx and ncr53c8xx drivers. For now, it is
84 a header file that is only included by the ncr53c8xx driver,
85 but things will be cleaned up later. This code addresses
86 notably:
87 * Chip detection and PCI related initialisations
88 * NVRAM detection and reading
89 * DMA mapping
90 * Boot setup command
91 * And some other ...
92 - Add support for the new dynamic dma mapping kernel interface.
93 Requires Linux-2.3.47 (tested with pre-2.3.47-6).
94 - Get data transfer direction from the scsi command structure
95 (Scsi_Cmnd) when this information is available.
96
97Fri Jan 14 14:00 2000 Pam Delaney (pam.delaney@lsil.com)
98 * revision pre-3.3b-1
99 - Merge parallel driver series 3.31 and 3.2e
100
101Tue Jan 11 14:00 2000 Pam Delaney (pam.delaney@lsil.com)
102 * revision 3.31
103 - Added support for mounting disks on wide-narrow-wide
104 scsi configurations.
105 - Built off of version 3.30
106
107Mon Jan 10 13:30 2000 Pam Delaney (pam.delaney@lsil.com)
108 * revision 3.30
109 - Added capability to use the integrity checking code
110 in the kernel (optional).
111 - Disabled support for the 53C1010.
112 - Built off of version 3.2c
113
114Sat Jan 8 22:00 2000 Gerard Roudier (groudier@club-internet.fr)
115 * revision 3.2e
116 - Add year 2000 copyright.
117 - Display correctly bus signals when bus is detected wrong.
118 - Remove the dead code that broke driver 3.2d.
119
120Mon Dec 6 22:00 1999 Gerard Roudier (groudier@club-internet.fr)
121 * revision 3.2d
122 - Change messages written by the driver at initialisation and
123 through the /proc FS (rather cosmetic changes that consist in
124 printing out the PCI bus number and device/function).
125 - Get rid of the old PCI bios interface, but preserve kernel 2.0
126 compatibility from a simple wrapper.
127 - Remove the compilation condition about having to acquire the
128 io_request_lock since it seems to be a definite feature now.:)
129 - proc_dir structure no longer needed for kernel >= 2.3.27.
130 - Change the driver detection code by the sym53c8xx one, modulo
131 some minor changes. The driver can now attach any number of
132 controllers (>40) and does no longer hoger stack space at
133 initialisation.
134 - Definitely disable overlapped PCI arbitration for all dual
135 function chips, since I cannot make sure for what chip revisions
136 it is actually safe.
137 - Add support for the SYM53C1510D.
138 - Update the poor Tekram sync factor table.
139 - Remove the compilation condition about having to acquire the
140 io_request_lock since it seems to be a definite feature now.:)
141 - proc_dir structure no longer needed for kernel >= 2.3.27.
142
143Sat Sep 11 18:00 1999 Gerard Roudier (groudier@club-internet.fr)
144 * revision 3.2c
145 - Handle correctly (hopefully) jiffies wrap-around.
146 - Restore the entry used to detect 875 until revision 0xff.
147 (I removed it inadvertently, it seems :) )
148 - Replace __initfunc() which is deprecated stuff by __init which
149 is not yet so. ;-)
150 - Add support of some 'resource handling' for linux-2.3.13.
151 Basically the BARs have been changed to something more complex
152 in the pci_dev structure.
153 - Remove some deprecated code.
154
155Sat May 10 11:00 1999 Gerard Roudier (groudier@club-internet.fr)
156 * revision pre-3.2b-1
157 - Support for the 53C895A by Pamela Delaney <pam.delaney@lsil.com>
158 The 53C895A contains all of the features of the 896 but has only
159 one channel and has a 32 bit PCI bus. It does 64 bit PCI addressing
160 using dual cycle PCI data transfers.
161 - Miscellaneous minor fixes.
162 - Some additions to the README.ncr53c8xx file.
163
164Sun Apr 11 10:00 1999 Gerard Roudier (groudier@club-internet.fr)
165 * revision 3.2a
166 - Add 'hostid:#id' boot option. This option allows to change the
167 default SCSI id the driver uses for controllers.
168 - Remove nvram layouts and driver set-up structures from the C source,
169 and use the one defined in sym53c8xx_defs.h file.
170 (shared by both drivers).
171 - Set for now MAX LUNS to 16 (instead of 8).
172
173Thu Mar 11 23:00 1999 Gerard Roudier (groudier@club-internet.fr)
174 * revision 3.2 (8xx-896 driver bundle)
175 - Only define the host template in ncr53c8xx.h and include the
176 sym53c8xx_defs.h file.
177 - Declare static all symbols that do not need to be visible from
178 outside the driver code.
179 - Add 'excl' boot command option that allows to pass to the driver
180 io address of devices not to attach.
181 - Add info() function called from the host template to print
182 driver/host information.
183 - Minor documentation additions.
184
185Sat Mar 6 11:00 1999 Gerard Roudier (groudier@club-internet.fr)
186 * revision 3.1h
187 - Fix some oooold bug that hangs the bus if a device rejects a
188 negotiation. Btw, the corresponding stuff also needed some cleanup
189 and thus the change is a bit larger than it could have been.
190 - Still some typo that made compilation fail for 64 bit (trivial fix).
191
192Sun Feb 14:00 1999 Gerard Roudier (groudier@club-internet.fr)
193 * revision 3.1g
194 - Deal correctly with 64 bit PCI address registers on Linux 2.2.
195 Pointed out by Leonard Zubkoff.
196 - Allow to tune request_irq() flags from the boot command line using
197 ncr53c8xx=irqm:??, as follows:
198 a) If bit 0x10 is set in irqm, SA_SHIRQ flag is not used.
199 b) If bit 0x20 is set in irqm, SA_INTERRUPT flag is not used.
200 By default the driver uses both SA_SHIRQ and SA_INTERRUPT.
201 Option 'ncr53c8xx=irqm:0x20' may be used when an IRQ is shared by
202 a 53C8XX adapter and a network board.
203 - Tiny mispelling fixed (ABORT instead of ABRT). Was fortunately
204 harmless.
205 - Negotiate SYNC data transfers with CCS devices.
206
207Sat Jan 16 17:30 1999 Gerard Roudier (groudier@club-internet.fr)
208 * revision 3.1f
209 - Some PCI fix-ups not needed any more for PPC (from Cort).
210 - Cache line size set to 16 DWORDS for Sparc (from DSM).
211 - Waiting list look-up didn't work for the first command of the list.
212 - Remove 2 useless lines of code.
213
214Sun Dec 13 18:00 1998 Gerard Roudier (groudier@club-internet.fr)
215 * revision 3.1e
216 - Same work-around as for the 53c876 rev <= 0x15 for 53c896 rev 1:
217 Disable overlapped arbitration. This will not make difference
218 since the chip has on-chip RAM.
219
220Thu Nov 26 22:00 1998 Gerard Roudier (groudier@club-internet.fr)
221 * revision 3.1d
222 - The SISL RAID change requires now remap_pci_mem() stuff to be
223 compiled for __i386__ when normal IOs are used.
224 - Minor spelling fixes in doc files.
225
226Sat Nov 21 18:00 1998 Gerard Roudier (groudier@club-internet.fr)
227 * revision 3.1c
228 - Ignore chips that are driven by SISL RAID (DAC 960).
229 Change sent by Leonard Zubkoff and slightly reworked.
230 - Still a buglet in the tags initial settings that needed to be fixed.
231 It was not possible to disable TGQ at system startup for devices
232 that claim TGQ support. The driver used at least 2 for the queue
233 depth but did'nt keep track of user settings for tags depth lower
234 than 2.
235
236Wed Nov 11 10:00 1998 Gerard Roudier (groudier@club-internet.fr)
237 * revision 3.1b
238 - The driver was unhappy when configured with default_tags > MAX_TAGS
239 Hopefully doubly-fixed.
240 - Update the Configure.help driver section that speaks of TAGS.
241
242Wed Oct 21 21:00 1998 Gerard Roudier (groudier@club-internet.fr)
243 * revision 3.1a
244 - Changes from Eddie Dost for Sparc and Alpha:
245 ioremap/iounmap support for Sparc.
246 pcivtophys changed to bus_dvma_to_phys.
247 - Add the 53c876 description to the chip table. This is only useful
248 for printing the right name of the controller.
249 - DEL-441 Item 2 work-around for the 53c876 rev <= 5 (0x15).
250 - Add additional checking of INQUIRY data:
251 Check INQUIRY data received length is at least 7. Byte 7 of
252 inquiry data contains device features bits and the driver might
253 be confused by garbage. Also check peripheral qualifier.
254 - Cleanup of the SCSI tasks management:
255 Remove the special case for 32 tags. Now the driver only uses the
256 scheme that allows up to 64 tags per LUN.
257 Merge some code from the 896 driver.
258 Use a 1,3,5,...MAXTAGS*2+1 tag numbering. Previous driver could
259 use any tag number from 1 to 253 and some non conformant devices
260 might have problems with large tag numbers.
261 - 'no_sync' changed to 'no_disc' in the README file. This is an old
262 and trivial mistake that seems to demonstrate the README file is
263 not often read. :)
264
265Sun Oct 4 14:00 1998 Gerard Roudier (groudier@club-internet.fr)
266 * revision 3.0i
267 - Cosmetic changes for sparc (but not for the driver) that needs
268 __irq_itoa() to be used for printed IRQ value to be understandable.
269 - Some problems with the driver that didn't occur using driver 2.5f
270 were due to a SCSI selection problem triggered by a clearly
271 documented feature that in fact seems not to work: (53C8XX chips
272 are claimed by the manuals to be able to execute SCSI scripts just
273 after abitration while the SCSI core is performing SCSI selection).
274 This optimization is broken and has been removed.
275 - Some broken scsi devices are confused when a negotiation is started
276 on a LUN that does not correspond to a real device. According to
277 SCSI specs, this is a device firmware bug. This has been worked
278 around by only starting negotiation if the LUN has previously be
279 used for at least 1 successful SCSI command.
280 - The 'last message sent' printed out on M_REJECT message reception
281 was read from the SFBR i/o register after the previous message had
282 been sent.
283 This was not correct and affects all previous driver versions and
284 the original FreeBSD one as well. The SCSI scripts has been fixed
285 so that it now provides the right information to the C code.
286
287Sat Jul 18 13:00 1998 Gerard Roudier (groudier@club-internet.fr)
288 * revision 3.0g
289 - Preliminary fixes for Big Endian (sent by Eddie C. Dost).
290 Big Endian architectures should work again with the driver.
291 Eddie's patch has been partially applied since current 2.1.109
292 does not have all the Sparc changes of the vger tree.
293 - Use of BITS_PER_LONG instead of (~0UL == 0xffffffffUL) has fixed
294 the problem observed when the driver was compiled using EGCS or
295 PGCC.
296
297Mon Jul 13 20:00 1998 Gerard Roudier (groudier@club-internet.fr)
298 * revision 3.0f
299 - Some spelling fixes.
300 - linux/config.h misplaced in ncr53c8xx.h
301 - MODULE_PARM stuff added for linux 2.1.
302 - check INQUIRY response data format is exactly 2.
303 - use BITS_PER_LONG if defined.
304
305Sun Jun 28 12:00 1998 Gerard Roudier (groudier@club-internet.fr)
306 * revision 3.0e
307 - Some cleanup, spelling fixes, version checks, documentations
308 changes, etc ...
309
310Sat Jun 20 20:00 1998 Gerard Roudier (groudier@club-internet.fr)
311 * revision 3.0c
312 - Add a boot setup option that allows to set up device queue depths
313 at boot-up. This option is very useful since Linux does not
314 allow to change scsi device queue depth once the system has been
315 booted up.
316
317Sun Jun 15 23:00 1998 Gerard Roudier (groudier@club-internet.fr)
318 * revision 3.0a
319 - Support for up to 64 TAGS per LUN.
320 - Rewrite the TARGET vs LUN capabilities management.
321 CmdQueue is now handled as a LUN capability as it shall be.
322 This also fixes a bug triggered when disabling tagged command
323 queuing for a device that had this feature enabled.
324 - Remove the ncr_opennings() stuff that was useless under Linux
325 and hard to understand to me.
326 - Add "setverbose" procfs driver command. It allows to tune
327 verbose level after boot-up. Setting this level to zero, for
328 example avoid flooding the syslog file.
329 - Add KERN_XXX to some printk's.
330
331Tue Jun 10 23:00 1998 Gerard Roudier (groudier@club-internet.fr)
332 * revision 3.0
333 - Linux config changes for 2.0.34:
334 Remove NVRAM detection config option. This option is now enabled
335 by default but can be disabled by editing the driver header file.
336 Add a PROFILE config option.
337 - Update Configure.help
338 - Add calls to new function mdelay() for milli-seconds delay if
339 kernel version >= 2.1.105.
340 - Replace all printf(s) by printk(s). After all, the ncr53c8xx is
341 a driver for Linux.
342 - Perform auto-sense on COMMAND TERMINATED. Not sure it is useful.
343 - Some other minor changes.
344
345Tue Jun 4 23:00 1998 Gerard Roudier (groudier@club-internet.fr)
346 * revision 2.6n
347 - Code cleanup and simplification:
348 Remove kernel 1.2.X and 1.3.X support.
349 Remove the _old_ target capabilities table.
350 Remove the error recovery code that have'nt been really useful.
351 Use a single alignment boundary (CACHE_LINE_SIZE) for data
352 structures.
353 - Several aggressive SCRIPTS optimizations and changes:
354 Reselect SCRIPTS code rewritten.
355 Support for selection/reselection without ATN.
356 And some others.
357 - Miscallaneous changes in the C code:
358 Count actual number of CCB queued to the controller (future use).
359 Lots of other minor changes.
360
361Wed May 13 20:00 1998 Gerard Roudier (groudier@club-internet.fr)
362 * revision 2.6m
363 - Problem of missed SCSI bus reset with the 53C895 fixed by
364 Richard Waltham. The 53C895 needs about 650 us for the bus
365 mode to settle. Delays used while resetting the controller
366 and the bus have been adjusted. Thanks Richard!
367 - Some simplification for 64 bit arch done ccb address testing.
368 - Add a check of the MSG_OUT phase after Selection with ATN.
369 - The new tagged queue stuff seems ok, so some informationnal
370 message have been conditionned by verbose >= 3.
371 - Donnot reset if a SBMC interrupt reports the same bus mode.
372 - Print out the whole driver set-up. Some options were missing and
373 the print statement was misplaced for modules.
374 - Ignore a SCSI parity interrupt if the chip is not connected to
375 the SCSI bus.
376
377Sat May 1 16:00 1998 Gerard Roudier (groudier@club-internet.fr)
378 * revision 2.6l
379 - Add CCB done queue support for Alpha and perhaps some other
380 architectures.
381 - Add some barriers to enforce memory ordering for x86 and
382 Alpha architectures.
383 - Fix something that looks like an old bug in the nego SIR
384 interrupt code in case of negotiation failure.
385
386Sat Apr 25 21:00 1998 Gerard Roudier (groudier@club-internet.fr)
387 * revision 2.6k
388 - Remove all accesses to the on-chip RAM from the C code:
389 Use SCRIPTS to load the on-chip RAM.
390 Use SCRIPTS to repair the start queue on selection timeout.
391 Use the copy of script in main memory to calculate the chip
392 context on phase mismatch.
393 - The above allows now to use the on-chip RAM without requiring
394 to get access to the on-chip RAM from the C code. This makes
395 on-chip RAM useable for linux-1.2.13 and for Linux-Alpha for
396 instance.
397 - Some simplifications and cleanups in the SCRIPTS and C code.
398 - Buglet fixed in parity error recovery SCRIPTS (never tested).
399 - Minor updates in README.ncr53c8xx.
400
401Wed Apr 15 21:00 1998 Gerard Roudier (groudier@club-internet.fr)
402 * revision 2.6j
403 - Incorporate changes from linux-2.1.95 ncr53c8xx driver version.
404 - Add SMP support for linux-2.1.95 and above.
405 - Fix a bug when QUEUE FULL is returned and no commands are
406 disconnected. This happens with Atlas I / L912 and may happen
407 with Atlas II / LXY4.
408 - Nail another one on CHECK condition when requeuing the command
409 for auto-sense.
410 - Call scsi_done() for all completed commands after interrupt
411 handling.
412 - Increase the done queue to 24 entries.
413
414Sat Apr 4 20:00 1998 Gerard Roudier (groudier@club-internet.fr)
415 * revision 2.6i
416 - CTEST0 is used by the 53C885 for Power Management and
417 priority setting between the 2 functions.
418 Use SDID instead as actual target number. Just have had to
419 overwrite it with SSID on reselection.
420 - Split DATA_IN and DATA_OUT scripts into 2 sub-scripts.
421 64 segments are moved from on-chip RAM scripts.
422 If more segments, a script in main memory is used for the
423 additional segments.
424 - Since the SCRIPTS processor continues SCRIPTS execution after
425 having won arbitration, do some stuff prior to testing any SCSI
426 phase on reselection. This should have the vertue to process
427 scripts in parallel with the SCSI core performing selection.
428 - Increase the done queue to 12 entries.
429
430Sun Mar 29 12:00 1998 Gerard Roudier (groudier@club-internet.fr)
431 * revision 2.6h
432 - Some fixes.
433
434Tue Mar 26 23:00 1998 Gerard Roudier (groudier@club-internet.fr)
435 * revision 2.6g
436 - New done queue. 8 entries by default (6 always useable).
437 Can be increased if needed.
438 - Resources management using doubly linked queues.
439 - New auto-sense and QUEUE FULL handling that does not need to
440 stall the NCR queue any more.
441 - New CCB starvation avoiding algorithm.
442 - Prepare CCBs for SCSI commands that cannot be queued, instead of
443 inserting these commands into the waiting list. The waiting list
444 is now only used while resetting and when memory for CCBs is not
445 yet available?
446
447Sun Feb 8 22:00 1998 Gerard Roudier (groudier@club-internet.fr)
448 * revision 2.6f
449 - Some fixes in order to really support the 53C895, at least with
450 FAST-20 devices.
451 - Heavy changes in the target/lun resources management to allow
452 the scripts to jump directly to the CCB on reselection instead
453 of walking on the lun CCBs list. Up to 32 tags per lun are now
454 supported without script processor and PCI traffic overhead.
455
456Sun Jan 11 22:00 1998 Gerard Roudier (groudier@club-internet.fr)
457 * revision 2.6d
458 - new (different ?) implementation of the start queue:
459 Use a simple CALL to a launch script in the CCB.
460 - implement a minimal done queue (1 entry :-) ).
461 this avoid scanning all CCBs on INT FLY (Only scan all CCBs, on
462 overflow). Hit ratio is better than 99.9 % on my system, so no
463 need to have a larger done queue.
464 - generalization of the restart of CCB on special condition as
465 Abort, QUEUE FULL, CHECK CONDITION.
466 This has been called 'silly scheduler'.
467 - make all the profiling code conditionned by a config option.
468 This spare some PCI traffic and C code when this feature is not
469 needed.
470 - handle more cleanly the situation where direction is unknown.
471 The pointers patching is now performed by the SCRIPTS processor.
472 - remove some useless scripts instructions.
473
474 Ported from driver 2.5 series:
475 ------------------------------
476 - Use FAST-5 instead of SLOW for slow scsi devices according to
477 new SPI-2 draft.
478 - Make some changes in order to accommodate with 875 rev <= 3
479 device errata listing 397. Minor consequences are:
480 . Leave use of PCI Write and Invalidate under user control.
481 Now, by default the driver does not enable PCI MWI and option
482 'specf:y' is required in order to enable this feature.
483 . Memory Read Line is not enabled for 875 and 875-like chips.
484 . Programmed burst length set to 64 DWORDS (instead of 128).
485 (Note: SYMBIOS uses 32 DWORDS for the SDMS BIOS)
486 - Add 'buschk' boot option.
487 This option enables checking of SCSI BUS data lines after SCSI
488 RESET (set by default). (Submitted by Richard Waltham).
489 - Update the README file.
490 - Dispatch CONDITION MET and RESERVATION CONFLICT scsi status
491 as OK driver status.
492 - Update the README file and the Symbios NVRAM format definition
493 with removable media flags values (available with SDMS 4.09).
494 - Several PCI configuration registers fix-ups for powerpc.
495 (Patch sent by Cort).
diff --git a/Documentation/scsi/ChangeLog.sym53c8xx b/Documentation/scsi/ChangeLog.sym53c8xx
new file mode 100644
index 000000000000..ef985ec348e6
--- /dev/null
+++ b/Documentation/scsi/ChangeLog.sym53c8xx
@@ -0,0 +1,593 @@
1Sat May 12 12:00 2001 Gerard Roudier (groudier@club-internet.fr)
2 * version sym53c8xx-1.7.3c
3 - Ensure LEDC bit in GPCNTL is cleared when reading the NVRAM.
4 Fix sent by Stig Telfer <stig@api-networks.com>.
5 - Backport from SYM-2 the work-around that allows to support
6 hardwares that fail PCI parity checking.
7 - Check that we received at least 8 bytes of INQUIRY response
8 for byte 7, that contains device capabilities, to be valid.
9 - Define scsi_set_pci_device() as nil for kernel < 2.4.4.
10 - + A couple of minor changes.
11
12Sat Apr 7 19:30 2001 Gerard Roudier (groudier@club-internet.fr)
13 * version sym53c8xx-1.7.3b
14 - Fix an unaligned LOAD from scripts (was used as dummy read).
15 - In ncr_soft_reset(), only try to ABORT the current operation
16 for chips that support SRUN bit in ISTAT1 and if SCRIPTS are
17 currently running, as 896 and 1010 manuals suggest.
18 - In the CCB abort path, do not assume that the CCB is currently
19 queued to SCRIPTS. This is not always true, notably after a
20 QUEUE FULL status or when using untagged commands.
21
22Sun Mar 4 18:30 2001 Gerard Roudier (groudier@club-internet.fr)
23 * version sym53c8xx-1.7.3a
24 - Fix an issue in the ncr_int_udc() (unexpected disconnect)
25 handling. If the DSA didn't match a CCB, a bad write to
26 memory could happen.
27
28Mon Feb 12 22:30 2001 Gerard Roudier (groudier@club-internet.fr)
29 * version sym53c8xx-1.7.3
30 - Support for hppa.
31 Tiny patch sent to me by Robert Hirst.
32 - Tiny patch for ia64 sent to me by Pamela Delaney.
33
34Tue Feb 6 13:30 2001 Gerard Roudier (groudier@club-internet.fr)
35 * version sym53c8xx-1.7.3-pre1
36 - Call pci_enable_device() as AC wants this to be done.
37 - Get both the BAR cookies used by CPU and actual PCI BAR
38 values used from SCRIPTS. Recent PCI chips are able to
39 access themselves using internal cycles, but they compare
40 BAR values to destination address to make decision.
41 Earlier chips simply use PCI transactions to access IO
42 registers from SCRIPTS.
43 The bus_dvma_to_mem() interface that reverses the actual
44 PCI BAR value from the BAR cookie is now useless.
45 This point had been discussed at the list and the solution
46 got approved by PCI code maintainer (Martin Mares).
47 - Merge changes for linux-2.4 that declare the host template
48 in the driver object also when the driver is statically
49 linked with the kernel.
50 - Increase SCSI message size up to 12 bytes, given that 8
51 bytes was not enough for the PPR message (fix).
52 - Add field 'maxoffs_st' (max offset for ST data transfers).
53 The C1010 supports offset 62 in DT mode but only 31 in
54 ST mode, to 2 different values for the max SCSI offset
55 are needed. Replace the obviously wrong masking of the
56 offset against 0x1f for ST mode by a lowering to
57 maxoffs_st of the SCSI offset in ST mode.
58 - Refine a work-around for the C1010-66. Revision 1 does
59 not requires extra cycles in DT DATA OUT phase.
60 - Add a missing endian-ization (abrt_tbl.addr).
61 - Minor clean-up in the np structure for fields accessed
62 from SCRIPTS that requires special alignments.
63
64Sun Sep 24 21:30 2000 Gerard Roudier (groudier@club-internet.fr)
65 * version sym53c8xx-1.7.2
66 - Remove the hack for PPC added in previous driver version.
67 - Add FE_DAC feature bit to distinguish between 64 bit PCI
68 addressing (FE_DAC) and 64 bit PCI interface (FE_64BIT).
69 - Get rid of the boot command line "ultra:" argument.
70 This parameter wasn't that clever since we can use "sync:"
71 for Ultra/Ultra2 settings, and for Ultra3 we may want to
72 pass PPR options (for now only DT clocking).
73 - Add FE_VARCLK feature bit that indicates that SCSI clock
74 frequency may vary depending on board design and thus,
75 the driver should try to evaluate the SCSI clock.
76 - Simplify the way the driver determine the SCSI clock:
77 ULTRA3 -> 160 MHz, ULTRA2 -> 80 MHz otherwise 40 MHz.
78 Measure the SCSI clock frequency if FE_VARCLK is set.
79 - Remove FE_CLK80 feature bit that got useless.
80 - Add support for the SYM53C875A (Pamela Delaney).
81
82Wed Jul 26 23:30 2000 Gerard Roudier (groudier@club-internet.fr)
83 * version sym53c8xx-1.7.1
84 - Provide OpenFirmare path through the proc FS on PPC.
85 - Download of on-chip SRAM using memcpy_toio() doesn't work
86 on PPC. Restore previous method (MEMORY MOVE from SCRIPTS).
87 - Remove trailing argument #2 from a couple of #undefs.
88
89Sun Jul 09 16:30 2000 Gerard Roudier (groudier@club-internet.fr)
90 * version sym53c8xx-1.7.0
91 - Remove the PROFILE C and SCRIPTS code.
92 This facility was not this useful and thus was not longer
93 desirable given the increasing complexity of the driver code.
94 - Merges from FreeBSD sym-1.6.2 driver:
95 * Clarify memory barriers needed by the driver for architectures
96 that implement a weak memory ordering.
97 * Simpler handling of illegal phases and data overrun from
98 SCRIPTS. These errors are now immediately reported to
99 the C code by an interrupt.
100 * Sync the residual handling code with sym-1.6.2 and now
101 report `resid' to user for linux version >= 2.3.99
102 - General cleanup:
103 Move definitions for barriers and IO/MMIO operations to the
104 sym53c8xx_defs.h header files. They are now shared by the
105 both drivers.
106 Remove unused options that claimed to optimize for the 896.
107 If fact, they were not this clever. :)
108 Use SCSI_NCR_IOMAPPED instead of NCR_IOMAPPED.
109 Remove a couple of unused fields from data structures.
110
111Thu May 11 12:40 2000 Pam Delaney (pam.delaney@lsil.com)
112 * version sym53c8xx-1.6b
113 - Merged version.
114
115Mon Apr 24 12:00 2000 Gerard Roudier (groudier@club-internet.fr)
116 * version sym53c8xx-1.5m
117 - Return value 1 (instead of 0) from the driver setup routine.
118 - Do not enable PCI DAC cycles. This just broke support for
119 SYM534C896 on sparc64. Problem fixed by David S. Miller.
120
121Fri Apr 14 9:00 2000 Pam Delaney (pam.delaney@lsil.com)
122 * version sym53c8xx-1.6b-9
123 - Added 53C1010_66 support.
124 - Small fix to integrity checking code.
125 - Removed requirement for integrity checking if want to run
126 at ultra 3.
127
128Sat Apr 1 12:00 2000 Gerard Roudier (groudier@club-internet.fr)
129 * version sym53c8xx-1.5l
130 - Tiny change for __sparc__ appeared in 2.3.99-pre4.1 that
131 applies to cache line size (? Probably from David S Miller).
132 - Make sure no data transfer will happen for Scsi_Cmnd requests
133 that supply SCSI_DATA_NONE direction (this avoids some BUG()
134 statement in the PCI code when a data buffer is also supplied).
135
136Sat Mar 11 12:00 2000 Gerard Roudier (groudier@club-internet.fr)
137 * version sym53c8xx-1.6b-5
138 - Test against expected data transfer direction from SCRIPTS.
139 - Add support for the new dynamic dma mapping kernel interface.
140 Requires Linux-2.3.47 (tested with pre-2.3.47-6).
141 Many thanks to David S. Miller for his preliminary changes
142 that have been useful guidelines.
143 - Get data transfer direction from the scsi command structure
144 (Scsi_Cmnd) with kernels that provide this information.
145
146Mon Mar 6 23:30 2000 Gerard Roudier (groudier@club-internet.fr)
147 * version sym53c8xx-1.5k
148 - Test against expected data transfer direction from SCRIPTS.
149 - Revert the change in 'ncr_flush_done_cmds()' but unmap the
150 scsi dma buffer prior to queueing the command to our done
151 list.
152 - Miscellaneous (minor) fixes in the code added in driver
153 version 1.5j.
154
155Mon Feb 14 4:00 2000 Pam Delaney (pam.delaney@lsil.com)
156 * version sym53c8xx-pre-1.6b-2.
157 - Updated the SCRIPTS error handling of the SWIDE
158 condition - to remove any reads of the sbdl
159 register. Changes needed because the 896 and 1010
160 chips will check parity in some special circumstances.
161 This will cause a parity error interrupt if not in
162 data phase. Changes based on those made in the
163 FreeBSD driver version 1.3.2.
164
165Sun Feb 20 11:00 2000 Gerard Roudier (groudier@club-internet.fr)
166 * version sym53c8xx-1.5j
167 - Add support for the new dynamic dma mapping kernel interface.
168 Requires Linux-2.3.47 (tested with pre-2.3.47-6).
169 Many thanks to David S. Miller for his preliminary changes
170 that have been useful guidelines, for having reviewed the
171 code and having tested this driver version on Ultra-Sparc.
172 - 2 tiny bugs fixed in the PCI wrapper that provides support
173 for early kernels without pci device structure.
174 - Get data transfer direction from the scsi command structure
175 (Scsi_Cmnd) with kernels that provide this information.
176 - Fix an old bug that only affected 896 rev. 1 when driver
177 profile support option was set in kernel configuration.
178
179Fri Jan 14 14:00 2000 Pam Delaney (pam.delaney@lsil.com)
180 * version sym53c8xx-pre-1.6b-1.
181 - Merge parallel driver series 1.61 and 1.5e
182
183Tue Jan 11 14:00 2000 Pam Delaney (pam.delaney@lsil.com)
184 * version sym53c8xx-1.61
185 - Added support for mounting disks on wide-narrow-wide
186 scsi configurations.
187 - Modified offset to be a maximum of 31 in ST mode,
188 62 in DT mode.
189 - Based off of 1.60
190
191Mon Jan 10 10:00 2000 Pam Delaney (pam.delaney@lsil.com)
192 * version sym53c8xx-1.60
193 - Added capability to use the integrity checking code
194 in the kernel (optional).
195 - Added PPR negotiation.
196 - Added support for 53C1010 Ultra 3 part.
197 - Based off of 1.5f
198
199Sat Jan 8 22:00 2000 Gerard Roudier (groudier@club-internet.fr)
200 * version sym53c8xx-1.5h
201 - Add year 2000 copyright.
202 - Display correctly bus signals when bus is detected wrong.
203 - Some fix for Sparc from DSM that went directly to kernel tree.
204
205Mon Dec 6 22:00 1999 Gerard Roudier (groudier@club-internet.fr)
206 * version sym53c8xx-1.5g
207 - Change messages written by the driver at initialisation and
208 through the /proc FS (rather cosmetic changes that consist in
209 printing out the PCI bus number and PCI device/function).
210 - Ensure the SCRIPTS processor is stopped while calibrating the
211 SCSI clock (the initialisation code has been a bit reworked).
212 Change moved to the FreeBSD sym_hipd driver).
213 - Some fixes in the MODIFY_DP/IGN_RESIDUE code and residual
214 calculation (moved from FreeBSD sym_hipd driver).
215 - Add NVRAM support for Tekram boards that use 24C16 EEPROM.
216 Code moved from the FreeBSD sym_hipd driver, since it has
217 been that one that got this feature first.
218 - Definitely disable overlapped PCI arbitration for all dual
219 function chips, since I cannot make sure for what chip revisions
220 it is actually safe.
221 - Add support for the SYM53C1510D (also for ncr53c8xx).
222 - Fix up properly the PCI latency timer when needed or asked for.
223 - Get rid of the old PCI bios interface, but preserve kernel 2.0
224 compatibility from a simple wrapper.
225 - Update the poor Tekram sync factor table.
226 - Fix in a tiny 'printk' bug that may oops in case of extended
227 errors (unrecovered parity error, data overrun, etc ...)
228 (Sent by Pamela Delaney from LSILOGIC)
229 - Remove the compilation condition about having to acquire the
230 io_request_lock since it seems to be a definite feature now.:)
231 - Change get_pages by GetPages since Linux >= 2.3.27 now wants
232 get_pages to ever be used as a kernel symbol (from 2.3.27).
233 - proc_dir structure no longer needed for kernel >= 2.3.27.
234
235Sun Oct 3 19:00 1999 Gerard Roudier (groudier@club-internet.fr)
236 * version sym53c8xx-1.5f
237 - Change the way the driver checks the PCI clock frequency, so
238 that overclocked PCI BUS up to 48 MHz will not be refused.
239 The more the BUS is overclocked, the less the driver will
240 guarantee that its measure of the SCSI clock is correct.
241 - Backport some minor improvements of SCRIPTS from the sym_hipd
242 driver.
243 - Backport the code rewrite of the START QUEUE dequeuing (on
244 bad scsi status received) from the sym_hipd driver.
245
246Sat Sep 11 11:00 1999 Gerard Roudier (groudier@club-internet.fr)
247 * version sym53c8xx-1.5e
248 - New linux-2.3.13 __setup scheme support added.
249 - Cleanup of the extended error status handling:
250 Use 1 bit per error type.
251 - Also save the extended error status prior to auto-sense.
252 - Add the FE_DIFF chip feature bit to indicate support of
253 diff probing from GPIO3 (825/825A/876/875).
254 - Remove the quirk handling that has been useless since day one.
255 - Work-around PCI chips being reported twice on some platforms.
256 - Add some redundant PCI reads in order to deal with common
257 bridge misbehaviour regarding posted write flushing.
258 - Add some other conditionnal code for people who have to deal
259 with really broken bridges (they will have to edit a source
260 file to try these options).
261 - Handle correctly (hopefully) jiffies wrap-around.
262 - Restore the entry used to detect 875 until revision 0xff.
263 (I removed it inadvertently, it seems :) )
264 - Replace __initfunc() which is deprecated stuff by __init which
265 is not yet so. ;-)
266 - Rewrite the MESSAGE IN scripts more generic by using a MOVE
267 table indirect. Extended messages of any size are accepted now.
268 (Size is limited to 8 for now, but a constant is just to be
269 increased if necessary)
270 - Fix some bug in the fully untested MDP handling:) and share
271 some code between MDP handling and residual calculation.
272 - Calculate the data transfer residual as the 2's complement
273 integer (A positive value in returned on data overrun, and
274 a negative one on underrun).
275 - Add support of some 'resource handling' for linux-2.3.13.
276 Basically the BARs have been changed to something more complex
277 in the pci_dev structure.
278 - Remove some deprecated code.
279
280Sat Jun 5 11:00 1999 Gerard Roudier (groudier@club-internet.fr)
281 * version sym53c8xx-1.5c
282 - Do not negotiate on auto-sense if we are currently using 8 bit
283 async transfer for the target.
284 - Only check for SISL/RAID on i386 platforms.
285 (A problem has been reported on PPC with that code).
286 - On MSG REJECT for a negotiation, the driver attempted to restart
287 the SCRIPT processor when this one was already running.
288
289Sat May 29 12:00 1999 Gerard Roudier (groudier@club-internet.fr)
290 * version sym53c8xx-1.5b
291 - Force negotiation prior auto-sense.
292 This ensures that the driver will be able to grab the sense data
293 from a device that has received a BUS DEVICE RESET message from
294 another initiator.
295 - Complete all disconnected CCBs for a logical UNIT if we are told
296 about a UNIT ATTENTION for a RESET condition by this target.
297 - Add the control command 'cleardev' that allows to send a ABORT
298 message to a logical UNIT (for test purpose).
299
300Tue May 25 23:00 1999 Gerard Roudier (groudier@club-internet.fr)
301 * version sym53c8xx-1.5a
302 - Add support for task abort and bus device reset SCSI message
303 and implement proper synchonisation with SCRIPTS to handle
304 correctly task abortion without races.
305 - Send an ABORT message (if untagged) or ABORT TAG message (if tagged)
306 when the driver is told to abort a command that is disconnected and
307 complete the command with appropriate error.
308 If the aborted command is not yet started, remove it from the start
309 queue and complete it with error.
310 - Add the control command 'resetdev' that allows to send a BUS
311 DEVICE RESET message to a target (for test purpose).
312 - Clean-up some unused or useless code.
313
314Fri May 21 23:00 1999 Gerard Roudier (groudier@club-internet.fr)
315 * version sym53c8xx-1.5
316 - Add support for CHMOV with Wide controllers.
317 - Handling of the SWIDE (low byte residue at the end of a CHMOV
318 in DATA IN phase with WIDE transfer when the byte count gets odd).
319 - Handling of the IGNORE WIDE RESIDUE message.
320 Handled from SCRIPTS as possible with some optimizations when both
321 a wide device and the controller are odd at the same time (SWIDE
322 present and IGNORE WIDE RESIDUE message on the BUS at the same time).
323 - Check against data OVERRUN/UNDERRUN condition at the end of a data
324 transfer, whatever a SWIDE is present (OVERRUN in DATA IN phase)
325 or the SODL is full (UNDERRUN in DATA out phase).
326 - Handling of the MODIFY DATA POINTER message.
327 This one cannot be handled from SCRIPTS, but hopefully it will not
328 happen very often. :)
329 - Large rewrite of the SCSI MESSAGE handling.
330
331Sun May 9 11:00 1999 Gerard Roudier (groudier@club-internet.fr)
332 * version sym53c8xx-1.4
333 - Support for IMMEDIATE ARBITRATION.
334 See the README file for detailed information about this feature.
335 Requires both a compile option and a boot option.
336 - Minor SCRIPTS optimization in reselection pattern for LUN 0.
337 - Simpler algorithm to deal with SCSI command starvation.
338 Just use 2 tag counters in flip/flop and switch to the other
339 one every 3 seconds.
340 - Do some work in SCRIPTS after the SELECT instruction and prior
341 to testing for a PHASE. SYMBIOS say this feature is working fine.
342 (Btw, only problems with Toshiba 3401B had been reported).
343 - Measure the PCI clock speed and do not attach controllers if
344 result is greater than 37 MHz. Since the precision of the
345 algorithm (from Stefan Esser) is better than 2%, this should
346 be fine.
347 - Fix the misdetection of SYM53C875E (was detected as a 876).
348 - Fix the misdetection of SYM53C810 not A (was detected as a 810A).
349 - Support for up to 256 TAGS per LUN (CMD_PER_LUN).
350 Currently limited to 255 due to Linux limitation. :)
351 - Support for up to 508 active commands (CAN_QUEUE).
352 - Support for the 53C895A by Pamela Delaney <pam.delaney@lsil.com>
353 The 53C895A contains all of the features of the 896 but has only
354 one channel and has a 32 bit PCI bus. It does 64 bit PCI addressing
355 using dual cycle PCI data transfers.
356 - Miscellaneous minor fixes.
357 - Some additions to the README.ncr53c8xx file.
358
359Tue Apr 15 10:00 1999 Gerard Roudier (groudier@club-internet.fr)
360 * version sym53c8xx-1.3e
361 - Support for any number of LUNs (64) (SPI2-compliant).
362 (Btw, this may only be ever useful under linux-2.2 ;-))
363
364Sun Apr 11 10:00 1999 Gerard Roudier (groudier@club-internet.fr)
365 * version sym53c8xx-1.3d
366 - Add 'hostid:#id' boot option. This option allows to change the
367 default SCSI id the driver uses for controllers.
368 - Make SCRIPTS not use self-mastering for PCI.
369 There were still 2 places the driver used this feature of the
370 53C8XX family.
371 - Move some data structures (nvram layouts and driver set-up) to
372 the sym53c8xx_defs.h file. So, the both drivers will share them.
373 - Set MAX LUNS to 16 (instead of 8).
374
375Sat Mar 20 21:00 1999 Gerard Roudier (groudier@club-internet.fr)
376 * version sym53c8xx-1.3b
377 - Add support for NCR PQS PDS.
378 James Bottomley <James.Bottomley@columbiasc.ncr.com>
379 - Allow value 0 for host ID.
380 - Support more than 8 controllers (> 40 in fact :-) )
381 - Add 'excl=#ioaddr' boot option: exclude controller.
382 (Version 1.3a driver)
383
384Thu Mar 11 23:00 1999 Gerard Roudier (groudier@club-internet.fr)
385 * version sym53c8xx-1.3 (8xx-896 driver bundle)
386 - Equivalent changes as ncr53c8xx-3.2 due to the driver bundle.
387 (See Changelog.ncr53c8xx)
388 - Do a normal soft reset as first chip reset, since aborting current
389 operation may raise an interrupt we are not able to handle since
390 the interrupt handler is not yet established.
391
392Sat Mar 6 11:00 1999 Gerard Roudier (groudier@club-internet.fr)
393 * version sym53c8xx-1.2b
394 - Fix some oooold bug that hangs the bus if a device rejects a
395 negotiation. Btw, the corresponding stuff also needed some cleanup
396 and thus the change is a bit larger than it could have been.
397 - Still some typo that made compilation fail for 64 bit (trivial fix).
398
399Sun Feb 21 20:00 1999 Gerard Roudier (groudier@club-internet.fr)
400 * version sym53c8xx-1.2a
401 - The rewrite of the interrupt handling broke the SBMC interrupt
402 handling due to a 1 bit mask tiny error. Hopefully fixed.
403 - If INQUIRY came from a scatter list, the driver looked into
404 the scatterlist instead of the data.:) Since this should never
405 happen, we just discard the data if use_sg is not zero.
406
407Fri Feb 12 23:00 1999 Gerard Roudier (groudier@club-internet.fr)
408 * version sym53c8xx-1.2
409 - Major rewrite of the interrupt handling and recovery stuff for
410 the support of non compliant SCSI removal, insertion and all
411 kinds of screw-up that may happen on the SCSI BUS.
412 Hopefully, the driver is now unbreakable or may-be, it is just
413 quite brocken. :-)
414 Many thanks to Johnson Russel (Symbios) for having responded to
415 my questions and for his interesting advices and comments about
416 support of SCSI hot-plug.
417 - Add 'recovery' option to driver set-up.
418 - Negotiate SYNC data transfers with CCS devices.
419 - Deal correctly with 64 bit PCI address registers on Linux 2.2.
420 Pointed out by Leonard Zubkoff.
421
422Sun Jan 31 18:00 1999 Gerard Roudier (groudier@club-internet.fr)
423 * version sym53c8xx-1.1a
424 - Some 896 chip revisions (all for now :-)), may hang-up if the
425 soft reset bit is set at the wrong time while SCRIPTS are running.
426 We need to first abort the current SCRIPTS operation prior to
427 resetting the chip. This fix has been sent to me by SYMBIOS/LSI
428 and I just translated it into ncr53c8xx syntax.
429 Must be considered 100 % trustable, unless I did some mistake
430 when translating it. :-)
431
432Sun Jan 24 18:00 1999 Gerard Roudier (groudier@club-internet.fr)
433 * version sym53c8xx-1.1
434 - Major rewrite of the SCSI parity error handling.
435 The informations contained in the data manuals are incomplete about
436 this feature.
437 I asked SYMBIOS about and got in reply the explanations that are
438 _indeed_ missing in the data manuals.
439 - Allow to tune request_irq() flags from the boot command line using
440 ncr53c8xx=irqm:??, as follows:
441 a) If bit 0x10 is set in irqm, SA_SHIRQ flag is not used.
442 b) If bit 0x20 is set in irqm, SA_INTERRUPT flag is not used.
443 By default the driver uses both SA_SHIRQ and SA_INTERRUPT.
444 Option 'ncr53c8xx=irqm:0x20' may be used when an IRQ is shared by
445 a 53C8XX adapter and a network board.
446 - Fix for 64 bit PCI address register calculation. (Lance Robinson)
447 - Fix for big-endian in phase mismatch handling. (Michal Jaegermann)
448
449Fri Jan 1 20:00 1999 Gerard Roudier (groudier@club-internet.fr)
450 * version sym53c8xx-1.0a
451 - Waiting list look-up didn't work for the first command of the list.
452 Hopefully fixed, but tested on paper only. ;)
453 - Remove the most part of PPC specific code for Linux-2.2.
454 Thanks to Cort.
455 - Some other minors changes.
456
457Sat Dec 19 21:00 1998 Gerard Roudier (groudier@club-internet.fr)
458 * version sym53c8xx-1.0
459 - Define some new IO registers for the 896 (istat1, mbox0, mbox1)
460 - Revamp slighly the Symbios NVRAM lay-out based on the excerpt of
461 the header file I received from Symbios.
462 - Check the PCI bus number for the boot order (Using a fast
463 PCI controller behing a PCI-PCI bridge seems sub-optimal).
464 - Disable overlapped PCI arbitration for the 896 revision 1.
465 - Reduce a bit the number of IO register reads for phase mismatch
466 by reading DWORDS at a time instead of BYTES.
467
468Thu Dec 3 24:00 1998 Gerard Roudier (groudier@club-internet.fr)
469 * version pre-sym53c8xx-0.18
470 - I received this afternoon a 896 from SYMBIOS and started testing
471 the driver with this beast. After having fixed 3 buglets, it worked
472 with all features enabled including the phase mismatch handling
473 from SCRIPTS. Since this feature is not yet tested enough, the
474 boot option 'ncr53c8xx=specf:1' is still required to enable the
475 driver to handle PM from SCRIPTS.
476
477Sun Nov 29 18:00 1998 Gerard Roudier (groudier@club-internet.fr)
478 * version pre-sym53c8xx-0.17
479 - The SISL RAID change requires now remap_pci_mem() stuff to be
480 compiled for __i386__ when normal IOs are used.
481 - The PCI memory read from SCRIPTS that should ensure ordering
482 was in fact misplaced. BTW, this may explain why broken PCI
483 device drivers regarding ordering are working so well. ;-)
484 - Rewrite ncr53c8xx_setup (boot command line options) since the
485 binary code was a bit too bloated in my opinion.
486 - Make the code simpler in the wakeup_done routine.
487
488Tue Nov 24 23:00 1998 Gerard Roudier (groudier@club-internet.fr)
489 * version pre-sym53c8xx-0.16
490 - Add SCSI_NCR_OPTIMIZE_896_1 compile option and 'optim' boot option.
491 When set, the driver unconditionnaly assumes that the interrupt
492 handler is called for command completion, then clears INTF, scans
493 the done queue and returns if some completed CCB is found. If no
494 completed CCB are found, interrupt handling will proceed normally.
495 With a 896 that handles MA from SCRIPTS, this can be a great win,
496 since the driver will never performs PCI read transactions, but
497 only PCI write transactions that may be posted.
498 If the driver haven't to also raise the SIGP this would be perfect.
499 Even with this penalty, I think that this will work great.
500 Obviously this optimization makes sense only if the IRQ is not
501 shared with another device.
502 - Still a buglet in the tags initial settings that needed to be fixed.
503 It was not possible to disable TGQ at system startup for devices
504 that claim TGQ support. The driver used at least 2 for the queue
505 depth but did'nt keep track of user settings for tags depth lower
506 than 2.
507
508Thu Nov 19 23:00 1998 Gerard Roudier (groudier@club-internet.fr)
509 * version pre-sym53c8xx-0.15
510 - Add support for hardware LED control of the 896.
511 - Ignore chips that are driven by SISL RAID (DAC 960).
512 Change sent by Leonard Zubkoff and slightly reworked.
513 - Prevent 810A rev 11 and 860 rev 1 from using cache line based
514 transactions since those early chip revisions may use such on
515 LOAD/STORE instructions (work-around).
516 - Remove some useless and bloat code from the pci init stuff.
517 - Do not use the readX()/writeX() kernel functions for __i386__,
518 since they perform useless masking operations in order to deal
519 with broken driver in 2.1.X kernel.
520
521Wed Nov 11 10:00 1998 Gerard Roudier (groudier@club-internet.fr)
522 * version pre-sym53c8xx-0.14
523 - The driver was unhappy when configured with default_tags > MAX_TAGS
524 Hopefully doubly-fixed.
525 - Set PCI_PARITY in PCI_COMMAND register in not set (PCI fix-up).
526 - Print out some message if phase mismatch is handled from SCRIPTS.
527
528Sun Nov 1 14H00 1998 Gerard Roudier (groudier@club-internet.fr)
529 * version pre-sym53c8xx-0.13
530 - Some rewrite of the device detection code. This code had been
531 patched too much and needed to be face-lifted a bit.
532 Remove all platform dependent fix-ups that was not needed or
533 conflicted with some other driver code as work-arounds.
534 Reread the NVRAM before the calling of ncr_attach(). This spares
535 stack space and so allows to handle more boards.
536 Handle 64 bit base addresses under linux-2.0.X.
537 Set MASTER bit in PCI COMMAND register if not set.
538
539Wed Oct 30 22H00 1998 Gerard Roudier (groudier@club-internet.fr)
540 * version pre-sym53c8xx-0.12
541 - Damned! I just broke the driver for Alpha by leaving a stale
542 instruction in the source code. Hopefully fixed.
543 - Do not set PFEN when it is useless. Doing so we are sure that BOF
544 will be active, since the manual appears to be very unclear on what
545 feature is actually used by the chip when both PFEN and BOF are
546 set.
547
548Sat Oct 24 16H00 1998 Gerard Roudier (groudier@club-internet.fr)
549 * version pre-sym53c8xx-0.11
550 - LOAD/STORE instructions were miscompiled for register offsets
551 beyond 0x7f. This broke accesses to 896' new registers.
552 - Disable by default Phase Mismatch handling from SCRIPTS, since
553 current 896 rev.1 seems not to operate safely with the driver
554 when this feature is enabled (and above LOAD/STORE fix applied).
555 I will change the default to 'enabled' when this problem will be
556 solved.
557 Using boot option 'ncr53c8xx=specf:1' enables this feature.
558 - Implement a work-around (DEL 472 - ITEM 5) that should allow the
559 driver to safely enable hardware phase mismatch with 896 rev. 1.
560
561Tue Oct 20 22H00 1998 Gerard Roudier (groudier@club-internet.fr)
562 * version pre-sym53c8xx-0.10
563 - Add the 53c876 description to the chip table. This is only useful
564 for printing the right name of the controller.
565 - Add additional checking of INQUIRY data:
566 Check INQUIRY data received length is at least 7. Byte 7 of
567 inquiry data contains device features bits and the driver might
568 be confused by garbage. Also check peripheral qualifier.
569 - Use a 1,3,5,...MAXTAGS*2+1 tag numbering. Previous driver could
570 use any tag number from 1 to 253 and some non conformant devices
571 might have problems with large tag numbers.
572 - Use NAME53C and NAME53C8XX for chip name prefix chip family name.
573 Just give a try using "sym53c" and "sym53c8xx" instead of "ncr53c"
574 and "ncr53c8xx". :-)
575
576Sun Oct 11 17H00 1998 Gerard Roudier (groudier@club-internet.fr)
577 * version pre-sym53c8xx-0.9
578 - DEL-441 Item 2 work-around for the 53c876 rev <= 5 (0x15).
579 - Break ncr_scatter() into 2 functions in order to guarantee best
580 possible code optimization for the case we get a scatter list.
581 - Add the code intended to support up to 1 tera-byte for 64 bit systems.
582 It is probably too early, but I wanted to complete the thing.
583
584Sat Oct 3 14H00 1998 Gerard Roudier (groudier@club-internet.fr)
585 * version pre-sym53c8xx-0.8
586 - Do some testing with io_mapped and fix what needed to be so.
587 - Wait for SCSI selection to complete or time-out immediately after
588 the chip won arbitration, since executing SCRIPTS while the SCSI
589 core is performing SCSI selection breaks the selection procedure
590 at least for some chip revisions.
591 - Interrupt the SCRIPTS if a device does not go to MSG OUT phase after
592 having been selected with ATN. Such a situation is not recoverable,
593 better to fail when we are stuck.
diff --git a/Documentation/scsi/ChangeLog.sym53c8xx_2 b/Documentation/scsi/ChangeLog.sym53c8xx_2
new file mode 100644
index 000000000000..18a5d712a56a
--- /dev/null
+++ b/Documentation/scsi/ChangeLog.sym53c8xx_2
@@ -0,0 +1,144 @@
1Sat Dec 30 21:30 2000 Gerard Roudier
2 * version sym-2.1.0-20001230
3 - Initial release of SYM-2.
4
5Mon Jan 08 21:30 2001 Gerard Roudier
6 * version sym-2.1.1-20010108
7 - Change a couple of defines containing ncr or NCR by their
8 equivalent containing sym or SYM instead.
9
10Sun Jan 14 22:30 2001 Gerard Roudier
11 * version sym-2.1.2-20010114
12 - Fix a couple of printfs:
13 * Add the target number to the display of transfer parameters.
14 * Make the display of TCQ and queue depth clearer.
15
16Wed Jan 17 23:30 2001 Gerard Roudier
17 * version sym-2.1.3-20010117
18 - Wrong residual values were returned in some situations.
19 This broke cdrecord with linux-2.4.0, for example.
20
21Sat Jan 20 18:00 2001 Gerard Roudier
22 * version sym-2.1.4-20010120
23 - Add year 2001 to Copyright.
24 - A tiny bug in the dma memory freeing path has been fixed.
25 (Driver unload failed with a bad address reference).
26
27Wed Jan 24 21:00 2001 Gerard Roudier
28 * version sym-2.1.5-20010124
29 - Make the driver work under Linux-2.4.x when statically linked
30 with the kernel.
31 - Check against memory allocation failure for SCRIPTZ and add the
32 missing free of this memory on instance detach.
33 - Check against GPIO3 pulled low for HVD controllers (driver did
34 just the opposite).
35 Misdetection of BUS mode was triggered on module reload only,
36 since BIOS settings were trusted instead on first load.
37
38Wed Feb 7 21:00 2001 Gerard Roudier
39 * version sym-2.1.6-20010207
40 - Call pci_enable_device() as wished by kernel maintainers.
41 - Change the sym_queue_scsiio() interface.
42 This is intended to simplify portability.
43 - Move the code intended to deal with the dowloading of SCRIPTS
44 from SCRIPTS :) in the patch method (was wrongly placed in
45 the SCRIPTS setup method).
46 - Add a missing cpu_to_scr() (np->abort_tbl.addr)
47 - Remove a wrong cpu_to_scr() (np->targtbl_ba)
48 - Cleanup a bit the PPR failure recovery code.
49
50Sat Mar 3 21:00 2001 Gerard Roudier
51 - Add option SYM_OPT_ANNOUNCE_TRANSFER_RATE and move the
52 corresponding code to file sym_misc.c.
53 Also move the code that sniffes INQUIRY to sym_misc.c.
54 This allows to share the corresponding code with NetBSD
55 without polluating the core driver source (sym_hipd.c).
56 - Add optionnal code that handles IO timeouts from the driver.
57 (not used under Linux, but required for NetBSD)
58 - Donnot assume any longer that PAGE_SHIFT and PAGE_SIZE are
59 defined at compile time, as at least NetBSD uses variables
60 in memory for that.
61 - Refine a work-around for the C1010-33 that consists in
62 disabling internal LOAD/STORE. Was applied up to revision 1.
63 Is now only applied to revision 0.
64 - Some code reorganisations due to code moves between files.
65
66Tues Apr 10 21:00 2001 Gerard Roudier
67 * version sym-2.1.9-20010412
68 - Reset 53C896 and 53C1010 chip according to the manual.
69 (i.e.: set the ABRT bit in ISTAT if SCRIPTS are running)
70 - Set #LUN in request sense only if scsi version <= 2 and
71 #LUN <= 7.
72 - Set busy_itl in LCB to 1 if the LCB is allocated and a
73 SCSI command is active. This is a simplification.
74 - In sym_hcb_free(), do not scan the free_ccbq if no CCBs
75 has been allocated. This fixes a panic if attach failed.
76 - Add DT/ST (double/simple transition) in the transfer
77 negotiation announce.
78 - Forces the max number of tasks per LUN to at least 64.
79 - Use pci_set_dma_mask() for linux-2.4.3 and above.
80 - A couple of comments fixes.
81
82Wed May 22:00 2001 Gerard Roudier
83 * version sym-2.1.10-20010509
84 - Mask GPCNTL against 0x1c (was 0xfc) for the reading of the NVRAM.
85 This ensure LEDC bit will not be set on 896 and later chips.
86 Fix sent by Chip Salzenberg <chip@perlsupport.com>.
87 - Define the number of PQS BUSes supported.
88 Fix sent by Stig Telfer <stig@api-networks.com>
89 - Miscellaneous common code rearrangements due to NetBSD accel
90 ioctl support, without impact on Linux (hopefully).
91
92Mon July 2 12:00 2001 Gerard Roudier
93 * version sym-2.1.11-20010702
94 - Add Tekram 390 U2B/U2W SCSI LED handling.
95 Submitted by Chip Salzenberg <chip@valinux.com>
96 - Add call to scsi_set_pci_device() for kernels >= 2.4.4.
97 - Check pci dma mapping failures and complete the IO with some
98 error when such mapping fails.
99 - Fill in instance->max_cmd_len for kernels > 2.4.0.
100 - A couple of tiny fixes ...
101
102Sun Sep 9 18:00 2001 Gerard Roudier
103 * version sym-2.1.12-20010909
104 - Change my email address.
105 - Add infrastructure for the forthcoming 64 bit DMA addressing support.
106 (Based on PCI 64 bit patch from David S. Miller)
107 - Donnot use anymore vm_offset_t type.
108
109Sat Sep 15 20:00 2001 Gerard Roudier
110 * version sym-2.1.13-20010916
111 - Add support for 64 bit DMA addressing using segment registers.
112 16 registers for up to 4 GB x 16 -> 64 GB.
113
114Sat Sep 22 12:00 2001 Gerard Roudier
115 * version sym-2.1.14-20010922
116 - Complete rewrite of the eh handling. The driver is now using a
117 semaphore in order to behave synchronously as required by the eh
118 threads. A timer is also used to prevent from waiting indefinitely.
119
120Sun Sep 30 17:00 2001 Gerard Roudier
121 * version sym-2.1.15-20010930
122 - Include <linux/module.h> unconditionnaly as expected by latest
123 kernels.
124 - Use del_timer_sync() for recent kernels to kill the driver timer
125 on module release.
126
127Sun Oct 28 15:00 2001 Gerard Roudier
128 * version sym-2.1.16-20011028
129 - Slightly simplify driver configuration.
130 - Prepare a new patch against linux-2.4.13.
131
132Sat Nov 17 10:00 2001 Gerard Roudier
133 * version sym-2.1.17
134 - Fix a couple of gcc/gcc3 warnings.
135 - Allocate separately from the HCB the array for CCBs hashed by DSA.
136 All driver memory allocations are now not greater than 1 PAGE
137 even on PPC64 / 4KB PAGE surprising setup.
138
139Sat Dec 01 18:00 2001 Gerard Roudier
140 * version sym-2.1.17a
141 - Use u_long instead of U32 for the IO base cookie. This is more
142 consistent with what archs are expecting.
143 - Use MMIO per default for Power PC instead of some fake normal IO,
144 as Paul Mackerras stated that MMIO works fine now on this arch.
diff --git a/Documentation/scsi/FlashPoint.txt b/Documentation/scsi/FlashPoint.txt
new file mode 100644
index 000000000000..d5acaa300a46
--- /dev/null
+++ b/Documentation/scsi/FlashPoint.txt
@@ -0,0 +1,163 @@
1The BusLogic FlashPoint SCSI Host Adapters are now fully supported on Linux.
2The upgrade program described below has been officially terminated effective
331 March 1997 since it is no longer needed.
4
5
6
7 MYLEX INTRODUCES LINUX OPERATING SYSTEM SUPPORT FOR ITS
8 BUSLOGIC FLASHPOINT LINE OF SCSI HOST ADAPTERS
9
10
11FREMONT, CA, -- October 8, 1996 -- Mylex Corporation has expanded Linux
12operating system support to its BusLogic brand of FlashPoint Ultra SCSI
13host adapters. All of BusLogic's other SCSI host adapters, including the
14MultiMaster line, currently support the Linux operating system. Linux
15drivers and information will be available on October 15th at
16http://www.dandelion.com/Linux/.
17
18"Mylex is committed to supporting the Linux community," says Peter Shambora,
19vice president of marketing for Mylex. "We have supported Linux driver
20development and provided technical support for our host adapters for several
21years, and are pleased to now make our FlashPoint products available to this
22user base."
23
24The Linux Operating System
25
26Linux is a freely-distributed implementation of UNIX for Intel x86, Sun
27SPARC, SGI MIPS, Motorola 68k, Digital Alpha AXP and Motorola PowerPC
28machines. It supports a wide range of software, including the X Window
29System, Emacs, and TCP/IP networking. Further information is available at
30http://www.linux.org and http://www.ssc.com/linux.
31
32FlashPoint Host Adapters
33
34The FlashPoint family of Ultra SCSI host adapters, designed for workstation
35and file server environments, are available in narrow, wide, dual channel,
36and dual channel wide versions. These adapters feature SeqEngine
37automation technology, which minimizes SCSI command overhead and reduces
38the number of interrupts generated to the CPU.
39
40About Mylex
41
42Mylex Corporation (NASDAQ/NM SYMBOL: MYLX), founded in 1983, is a leading
43producer of RAID technology and network management products. The company
44produces high performance disk array (RAID) controllers, and complementary
45computer products for network servers, mass storage systems, workstations
46and system boards. Through its wide range of RAID controllers and its
47BusLogic line of Ultra SCSI host adapter products, Mylex provides enabling
48intelligent I/O technologies that increase network management control,
49enhance CPU utilization, optimize I/O performance, and ensure data security
50and availability. Products are sold globally through a network of OEMs,
51major distributors, VARs, and system integrators. Mylex Corporation is
52headquartered at 34551 Ardenwood Blvd., Fremont, CA.
53
54 ####
55
56Contact:
57
58Peter Shambora
59Vice President of Marketing
60Mylex Corp.
61510/796-6100
62peters@mylex.com
63
64 ANNOUNCEMENT
65 BusLogic FlashPoint LT/BT-948 Upgrade Program
66 1 February 1996
67
68 ADDITIONAL ANNOUNCEMENT
69 BusLogic FlashPoint LW/BT-958 Upgrade Program
70 14 June 1996
71
72Ever since its introduction last October, the BusLogic FlashPoint LT has
73been problematic for members of the Linux community, in that no Linux
74drivers have been available for this new Ultra SCSI product. Despite it's
75officially being positioned as a desktop workstation product, and not being
76particularly well suited for a high performance multitasking operating
77system like Linux, the FlashPoint LT has been touted by computer system
78vendors as the latest thing, and has been sold even on many of their high
79end systems, to the exclusion of the older MultiMaster products. This has
80caused grief for many people who inadvertently purchased a system expecting
81that all BusLogic SCSI Host Adapters were supported by Linux, only to
82discover that the FlashPoint was not supported and would not be for quite
83some time, if ever.
84
85After this problem was identified, BusLogic contacted its major OEM
86customers to make sure the BT-946C/956C MultiMaster cards would still be
87made available, and that Linux users who mistakenly ordered systems with
88the FlashPoint would be able to upgrade to the BT-946C. While this helped
89many purchasers of new systems, it was only a partial solution to the
90overall problem of FlashPoint support for Linux users. It did nothing to
91assist the people who initially purchased a FlashPoint for a supported
92operating system and then later decided to run Linux, or those who had
93ended up with a FlashPoint LT, believing it was supported, and were unable
94to return it.
95
96In the middle of December, I asked to meet with BusLogic's senior
97management to discuss the issues related to Linux and free software support
98for the FlashPoint. Rumors of varying accuracy had been circulating
99publicly about BusLogic's attitude toward the Linux community, and I felt
100it was best that these issues be addressed directly. I sent an email
101message after 11pm one evening, and the meeting took place the next
102afternoon. Unfortunately, corporate wheels sometimes grind slowly,
103especially when a company is being acquired, and so it's taken until now
104before the details were completely determined and a public statement could
105be made.
106
107BusLogic is not prepared at this time to release the information necessary
108for third parties to write drivers for the FlashPoint. The only existing
109FlashPoint drivers have been written directly by BusLogic Engineering, and
110there is no FlashPoint documentation sufficiently detailed to allow outside
111developers to write a driver without substantial assistance. While there
112are people at BusLogic who would rather not release the details of the
113FlashPoint architecture at all, that debate has not yet been settled either
114way. In any event, even if documentation were available today it would
115take quite a while for a usable driver to be written, especially since I'm
116not convinced that the effort required would be worthwhile.
117
118However, BusLogic does remain committed to providing a high performance
119SCSI solution for the Linux community, and does not want to see anyone left
120unable to run Linux because they have a Flashpoint LT. Therefore, BusLogic
121has put in place a direct upgrade program to allow any Linux user worldwide
122to trade in their FlashPoint LT for the new BT-948 MultiMaster PCI Ultra
123SCSI Host Adapter. The BT-948 is the Ultra SCSI successor to the BT-946C
124and has all the best features of both the BT-946C and FlashPoint LT,
125including smart termination and a flash PROM for easy firmware updates, and
126is of course compatible with the present Linux driver. The price for this
127upgrade has been set at US $45 plus shipping and handling, and the upgrade
128program will be administered through BusLogic Technical Support, which can
129be reached by electronic mail at techsup@buslogic.com, by Voice at +1 408
130654-0760, or by FAX at +1 408 492-1542.
131
132As of 14 June 1996, the original BusLogic FlashPoint LT to BT-948 upgrade
133program has now been extended to encompass the FlashPoint LW Wide Ultra
134SCSI Host Adapter. Any Linux user worldwide may trade in their FlashPoint
135LW (BT-950) for a BT-958 MultiMaster PCI Ultra SCSI Host Adapter. The
136price for this upgrade has been set at US $65 plus shipping and handling.
137
138I was a beta test site for the BT-948/958, and versions 1.2.1 and 1.3.1 of
139my BusLogic driver already included latent support for the BT-948/958.
140Additional cosmetic support for the Ultra SCSI MultiMaster cards was added
141subsequent releases. As a result of this cooperative testing process,
142several firmware bugs were found and corrected. My heavily loaded Linux
143test system provided an ideal environment for testing error recovery
144processes that are much more rarely exercised in production systems, but
145are crucial to overall system stability. It was especially convenient
146being able to work directly with their firmware engineer in demonstrating
147the problems under control of the firmware debugging environment; things
148sure have come a long way since the last time I worked on firmware for an
149embedded system. I am presently working on some performance testing and
150expect to have some data to report in the not too distant future.
151
152BusLogic asked me to send this announcement since a large percentage of the
153questions regarding support for the FlashPoint have either been sent to me
154directly via email, or have appeared in the Linux newsgroups in which I
155participate. To summarize, BusLogic is offering Linux users an upgrade
156from the unsupported FlashPoint LT (BT-930) to the supported BT-948 for US
157$45 plus shipping and handling, or from the unsupported FlashPoint LW
158(BT-950) to the supported BT-958 for $65 plus shipping and handling.
159Contact BusLogic Technical Support at techsup@buslogic.com or +1 408
160654-0760 to take advantage of their offer.
161
162 Leonard N. Zubkoff
163 lnz@dandelion.com
diff --git a/Documentation/scsi/LICENSE.FlashPoint b/Documentation/scsi/LICENSE.FlashPoint
new file mode 100644
index 000000000000..ffd0fe226ee2
--- /dev/null
+++ b/Documentation/scsi/LICENSE.FlashPoint
@@ -0,0 +1,60 @@
1 FlashPoint Driver Developer's Kit
2 Version 1.0
3
4 Copyright 1995-1996 by Mylex Corporation
5 All Rights Reserved
6
7This program is free software; you may redistribute and/or modify it under
8the terms of either:
9
10 a) the GNU General Public License as published by the Free Software
11 Foundation; either version 2, or (at your option) any later version,
12
13 or
14
15 b) the "BSD-style License" included below.
16
17This program is distributed in the hope that it will be useful, but
18WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
19or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public
20License or the BSD-style License below for more details.
21
22You should have received a copy of the GNU General Public License along
23with this program; if not, write to the Free Software Foundation, Inc.,
24675 Mass Ave, Cambridge, MA 02139, USA.
25
26The BSD-style License is as follows:
27
28Redistribution and use in source and binary forms, with or without
29modification, are permitted provided that the following conditions are
30met:
31
321. Redistributions of source code must retain this LICENSE.FlashPoint
33 file, without modification, this list of conditions, and the following
34 disclaimer. The following copyright notice must appear immediately at
35 the beginning of all source files:
36
37 Copyright 1995-1996 by Mylex Corporation. All Rights Reserved
38
39 This file is available under both the GNU General Public License
40 and a BSD-style copyright; see LICENSE.FlashPoint for details.
41
422. Redistributions in binary form must reproduce the above copyright
43 notice, this list of conditions and the following disclaimer in the
44 documentation and/or other materials provided with the distribution.
45
463. The name of Mylex Corporation may not be used to endorse or promote
47 products derived from this software without specific prior written
48 permission.
49
50THIS SOFTWARE IS PROVIDED BY MYLEX CORP. ``AS IS'' AND ANY EXPRESS OR
51IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
52OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
53NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
54INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
55(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
56SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
57CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
58LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
59OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
60SUCH DAMAGE.
diff --git a/Documentation/scsi/Mylex.txt b/Documentation/scsi/Mylex.txt
new file mode 100644
index 000000000000..cdf69293f7d5
--- /dev/null
+++ b/Documentation/scsi/Mylex.txt
@@ -0,0 +1,5 @@
1Please see the file README.BusLogic for information about Linux support for
2Mylex (formerly BusLogic) MultiMaster and FlashPoint SCSI Host Adapters.
3
4The Mylex DAC960 PCI RAID Controllers are now supported. Please consult
5http://www.dandelion.com/Linux/ for further information on the DAC960 driver.
diff --git a/Documentation/scsi/NinjaSCSI.txt b/Documentation/scsi/NinjaSCSI.txt
new file mode 100644
index 000000000000..041780f428ac
--- /dev/null
+++ b/Documentation/scsi/NinjaSCSI.txt
@@ -0,0 +1,130 @@
1
2 WorkBiT NinjaSCSI-3/32Bi driver for Linux
3
41. Comment
5 This is Workbit corp.'s(http://www.workbit.co.jp/) NinjaSCSI-3
6(http://www.workbit.co.jp/ts/z_nj3r.html) and NinjaSCSI-32Bi
7(http://www.workbit.co.jp/ts/z_njsc32bi.html) PCMCIA card driver module
8for Linux.
9
102. My Linux environment
11Linux kernel: 2.4.7 / 2.2.19
12pcmcia-cs: 3.1.27
13gcc: gcc-2.95.4
14PC card: I-O data PCSC-F (NinjaSCSI-3)
15 I-O data CBSC-II in 16 bit mode (NinjaSCSI-32Bi)
16SCSI device: I-O data CDPS-PX24 (CD-ROM drive)
17 Media Intelligent MMO-640GT (Optical disk drive)
18
193. Install
20[1] Check your PC card is true "NinjaSCSI-3" card.
21 If you installed pcmcia-cs already, pcmcia reports your card as UNKNOWN
22 card, and write ["WBT", "NinjaSCSI-3", "R1.0"] or some other string to
23 your console or log file.
24 You can also use "cardctl" program (this program is in pcmcia-cs source
25 code) to get more info.
26
27# cat /var/log/messgaes
28...
29Jan 2 03:45:06 lindberg cardmgr[78]: unsupported card in socket 1
30Jan 2 03:45:06 lindberg cardmgr[78]: product info: "WBT", "NinjaSCSI-3", "R1.0"
31...
32# cardctl ident
33Socket 0:
34 no product info available
35Socket 1:
36 product info: "IO DATA", "CBSC16 ", "1"
37
38
39[2] Get Linux kernel source, and extract it to /usr/src.
40 Because NinjaSCSI driver requiers some SCSI header files in Linux kernel
41 source.
42 I recomend rebuilding your kernel. This eliminate some versioning problem.
43$ cd /usr/src
44$ tar -zxvf linux-x.x.x.tar.gz
45$ cd linux
46$ make config
47...
48
49[3] If you use this driver with Kernel 2.2, Unpack pcmcia-cs in some directory
50 and make & install. This driver requies pcmcia-cs header file.
51$ cd /usr/src
52$ tar zxvf cs-pcmcia-cs-3.x.x.tar.gz
53...
54
55[4] Extract this driver's archive somewhere, and edit Makefile, then do make.
56$ tar -zxvf nsp_cs-x.x.tar.gz
57$ cd nsp_cs-x.x
58$ emacs Makefile
59...
60$ make
61
62[5] Copy nsp_cs.o to suitable plase, like /lib/modules/<Kernel version>/pcmcia/ .
63
64[6] Add these lines to /etc/pcmcia/config .
65 If you yse pcmcia-cs-3.1.8 or later, we can use "nsp_cs.conf" file.
66 So, you don't need to edit file. Just copy to /etc/pcmcia/ .
67
68-------------------------------------
69device "nsp_cs"
70 class "scsi" module "nsp_cs"
71
72card "WorkBit NinjaSCSI-3"
73 version "WBT", "NinjaSCSI-3", "R1.0"
74 bind "nsp_cs"
75
76card "WorkBit NinjaSCSI-32Bi (16bit)"
77 version "WORKBIT", "UltraNinja-16", "1"
78 bind "nsp_cs"
79
80# OEM
81card "WorkBit NinjaSCSI-32Bi (16bit) / IO-DATA"
82 version "IO DATA", "CBSC16 ", "1"
83 bind "nsp_cs"
84
85# OEM
86card "WorkBit NinjaSCSI-32Bi (16bit) / KME-1"
87 version "KME ", "SCSI-CARD-001", "1"
88 bind "nsp_cs"
89card "WorkBit NinjaSCSI-32Bi (16bit) / KME-2"
90 version "KME ", "SCSI-CARD-002", "1"
91 bind "nsp_cs"
92card "WorkBit NinjaSCSI-32Bi (16bit) / KME-3"
93 version "KME ", "SCSI-CARD-003", "1"
94 bind "nsp_cs"
95card "WorkBit NinjaSCSI-32Bi (16bit) / KME-4"
96 version "KME ", "SCSI-CARD-004", "1"
97 bind "nsp_cs"
98-------------------------------------
99
100[7] Start (or restart) pcmcia-cs.
101# /etc/rc.d/rc.pcmcia start (BSD style)
102or
103# /etc/init.d/pcmcia start (SYSV style)
104
105
1064. History
107See README.nin_cs .
108
1095. Caution
110 If you eject card when doing some operation for your SCSI device or suspend
111your computer, you encount some *BAD* error like disk crash.
112 It works good when I using this driver right way. But I'm not guarantee
113your data. Please backup your data when you use this driver.
114
1156. Known Bugs
116 In 2.4 kernel, you can't use 640MB Optical disk. This error comes from
117high level SCSI driver.
118
1197. Testing
120 Please send me some reports(bug reports etc..) of this software.
121When you send report, please tell me these or more.
122 card name
123 kernel version
124 your SCSI device name(hard drive, CD-ROM, etc...)
125
1268. Copyright
127 See GPL.
128
129
1302001/08/08 yokota@netlab.is.tsukuba.ac.jp <YOKOTA Hiroshi>
diff --git a/Documentation/scsi/aha152x.txt b/Documentation/scsi/aha152x.txt
new file mode 100644
index 000000000000..2ce022cec9be
--- /dev/null
+++ b/Documentation/scsi/aha152x.txt
@@ -0,0 +1,183 @@
1$Id: README.aha152x,v 1.2 1999/12/25 15:32:30 fischer Exp fischer $
2Adaptec AHA-1520/1522 SCSI driver for Linux (aha152x)
3
4Copyright 1993-1999 Jürgen Fischer <fischer@norbit.de>
5TC1550 patches by Luuk van Dijk (ldz@xs4all.nl)
6
7
8In Revision 2 the driver was modified a lot (especially the
9bottom-half handler complete()).
10
11The driver is much cleaner now, has support for the new
12error handling code in 2.3, produced less cpu load (much
13less polling loops), has slightly higher throughput (at
14least on my ancient test box; a i486/33Mhz/20MB).
15
16
17CONFIGURATION ARGUMENTS:
18
19IOPORT base io address (0x340/0x140)
20IRQ interrupt level (9-12; default 11)
21SCSI_ID scsi id of controller (0-7; default 7)
22RECONNECT allow targets to disconnect from the bus (0/1; default 1 [on])
23PARITY enable parity checking (0/1; default 1 [on])
24SYNCHRONOUS enable synchronous transfers (0/1; default 1 [on])
25DELAY: bus reset delay (default 100)
26EXT_TRANS: enable extended translation (0/1: default 0 [off])
27 (see NOTES)
28
29COMPILE TIME CONFIGURATION (go into AHA152X in drivers/scsi/Makefile):
30
31-DAUTOCONF
32 use configuration the controller reports (AHA-152x only)
33
34-DSKIP_BIOSTEST
35 Don't test for BIOS signature (AHA-1510 or disabled BIOS)
36
37-DSETUP0="{ IOPORT, IRQ, SCSI_ID, RECONNECT, PARITY, SYNCHRONOUS, DELAY, EXT_TRANS }"
38 override for the first controller
39
40-DSETUP1="{ IOPORT, IRQ, SCSI_ID, RECONNECT, PARITY, SYNCHRONOUS, DELAY, EXT_TRANS }"
41 override for the second controller
42
43-DAHA152X_DEBUG
44 enable debugging output
45
46-DAHA152X_STAT
47 enable some statistics
48
49
50LILO COMMAND LINE OPTIONS:
51
52aha152x=<IOPORT>[,<IRQ>[,<SCSI-ID>[,<RECONNECT>[,<PARITY>[,<SYNCHRONOUS>[,<DELAY> [,<EXT_TRANS]]]]]]]
53
54 The normal configuration can be overridden by specifying a command line.
55 When you do this, the BIOS test is skipped. Entered values have to be
56 valid (known). Don't use values that aren't supported under normal
57 operation. If you think that you need other values: contact me.
58 For two controllers use the aha152x statement twice.
59
60
61SYMBOLS FOR MODULE CONFIGURATION:
62
63Choose from 2 alternatives:
64
651. specify everything (old)
66
67aha152x=IOPORT,IRQ,SCSI_ID,RECONNECT,PARITY,SYNCHRONOUS,DELAY,EXT_TRANS
68 configuration override for first controller
69
70
71aha152x1=IOPORT,IRQ,SCSI_ID,RECONNECT,PARITY,SYNCHRONOUS,DELAY,EXT_TRANS
72 configuration override for second controller
73
742. specify only what you need to (irq or io is required; new)
75
76io=IOPORT0[,IOPORT1]
77 IOPORT for first and second controller
78
79irq=IRQ0[,IRQ1]
80 IRQ for first and second controller
81
82scsiid=SCSIID0[,SCSIID1]
83 SCSIID for first and second controller
84
85reconnect=RECONNECT0[,RECONNECT1]
86 allow targets to disconnect for first and second controller
87
88parity=PAR0[PAR1]
89 use parity for first and second controller
90
91sync=SYNCHRONOUS0[,SYNCHRONOUS1]
92 enable synchronous transfers for first and second controller
93
94delay=DELAY0[,DELAY1]
95 reset DELAY for first and second controller
96
97exttrans=EXTTRANS0[,EXTTRANS1]
98 enable extended translation for first and second controller
99
100
101If you use both alternatives the first will be taken.
102
103
104NOTES ON EXT_TRANS:
105
106SCSI uses block numbers to address blocks/sectors on a device.
107The BIOS uses a cylinder/head/sector addressing scheme (C/H/S)
108scheme instead. DOS expects a BIOS or driver that understands this
109C/H/S addressing.
110
111The number of cylinders/heads/sectors is called geometry and is required
112as base for requests in C/H/S addressing. SCSI only knows about the
113total capacity of disks in blocks (sectors).
114
115Therefore the SCSI BIOS/DOS driver has to calculate a logical/virtual
116geometry just to be able to support that addressing scheme. The geometry
117returned by the SCSI BIOS is a pure calculation and has nothing to
118do with the real/physical geometry of the disk (which is usually
119irrelevant anyway).
120
121Basically this has no impact at all on Linux, because it also uses block
122instead of C/H/S addressing. Unfortunately C/H/S addressing is also used
123in the partition table and therefore every operating system has to know
124the right geometry to be able to interpret it.
125
126Moreover there are certain limitations to the C/H/S addressing scheme,
127namely the address space is limited to upto 255 heads, upto 63 sectors
128and a maximum of 1023 cylinders.
129
130The AHA-1522 BIOS calculates the geometry by fixing the number of heads
131to 64, the number of sectors to 32 and by calculating the number of
132cylinders by dividing the capacity reported by the disk by 64*32 (1 MB).
133This is considered to be the default translation.
134
135With respect to the limit of 1023 cylinders using C/H/S you can only
136address the first GB of your disk in the partition table. Therefore
137BIOSes of some newer controllers based on the AIC-6260/6360 support
138extended translation. This means that the BIOS uses 255 for heads,
13963 for sectors and then divides the capacity of the disk by 255*63
140(about 8 MB), as soon it sees a disk greater than 1 GB. That results
141in a maximum of about 8 GB addressable diskspace in the partition table
142(but there are already bigger disks out there today).
143
144To make it even more complicated the translation mode might/might
145not be configurable in certain BIOS setups.
146
147This driver does some more or less failsafe guessing to get the
148geometry right in most cases:
149
150- for disks<1GB: use default translation (C/32/64)
151
152- for disks>1GB:
153 - take current geometry from the partition table
154 (using scsicam_bios_param and accept only `valid' geometries,
155 ie. either (C/32/64) or (C/63/255)). This can be extended translation
156 even if it's not enabled in the driver.
157
158 - if that fails, take extended translation if enabled by override,
159 kernel or module parameter, otherwise take default translation and
160 ask the user for verification. This might on not yet partitioned
161 disks.
162
163
164REFERENCES USED:
165
166 "AIC-6260 SCSI Chip Specification", Adaptec Corporation.
167
168 "SCSI COMPUTER SYSTEM INTERFACE - 2 (SCSI-2)", X3T9.2/86-109 rev. 10h
169
170 "Writing a SCSI device driver for Linux", Rik Faith (faith@cs.unc.edu)
171
172 "Kernel Hacker's Guide", Michael K. Johnson (johnsonm@sunsite.unc.edu)
173
174 "Adaptec 1520/1522 User's Guide", Adaptec Corporation.
175
176 Michael K. Johnson (johnsonm@sunsite.unc.edu)
177
178 Drew Eckhardt (drew@cs.colorado.edu)
179
180 Eric Youngdale (eric@andante.org)
181
182 special thanks to Eric Youngdale for the free(!) supplying the
183 documentation on the chip.
diff --git a/Documentation/scsi/aic79xx.txt b/Documentation/scsi/aic79xx.txt
new file mode 100644
index 000000000000..0aeef740a95a
--- /dev/null
+++ b/Documentation/scsi/aic79xx.txt
@@ -0,0 +1,516 @@
1====================================================================
2= Adaptec Ultra320 Family Manager Set v1.3.11 =
3= =
4= README for =
5= The Linux Operating System =
6====================================================================
7
8The following information is available in this file:
9
10 1. Supported Hardware
11 2. Version History
12 3. Command Line Options
13 4. Additional Notes
14 5. Contacting Adaptec
15
16
171. Supported Hardware
18
19 The following Adaptec SCSI Host Adapters are supported by this
20 driver set.
21
22 Ultra320 ASIC Description
23 ----------------------------------------------------------------
24 AIC-7901A Single Channel 64-bit PCI-X 133MHz to
25 Ultra320 SCSI ASIC
26 AIC-7901B Single Channel 64-bit PCI-X 133MHz to
27 Ultra320 SCSI ASIC with Retained Training
28 AIC-7902A4 Dual Channel 64-bit PCI-X 133MHz to
29 Ultra320 SCSI ASIC
30 AIC-7902B Dual Channel 64-bit PCI-X 133MHz to
31 Ultra320 SCSI ASIC with Retained Training
32
33 Ultra320 Adapters Description ASIC
34 --------------------------------------------------------------------------
35 Adaptec SCSI Card 39320 Dual Channel 64-bit PCI-X 133MHz to 7902A4/7902B
36 Ultra320 SCSI Card (one external
37 68-pin, two internal 68-pin)
38 Adaptec SCSI Card 39320A Dual Channel 64-bit PCI-X 133MHz to 7902B
39 Ultra320 SCSI Card (one external
40 68-pin, two internal 68-pin)
41 Adaptec SCSI Card 39320D Dual Channel 64-bit PCI-X 133MHz to 7902A4
42 Ultra320 SCSI Card (two external VHDC
43 and one internal 68-pin)
44 Adaptec SCSI Card 39320D Dual Channel 64-bit PCI-X 133MHz to 7902A4
45 Ultra320 SCSI Card (two external VHDC
46 and one internal 68-pin) based on the
47 AIC-7902B ASIC
48 Adaptec SCSI Card 29320 Single Channel 64-bit PCI-X 133MHz to 7901A
49 Ultra320 SCSI Card (one external
50 68-pin, two internal 68-pin, one
51 internal 50-pin)
52 Adaptec SCSI Card 29320A Single Channel 64-bit PCI-X 133MHz to 7901B
53 Ultra320 SCSI Card (one external
54 68-pin, two internal 68-pin, one
55 internal 50-pin)
56 Adaptec SCSI Card 29320LP Single Channel 64-bit Low Profile 7901A
57 PCI-X 133MHz to Ultra320 SCSI Card
58 (One external VHDC, one internal
59 68-pin)
60 Adaptec SCSI Card 29320ALP Single Channel 64-bit Low Profile 7901B
61 PCI-X 133MHz to Ultra320 SCSI Card
62 (One external VHDC, one internal
63 68-pin)
642. Version History
65
66 1.3.11 (July 11, 2003)
67 - Fix several deadlock issues.
68 - Add 29320ALP and 39320B Id's.
69
70 1.3.10 (June 3rd, 2003)
71 - Align the SCB_TAG field on a 16byte boundary. This avoids
72 SCB corruption on some PCI-33 busses.
73 - Correct non-zero luns on Rev B. hardware.
74 - Update for change in 2.5.X SCSI proc FS interface.
75 - When negotiation async via an 8bit WDTR message, send
76 an SDTR with an offset of 0 to be sure the target
77 knows we are async. This works around a firmware defect
78 in the Quantum Atlas 10K.
79 - Implement controller susupend and resume.
80 - Clear PCI error state during driver attach so that we
81 don't disable memory mapped I/O due to a stray write
82 by some other driver probe that occurred before we
83 claimed the controller.
84
85 1.3.9 (May 22nd, 2003)
86 - Fix compiler errors.
87 - Remove S/G splitting for segments that cross a 4GB boundary.
88 This is guaranteed not to happen in Linux.
89 - Add support for scsi_report_device_reset() found in
90 2.5.X kernels.
91 - Add 7901B support.
92 - Simplify handling of the packtized lun Rev A workaround.
93 - Correct and simplify handling of the ignore wide residue
94 message. The previous code would fail to report a residual
95 if the transaction data length was even and we received
96 an IWR message.
97
98 1.3.8 (April 29th, 2003)
99 - Fix types accessed via the command line interface code.
100 - Perform a few firmware optimizations.
101 - Fix "Unexpected PKT busfree" errors.
102 - Use a sequencer interrupt to notify the host of
103 commands with bad status. We defer the notification
104 until there are no outstanding selections to ensure
105 that the host is interrupted for as short a time as
106 possible.
107 - Remove pre-2.2.X support.
108 - Add support for new 2.5.X interrupt API.
109 - Correct big-endian architecture support.
110
111 1.3.7 (April 16th, 2003)
112 - Use del_timer_sync() to ensure that no timeouts
113 are pending during controller shutdown.
114 - For pre-2.5.X kernels, carefully adjust our segment
115 list size to avoid SCSI malloc pool fragmentation.
116 - Cleanup channel display in our /proc output.
117 - Workaround duplicate device entries in the mid-layer
118 devlice list during add-single-device.
119
120 1.3.6 (March 28th, 2003)
121 - Correct a double free in the Domain Validation code.
122 - Correct a reference to free'ed memory during controller
123 shutdown.
124 - Reset the bus on an SE->LVD change. This is required
125 to reset our transcievers.
126
127 1.3.5 (March 24th, 2003)
128 - Fix a few register window mode bugs.
129 - Include read streaming in the PPR flags we display in
130 diagnostics as well as /proc.
131 - Add PCI hot plug support for 2.5.X kernels.
132 - Correct default precompensation value for RevA hardware.
133 - Fix Domain Validation thread shutdown.
134 - Add a firmware workaround to make the LED blink
135 brighter during packetized operations on the H2A4.
136 - Correct /proc display of user read streaming settings.
137 - Simplify driver locking by releasing the io_request_lock
138 upon driver entry from the mid-layer.
139 - Cleanup command line parsing and move much of this code
140 to aiclib.
141
142 1.3.4 (February 28th, 2003)
143 - Correct a race condition in our error recovery handler.
144 - Allow Test Unit Ready commands to take a full 5 seconds
145 during Domain Validation.
146
147 1.3.2 (February 19th, 2003)
148 - Correct a Rev B. regression due to the GEM318
149 compatibility fix included in 1.3.1.
150
151 1.3.1 (February 11th, 2003)
152 - Add support for the 39320A.
153 - Improve recovery for certain PCI-X errors.
154 - Fix handling of LQ/DATA/LQ/DATA for the
155 same write transaction that can occur without
156 interveining training.
157 - Correct compatibility issues with the GEM318
158 enclosure services device.
159 - Correct data corruption issue that occurred under
160 high tag depth write loads.
161 - Adapt to a change in the 2.5.X daemonize() API.
162 - Correct a "Missing case in ahd_handle_scsiint" panic.
163
164 1.3.0 (January 21st, 2003)
165 - Full regression testing for all U320 products completed.
166 - Added abort and target/lun reset error recovery handler and
167 interrupt coalessing.
168
169 1.2.0 (November 14th, 2002)
170 - Added support for Domain Validation
171 - Add support for the Hewlett-Packard version of the 39320D
172 and AIC-7902 adapters.
173 Support for previous adapters has not been fully tested and should
174 only be used at the customer's own risk.
175
176 1.1.1 (September 24th, 2002)
177 - Added support for the Linux 2.5.X kernel series
178
179 1.1.0 (September 17th, 2002)
180 - Added support for four additional SCSI products:
181 ASC-39320, ASC-29320, ASC-29320LP, AIC-7901.
182
183 1.0.0 (May 30th, 2002)
184 - Initial driver release.
185
186 2.1. Software/Hardware Features
187 - Support for the SPI-4 "Ultra320" standard:
188 - 320MB/s transfer rates
189 - Packetized SCSI Protocol at 160MB/s and 320MB/s
190 - Quick Arbitration Selection (QAS)
191 - Retained Training Information (Rev B. ASIC only)
192 - Interrupt Coalessing
193 - Initiator Mode (target mode not currently
194 supported)
195 - Support for the PCI-X standard up to 133MHz
196 - Support for the PCI v2.2 standard
197 - Domain Validation
198
199 2.2. Operating System Support:
200 - Redhat Linux 7.2, 7.3, 8.0, Advanced Server 2.1
201 - SuSE Linux 7.3, 8.0, 8.1, Enterprise Server 7
202 - only Intel and AMD x86 supported at this time
203 - >4GB memory configurations supported.
204
205 Refer to the User's Guide for more details on this.
206
2073. Command Line Options
208
209 WARNING: ALTERING OR ADDING THESE DRIVER PARAMETERS
210 INCORRECTLY CAN RENDER YOUR SYSTEM INOPERABLE.
211 USE THEM WITH CAUTION.
212
213 Edit the file "modprobe.conf" in the directory /etc and add/edit a
214 line containing 'options aic79xx aic79xx=[command[,command...]]' where
215 'command' is one or more of the following:
216 -----------------------------------------------------------------
217 Option: verbose
218 Definition: enable additional informative messages during
219 driver operation.
220 Possible Values: This option is a flag
221 Default Value: disabled
222 -----------------------------------------------------------------
223 Option: debug:[value]
224 Definition: Enables various levels of debugging information
225 The bit definitions for the debugging mask can
226 be found in drivers/scsi/aic7xxx/aic79xx.h under
227 the "Debug" heading.
228 Possible Values: 0x0000 = no debugging, 0xffff = full debugging
229 Default Value: 0x0000
230 -----------------------------------------------------------------
231 Option: no_reset
232 Definition: Do not reset the bus during the initial probe
233 phase
234 Possible Values: This option is a flag
235 Default Value: disabled
236 -----------------------------------------------------------------
237 Option: extended
238 Definition: Force extended translation on the controller
239 Possible Values: This option is a flag
240 Default Value: disabled
241 -----------------------------------------------------------------
242 Option: periodic_otag
243 Definition: Send an ordered tag periodically to prevent
244 tag starvation. Needed for some older devices
245 Possible Values: This option is a flag
246 Default Value: disabled
247 -----------------------------------------------------------------
248 Option: reverse_scan
249 Definition: Probe the scsi bus in reverse order, starting
250 with target 15
251 Possible Values: This option is a flag
252 Default Value: disabled
253 -----------------------------------------------------------------
254 Option: global_tag_depth
255 Definition: Global tag depth for all targets on all busses.
256 This option sets the default tag depth which
257 may be selectively overridden vi the tag_info
258 option.
259 Possible Values: 1 - 253
260 Default Value: 32
261 -----------------------------------------------------------------
262 Option: tag_info:{{value[,value...]}[,{value[,value...]}...]}
263 Definition: Set the per-target tagged queue depth on a
264 per controller basis. Both controllers and targets
265 may be ommitted indicating that they should retain
266 the default tag depth.
267 Examples: tag_info:{{16,32,32,64,8,8,,32,32,32,32,32,32,32,32,32}
268 On Controller 0
269 specifies a tag depth of 16 for target 0
270 specifies a tag depth of 64 for target 3
271 specifies a tag depth of 8 for targets 4 and 5
272 leaves target 6 at the default
273 specifies a tag depth of 32 for targets 1,2,7-15
274 All other targets retain the default depth.
275
276 tag_info:{{},{32,,32}}
277 On Controller 1
278 specifies a tag depth of 32 for targets 0 and 2
279 All other targets retain the default depth.
280
281 Possible Values: 1 - 253
282 Default Value: 32
283 -----------------------------------------------------------------
284 Option: rd_strm: {rd_strm_bitmask[,rd_strm_bitmask...]}
285 Definition: Enable read streaming on a per target basis.
286 The rd_strm_bitmask is a 16 bit hex value in which
287 each bit represents a target. Setting the target's
288 bit to '1' enables read streaming for that
289 target. Controllers may be ommitted indicating that
290 they should retain the default read streaming setting.
291 Example: rd_strm:{0x0041}
292 On Controller 0
293 enables read streaming for targets 0 and 6.
294 disables read streaming for targets 1-5,7-15.
295 All other targets retain the default read
296 streaming setting.
297 Example: rd_strm:{0x0023,,0xFFFF}
298 On Controller 0
299 enables read streaming for targets 1,2, and 5.
300 disables read streaming for targets 3,4,6-15.
301 On Controller 2
302 enables read streaming for all targets.
303 All other targets retain the default read
304 streaming setting.
305
306 Possible Values: 0x0000 - 0xffff
307 Default Value: 0x0000
308 -----------------------------------------------------------------
309 Option: dv: {value[,value...]}
310 Definition: Set Domain Validation Policy on a per-controller basis.
311 Controllers may be ommitted indicating that
312 they should retain the default read streaming setting.
313 Example: dv:{-1,0,,1,1,0}
314 On Controller 0 leave DV at its default setting.
315 On Controller 1 disable DV.
316 Skip configuration on Controller 2.
317 On Controllers 3 and 4 enable DV.
318 On Controller 5 disable DV.
319
320 Possible Values: < 0 Use setting from serial EEPROM.
321 0 Disable DV
322 > 0 Enable DV
323 Default Value: DV Serial EEPROM configuration setting.
324 -----------------------------------------------------------------
325 Option: seltime:[value]
326 Definition: Specifies the selection timeout value
327 Possible Values: 0 = 256ms, 1 = 128ms, 2 = 64ms, 3 = 32ms
328 Default Value: 0
329 -----------------------------------------------------------------
330
331 *** The following three options should only be changed at ***
332 *** the direction of a technical support representative. ***
333
334 -----------------------------------------------------------------
335 Option: precomp: {value[,value...]}
336 Definition: Set IO Cell precompensation value on a per-controller
337 basis.
338 Controllers may be ommitted indicating that
339 they should retain the default precompensation setting.
340 Example: precomp:{0x1}
341 On Controller 0 set precompensation to 1.
342 Example: precomp:{1,,7}
343 On Controller 0 set precompensation to 1.
344 On Controller 2 set precompensation to 8.
345
346 Possible Values: 0 - 7
347 Default Value: Varies based on chip revision
348 -----------------------------------------------------------------
349 Option: slewrate: {value[,value...]}
350 Definition: Set IO Cell slew rate on a per-controller basis.
351 Controllers may be ommitted indicating that
352 they should retain the default slew rate setting.
353 Example: slewrate:{0x1}
354 On Controller 0 set slew rate to 1.
355 Example: slewrate :{1,,8}
356 On Controller 0 set slew rate to 1.
357 On Controller 2 set slew rate to 8.
358
359 Possible Values: 0 - 15
360 Default Value: Varies based on chip revision
361 -----------------------------------------------------------------
362 Option: amplitude: {value[,value...]}
363 Definition: Set IO Cell signal amplitude on a per-controller basis.
364 Controllers may be ommitted indicating that
365 they should retain the default read streaming setting.
366 Example: amplitude:{0x1}
367 On Controller 0 set amplitude to 1.
368 Example: amplitude :{1,,7}
369 On Controller 0 set amplitude to 1.
370 On Controller 2 set amplitude to 7.
371
372 Possible Values: 1 - 7
373 Default Value: Varies based on chip revision
374 -----------------------------------------------------------------
375
376 Example: 'options aic79xx aic79xx=verbose,rd_strm:{{0x0041}}'
377 enables verbose output in the driver and turns read streaming on
378 for targets 0 and 6 of Controller 0.
379
3804. Additional Notes
381
382 4.1. Known/Unresolved or FYI Issues
383
384 * Under SuSE Linux Enterprise 7, the driver may fail to operate
385 correctly due to a problem with PCI interrupt routing in the
386 Linux kernel. Please contact SuSE for an updated Linux
387 kernel.
388
389 4.2. Third-Party Compatibility Issues
390
391 * Adaptec only supports Ultra320 hard drives running
392 the latest firmware available. Please check with
393 your hard drive manufacturer to ensure you have the
394 latest version.
395
396 4.3. Operating System or Technology Limitations
397
398 * PCI Hot Plug is untested and may cause the operating system
399 to stop responding.
400 * Luns that are not numbered contiguously starting with 0 might not
401 be automatically probed during system startup. This is a limitation
402 of the OS. Please contact your Linux vendor for instructions on
403 manually probing non-contiguous luns.
404 * Using the Driver Update Disk version of this package during OS
405 installation under RedHat might result in two versions of this
406 driver being installed into the system module directory. This
407 might cause problems with the /sbin/mkinitrd program and/or
408 other RPM packages that try to install system modules. The best
409 way to correct this once the system is running is to install
410 the latest RPM package version of this driver, available from
411 http://www.adaptec.com.
412
413
4145. Contacting Adaptec
415
416 A Technical Support Identification (TSID) Number is required for
417 Adaptec technical support.
418 - The 12-digit TSID can be found on the white barcode-type label
419 included inside the box with your product. The TSID helps us
420 provide more efficient service by accurately identifying your
421 product and support status.
422 Support Options
423 - Search the Adaptec Support Knowledgebase (ASK) at
424 http://ask.adaptec.com for articles, troubleshooting tips, and
425 frequently asked questions for your product.
426 - For support via Email, submit your question to Adaptec's
427 Technical Support Specialists at http://ask.adaptec.com.
428
429 North America
430 - Visit our Web site at http://www.adaptec.com.
431 - To speak with a Fibre Channel/RAID/External Storage Technical
432 Support Specialist, call 1-321-207-2000,
433 Hours: Monday-Friday, 3:00 A.M. to 5:00 P.M., PST.
434 (Not open on holidays)
435 - For Technical Support in all other technologies including
436 SCSI, call 1-408-934-7274,
437 Hours: Monday-Friday, 6:00 A.M. to 5:00 P.M., PST.
438 (Not open on holidays)
439 - For after hours support, call 1-800-416-8066 ($99/call,
440 $149/call on holidays)
441 - To order Adaptec products including software and cables, call
442 1-800-442-7274 or 1-408-957-7274. You can also visit our
443 online store at http://www.adaptecstore.com
444
445 Europe
446 - Visit our Web site at http://www.adaptec-europe.com.
447 - English and French: To speak with a Technical Support
448 Specialist, call one of the following numbers:
449 - English: +32-2-352-3470
450 - French: +32-2-352-3460
451 Hours: Monday-Thursday, 10:00 to 12:30, 13:30 to 17:30 CET
452 Friday, 10:00 to 12:30, 13:30 to 16:30 CET
453 - German: To speak with a Technical Support Specialist,
454 call +49-89-456-40660
455 Hours: Monday-Thursday, 09:30 to 12:30, 13:30 to 16:30 CET
456 Friday, 09:30 to 12:30, 13:30 to 15:00 CET
457 - To order Adaptec products, including accessories and cables:
458 - UK: +0800-96-65-26 or fax +0800-731-02-95
459 - Other European countries: +32-11-300-379
460
461 Australia and New Zealand
462 - Visit our Web site at http://www.adaptec.com.au.
463 - To speak with a Technical Support Specialist, call
464 +612-9416-0698
465 Hours: Monday-Friday, 10:00 A.M. to 4:30 P.M., EAT
466 (Not open on holidays)
467
468 Japan
469 - To speak with a Technical Support Specialist, call
470 +81-3-5308-6120
471 Hours: Monday-Friday, 9:00 a.m. to 12:00 p.m., 1:00 p.m. to
472 6:00 p.m. TSC
473
474 Hong Kong and China
475 - To speak with a Technical Support Specialist, call
476 +852-2869-7200
477 Hours: Monday-Friday, 10:00 to 17:00.
478 - Fax Technical Support at +852-2869-7100.
479
480 Singapore
481 - To speak with a Technical Support Specialist, call
482 +65-245-7470
483 Hours: Monday-Friday, 10:00 to 17:00.
484 - Fax Technical Support at +852-2869-7100
485
486-------------------------------------------------------------------
487/*
488 * Copyright (c) 2003 Adaptec Inc. 691 S. Milpitas Blvd., Milpitas CA 95035 USA.
489 * All rights reserved.
490 *
491 * You are permitted to redistribute, use and modify this README file in whole
492 * or in part in conjunction with redistribution of software governed by the
493 * General Public License, provided that the following conditions are met:
494 * 1. Redistributions of README file must retain the above copyright
495 * notice, this list of conditions, and the following disclaimer,
496 * without modification.
497 * 2. The name of the author may not be used to endorse or promote products
498 * derived from this software without specific prior written permission.
499 * 3. Modifications or new contributions must be attributed in a copyright
500 * notice identifying the author ("Contributor") and added below the
501 * original copyright notice. The copyright notice is for purposes of
502 * identifying contributors and should not be deemed as permission to alter
503 * the permissions given by Adaptec.
504 *
505 * THIS README FILE IS PROVIDED BY ADAPTEC AND CONTRIBUTORS ``AS IS'' AND
506 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, ANY
507 * WARRANTIES OF NON-INFRINGEMENT OR THE IMPLIED WARRANTIES OF MERCHANTABILITY
508 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
509 * ADAPTEC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
510 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
511 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
512 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
513 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
514 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS README
515 * FILE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
516 */
diff --git a/Documentation/scsi/aic7xxx.txt b/Documentation/scsi/aic7xxx.txt
new file mode 100644
index 000000000000..160e7354cd1e
--- /dev/null
+++ b/Documentation/scsi/aic7xxx.txt
@@ -0,0 +1,414 @@
1====================================================================
2= Adaptec Aic7xxx Fast -> Ultra160 Family Manager Set v6.2.28 =
3= README for =
4= The Linux Operating System =
5====================================================================
6
7The following information is available in this file:
8
9 1. Supported Hardware
10 2. Version History
11 3. Command Line Options
12 4. Contacting Adaptec
13
141. Supported Hardware
15
16 The following Adaptec SCSI Chips and Host Adapters are supported by
17 the aic7xxx driver.
18
19 Chip MIPS Host Bus MaxSync MaxWidth SCBs Notes
20 ---------------------------------------------------------------
21 aic7770 10 EISA/VL 10MHz 16Bit 4 1
22 aic7850 10 PCI/32 10MHz 8Bit 3
23 aic7855 10 PCI/32 10MHz 8Bit 3
24 aic7856 10 PCI/32 10MHz 8Bit 3
25 aic7859 10 PCI/32 20MHz 8Bit 3
26 aic7860 10 PCI/32 20MHz 8Bit 3
27 aic7870 10 PCI/32 10MHz 16Bit 16
28 aic7880 10 PCI/32 20MHz 16Bit 16
29 aic7890 20 PCI/32 40MHz 16Bit 16 3 4 5 6 7 8
30 aic7891 20 PCI/64 40MHz 16Bit 16 3 4 5 6 7 8
31 aic7892 20 PCI/64-66 80MHz 16Bit 16 3 4 5 6 7 8
32 aic7895 15 PCI/32 20MHz 16Bit 16 2 3 4 5
33 aic7895C 15 PCI/32 20MHz 16Bit 16 2 3 4 5 8
34 aic7896 20 PCI/32 40MHz 16Bit 16 2 3 4 5 6 7 8
35 aic7897 20 PCI/64 40MHz 16Bit 16 2 3 4 5 6 7 8
36 aic7899 20 PCI/64-66 80MHz 16Bit 16 2 3 4 5 6 7 8
37
38 1. Multiplexed Twin Channel Device - One controller servicing two
39 busses.
40 2. Multi-function Twin Channel Device - Two controllers on one chip.
41 3. Command Channel Secondary DMA Engine - Allows scatter gather list
42 and SCB prefetch.
43 4. 64 Byte SCB Support - Allows disconnected, unttagged request table
44 for all possible target/lun combinations.
45 5. Block Move Instruction Support - Doubles the speed of certain
46 sequencer operations.
47 6. `Bayonet' style Scatter Gather Engine - Improves S/G prefetch
48 performance.
49 7. Queuing Registers - Allows queuing of new transactions without
50 pausing the sequencer.
51 8. Multiple Target IDs - Allows the controller to respond to selection
52 as a target on multiple SCSI IDs.
53
54 Controller Chip Host-Bus Int-Connectors Ext-Connectors Notes
55 --------------------------------------------------------------------------
56 AHA-274X[A] aic7770 EISA SE-50M SE-HD50F
57 AHA-274X[A]W aic7770 EISA SE-HD68F SE-HD68F
58 SE-50M
59 AHA-274X[A]T aic7770 EISA 2 X SE-50M SE-HD50F
60 AHA-2842 aic7770 VL SE-50M SE-HD50F
61 AHA-2940AU aic7860 PCI/32 SE-50M SE-HD50F
62 AVA-2902I aic7860 PCI/32 SE-50M
63 AVA-2902E aic7860 PCI/32 SE-50M
64 AVA-2906 aic7856 PCI/32 SE-50M SE-DB25F
65 APC-7850 aic7850 PCI/32 SE-50M 1
66 AVA-2940 aic7860 PCI/32 SE-50M
67 AHA-2920B aic7860 PCI/32 SE-50M
68 AHA-2930B aic7860 PCI/32 SE-50M
69 AHA-2920C aic7856 PCI/32 SE-50M SE-HD50F
70 AHA-2930C aic7860 PCI/32 SE-50M
71 AHA-2930C aic7860 PCI/32 SE-50M
72 AHA-2910C aic7860 PCI/32 SE-50M
73 AHA-2915C aic7860 PCI/32 SE-50M
74 AHA-2940AU/CN aic7860 PCI/32 SE-50M SE-HD50F
75 AHA-2944W aic7870 PCI/32 HVD-HD68F HVD-HD68F
76 HVD-50M
77 AHA-3940W aic7870 PCI/32 2 X SE-HD68F SE-HD68F 2
78 AHA-2940UW aic7880 PCI/32 SE-HD68F
79 SE-50M SE-HD68F
80 AHA-2940U aic7880 PCI/32 SE-50M SE-HD50F
81 AHA-2940D aic7880 PCI/32
82 aHA-2940 A/T aic7880 PCI/32
83 AHA-2940D A/T aic7880 PCI/32
84 AHA-3940UW aic7880 PCI/32 2 X SE-HD68F SE-HD68F 3
85 AHA-3940UWD aic7880 PCI/32 2 X SE-HD68F 2 X SE-VHD68F 3
86 AHA-3940U aic7880 PCI/32 2 X SE-50M SE-HD50F 3
87 AHA-2944UW aic7880 PCI/32 HVD-HD68F HVD-HD68F
88 HVD-50M
89 AHA-3944UWD aic7880 PCI/32 2 X HVD-HD68F 2 X HVD-VHD68F 3
90 AHA-4944UW aic7880 PCI/32
91 AHA-2930UW aic7880 PCI/32
92 AHA-2940UW Pro aic7880 PCI/32 SE-HD68F SE-HD68F 4
93 SE-50M
94 AHA-2940UW/CN aic7880 PCI/32
95 AHA-2940UDual aic7895 PCI/32
96 AHA-2940UWDual aic7895 PCI/32
97 AHA-3940UWD aic7895 PCI/32
98 AHA-3940AUW aic7895 PCI/32
99 AHA-3940AUWD aic7895 PCI/32
100 AHA-3940AU aic7895 PCI/32
101 AHA-3944AUWD aic7895 PCI/32 2 X HVD-HD68F 2 X HVD-VHD68F
102 AHA-2940U2B aic7890 PCI/32 LVD-HD68F LVD-HD68F
103 AHA-2940U2 OEM aic7891 PCI/64
104 AHA-2940U2W aic7890 PCI/32 LVD-HD68F LVD-HD68F
105 SE-HD68F
106 SE-50M
107 AHA-2950U2B aic7891 PCI/64 LVD-HD68F LVD-HD68F
108 AHA-2930U2 aic7890 PCI/32 LVD-HD68F SE-HD50F
109 SE-50M
110 AHA-3950U2B aic7897 PCI/64
111 AHA-3950U2D aic7897 PCI/64
112 AHA-29160 aic7892 PCI/64-66
113 AHA-29160 CPQ aic7892 PCI/64-66
114 AHA-29160N aic7892 PCI/32 LVD-HD68F SE-HD50F
115 SE-50M
116 AHA-29160LP aic7892 PCI/64-66
117 AHA-19160 aic7892 PCI/64-66
118 AHA-29150LP aic7892 PCI/64-66
119 AHA-29130LP aic7892 PCI/64-66
120 AHA-3960D aic7899 PCI/64-66 2 X LVD-HD68F 2 X LVD-VHD68F
121 LVD-50M
122 AHA-3960D CPQ aic7899 PCI/64-66 2 X LVD-HD68F 2 X LVD-VHD68F
123 LVD-50M
124 AHA-39160 aic7899 PCI/64-66 2 X LVD-HD68F 2 X LVD-VHD68F
125 LVD-50M
126
127 1. No BIOS support
128 2. DEC21050 PCI-PCI bridge with multiple controller chips on secondary bus
129 3. DEC2115X PCI-PCI bridge with multiple controller chips on secondary bus
130 4. All three SCSI connectors may be used simultaneously without
131 SCSI "stub" effects.
132
1332. Version History
134 6.2.36 (June 3rd, 2003)
135 - Correct code that disables PCI parity error checking.
136 - Correct and simplify handling of the ignore wide residue
137 message. The previous code would fail to report a residual
138 if the transaction data length was even and we received
139 an IWR message.
140 - Add support for the 2.5.X EISA framework.
141 - Update for change in 2.5.X SCSI proc FS interface.
142 - Correct Domain Validation command-line option parsing.
143 - When negotiation async via an 8bit WDTR message, send
144 an SDTR with an offset of 0 to be sure the target
145 knows we are async. This works around a firmware defect
146 in the Quantum Atlas 10K.
147 - Clear PCI error state during driver attach so that we
148 don't disable memory mapped I/O due to a stray write
149 by some other driver probe that occurred before we
150 claimed the controller.
151
152 6.2.35 (May 14th, 2003)
153 - Fix a few GCC 3.3 compiler warnings.
154 - Correct operation on EISA Twin Channel controller.
155 - Add support for 2.5.X's scsi_report_device_reset().
156
157 6.2.34 (May 5th, 2003)
158 - Fix locking regression instroduced in 6.2.29 that
159 could cuase a lock order reversal between the io_request_lock
160 and our per-softc lock. This was only possible on RH9,
161 SuSE, and kernel.org 2.4.X kernels.
162
163 6.2.33 (April 30th, 2003)
164 - Dynamically disable PCI parity error reporting after
165 10 errors are reported to the user. These errors are
166 the result of some other device issuing PCI transactions
167 with bad parity. Once the user has been informed of the
168 problem, continuing to report the errors just degrades
169 our performance.
170
171 6.2.32 (March 28th, 2003)
172 - Dynamically sized S/G lists to avoid SCSI malloc
173 pool fragmentation and SCSI mid-layer deadlock.
174
175 6.2.28 (January 20th, 2003)
176 - Domain Validation Fixes
177 - Add ability to disable PCI parity error checking.
178 - Enhanced Memory Mapped I/O probe
179
180 6.2.20 (November 7th, 2002)
181 - Added Domain Validation.
182
1833. Command Line Options
184
185 WARNING: ALTERING OR ADDING THESE DRIVER PARAMETERS
186 INCORRECTLY CAN RENDER YOUR SYSTEM INOPERABLE.
187 USE THEM WITH CAUTION.
188
189 Edit the file "modprobe.conf" in the directory /etc and add/edit a
190 line containing 'options aic7xxx aic7xxx=[command[,command...]]' where
191 'command' is one or more of the following:
192 -----------------------------------------------------------------
193 Option: verbose
194 Definition: enable additional informative messages during
195 driver operation.
196 Possible Values: This option is a flag
197 Default Value: disabled
198 -----------------------------------------------------------------
199 Option: debug:[value]
200 Definition: Enables various levels of debugging information
201 Possible Values: 0x0000 = no debugging, 0xffff = full debugging
202 Default Value: 0x0000
203 -----------------------------------------------------------------
204 Option: no_probe
205 Option: probe_eisa_vl
206 Definition: Do not probe for EISA/VLB controllers.
207 This is a toggle. If the driver is compiled
208 to not probe EISA/VLB controllers by default,
209 specifying "no_probe" will enable this probing.
210 If the driver is compiled to probe EISA/VLB
211 controllers by default, specifying "no_probe"
212 will disable this probing.
213 Possible Values: This option is a toggle
214 Default Value: EISA/VLB probing is disabled by default.
215 -----------------------------------------------------------------
216 Option: pci_parity
217 Definition: Toggles the detection of PCI parity errors.
218 On many motherboards with VIA chipsets,
219 PCI parity is not generated correctly on the
220 PCI bus. It is impossible for the hardware to
221 differentiate between these "spurious" parity
222 errors and real parity errors. The symptom of
223 this problem is a stream of the message:
224 "scsi0: Data Parity Error Detected during address or write data phase"
225 output by the driver.
226 Possible Values: This option is a toggle
227 Default Value: PCI Parity Error reporting is disabled
228 -----------------------------------------------------------------
229 Option: no_reset
230 Definition: Do not reset the bus during the initial probe
231 phase
232 Possible Values: This option is a flag
233 Default Value: disabled
234 -----------------------------------------------------------------
235 Option: extended
236 Definition: Force extended translation on the controller
237 Possible Values: This option is a flag
238 Default Value: disabled
239 -----------------------------------------------------------------
240 Option: periodic_otag
241 Definition: Send an ordered tag periodically to prevent
242 tag starvation. Needed for some older devices
243 Possible Values: This option is a flag
244 Default Value: disabled
245 -----------------------------------------------------------------
246 Option: reverse_scan
247 Definition: Probe the scsi bus in reverse order, starting
248 with target 15
249 Possible Values: This option is a flag
250 Default Value: disabled
251 -----------------------------------------------------------------
252 Option: global_tag_depth:[value]
253 Definition: Global tag depth for all targets on all busses.
254 This option sets the default tag depth which
255 may be selectively overridden vi the tag_info
256 option.
257 Possible Values: 1 - 253
258 Default Value: 32
259 -----------------------------------------------------------------
260 Option: tag_info:{{value[,value...]}[,{value[,value...]}...]}
261 Definition: Set the per-target tagged queue depth on a
262 per controller basis. Both controllers and targets
263 may be ommitted indicating that they should retain
264 the default tag depth.
265 Examples: tag_info:{{16,32,32,64,8,8,,32,32,32,32,32,32,32,32,32}
266 On Controller 0
267 specifies a tag depth of 16 for target 0
268 specifies a tag depth of 64 for target 3
269 specifies a tag depth of 8 for targets 4 and 5
270 leaves target 6 at the default
271 specifies a tag depth of 32 for targets 1,2,7-15
272 All other targets retain the default depth.
273
274 tag_info:{{},{32,,32}}
275 On Controller 1
276 specifies a tag depth of 32 for targets 0 and 2
277 All other targets retain the default depth.
278
279 Possible Values: 1 - 253
280 Default Value: 32
281 -----------------------------------------------------------------
282 Option: seltime:[value]
283 Definition: Specifies the selection timeout value
284 Possible Values: 0 = 256ms, 1 = 128ms, 2 = 64ms, 3 = 32ms
285 Default Value: 0
286 -----------------------------------------------------------------
287 Option: dv: {value[,value...]}
288 Definition: Set Domain Validation Policy on a per-controller basis.
289 Controllers may be ommitted indicating that
290 they should retain the default read streaming setting.
291 Example: dv:{-1,0,,1,1,0}
292 On Controller 0 leave DV at its default setting.
293 On Controller 1 disable DV.
294 Skip configuration on Controller 2.
295 On Controllers 3 and 4 enable DV.
296 On Controller 5 disable DV.
297
298 Possible Values: < 0 Use setting from serial EEPROM.
299 0 Disable DV
300 > 0 Enable DV
301
302 Default Value: SCSI-Select setting on controllers with a SCSI Select
303 option for DV. Otherwise, on for controllers supporting
304 U160 speeds and off for all other controller types.
305 -----------------------------------------------------------------
306
307 Example:
308 'options aic7xxx aic7xxx=verbose,no_probe,tag_info:{{},{,,10}},seltime:1"
309 enables verbose logging, Disable EISA/VLB probing,
310 and set tag depth on Controller 1/Target 2 to 10 tags.
311
3123. Contacting Adaptec
313
314 A Technical Support Identification (TSID) Number is required for
315 Adaptec technical support.
316 - The 12-digit TSID can be found on the white barcode-type label
317 included inside the box with your product. The TSID helps us
318 provide more efficient service by accurately identifying your
319 product and support status.
320 Support Options
321 - Search the Adaptec Support Knowledgebase (ASK) at
322 http://ask.adaptec.com for articles, troubleshooting tips, and
323 frequently asked questions for your product.
324 - For support via Email, submit your question to Adaptec's
325 Technical Support Specialists at http://ask.adaptec.com.
326
327 North America
328 - Visit our Web site at http://www.adaptec.com.
329 - To speak with a Fibre Channel/RAID/External Storage Technical
330 Support Specialist, call 1-321-207-2000,
331 Hours: Monday-Friday, 3:00 A.M. to 5:00 P.M., PST.
332 (Not open on holidays)
333 - For Technical Support in all other technologies including
334 SCSI, call 1-408-934-7274,
335 Hours: Monday-Friday, 6:00 A.M. to 5:00 P.M., PST.
336 (Not open on holidays)
337 - For after hours support, call 1-800-416-8066 ($99/call,
338 $149/call on holidays)
339 - To order Adaptec products including software and cables, call
340 1-800-442-7274 or 1-408-957-7274. You can also visit our
341 online store at http://www.adaptecstore.com
342
343 Europe
344 - Visit our Web site at http://www.adaptec-europe.com.
345 - English and French: To speak with a Technical Support
346 Specialist, call one of the following numbers:
347 - English: +32-2-352-3470
348 - French: +32-2-352-3460
349 Hours: Monday-Thursday, 10:00 to 12:30, 13:30 to 17:30 CET
350 Friday, 10:00 to 12:30, 13:30 to 16:30 CET
351 - German: To speak with a Technical Support Specialist,
352 call +49-89-456-40660
353 Hours: Monday-Thursday, 09:30 to 12:30, 13:30 to 16:30 CET
354 Friday, 09:30 to 12:30, 13:30 to 15:00 CET
355 - To order Adaptec products, including accessories and cables:
356 - UK: +0800-96-65-26 or fax +0800-731-02-95
357 - Other European countries: +32-11-300-379
358
359 Australia and New Zealand
360 - Visit our Web site at http://www.adaptec.com.au.
361 - To speak with a Technical Support Specialist, call
362 +612-9416-0698
363 Hours: Monday-Friday, 10:00 A.M. to 4:30 P.M., EAT
364 (Not open on holidays)
365
366 Japan
367 - To speak with a Technical Support Specialist, call
368 +81-3-5308-6120
369 Hours: Monday-Friday, 9:00 a.m. to 12:00 p.m., 1:00 p.m. to
370 6:00 p.m. TSC
371
372 Hong Kong and China
373 - To speak with a Technical Support Specialist, call
374 +852-2869-7200
375 Hours: Monday-Friday, 10:00 to 17:00.
376 - Fax Technical Support at +852-2869-7100.
377
378 Singapore
379 - To speak with a Technical Support Specialist, call
380 +65-245-7470
381 Hours: Monday-Friday, 10:00 to 17:00.
382 - Fax Technical Support at +852-2869-7100
383
384-------------------------------------------------------------------
385/*
386 * Copyright (c) 2003 Adaptec Inc. 691 S. Milpitas Blvd., Milpitas CA 95035 USA.
387 * All rights reserved.
388 *
389 * You are permitted to redistribute, use and modify this README file in whole
390 * or in part in conjunction with redistribution of software governed by the
391 * General Public License, provided that the following conditions are met:
392 * 1. Redistributions of README file must retain the above copyright
393 * notice, this list of conditions, and the following disclaimer,
394 * without modification.
395 * 2. The name of the author may not be used to endorse or promote products
396 * derived from this software without specific prior written permission.
397 * 3. Modifications or new contributions must be attributed in a copyright
398 * notice identifying the author ("Contributor") and added below the
399 * original copyright notice. The copyright notice is for purposes of
400 * identifying contributors and should not be deemed as permission to alter
401 * the permissions given by Adaptec.
402 *
403 * THIS README FILE IS PROVIDED BY ADAPTEC AND CONTRIBUTORS ``AS IS'' AND
404 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, ANY
405 * WARRANTIES OF NON-INFRINGEMENT OR THE IMPLIED WARRANTIES OF MERCHANTABILITY
406 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
407 * ADAPTEC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
408 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
409 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
410 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
411 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
412 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS README
413 * FILE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
414 */
diff --git a/Documentation/scsi/aic7xxx_old.txt b/Documentation/scsi/aic7xxx_old.txt
new file mode 100644
index 000000000000..79e5ac6cb6ff
--- /dev/null
+++ b/Documentation/scsi/aic7xxx_old.txt
@@ -0,0 +1,511 @@
1 AIC7xxx Driver for Linux
2
3Introduction
4----------------------------
5The AIC7xxx SCSI driver adds support for Adaptec (http://www.adaptec.com)
6SCSI controllers and chipsets. Major portions of the driver and driver
7development are shared between both Linux and FreeBSD. Support for the
8AIC-7xxx chipsets have been in the default Linux kernel since approximately
9linux-1.1.x and fairly stable since linux-1.2.x, and are also in FreeBSD
102.1.0 or later.
11
12 Supported cards/chipsets
13 ----------------------------
14 Adaptec Cards
15 ----------------------------
16 AHA-274x
17 AHA-274xT
18 AHA-2842
19 AHA-2910B
20 AHA-2920C
21 AHA-2930
22 AHA-2930U
23 AHA-2930CU
24 AHA-2930U2
25 AHA-2940
26 AHA-2940W
27 AHA-2940U
28 AHA-2940UW
29 AHA-2940UW-PRO
30 AHA-2940AU
31 AHA-2940U2W
32 AHA-2940U2
33 AHA-2940U2B
34 AHA-2940U2BOEM
35 AHA-2944D
36 AHA-2944WD
37 AHA-2944UD
38 AHA-2944UWD
39 AHA-2950U2
40 AHA-2950U2W
41 AHA-2950U2B
42 AHA-29160M
43 AHA-3940
44 AHA-3940U
45 AHA-3940W
46 AHA-3940UW
47 AHA-3940AUW
48 AHA-3940U2W
49 AHA-3950U2B
50 AHA-3950U2D
51 AHA-3960D
52 AHA-39160M
53 AHA-3985
54 AHA-3985U
55 AHA-3985W
56 AHA-3985UW
57
58 Motherboard Chipsets
59 ----------------------------
60 AIC-777x
61 AIC-785x
62 AIC-786x
63 AIC-787x
64 AIC-788x
65 AIC-789x
66 AIC-3860
67
68 Bus Types
69 ----------------------------
70 W - Wide SCSI, SCSI-3, 16bit bus, 68pin connector, will also support
71 SCSI-1/SCSI-2 50pin devices, transfer rates up to 20MB/s.
72 U - Ultra SCSI, transfer rates up to 40MB/s.
73 U2- Ultra 2 SCSI, transfer rates up to 80MB/s.
74 D - Differential SCSI.
75 T - Twin Channel SCSI. Up to 14 SCSI devices.
76
77 AHA-274x - EISA SCSI controller
78 AHA-284x - VLB SCSI controller
79 AHA-29xx - PCI SCSI controller
80 AHA-394x - PCI controllers with two separate SCSI controllers on-board.
81 AHA-398x - PCI RAID controllers with three separate SCSI controllers
82 on-board.
83
84 Not Supported Devices
85 ------------------------------
86 Adaptec Cards
87 ----------------------------
88 AHA-2920 (Only the cards that use the Future Domain chipset are not
89 supported, any 2920 cards based on Adaptec AIC chipsets,
90 such as the 2920C, are supported)
91 AAA-13x Raid Adapters
92 AAA-113x Raid Port Card
93
94 Motherboard Chipsets
95 ----------------------------
96 AIC-7810
97
98 Bus Types
99 ----------------------------
100 R - Raid Port busses are not supported.
101
102 The hardware RAID devices sold by Adaptec are *NOT* supported by this
103 driver (and will people please stop emailing me about them, they are
104 a totally separate beast from the bare SCSI controllers and this driver
105 can not be retrofitted in any sane manner to support the hardware RAID
106 features on those cards - Doug Ledford).
107
108
109 People
110 ------------------------------
111 Justin T Gibbs gibbs@plutotech.com
112 (BSD Driver Author)
113 Dan Eischen deischen@iworks.InterWorks.org
114 (Original Linux Driver Co-maintainer)
115 Dean Gehnert deang@teleport.com
116 (Original Linux FTP/patch maintainer)
117 Jess Johnson jester@frenzy.com
118 (AIC7xxx FAQ author)
119 Doug Ledford dledford@redhat.com
120 (Current Linux aic7xxx-5.x.x Driver/Patch/FTP maintainer)
121
122 Special thanks go to John Aycock (aycock@cpsc.ucalgary.ca), the original
123 author of the driver. John has since retired from the project. Thanks
124 again for all his work!
125
126 Mailing list
127 ------------------------------
128 There is a mailing list available for users who want to track development
129 and converse with other users and developers. This list is for both
130 FreeBSD and Linux support of the AIC7xxx chipsets.
131
132 To subscribe to the AIC7xxx mailing list send mail to the list server,
133 with "subscribe AIC7xxx" in the body (no Subject: required):
134 To: majordomo@FreeBSD.ORG
135 ---
136 subscribe AIC7xxx
137
138 To unsubscribe from the list, send mail to the list server with:
139 To: majordomo@FreeBSD.ORG
140 ---
141 unsubscribe AIC7xxx
142
143 Send regular messages and replies to: AIC7xxx@FreeBSD.ORG
144
145 Boot Command line options
146 ------------------------------
147 "aic7xxx=no_reset" - Eliminate the SCSI bus reset during startup.
148 Some SCSI devices need the initial reset that this option disables
149 in order to work. If you have problems at bootup, please make sure
150 you aren't using this option.
151
152 "aic7xxx=reverse_scan" - Certain PCI motherboards scan for devices at
153 bootup by scanning from the highest numbered PCI device to the
154 lowest numbered PCI device, others do just the opposite and scan
155 from lowest to highest numbered PCI device. There is no reliable
156 way to autodetect this ordering. So, we default to the most common
157 order, which is lowest to highest. Then, in case your motherboard
158 scans from highest to lowest, we have this option. If your BIOS
159 finds the drives on controller A before controller B but the linux
160 kernel finds your drives on controller B before A, then you should
161 use this option.
162
163 "aic7xxx=extended" - Force the driver to detect extended drive translation
164 on your controller. This helps those people who have cards without
165 a SEEPROM make sure that linux and all other operating systems think
166 the same way about your hard drives.
167
168 "aic7xxx=scbram" - Some cards have external SCB RAM that can be used to
169 give the card more hardware SCB slots. This allows the driver to use
170 that SCB RAM. Without this option, the driver won't touch the SCB
171 RAM because it is known to cause problems on a few cards out there
172 (such as 3985 class cards).
173
174 "aic7xxx=irq_trigger:x" - Replace x with either 0 or 1 to force the kernel
175 to use the correct IRQ type for your card. This only applies to EISA
176 based controllers. On these controllers, 0 is for Edge triggered
177 interrupts, and 1 is for Level triggered interrupts. If you aren't
178 sure or don't know which IRQ trigger type your EISA card uses, then
179 let the kernel autodetect the trigger type.
180
181 "aic7xxx=verbose" - This option can be used in one of two ways. If you
182 simply specify aic7xxx=verbose, then the kernel will automatically
183 pick the default set of verbose messages for you to see.
184 Alternatively, you can specify the command as
185 "aic7xxx=verbose:0xXXXX" where the X entries are replaced with
186 hexadecimal digits. This option is a bit field type option. For
187 a full listing of the available options, search for the
188 #define VERBOSE_xxxxxx lines in the aic7xxx.c file. If you want
189 verbose messages, then it is recommended that you simply use the
190 aic7xxx=verbose variant of this command.
191
192 "aic7xxx=pci_parity:x" - This option controls whether or not the driver
193 enables PCI parity error checking on the PCI bus. By default, this
194 checking is disabled. To enable the checks, simply specify pci_parity
195 with no value afterwords. To reverse the parity from even to odd,
196 supply any number other than 0 or 255. In short:
197 pci_parity - Even parity checking (even is the normal PCI parity)
198 pci_parity:x - Where x > 0, Odd parity checking
199 pci_parity:0 - No check (default)
200 NOTE: In order to get Even PCI parity checking, you must use the
201 version of the option that does not include the : and a number at
202 the end (unless you want to enter exactly 2^32 - 1 as the number).
203
204 "aic7xxx=no_probe" - This option will disable the probing for any VLB
205 based 2842 controllers and any EISA based controllers. This is
206 needed on certain newer motherboards where the normal EISA I/O ranges
207 have been claimed by other PCI devices. Probing on those machines
208 will often result in the machine crashing or spontaneously rebooting
209 during startup. Examples of machines that need this are the
210 Dell PowerEdge 6300 machines.
211
212 "aic7xxx=seltime:2" - This option controls how long the card waits
213 during a device selection sequence for the device to respond.
214 The original SCSI spec says that this "should be" 256ms. This
215 is generally not required with modern devices. However, some
216 very old SCSI I devices need the full 256ms. Most modern devices
217 can run fine with only 64ms. The default for this option is
218 64ms. If you need to change this option, then use the following
219 table to set the proper value in the example above:
220 0 - 256ms
221 1 - 128ms
222 2 - 64ms
223 3 - 32ms
224
225 "aic7xxx=panic_on_abort" - This option is for debugging and will cause
226 the driver to panic the linux kernel and freeze the system the first
227 time the drivers abort or reset routines are called. This is most
228 helpful when some problem causes infinite reset loops that scroll too
229 fast to see. By using this option, you can write down what the errors
230 actually are and send that information to me so it can be fixed.
231
232 "aic7xxx=dump_card" - This option will print out the *entire* set of
233 configuration registers on the card during the init sequence. This
234 is a debugging aid used to see exactly what state the card is in
235 when we finally finish our initialization routines. If you don't
236 have documentation on the chipsets, this will do you absolutely
237 no good unless you are simply trying to write all the information
238 down in order to send it to me.
239
240 "aic7xxx=dump_sequencer" - This is the same as the above options except
241 that instead of dumping the register contents on the card, this
242 option dumps the contents of the sequencer program RAM. This gives
243 the ability to verify that the instructions downloaded to the
244 card's sequencer are indeed what they are suppossed to be. Again,
245 unless you have documentation to tell you how to interpret these
246 numbers, then it is totally useless.
247
248 "aic7xxx=override_term:0xffffffff" - This option is used to force the
249 termination on your SCSI controllers to a particular setting. This
250 is a bit mask variable that applies for up to 8 aic7xxx SCSI channels.
251 Each channel gets 4 bits, divided as follows:
252 bit 3 2 1 0
253 | | | Enable/Disable Single Ended Low Byte Termination
254 | | En/Disable Single Ended High Byte Termination
255 | En/Disable Low Byte LVD Termination
256 En/Disable High Byte LVD Termination
257
258 The upper 2 bits that deal with LVD termination only apply to Ultra2
259 controllers. Futhermore, due to the current Ultra2 controller
260 designs, these bits are tied together such that setting either bit
261 enables both low and high byte LVD termination. It is not possible
262 to only set high or low byte LVD termination in this manner. This is
263 an artifact of the BIOS definition on Ultra2 controllers. For other
264 controllers, the only important bits are the two lowest bits. Setting
265 the higher bits on non-Ultra2 controllers has no effect. A few
266 examples of how to use this option:
267
268 Enable low and high byte termination on a non-ultra2 controller that
269 is the first aic7xxx controller (the correct bits are 0011),
270 aic7xxx=override_term:0x3
271
272 Enable all termination on the third aic7xxx controller, high byte
273 termination on the second aic7xxx controller, and low and high byte
274 SE termination on the first aic7xxx controller
275 (bits are 1111 0010 0011),
276 aic7xxx=override_term:0xf23
277
278 No attempt has been made to make this option non-cryptic. It really
279 shouldn't be used except in dire circumstances, and if that happens,
280 I'm probably going to be telling you what to set this to anyway :)
281
282 "aic7xxx=stpwlev:0xffffffff" - This option is used to control the STPWLEV
283 bit in the DEVCONFIG PCI register. Currently, this is one of the
284 very few registers that we have absolutely *no* way of detecting
285 what the variable should be. It depends entirely on how the chipset
286 and external terminators were coupled by the card/motherboard maker.
287 Further, a chip reset (at power up) always sets this bit to 0. If
288 there is no BIOS to run on the chipset/card (such as with a 2910C
289 or a motherboard controller with the BIOS totally disabled) then
290 the variable may not get set properly. Of course, if the proper
291 setting was 0, then that's what it would be after the reset, but if
292 the proper setting is actually 1.....you get the picture. Now, since
293 we can't detect this at all, I've added this option to force the
294 setting. If you have a BIOS on your controller then you should never
295 need to use this option. However, if you are having lots of SCSI
296 reset problems and can't seem to get them knocked out, this may help.
297
298 Here's a test to know for certain if you need this option. Make
299 a boot floppy that you can use to boot your computer up and that
300 will detect the aic7xxx controller. Next, power down your computer.
301 While it's down, unplug all SCSI cables from your Adaptec SCSI
302 controller. Boot the system back up to the Adaptec EZ-SCSI BIOS
303 and then make sure that termination is enabled on your adapter (if
304 you have an Adaptec BIOS of course). Next, boot up the floppy you
305 made and wait for it to detect the aic7xxx controller. If the kernel
306 finds the controller fine, says scsi : x hosts and then tries to
307 detect your devices like normal, up to the point where it fails to
308 mount your root file system and panics, then you're fine. If, on
309 the other hand, the system goes into an infinite reset loop, then
310 you need to use this option and/or the previous option to force the
311 proper termination settings on your controller. If this happens,
312 then you next need to figure out what your settings should be.
313
314 To find the correct settings, power your machine back down, connect
315 back up the SCSI cables, and boot back into your machine like normal.
316 However, boot with the aic7xxx=verbose:0x39 option. Record the
317 initial DEVCONFIG values for each of your aic7xxx controllers as
318 they are listed, and also record what the machine is detecting as
319 the proper termination on your controllers. NOTE: the order in
320 which the initial DEVCONFIG values are printed out is not gauranteed
321 to be the same order as the SCSI controllers are registered. The
322 above option and this option both work on the order of the SCSI
323 controllers as they are registered, so make sure you match the right
324 DEVCONFIG values with the right controllers if you have more than
325 one aic7xxx controller.
326
327 Once you have the detected termination settings and the initial
328 DEVCONFIG values for each controller, then figure out what the
329 termination on each of the controllers *should* be. Hopefully, that
330 part is correct, but it could possibly be wrong if there is
331 bogus cable detection logic on your controller or something similar.
332 If all the controllers have the correct termination settings, then
333 don't set the aic7xxx=override_term variable at all, leave it alone.
334 Next, on any controllers that go into an infinite reset loop when
335 you unplug all the SCSI cables, get the starting DEVCONFIG value.
336 If the initial DEVCONFIG value is divisible by 2, then the correct
337 setting for that controller is 0. If it's an odd number, then
338 the correct setting for that controller is 1. For any other
339 controllers that didn't have an infinite reset problem, then reverse
340 the above options. If DEVCONFIG was even, then the correct setting
341 is 1, if not then the correct setting is 0.
342
343 Now that you know what the correct setting was for each controller,
344 we need to encode that into the aic7xxx=stpwlev:0x... variable.
345 This variable is a bit field encoded variable. Bit 0 is for the first
346 aic7xxx controller, bit 1 for the next, etc. Put all these bits
347 together and you get a number. For example, if the third aic7xxx
348 needed a 1, but the second and first both needed a 0, then the bits
349 would be 100 in binary. This then translates to 0x04. You would
350 therefore set aic7xxx=stpwlev:0x04. This is fairly standard binary
351 to hexadecimal conversions here. If you aren't up to speed on the
352 binary->hex conversion then send an email to the aic7xxx mailing
353 list and someone can help you out.
354
355 "aic7xxx=tag_info:{{8,8..},{8,8..},..}" - This option is used to disable
356 or enable Tagged Command Queueing (TCQ) on specific devices. As of
357 driver version 5.1.11, TCQ is now either on or off by default
358 according to the setting you choose during the make config process.
359 In order to en/disable TCQ for certian devices at boot time, a user
360 may use this boot param. The driver will then parse this message out
361 and en/disable the specific device entries that are present based upon
362 the value given. The param line is parsed in the following manner:
363
364 { - first instance indicates the start of this parameter values
365 second instance is the start of entries for a particular
366 device entry
367 } - end the entries for a particular host adapter, or end the entire
368 set of parameter entries
369 , - move to next entry. Inside of a set of device entries, this
370 moves us to the next device on the list. Outside of device
371 entries, this moves us to the next host adapter
372 . - Same effect as , but is safe to use with insmod.
373 x - the number to enter into the array at this position.
374 0 = Enable tagged queueing on this device and use the default
375 queue depth
376 1-254 = Enable tagged queueing on this device and use this
377 number as the queue depth
378 255 = Disable tagged queueing on this device.
379 Note: anything above 32 for an actual queue depth is wasteful
380 and not recommended.
381
382 A few examples of how this can be used:
383
384 tag_info:{{8,12,,0,,255,4}}
385 This line will only effect the first aic7xxx card registered. It
386 will set scsi id 0 to a queue depth of 8, id 1 to 12, leave id 2
387 at the default, set id 3 to tagged queueing enabled and use the
388 default queue depth, id 4 default, id 5 disabled, and id 6 to 4.
389 Any not specified entries stay at the default value, repeated
390 commas with no value specified will simply increment to the next id
391 without changing anything for the missing values.
392
393 tag_info:{,,,{,,,255}}
394 First, second, and third adapters at default values. Fourth
395 adapter, id 3 is disabled. Notice that leading commas simply
396 increment what the first number effects, and there are no need
397 for trailing commas. When you close out an adapter, or the
398 entire entry, anything not explicitly set stays at the default
399 value.
400
401 A final note on this option. The scanner I used for this isn't
402 perfect or highly robust. If you mess the line up, the worst that
403 should happen is that the line will get ignored. If you don't
404 close out the entire entry with the final bracket, then any other
405 aic7xxx options after this will get ignored. So, in general, be
406 sure of what you are entering, and after you have it right, just
407 add it to the lilo.conf file so there won't be any mistakes. As
408 a means of checking this parser, the entire tag_info array for
409 each card is now printed out in the /proc/scsi/aic7xxx/x file. You
410 can use that to verify that your options were parsed correctly.
411
412 Boot command line options may be combined to form the proper set of options
413 a user might need. For example, the following is valid:
414
415 aic7xxx=verbose,extended,irq_trigger:1
416
417 The only requirement is that individual options be separated by a comma or
418 a period on the command line.
419
420 Module Loading command options
421 ------------------------------
422 When loading the aic7xxx driver as a module, the exact same options are
423 available to the user. However, the syntax to specify the options changes
424 slightly. For insmod, you need to wrap the aic7xxx= argument in quotes
425 and replace all ',' with '.'. So, for example, a valid insmod line
426 would be:
427
428 insmod aic7xxx aic7xxx='verbose.irq_trigger:1.extended'
429
430 This line should result in the *exact* same behaviour as if you typed
431 it in at the lilo prompt and the driver was compiled into the kernel
432 instead of being a module. The reason for the single quote is so that
433 the shell won't try to interpret anything in the line, such as {.
434 Insmod assumes any options starting with a letter instead of a number
435 is a character string (which is what we want) and by switching all of
436 the commas to periods, insmod won't interpret this as more than one
437 string and write junk into our binary image. I consider it a bug in
438 the insmod program that even if you wrap your string in quotes (quotes
439 that pass the shell mind you and that insmod sees) it still treates
440 a comma inside of those quotes as starting a new variable, resulting
441 in memory scribbles if you don't switch the commas to periods.
442
443
444 Kernel Compile options
445 ------------------------------
446 The various kernel compile time options for this driver are now fairly
447 well documented in the file Documentation/Configure.help. In order to
448 see this documentation, you need to use one of the advanced configuration
449 programs (menuconfig and xconfig). If you are using the "make menuconfig"
450 method of configuring your kernel, then you would simply highlight the
451 option in question and hit the ? key. If you are using the "make xconfig"
452 method of configuring your kernel, then simply click on the help button
453 next to the option you have questions about. The help information from
454 the Configure.help file will then get automatically displayed.
455
456 /proc support
457 ------------------------------
458 The /proc support for the AIC7xxx can be found in the /proc/scsi/aic7xxx/
459 directory. That directory contains a file for each SCSI controller in
460 the system. Each file presents the current configuration and transfer
461 statistics (enabled with #define in aic7xxx.c) for each controller.
462
463 Thanks to Michael Neuffer for his upper-level SCSI help, and
464 Matthew Jacob for statistics support.
465
466 Debugging the driver
467 ------------------------------
468 Should you have problems with this driver, and would like some help in
469 getting them solved, there are a couple debugging items built into
470 the driver to facilitate getting the needed information from the system.
471 In general, I need a complete description of the problem, with as many
472 logs as possible concerning what happens. To help with this, there is
473 a command option aic7xxx=panic_on_abort. This option, when set, forces
474 the driver to panic the kernel on the first SCSI abort issued by the
475 mid level SCSI code. If your system is going to reset loops and you
476 can't read the screen, then this is what you need. Not only will it
477 stop the system, but it also prints out a large amount of state
478 information in the process. Second, if you specify the option
479 "aic7xxx=verbose:0x1ffff", the system will print out *SOOOO* much
480 information as it runs that you won't be able to see anything.
481 However, this can actually be very useful if your machine simply
482 locks up when trying to boot, since it will pin-point what was last
483 happening (in regards to the aic7xxx driver) immediately prior to
484 the lockup. This is really only useful if your machine simply can
485 not boot up successfully. If you can get your machine to run, then
486 this will produce far too much information.
487
488 FTP sites
489 ------------------------------
490 ftp://ftp.redhat.com/pub/aic/
491 - Out of date. I used to keep stuff here, but too many people
492 complained about having a hard time getting into Red Hat's ftp
493 server. So use the web site below instead.
494 ftp://ftp.pcnet.com/users/eischen/Linux/
495 - Dan Eischen's driver distribution area
496 ftp://ekf2.vsb.cz/pub/linux/kernel/aic7xxx/ftp.teleport.com/
497 - European Linux mirror of Teleport site
498
499 Web sites
500 ------------------------------
501 http://people.redhat.com/dledford/
502 - My web site, also the primary aic7xxx site with several related
503 pages.
504
505Dean W. Gehnert
506deang@teleport.com
507
508$Revision: 3.0 $
509
510Modified by Doug Ledford 1998-2000
511
diff --git a/Documentation/scsi/cpqfc.txt b/Documentation/scsi/cpqfc.txt
new file mode 100644
index 000000000000..dd33e61c0645
--- /dev/null
+++ b/Documentation/scsi/cpqfc.txt
@@ -0,0 +1,272 @@
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.5.4 Oct 03, 2002
11 * fixed memcpy of sense buffer in ioctl to copy the smaller defined size
12Ver 2.5.3 Aug 01, 2002
13 * fix the passthru ioctl to handle the Scsi_Cmnd->request being a pointer
14Ver 2.5.1 Jul 30, 2002
15 * fix ioctl to pay attention to the specified LUN.
16Ver 2.5.0 Nov 29, 2001
17 * eliminated io_request_lock. This change makes the driver specific
18 to the 2.5.x kernels.
19 * silenced excessively noisy printks.
20
21Ver 2.1.2 July 23, 2002
22 * initialize DumCmnd->lun in cpqfcTS_ioctl (used in fcFindLoggedInPorts as LUN index)
23
24Ver 2.1.1 Oct 18, 2001
25 * reinitialize Cmnd->SCp.sent_command (used to identify commands as
26 passthrus) on calling scsi_done, since the scsi mid layer does not
27 use (or reinitialize) this field to prevent subsequent comands from
28 having it set incorrectly.
29
30Ver 2.1.0 Aug 27, 2001
31 * Revise driver to use new kernel 2.4.x PCI DMA API, instead of
32 virt_to_bus(). (enables driver to work w/ ia64 systems with >2Gb RAM.)
33 Rework main scatter-gather code to handle cases where SG element
34 lengths are larger than 0x7FFFF bytes and use as many scatter
35 gather pages as necessary. (Steve Cameron)
36 * Makefile changes to bring cpqfc into line w/ rest of SCSI drivers
37 (thanks to Keith Owens)
38
39Ver 2.0.5 Aug 06, 2001
40 * Reject non-existent luns in the driver rather than letting the
41 hardware do it. (some HW behaves differently than others in this area.)
42 * Changed Makefile to rely on "make dep" instead of explicit dependencies
43 * ifdef'ed out fibre channel analyzer triggering debug code
44 * fixed a jiffies wrapping issue
45
46Ver 2.0.4 Aug 01, 2001
47 * Incorporated fix for target device reset from Steeleye
48 * Fixed passthrough ioctl so it doesn't hang.
49 * Fixed hang in launch_FCworker_thread() that occurred on some machines.
50 * Avoid problem when number of volumes in a single cabinet > 8
51
52Ver 2.0.2 July 23, 2001
53 Changed the semiphore changes so the driver would compile in 2.4.7.
54 This version is for 2.4.7 and beyond.
55
56Ver 2.0.1 May 7, 2001
57 Merged version 1.3.6 fixes into version 2.0.0.
58
59Ver 2.0.0 May 7, 2001
60 Fixed problem so spinlock is being initialized to UNLOCKED.
61 Fixed updated driver so it compiles in the 2.4 tree.
62
63 Ver 1.3.6 Feb 27, 2001
64 Added Target_Device_Reset function for SCSI error handling
65 Fixed problem with not reseting addressing mode after implicit logout
66
67
68Ver 1.3.4 Sep 7, 2000
69 Added Modinfo information
70 Fixed problem with statically linking the driver
71
72Ver 1.3.3, Aug 23, 2000
73 Fixed device/function number in ioctl
74
75Ver 1.3.2, July 27, 2000
76 Add include for Alpha compile on 2.2.14 kernel (cpq*i2c.c)
77 Change logic for different FCP-RSP sense_buffer location for HSG80 target
78 And search for Agilent Tachyon XL2 HBAs (not finished! - in test)
79
80Tested with
81(storage):
82 Compaq RA-4x000, RAID firmware ver 2.40 - 2.54
83 Seagate FC drives model ST39102FC, rev 0006
84 Hitachi DK31CJ-72FC rev J8A8
85 IBM DDYF-T18350R rev F60K
86 Compaq FC-SCSI bridge w/ DLT 35/70 Gb DLT (tape)
87(servers):
88 Compaq PL-1850R
89 Compaq PL-6500 Xeon (400MHz)
90 Compaq PL-8500 (500MHz, 66MHz, 64bit PCI)
91 Compaq Alpha DS20 (RH 6.1)
92(hubs):
93 Vixel Rapport 1000 (7-port "dumb")
94 Gadzoox Gibralter (12-port "dumb")
95 Gadzoox Capellix 2000, 3000
96(switches):
97 Brocade 2010, 2400, 2800, rev 2.0.3a (& later)
98 Gadzoox 3210 (Fabric blade beta)
99 Vixel 7100 (Fabric beta firmare - known hot plug issues)
100using "qa_test" (esp. io_test script) suite modified from Unix tests.
101
102Installation:
103make menuconfig
104 (select SCSI low-level, Compaq FC HBA)
105make modules
106make modules_install
107
108e.g. insmod -f cpqfc
109
110Due to Fabric/switch delays, driver requires 4 seconds
111to initialize. If adapters are found, there will be a entries at
112/proc/scsi/cpqfcTS/*
113
114sample contents of startup messages
115
116*************************
117 scsi_register allocating 3596 bytes for CPQFCHBA
118 ioremap'd Membase: c887e600
119 HBA Tachyon RevId 1.2
120Allocating 119808 for 576 Exchanges @ c0dc0000
121Allocating 112904 for LinkQ @ c0c20000 (576 elements)
122Allocating 110600 for TachSEST for 512 Exchanges
123 cpqfcTS: writing IMQ BASE 7C0000h PI 7C4000h
124 cpqfcTS: SEST c0e40000(virt): Wrote base E40000h @ c887e740
125cpqfcTS: New FC port 0000E8h WWN: 500507650642499D SCSI Chan/Trgt 0/0
126cpqfcTS: New FC port 0000EFh WWN: 50000E100000D5A6 SCSI Chan/Trgt 0/1
127cpqfcTS: New FC port 0000E4h WWN: 21000020370097BB SCSI Chan/Trgt 0/2
128cpqfcTS: New FC port 0000E2h WWN: 2100002037009946 SCSI Chan/Trgt 0/3
129cpqfcTS: New FC port 0000E1h WWN: 21000020370098FE SCSI Chan/Trgt 0/4
130cpqfcTS: New FC port 0000E0h WWN: 21000020370097B2 SCSI Chan/Trgt 0/5
131cpqfcTS: New FC port 0000DCh WWN: 2100002037006CC1 SCSI Chan/Trgt 0/6
132cpqfcTS: New FC port 0000DAh WWN: 21000020370059F6 SCSI Chan/Trgt 0/7
133cpqfcTS: New FC port 00000Fh WWN: 500805F1FADB0E20 SCSI Chan/Trgt 0/8
134cpqfcTS: New FC port 000008h WWN: 500805F1FADB0EBA SCSI Chan/Trgt 0/9
135cpqfcTS: New FC port 000004h WWN: 500805F1FADB1EB9 SCSI Chan/Trgt 0/10
136cpqfcTS: New FC port 000002h WWN: 500805F1FADB1ADE SCSI Chan/Trgt 0/11
137cpqfcTS: New FC port 000001h WWN: 500805F1FADBA2CA SCSI Chan/Trgt 0/12
138scsi4 : Compaq FibreChannel HBA Tachyon TS HPFC-5166A/1.2: WWN 500508B200193F50
139 on PCI bus 0 device 0xa0fc irq 5 IObaseL 0x3400, MEMBASE 0xc6ef8600
140PCI bus width 32 bits, bus speed 33 MHz
141FCP-SCSI Driver v1.3.0
142GBIC detected: Short-wave. LPSM 0h Monitor
143scsi : 5 hosts.
144 Vendor: IBM Model: DDYF-T18350R Rev: F60K
145 Type: Direct-Access ANSI SCSI revision: 03
146Detected scsi disk sdb at scsi4, channel 0, id 0, lun 0
147 Vendor: HITACHI Model: DK31CJ-72FC Rev: J8A8
148 Type: Direct-Access ANSI SCSI revision: 02
149Detected scsi disk sdc at scsi4, channel 0, id 1, lun 0
150 Vendor: SEAGATE Model: ST39102FC Rev: 0006
151 Type: Direct-Access ANSI SCSI revision: 02
152Detected scsi disk sdd at scsi4, channel 0, id 2, lun 0
153 Vendor: SEAGATE Model: ST39102FC Rev: 0006
154 Type: Direct-Access ANSI SCSI revision: 02
155Detected scsi disk sde at scsi4, channel 0, id 3, lun 0
156 Vendor: SEAGATE Model: ST39102FC Rev: 0006
157 Type: Direct-Access ANSI SCSI revision: 02
158Detected scsi disk sdf at scsi4, channel 0, id 4, lun 0
159 Vendor: SEAGATE Model: ST39102FC Rev: 0006
160 Type: Direct-Access ANSI SCSI revision: 02
161Detected scsi disk sdg at scsi4, channel 0, id 5, lun 0
162 Vendor: SEAGATE Model: ST39102FC Rev: 0006
163 Type: Direct-Access ANSI SCSI revision: 02
164Detected scsi disk sdh at scsi4, channel 0, id 6, lun 0
165 Vendor: SEAGATE Model: ST39102FC Rev: 0006
166 Type: Direct-Access ANSI SCSI revision: 02
167Detected scsi disk sdi at scsi4, channel 0, id 7, lun 0
168 Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.48
169 Type: Direct-Access ANSI SCSI revision: 02
170Detected scsi disk sdj at scsi4, channel 0, id 8, lun 0
171 Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.48
172 Type: Direct-Access ANSI SCSI revision: 02
173Detected scsi disk sdk at scsi4, channel 0, id 8, lun 1
174 Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.40
175 Type: Direct-Access ANSI SCSI revision: 02
176Detected scsi disk sdl at scsi4, channel 0, id 9, lun 0
177 Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.40
178 Type: Direct-Access ANSI SCSI revision: 02
179Detected scsi disk sdm at scsi4, channel 0, id 9, lun 1
180 Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54
181 Type: Direct-Access ANSI SCSI revision: 02
182Detected scsi disk sdn at scsi4, channel 0, id 10, lun 0
183 Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54
184 Type: Direct-Access ANSI SCSI revision: 02
185Detected scsi disk sdo at scsi4, channel 0, id 11, lun 0
186 Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54
187 Type: Direct-Access ANSI SCSI revision: 02
188Detected scsi disk sdp at scsi4, channel 0, id 11, lun 1
189 Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54
190 Type: Direct-Access ANSI SCSI revision: 02
191Detected scsi disk sdq at scsi4, channel 0, id 12, lun 0
192 Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54
193 Type: Direct-Access ANSI SCSI revision: 02
194Detected scsi disk sdr at scsi4, channel 0, id 12, lun 1
195resize_dma_pool: unknown device type 12
196resize_dma_pool: unknown device type 12
197SCSI device sdb: hdwr sector= 512 bytes. Sectors= 35843670 [17501 MB] [17.5 GB]
198 sdb: sdb1
199SCSI device sdc: hdwr sector= 512 bytes. Sectors= 144410880 [70513 MB] [70.5 GB]
200 sdc: sdc1
201SCSI device sdd: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
202 sdd: sdd1
203SCSI device sde: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
204 sde: sde1
205SCSI device sdf: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
206 sdf: sdf1
207SCSI device sdg: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
208 sdg: sdg1
209SCSI device sdh: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
210 sdh: sdh1
211SCSI device sdi: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
212 sdi: sdi1
213SCSI device sdj: hdwr sector= 512 bytes. Sectors= 2056160 [1003 MB] [1.0 GB]
214 sdj: sdj1
215SCSI device sdk: hdwr sector= 512 bytes. Sectors= 2052736 [1002 MB] [1.0 GB]
216 sdk: sdk1
217SCSI device sdl: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
218 sdl: sdl1
219SCSI device sdm: hdwr sector= 512 bytes. Sectors= 8380320 [4091 MB] [4.1 GB]
220 sdm: sdm1
221SCSI device sdn: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
222 sdn: sdn1
223SCSI device sdo: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
224 sdo: sdo1
225SCSI device sdp: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
226 sdp: sdp1
227SCSI device sdq: hdwr sector= 512 bytes. Sectors= 2056160 [1003 MB] [1.0 GB]
228 sdq: sdq1
229SCSI device sdr: hdwr sector= 512 bytes. Sectors= 2052736 [1002 MB] [1.0 GB]
230 sdr: sdr1
231
232*************************
233
234If a GBIC of type Short-wave, Long-wave, or Copper is detected, it will
235print out; otherwise, "none" is displayed. If the cabling is correct
236and a loop circuit is completed, you should see "Monitor"; otherwise,
237"LoopFail" (on open circuit) or some LPSM number/state with bit 3 set.
238
239
240ERRATA:
2411. Normally, Linux Scsi queries FC devices with INQUIRY strings. All LUNs
242found according to INQUIRY should get READ commands at sector 0 to find
243partition table, etc. Older kernels only query the first 4 devices. Some
244Linux kernels only look for one LUN per target (i.e. FC device).
245
2462. Physically removing a device, or a malfunctioning system which hides a
247device, leads to a 30-second timeout and subsequent _abort call.
248In some process contexts, this will hang the kernel (crashing the system).
249Single bit errors in frames and virtually all hot plugging events are
250gracefully handled with internal driver timer and Abort processing.
251
2523. Some SCSI drives with error conditions will not handle the 7 second timeout
253in this software driver, leading to infinite retries on timed out SCSI commands.
254The 7 secs balances the need to quickly recover from lost frames (esp. on sequence
255initiatives) and time needed by older/slower/error-state drives in responding.
256This can be easily changed in "Exchanges[].timeOut".
257
2584. Due to the nature of FC soft addressing, there is no assurance that the
259same LUNs (drives) will have the same path (e.g. /dev/sdb1) from one boot to
260next. Dynamic soft address changes (i.e. 24-bit FC port_id) are
261supported during run time (e.g. due to hot plug event) by the use of WWN to
262SCSI Nexus (channel/target/LUN) mapping.
263
2645. Compaq RA4x00 firmware version 2.54 and later supports SSP (Selective
265Storage Presentation), which maps LUNs to a WWN. If RA4x00 firmware prior
2662.54 (e.g. older controller) is used, or the FC HBA is replaced (another WWN
267is used), logical volumes on the RA4x00 will no longer be visible.
268
269
270Send questions/comments to:
271Amy Vanzant-Hodge (fibrechannel@compaq.com)
272
diff --git a/Documentation/scsi/dc395x.txt b/Documentation/scsi/dc395x.txt
new file mode 100644
index 000000000000..ae3b79a2d275
--- /dev/null
+++ b/Documentation/scsi/dc395x.txt
@@ -0,0 +1,102 @@
1README file for the dc395x SCSI driver
2==========================================
3
4Status
5------
6The driver has been tested with CD-R and CD-R/W drives. These should
7be safe to use. Testing with hard disks has not been done to any
8great degree and caution should be exercised if you want to attempt
9to use this driver with hard disks.
10
11This is a 2.5 only driver. For a 2.4 driver please see the original
12driver (which this driver started from) at
13http://www.garloff.de/kurt/linux/dc395/
14
15Problems, questions and patches should be submitted to the mailing
16list. Details on the list, including archives, are available at
17http://lists.twibble.org/mailman/listinfo/dc395x/
18
19Parameters
20----------
21The driver uses the settings from the EEPROM set in the SCSI BIOS
22setup. If there is no EEPROM, the driver uses default values.
23Both can be overriden by command line parameters (module or kernel
24parameters).
25
26The following parameters are available:
27
28 - safe
29 Default: 0, Acceptable values: 0 or 1
30
31 If safe is set to 1 then the adapter will use conservative
32 ("safe") default settings. This sets:
33
34 shortcut for dc395x=7,4,9,15,2,10
35
36 - adapter_id
37 Default: 7, Acceptable values: 0 to 15
38
39 Sets the host adapter SCSI ID.
40
41 - max_speed
42 Default: 1, Acceptable value: 0 to 7
43 0 = 20 Mhz
44 1 = 12.2 Mhz
45 2 = 10 Mhz
46 3 = 8 Mhz
47 4 = 6.7 Mhz
48 5 = 5.8 Hhz
49 6 = 5 Mhz
50 7 = 4 Mhz
51
52 - dev_mode
53 Bitmap for device configuration
54
55 DevMode bit definition:
56 Bit Val(hex) Val(dec) Meaning
57 *0 0x01 1 Parity check
58 *1 0x02 2 Synchronous Negotiation
59 *2 0x04 4 Disconnection
60 *3 0x08 8 Send Start command on startup. (Not used)
61 *4 0x10 16 Tagged Command Queueing
62 *5 0x20 32 Wide Negotiation
63
64 - adapter_mode
65 Bitmap for adapter configuration
66
67 AdaptMode bit definition
68 Bit Val(hex) Val(dec) Meaning
69 *0 0x01 1 Support more than two drives. (Not used)
70 *1 0x02 2 Use DOS compatible mapping for HDs greater than 1GB.
71 *2 0x04 4 Reset SCSI Bus on startup.
72 *3 0x08 8 Active Negation: Improves SCSI Bus noise immunity.
73 4 0x10 16 Immediate return on BIOS seek command. (Not used)
74 (*)5 0x20 32 Check for LUNs >= 1.
75
76 - tags
77 Default: 3, Acceptable values: 0-5
78
79 The number of tags is 1<<x, if x has been specified
80
81 - reset_delay
82 Default: 1, Acceptable values: 0-180
83
84 The seconds to not accept commands after a SCSI Reset
85
86
87For the built in driver the parameters should be prefixed with
88dc395x. (eg "dc395x.safe=1")
89
90
91Copyright
92---------
93The driver is free software. It is protected by the GNU General Public
94License (GPL). Please read it, before using this driver. It should be
95included in your kernel sources and with your distribution. It carries the
96filename COPYING. If you don't have it, please ask me to send you one by
97email.
98Note: The GNU GPL says also something about warranty and liability.
99Please be aware the following: While we do my best to provide a working and
100reliable driver, there is a chance, that it will kill your valuable data.
101We refuse to take any responsibility for that. The driver is provided as-is
102and YOU USE IT AT YOUR OWN RESPONSIBILITY.
diff --git a/Documentation/scsi/dpti.txt b/Documentation/scsi/dpti.txt
new file mode 100644
index 000000000000..6e45e70243e5
--- /dev/null
+++ b/Documentation/scsi/dpti.txt
@@ -0,0 +1,83 @@
1 /* TERMS AND CONDITIONS OF USE
2 *
3 * Redistribution and use in source form, with or without modification, are
4 * permitted provided that redistributions of source code must retain the
5 * above copyright notice, this list of conditions and the following disclaimer.
6 *
7 * This software is provided `as is' by Adaptec and
8 * any express or implied warranties, including, but not limited to, the
9 * implied warranties of merchantability and fitness for a particular purpose,
10 * are disclaimed. In no event shall Adaptec be
11 * liable for any direct, indirect, incidental, special, exemplary or
12 * consequential damages (including, but not limited to, procurement of
13 * substitute goods or services; loss of use, data, or profits; or business
14 * interruptions) however caused and on any theory of liability, whether in
15 * contract, strict liability, or tort (including negligence or otherwise)
16 * arising in any way out of the use of this driver software, even if advised
17 * of the possibility of such damage.
18 *
19 ****************************************************************
20 * This driver supports the Adaptec I2O RAID and DPT SmartRAID V I2O boards.
21 *
22 * CREDITS:
23 * The original linux driver was ported to Linux by Karen White while at
24 * Dell Computer. It was ported from Bob Pasteur's (of DPT) original
25 * non-Linux driver. Mark Salyzyn and Bob Pasteur consulted on the original
26 * driver.
27 *
28 * 2.0 version of the driver by Deanna Bonds and Mark Salyzyn.
29 *
30 * HISTORY:
31 * The driver was originally ported to linux version 2.0.34
32 *
33 * V2.0 Rewrite of driver. Re-architectured based on i2o subsystem.
34 * This was the first full GPL version since the last version used
35 * i2osig headers which were not GPL. Developer Testing version.
36 * V2.1 Internal testing
37 * V2.2 First released version
38 *
39 * V2.3
40 * Changes:
41 * Added Raptor Support
42 * Fixed bug causing system to hang under extreme load with
43 * management utilities running (removed GFP_DMA from kmalloc flags)
44 *
45 *
46 * V2.4 First version ready to be submitted to be embedded in the kernel
47 * Changes:
48 * Implemented suggestions from Alan Cox
49 * Added calculation of resid for sg layer
50 * Better error handling
51 * Added checking underflow condtions
52 * Added DATAPROTECT checking
53 * Changed error return codes
54 * Fixed pointer bug in bus reset routine
55 * Enabled hba reset from ioctls (allows a FW flash to reboot and use the new
56 * FW without having to reboot)
57 * Changed proc output
58 *
59 * TODO:
60 * Add 64 bit Scatter Gather when compiled on 64 bit architectures
61 * Add sparse lun scanning
62 * Add code that checks if a device that had been taken offline is
63 * now online (at the FW level) when test unit ready or inquiry
64 * command from scsi-core
65 * Add proc read interface
66 * busrescan command
67 * rescan command
68 * Add code to rescan routine that notifies scsi-core about new devices
69 * Add support for C-PCI (hotplug stuff)
70 * Add ioctl passthru error recovery
71 *
72 * NOTES:
73 * The DPT card optimizes the order of processing commands. Consequently,
74 * a command may take up to 6 minutes to complete after it has been sent
75 * to the board.
76 *
77 * The files dpti_ioctl.h dptsig.h osd_defs.h osd_util.h sys_info.h are part of the
78 * interface files for Adaptec's management routines. These define the structures used
79 * in the ioctls. They are written to be portable. They are hard to read, but I need
80 * to use them 'as is' or I can miss changes in the interface.
81 *
82 */
83
diff --git a/Documentation/scsi/dtc3x80.txt b/Documentation/scsi/dtc3x80.txt
new file mode 100644
index 000000000000..e8ae6230ab3e
--- /dev/null
+++ b/Documentation/scsi/dtc3x80.txt
@@ -0,0 +1,43 @@
1README file for the Linux DTC3180/3280 scsi driver.
2by Ray Van Tassle (rayvt@comm.mot.com) March 1996
3Based on the generic & core NCR5380 code by Drew Eckhard
4
5SCSI device driver for the DTC 3180/3280.
6Data Technology Corp---a division of Qume.
7
8The 3280 has a standard floppy interface.
9
10The 3180 does not. Otherwise, they are identical.
11
12The DTC3x80 does not support DMA but it does have Pseudo-DMA which is
13supported by the driver.
14
15It's DTC406 scsi chip is supposedly compatible with the NCR 53C400.
16It is memory mapped, uses an IRQ, but no dma or io-port. There is
17internal DMA, between SCSI bus and an on-chip 128-byte buffer. Double
18buffering is done automagically by the chip. Data is transferred
19between the on-chip buffer and CPU/RAM via memory moves.
20
21The driver detects the possible memory addresses (jumper selectable):
22 CC00, DC00, C800, and D800
23The possible IRQ's (jumper selectable) are:
24 IRQ 10, 11, 12, 15
25Parity is supported by the chip, but not by this driver.
26Information can be obtained from /proc/scsi/dtc3c80/N.
27
28Note on interrupts:
29
30The documentation says that it can be set to interrupt whenever the
31on-chip buffer needs CPU attention. I couldn't get this to work. So
32the driver polls for data-ready in the pseudo-DMA transfer routine.
33The interrupt support routines in the NCR3280.c core modules handle
34scsi disconnect/reconnect, and this (mostly) works. However..... I
35have tested it with 4 totally different hard drives (both SCSI-1 and
36SCSI-2), and one CDROM drive. Interrupts works great for all but one
37specific hard drive. For this one, the driver will eventually hang in
38the transfer state. I have tested with: "dd bs=4k count=2k
39of=/dev/null if=/dev/sdb". It reads ok for a while, then hangs.
40After beating my head against this for a couple of weeks, getting
41nowhere, I give up. So.....This driver does NOT use interrupts, even
42if you have the card jumpered to an IRQ. Probably nobody will ever
43care.
diff --git a/Documentation/scsi/g_NCR5380.txt b/Documentation/scsi/g_NCR5380.txt
new file mode 100644
index 000000000000..3b80f567f818
--- /dev/null
+++ b/Documentation/scsi/g_NCR5380.txt
@@ -0,0 +1,63 @@
1README file for the Linux g_NCR5380 driver.
2
3(c) 1993 Drew Eckhard
4NCR53c400 extensions (c) 1994,1995,1996 Kevin Lentin
5
6This file documents the NCR53c400 extensions by Kevin Lentin and some
7enhancements to the NCR5380 core.
8
9This driver supports both NCR5380 and NCR53c400 cards in port or memory
10mapped modes. Currently this driver can only support one of those mapping
11modes at a time but it does support both of these chips at the same time.
12The next release of this driver will support port & memory mapped cards at
13the same time. It should be able to handle multiple different cards in the
14same machine.
15
16The drivers/scsi/Makefile has an override in it for the most common
17NCR53c400 card, the Trantor T130B in its default configuration:
18 Port: 0x350
19 IRQ : 5
20
21The NCR53c400 does not support DMA but it does have Pseudo-DMA which is
22supported by the driver.
23
24If the default configuration does not work for you, you can use the kernel
25command lines (eg using the lilo append command):
26 ncr5380=port,irq,dma
27 ncr53c400=port,irq
28or
29 ncr5380=base,irq,dma
30 ncr53c400=base,irq
31
32The driver does not probe for any addresses or ports other than those in
33the OVERRIDE or given to the kernel as above.
34
35This driver provides some information on what it has detected in
36/proc/scsi/g_NCR5380/x where x is the scsi card number as detected at boot
37time. More info to come in the future.
38
39When NCR53c400 support is compiled in, BIOS parameters will be returned by
40the driver (the raw 5380 driver does not and I don't plan to fiddle with
41it!).
42
43This driver works as a module.
44When included as a module, parameters can be passed on the insmod/modprobe
45command line:
46 ncr_irq=xx the interrupt
47 ncr_addr=xx the port or base address (for port or memory
48 mapped, resp.)
49 ncr_dma=xx the DMA
50 ncr_5380=1 to set up for a NCR5380 board
51 ncr_53c400=1 to set up for a NCR53C400 board
52e.g.
53modprobe g_NCR5380 ncr_irq=5 ncr_addr=0x350 ncr_5380=1
54 for a port mapped NCR5380 board or
55modprobe g_NCR5380 ncr_irq=255 ncr_addr=0xc8000 ncr_53c400=1
56 for a memory mapped NCR53C400 board with interrupts disabled.
57
58(255 should be specified for no or DMA interrupt, 254 to autoprobe for an
59 IRQ line if overridden on the command line.)
60
61
62Kevin Lentin
63K.Lentin@cs.monash.edu.au
diff --git a/Documentation/scsi/ibmmca.txt b/Documentation/scsi/ibmmca.txt
new file mode 100644
index 000000000000..2814491600ff
--- /dev/null
+++ b/Documentation/scsi/ibmmca.txt
@@ -0,0 +1,1402 @@
1
2 -=< The IBM Microchannel SCSI-Subsystem >=-
3
4 for the IBM PS/2 series
5
6 Low Level Software-Driver for Linux
7
8 Copyright (c) 1995 Strom Systems, Inc. under the terms of the GNU
9 General Public License. Originally written by Martin Kolinek, December 1995.
10 Officially modified and maintained by Michael Lang since January 1999.
11
12 Version 4.0a
13
14 Last update: January 3, 2001
15
16 Before you Start
17 ----------------
18 This is the common README.ibmmca file for all driver releases of the
19 IBM MCA SCSI driver for Linux. Please note, that driver releases 4.0
20 or newer do not work with kernel versions older than 2.4.0, while driver
21 versions older than 4.0 do not work with kernels 2.4.0 or later! If you
22 try to compile your kernel with the wrong driver source, the
23 compilation is aborted and you get a corresponding error message. This is
24 no bug in the driver. It prevents you from using the wrong sourcecode
25 with the wrong kernel version.
26
27 Authors of this Driver
28 ----------------------
29 - Chris Beauregard (improvement of the SCSI-device mapping by the driver)
30 - Martin Kolinek (origin, first release of this driver)
31 - Klaus Kudielka (multiple SCSI-host management/detection, adaption to
32 Linux Kernel 2.1.x, module support)
33 - Michael Lang (assigning original pun/lun mapping, dynamical ldn
34 assignment, rewritten adapter detection, this file,
35 patches, official driver maintenance and subsequent
36 debugging, related with the driver)
37
38 Table of Contents
39 -----------------
40 1 Abstract
41 2 Driver Description
42 2.1 IBM SCSI-Subsystem Detection
43 2.2 Physical Units, Logical Units, and Logical Devices
44 2.3 SCSI-Device Recognition and dynamical ldn Assignment
45 2.4 SCSI-Device Order
46 2.5 Regular SCSI-Command-Processing
47 2.6 Abort & Reset Commands
48 2.7 Disk Geometry
49 2.8 Kernel Boot Option
50 2.9 Driver Module Support
51 2.10 Multiple Hostadapter Support
52 2.11 /proc/scsi-Filesystem Information
53 2.12 /proc/mca-Filesystem Information
54 2.13 Supported IBM SCSI-Subsystems
55 2.14 Linux Kernel Versions
56 3 Code History
57 4 To do
58 5 Users' Manual
59 5.1 Commandline Parameters
60 5.2 Troubleshooting
61 5.3 Bugreports
62 5.4 Support WWW-page
63 6 References
64 7 Credits to
65 7.1 People
66 7.2 Sponsors & Supporters
67 8 Trademarks
68 9 Disclaimer
69
70 * * *
71
72 1 Abstract
73 ----------
74 This README-file describes the IBM SCSI-subsystem low level driver for
75 Linux. The descriptions which were formerly kept in the source-code have
76 been taken out to this file to easify the codes' readability. The driver
77 description has been updated, as most of the former description was already
78 quite outdated. The history of the driver development is also kept inside
79 here. Multiple historical developments have been summarized to shorten the
80 textsize a bit. At the end of this file you can find a small manual for
81 this driver and hints to get it running on your machine.
82
83 2 Driver Description
84 --------------------
85 2.1 IBM SCSI-Subsystem Detection
86 --------------------------------
87 This is done in the ibmmca_detect() function. It first checks, if the
88 Microchannel-bus support is enabled, as the IBM SCSI-subsystem needs the
89 Microchannel. In a next step, a free interrupt is chosen and the main
90 interrupt handler is connected to it to handle answers of the SCSI-
91 subsystem(s). If the F/W SCSI-adapter is forced by the BIOS to use IRQ11
92 instead of IRQ14, IRQ11 is used for the IBM SCSI-2 F/W adapter. In a
93 further step it is checked, if the adapter gets detected by force from
94 the kernel commandline, where the I/O port and the SCSI-subsystem id can
95 be specified. The next step checks if there is an integrated SCSI-subsystem
96 installed. This register area is fixed through all IBM PS/2 MCA-machines
97 and appears as something like a virtual slot 10 of the MCA-bus. On most
98 PS/2 machines, the POS registers of slot 10 are set to 0xff or 0x00 if not
99 integrated SCSI-controller is available. But on certain PS/2s, like model
100 9595, this slot 10 is used to store other information which at earlier
101 stage confused the driver and resulted in the detection of some ghost-SCSI.
102 If POS-register 2 and 3 are not 0x00 and not 0xff, but all other POS
103 registers are either 0xff or 0x00, there must be an integrated SCSI-
104 subsystem present and it will be registered as IBM Integrated SCSI-
105 Subsystem. The next step checks, if there is a slot-adapter installed on
106 the MCA-bus. To get this, the first two POS-registers, that represent the
107 adapter ID are checked. If they fit to one of the ids, stored in the
108 adapter list, a SCSI-subsystem is assumed to be found in a slot and will be
109 registered. This check is done through all possible MCA-bus slots to allow
110 more than one SCSI-adapter to be present in the PS/2-system and this is
111 already the first point of problems. Looking into the technical reference
112 manual for the IBM PS/2 common interfaces, the POS2 register must have
113 different interpretation of its single bits to avoid overlapping I/O
114 regions. While one can assume, that the integrated subsystem has a fix
115 I/O-address at 0x3540 - 0x3547, further installed IBM SCSI-adapters must
116 use a different I/O-address. This is expressed by bit 1 to 3 of POS2
117 (multiplied by 8 + 0x3540). Bits 2 and 3 are reserved for the integrated
118 subsystem, but not for the adapters! The following list shows, how the
119 bits of POS2 and POS3 should be interpreted.
120
121 The POS2-register of all PS/2 models' integrated SCSI-subsystems has the
122 following interpretation of bits:
123 Bit 7 - 4 : Chip Revision ID (Release)
124 Bit 3 - 2 : Reserved
125 Bit 1 : 8k NVRAM Disabled
126 Bit 0 : Chip Enable (EN-Signal)
127 The POS3-register is interpreted as follows (for most IBM SCSI-subsys.):
128 Bit 7 - 5 : SCSI ID
129 Bit 4 - 0 : Reserved = 0
130 The slot-adapters have different interpretation of these bits. The IBM SCSI
131 adapter (w/Cache) and the IBM SCSI-2 F/W adapter use the following
132 interpretation of the POS2 register:
133 Bit 7 - 4 : ROM Segment Address Select
134 Bit 3 - 1 : Adapter I/O Address Select (*8+0x3540)
135 Bit 0 : Adapter Enable (EN-Signal)
136 and for the POS3 register:
137 Bit 7 - 5 : SCSI ID
138 Bit 4 : Fairness Enable (SCSI ID3 f. F/W)
139 Bit 3 - 0 : Arbitration Level
140 The most modern product of the series is the IBM SCSI-2 F/W adapter, it
141 allows dual-bus SCSI and SCSI-wide addressing, which means, PUNs may be
142 between 0 and 15. Here, Bit 4 is the high-order bit of the 4-bit wide
143 adapter PUN expression. In short words, this means, that IBM PS/2 machines
144 can only support 1 single integrated subsystem by default. Additional
145 slot-adapters get ports assigned by the automatic configuration tool.
146
147 One day I found a patch in ibmmca_detect(), forcing the I/O-address to be
148 0x3540 for integrated SCSI-subsystems, there was a remark placed, that on
149 integrated IBM SCSI-subsystems of model 56, the POS2 register was showing 5.
150 This means, that really for these models, POS2 has to be interpreted
151 sticking to the technical reference guide. In this case, the bit 2 (4) is
152 a reserved bit and may not be interpreted. These differences between the
153 adapters and the integrated controllers are taken into account by the
154 detection routine of the driver on from version >3.0g.
155
156 Every time, a SCSI-subsystem is discovered, the ibmmca_register() function
157 is called. This function checks first, if the requested area for the I/O-
158 address of this SCSI-subsystem is still available and assigns this I/O-
159 area to the SCSI-subsystem. There are always 8 sequential I/O-addresses
160 taken for each individual SCSI-subsystem found, which are:
161
162 Offset Type Permissions
163 0 Command Interface Register 1 Read/Write
164 1 Command Interface Register 2 Read/Write
165 2 Command Interface Register 3 Read/Write
166 3 Command Interface Register 4 Read/Write
167 4 Attention Register Read/Write
168 5 Basic Control Register Read/Write
169 6 Interrupt Status Register Read
170 7 Basic Status Register Read
171
172 After the I/O-address range is assigned, the host-adapter is assigned
173 to a local structure which keeps all adapter information needed for the
174 driver itself and the mid- and higher-level SCSI-drivers. The SCSI pun/lun
175 and the adapters' ldn tables are initialized and get probed afterwards by
176 the check_devices() function. If no further adapters are found,
177 ibmmca_detect() quits.
178
179 2.2 Physical Units, Logical Units, and Logical Devices
180 ------------------------------------------------------
181 There can be up to 56 devices on the SCSI bus (besides the adapter):
182 there are up to 7 "physical units" (each identified by physical unit
183 number or pun, also called the scsi id, this is the number you select
184 with hardware jumpers), and each physical unit can have up to 8
185 "logical units" (each identified by logical unit number, or lun,
186 between 0 and 7). The IBM SCSI-2 F/W adapter offers this on up to two
187 busses and provides support for 30 logical devices at the same time, where
188 in wide-addressing mode you can have 16 puns with 32 luns on each device.
189 This section dexribes you the handling of devices on non-F/W adapters.
190 Just imagine, that you can have 16 * 32 = 512 devices on a F/W adapter
191 which means a lot of possible devices for such a small machine.
192
193 Typically the adapter has pun=7, so puns of other physical units
194 are between 0 and 6(15). On a wide-adapter a pun higher than 7 is
195 possible, but is normally not used. Almost all physical units have only
196 one logical unit, with lun=0. A CD-ROM jukebox would be an example of a
197 physical unit with more than one logical unit.
198
199 The embedded microprocessor of the IBM SCSI-subsystem hides the complex
200 two-dimensional (pun,lun) organization from the operating system.
201 When the machine is powered-up (or rebooted), the embedded microprocessor
202 checks, on its own, all 56 possible (pun,lun) combinations, and the first
203 15 devices found are assigned into a one-dimensional array of so-called
204 "logical devices", identified by "logical device numbers" or ldn. The last
205 ldn=15 is reserved for the subsystem itself. Wide adapters may have
206 to check up to 15 * 8 = 120 pun/lun combinations.
207
208 2.3 SCSI-Device Recognition and Dynamical ldn Assignment
209 --------------------------------------------------------
210 One consequence of information hiding is that the real (pun,lun)
211 numbers are also hidden. The two possibilities to get around this problem
212 is to offer fake pun/lun combinations to the operating system or to
213 delete the whole mapping of the adapter and to reassign the ldns, using
214 the immediate assign command of the SCSI-subsystem for probing through
215 all possible pun/lun combinations. a ldn is a "logical device number"
216 which is used by IBM SCSI-subsystems to access some valid SCSI-device.
217 At the beginning of the development of this driver, the following approach
218 was used:
219
220 First, the driver checked the ldn's (0 to 6) to find out which ldn's
221 have devices assigned. This was done by the functions check_devices() and
222 device_exists(). The interrupt handler has a special paragraph of code
223 (see local_checking_phase_flag) to assist in the checking. Assume, for
224 example, that three logical devices were found assigned at ldn 0, 1, 2.
225 These are presented to the upper layer of Linux SCSI driver
226 as devices with bogus (pun, lun) equal to (0,0), (1,0), (2,0).
227 On the other hand, if the upper layer issues a command to device
228 say (4,0), this driver returns DID_NO_CONNECT error.
229
230 In a second step of the driver development, the following improvement has
231 been applied: The first approach limited the number of devices to 7, far
232 fewer than the 15 that it could usem then it just maped ldn ->
233 (ldn/8,ldn%8) for pun,lun. We ended up with a real mishmash of puns
234 and luns, but it all seemed to work.
235
236 The latest development, which is implemented from the driver version 3.0
237 and later, realizes the device recognition in the following way:
238 The physical SCSI-devices on the SCSI-bus are probed via immediate_assign-
239 and device_inquiry-commands, that is all implemented in a completely new
240 made check_devices() subroutine. This delivers an exact map of the physical
241 SCSI-world that is now stored in the get_scsi[][]-array. This means,
242 that the once hidden pun,lun assignment is now known to this driver.
243 It no longer believes in default-settings of the subsystem and maps all
244 ldns to existing pun,lun "by foot". This assures full control of the ldn
245 mapping and allows dynamical remapping of ldns to different pun,lun, if
246 there are more SCSI-devices installed than ldns available (n>15). The
247 ldns from 0 to 6 get 'hardwired' by this driver to puns 0 to 7 at lun=0,
248 excluding the pun of the subsystem. This assures, that at least simple
249 SCSI-installations have optimum access-speed and are not touched by
250 dynamical remapping. The ldns 7 to 14 are put to existing devices with
251 lun>0 or to non-existing devices, in order to satisfy the subsystem, if
252 there are less than 15 SCSI-devices connected. In the case of more than 15
253 devices, the dynamical mapping goes active. If the get_scsi[][] reports a
254 device to be existant, but it has no ldn assigned, it gets a ldn out of 7
255 to 14. The numbers are assigned in cyclic order. Therefore it takes 8
256 dynamical reassignments on the SCSI-devices, until a certain device
257 loses its ldn again. This assures, that dynamical remapping is avoided
258 during intense I/O between up to 15 SCSI-devices (means pun,lun
259 combinations). A further advantage of this method is, that people who
260 build their kernel without probing on all luns will get what they expect,
261 because the driver just won't assign everything with lun>0 when
262 multpile lun probing is inactive.
263
264 2.4 SCSI-Device Order
265 ---------------------
266 Because of the now correct recognition of physical pun,lun, and
267 their report to mid-level- and higher-level-drivers, the new reported puns
268 can be different from the old, faked puns. Therefore, Linux will eventually
269 change /dev/sdXXX assignments and prompt you for corrupted superblock
270 repair on boottime. In this case DO NOT PANIC, YOUR DISKS ARE STILL OK!!!
271 You have to reboot (CTRL-D) with an old kernel and set the /etc/fstab-file
272 entries right. After that, the system should come up as errorfree as before.
273 If your boot-partition is not coming up, also edit the /etc/lilo.conf-file
274 in a Linux session booted on old kernel and run lilo before reboot. Check
275 lilo.conf anyway to get boot on other partitions with foreign OSes right
276 again. But there exists a feature of this driver that allows you to change
277 the assignment order of the SCSI-devices by flipping the PUN-assignment.
278 See the next paragraph for a description.
279
280 The problem for this is, that Linux does not assign the SCSI-devices in the
281 way as described in the ANSI-SCSI-standard. Linux assigns /dev/sda to
282 the device with at minimum id 0. But the first drive should be at id 6,
283 because for historical reasons, drive at id 6 has, by hardware, the highest
284 priority and a drive at id 0 the lowest. IBM was one of the rare producers,
285 where the BIOS assigns drives belonging to the ANSI-SCSI-standard. Most
286 other producers' BIOS does not (I think even Adaptec-BIOS). The
287 IBMMCA_SCSI_ORDER_STANDARD flag, which you set while configuring the
288 kernel enables to choose the preferred way of SCSI-device-assignment.
289 Defining this flag would result in Linux determining the devices in the
290 same order as DOS and OS/2 does on your MCA-machine. This is also standard
291 on most industrial computers and OSes, like e.g. OS-9. Leaving this flag
292 undefined will get your devices ordered in the default way of Linux. See
293 also the remarks of Chris Beauregard from Dec 15, 1997 and the followups
294 in section 3.
295
296 2.5 Regular SCSI-Command-Processing
297 -----------------------------------
298 Only three functions get involved: ibmmca_queuecommand(), issue_cmd(),
299 and interrupt_handler().
300
301 The upper layer issues a scsi command by calling function
302 ibmmca_queuecommand(). This function fills a "subsystem control block"
303 (scb) and calls a local function issue_cmd(), which writes a scb
304 command into subsystem I/O ports. Once the scb command is carried out,
305 the interrupt_handler() is invoked. If a device is determined to be
306 existant and it has not assigned any ldn, it gets one dynamically.
307 For this, the whole stuff is done in ibmmca_queuecommand().
308
309 2.6 Abort & Reset Commands
310 --------------------------
311 These are implemented with busy waiting for interrupt to arrive.
312 ibmmca_reset() and ibmmca_abort() do not work sufficently well
313 up to now and need still a lot of development work. But, this seems
314 to be even a problem with other SCSI-low level drivers, too. However,
315 this should be no excuse.
316
317 2.7 Disk Geometry
318 -----------------
319 The ibmmca_biosparams() function should return the same disk geometry
320 as the bios. This is needed for fdisk, etc. The returned geometry is
321 certainly correct for disks smaller than 1 gigabyte. In the meantime,
322 it has been proved, that this works fine even with disks larger than
323 1 gigabyte.
324
325 2.8 Kernel Boot Option
326 ----------------------
327 The function ibmmca_scsi_setup() is called if option ibmmcascsi=n
328 is passed to the kernel. See file linux/init/main.c for details.
329
330 2.9 Driver Module Support
331 -------------------------
332 Is implemented and tested by K. Kudielka. This could probably not work
333 on kernels <2.1.0.
334
335 2.10 Multiple Hostadapter Support
336 ---------------------------------
337 This driver supports up to eight interfaces of type IBM-SCSI-Subsystem.
338 Integrated-, and MCA-adapters are automatically recognized. Unrecognizable
339 IBM-SCSI-Subsystem interfaces can be specified as kernel-parameters.
340
341 2.11 /proc/scsi-Filesystem Information
342 --------------------------------------
343 Information about the driver condition is given in
344 /proc/scsi/ibmmca/<host_no>. ibmmca_proc_info() provides this information.
345
346 This table is quite informative for interested users. It shows the load
347 of commands on the subsystem and wether you are running the bypassed
348 (software) or integrated (hardware) SCSI-command set (see below). The
349 amount of accesses is shown. Read, write, modeselect is shown separately
350 in order to help debugging problems with CD-ROMs or tapedrives.
351
352 The following table shows the list of 15 logical device numbers, that are
353 used by the SCSI-subsystem. The load on each ldn is shown in the table,
354 again, read and write commands are split. The last column shows the amount
355 of reassignments, that have been applied to the ldns, if you have more than
356 15 pun/lun combinations available on the SCSI-bus.
357
358 The last two tables show the pun/lun map and the positions of the ldns
359 on this pun/lun map. This may change during operation, when a ldn is
360 reassigned to another pun/lun combination. If the necessity for dynamical
361 assignments is set to 'no', the ldn structure keeps static.
362
363 2.12 /proc/mca-Filesystem Information
364 -------------------------------------
365 The slot-file contains all default entries and in addition chip and I/O-
366 address information of the SCSI-subsystem. This information is provided
367 by ibmmca_getinfo().
368
369 2.13 Supported IBM SCSI-Subsystems
370 ----------------------------------
371 The following IBM SCSI-subsystems are supported by this driver:
372
373 - IBM Fast/Wide SCSI-2 Adapter
374 - IBM 7568 Industrial Computer SCSI Adapter w/Cache
375 - IBM Expansion Unit SCSI Controller
376 - IBM SCSI Adapter w/Cache
377 - IBM SCSI Adapter
378 - IBM Integrated SCSI Controller
379 - All clones, 100% compatible with the chipset and subsystem command
380 system of IBM SCSI-adapters (forced detection)
381
382 2.14 Linux Kernel Versions
383 --------------------------
384 The IBM SCSI-subsystem low level driver is prepared to be used with
385 all versions of Linux between 2.0.x and 2.4.x. The compatibility checks
386 are fully implemented up from version 3.1e of the driver. This means, that
387 you just need the latest ibmmca.h and ibmmca.c file and copy it in the
388 linux/drivers/scsi directory. The code is automatically adapted during
389 kernel compilation. This is different from kernel 2.4.0! Here version
390 4.0 or later of the driver must be used for kernel 2.4.0 or later. Version
391 4.0 or later does not work together with older kernels! Driver versions
392 older than 4.0 do not work together with kernel 2.4.0 or later. They work
393 on all older kernels.
394
395 3 Code History
396 --------------
397 Jan 15 1996: First public release.
398 - Martin Kolinek
399
400 Jan 23 1996: Scrapped code which reassigned scsi devices to logical
401 device numbers. Instead, the existing assignment (created
402 when the machine is powered-up or rebooted) is used.
403 A side effect is that the upper layer of Linux SCSI
404 device driver gets bogus scsi ids (this is benign),
405 and also the hard disks are ordered under Linux the
406 same way as they are under dos (i.e., C: disk is sda,
407 D: disk is sdb, etc.).
408 - Martin Kolinek
409
410 I think that the CD-ROM is now detected only if a CD is
411 inside CD_ROM while Linux boots. This can be fixed later,
412 once the driver works on all types of PS/2's.
413 - Martin Kolinek
414
415 Feb 7 1996: Modified biosparam function. Fixed the CD-ROM detection.
416 For now, devices other than harddisk and CD_ROM are
417 ignored. Temporarily modified abort() function
418 to behave like reset().
419 - Martin Kolinek
420
421 Mar 31 1996: The integrated scsi subsystem is correctly found
422 in PS/2 models 56,57, but not in model 76. Therefore
423 the ibmmca_scsi_setup() function has been added today.
424 This function allows the user to force detection of
425 scsi subsystem. The kernel option has format
426 ibmmcascsi=n
427 where n is the scsi_id (pun) of the subsystem. Most likely, n is 7.
428 - Martin Kolinek
429
430 Aug 21 1996: Modified the code which maps ldns to (pun,0). It was
431 insufficient for those of us with CD-ROM changers.
432 - Chris Beauregard
433
434 Dec 14 1996: More improvements to the ldn mapping. See check_devices
435 for details. Did more fiddling with the integrated SCSI detection,
436 but I think it's ultimately hopeless without actually testing the
437 model of the machine. The 56, 57, 76 and 95 (ultimedia) all have
438 different integrated SCSI register configurations. However, the 56
439 and 57 are the only ones that have problems with forced detection.
440 - Chris Beauregard
441
442 Mar 8-16 1997: Modified driver to run as a module and to support
443 multiple adapters. A structure, called ibmmca_hostdata, is now
444 present, containing all the variables, that were once only
445 available for one single adapter. The find_subsystem-routine has vanished.
446 The hardware recognition is now done in ibmmca_detect directly.
447 This routine checks for presence of MCA-bus, checks the interrupt
448 level and continues with checking the installed hardware.
449 Certain PS/2-models do not recognize a SCSI-subsystem automatically.
450 Hence, the setup defined by command-line-parameters is checked first.
451 Thereafter, the routine probes for an integrated SCSI-subsystem.
452 Finally, adapters are checked. This method has the advantage to cover all
453 possible combinations of multiple SCSI-subsystems on one MCA-board. Up to
454 eight SCSI-subsystems can be recognized and announced to the upper-level
455 drivers with this improvement. A set of defines made changes to other
456 routines as small as possible.
457 - Klaus Kudielka
458
459 May 30 1997: (v1.5b)
460 1) SCSI-command capability enlarged by the recognition of MODE_SELECT.
461 This needs the RD-Bit to be disabled on IM_OTHER_SCSI_CMD_CMD which
462 allows data to be written from the system to the device. It is a
463 necessary step to be allowed to set blocksize of SCSI-tape-drives and
464 the tape-speed, whithout confusing the SCSI-Subsystem.
465 2) The recognition of a tape is included in the check_devices routine.
466 This is done by checking for TYPE_TAPE, that is already defined in
467 the kernel-scsi-environment. The markup of a tape is done in the
468 global ldn_is_tape[] array. If the entry on index ldn
469 is 1, there is a tapedrive connected.
470 3) The ldn_is_tape[] array is necessary to distinguish between tape- and
471 other devices. Fixed blocklength devices should not cause a problem
472 with the SCB-command for read and write in the ibmmca_queuecommand
473 subroutine. Therefore, I only derivate the READ_XX, WRITE_XX for
474 the tape-devices, as recommended by IBM in this Technical Reference,
475 mentioned below. (IBM recommends to avoid using the read/write of the
476 subsystem, but the fact was, that read/write causes a command error from
477 the subsystem and this causes kernel-panic.)
478 4) In addition, I propose to use the ldn instead of a fix char for the
479 display of PS2_DISK_LED_ON(). On 95, one can distinguish between the
480 devices that are accessed. It shows activity and easyfies debugging.
481 The tape-support has been tested with a SONY SDT-5200 and a HP DDS-2
482 (I do not know yet the type). Optimization and CD-ROM audio-support,
483 I am working on ...
484 - Michael Lang
485
486 June 19 1997: (v1.6b)
487 1) Submitting the extra-array ldn_is_tape[] -> to the local ld[]
488 device-array.
489 2) CD-ROM Audio-Play seems to work now.
490 3) When using DDS-2 (120M) DAT-Tapes, mtst shows still density-code
491 0x13 for ordinary DDS (61000 BPM) instead 0x24 for DDS-2. This appears
492 also on Adaptec 2940 adaptor in a PCI-System. Therefore, I assume that
493 the problem is independent of the low-level-driver/bus-architecture.
494 4) Hexadecimal ldn on PS/2-95 LED-display.
495 5) Fixing of the PS/2-LED on/off that it works right with tapedrives and
496 does not confuse the disk_rw_in_progress counter.
497 - Michael Lang
498
499 June 21 1997: (v1.7b)
500 1) Adding of a proc_info routine to inform in /proc/scsi/ibmmca/<host> the
501 outer-world about operational load statistics on the different ldns,
502 seen by the driver. Everybody that has more than one IBM-SCSI should
503 test this, because I only have one and cannot see what happens with more
504 than one IBM-SCSI hosts.
505 2) Definition of a driver version-number to have a better recognition of
506 the source when there are existing too much releases that may confuse
507 the user, when reading about release-specific problems. Up to know,
508 I calculated the version-number to be 1.7. Because we are in BETA-test
509 yet, it is today 1.7b.
510 3) Sorry for the heavy bug I programmed on June 19 1997! After that, the
511 CD-ROM did not work any more! The C7-command was a fake impression
512 I got while programming. Now, the READ and WRITE commands for CD-ROM are
513 no longer running over the subsystem, but just over
514 IM_OTHER_SCSI_CMD_CMD. On my observations (PS/2-95), now CD-ROM mounts
515 much faster(!) and hopefully all fancy multimedia-functions, like direct
516 digital recording from audio-CDs also work. (I tried it with cdda2wav
517 from the cdwtools-package and it filled up the harddisk immediately :-).)
518 To easify boolean logics, a further local device-type in ld[], called
519 is_cdrom has been included.
520 4) If one uses a SCSI-device of unsupported type/commands, one
521 immediately runs into a kernel-panic caused by Command Error. To better
522 understand which SCSI-command caused the problem, I extended this
523 specific panic-message slightly.
524 - Michael Lang
525
526 June 25 1997: (v1.8b)
527 1) Some cosmetical changes for the handling of SCSI-device-types.
528 Now, also CD-Burners / WORMs and SCSI-scanners should work. For
529 MO-drives I have no experience, therefore not yet supported.
530 In logical_devices I changed from different type-variables to one
531 called 'device_type' where the values, corresponding to scsi.h,
532 of a SCSI-device are stored.
533 2) There existed a small bug, that maps a device, coming after a SCSI-tape
534 wrong. Therefore, e.g. a CD-ROM changer would have been mapped wrong
535 -> problem removed.
536 3) Extension of the logical_device structure. Now it contains also device,
537 vendor and revision-level of a SCSI-device for internal usage.
538 - Michael Lang
539
540 June 26-29 1997: (v2.0b)
541 1) The release number 2.0b is necessary because of the completely new done
542 recognition and handling of SCSI-devices with the adapter. As I got
543 from Chris the hint, that the subsystem can reassign ldns dynamically,
544 I remembered this immediate_assign-command, I found once in the handbook.
545 Now, the driver first kills all ldn assignments that are set by default
546 on the SCSI-subsystem. After that, it probes on all puns and luns for
547 devices by going through all combinations with immediate_assign and
548 probing for devices, using device_inquiry. The found physical(!) pun,lun
549 structure is stored in get_scsi[][] as device types. This is followed
550 by the assignment of all ldns to existing SCSI-devices. If more ldns
551 than devices are available, they are assigned to non existing pun,lun
552 combinations to satisfy the adapter. With this, the dynamical mapping
553 was possible to implement. (For further info see the text in the
554 source-code and in the description below. Read the description
555 below BEFORE installing this driver on your system!)
556 2) Changed the name IBMMCA_DRIVER_VERSION to IBMMCA_SCSI_DRIVER_VERSION.
557 3) The LED-display shows on PS/2-95 no longer the ldn, but the SCSI-ID
558 (pun) of the accessed SCSI-device. This is now senseful, because the
559 pun known within the driver is exactly the pun of the physical device
560 and no longer a fake one.
561 4) The /proc/scsi/ibmmca/<host_no> consists now of the first part, where
562 hit-statistics of ldns is shown and a second part, where the maps of
563 physical and logical SCSI-devices are displayed. This could be very
564 interesting, when one is using more than 15 SCSI-devices in order to
565 follow the dynamical remapping of ldns.
566 - Michael Lang
567
568 June 26-29 1997: (v2.0b-1)
569 1) I forgot to switch the local_checking_phase_flag to 1 and back to 0
570 in the dynamical remapping part in ibmmca_queuecommand for the
571 device_exist routine. Sorry.
572 - Michael Lang
573
574 July 1-13 1997: (v3.0b,c)
575 1) Merging of the driver-developments of Klaus Kudielka and Michael Lang
576 in order to get a optimum and unified driver-release for the
577 IBM-SCSI-Subsystem-Adapter(s).
578 For people, using the Kernel-release >=2.1.0, module-support should
579 be no problem. For users, running under <2.1.0, module-support may not
580 work, because the methods have changed between 2.0.x and 2.1.x.
581 2) Added some more effective statistics for /proc-output.
582 3) Change typecasting at necessary points from (unsigned long) to
583 virt_to_bus().
584 4) Included #if... at special points to have specific adaption of the
585 driver to kernel 2.0.x and 2.1.x. It should therefore also run with
586 later releases.
587 5) Magneto-Optical drives and medium-changers are also recognized, now.
588 Therefore, we have a completely gapfree recognition of all SCSI-
589 device-types, that are known by Linux up to kernel 2.1.31.
590 6) The flag SCSI_IBMMCA_DEV_RESET has been inserted. If it is set within
591 the configuration, each connected SCSI-device will get a reset command
592 during boottime. This can be necessary for some special SCSI-devices.
593 This flag should be included in Config.in.
594 (See also the new Config.in file.)
595 Probable next improvement: bad disk handler.
596 - Michael Lang
597
598 Sept 14 1997: (v3.0c)
599 1) Some debugging and speed optimization applied.
600 - Michael Lang
601
602 Dec 15, 1997
603 - chrisb@truespectra.com
604 - made the front panel display thingy optional, specified from the
605 command-line via ibmmcascsi=display. Along the lines of the /LED
606 option for the OS/2 driver.
607 - fixed small bug in the LED display that would hang some machines.
608 - reversed ordering of the drives (using the
609 IBMMCA_SCSI_ORDER_STANDARD define). This is necessary for two main
610 reasons:
611 - users who've already installed Linux won't be screwed. Keep
612 in mind that not everyone is a kernel hacker.
613 - be consistent with the BIOS ordering of the drives. In the
614 BIOS, id 6 is C:, id 0 might be D:. With this scheme, they'd be
615 backwards. This confuses the crap out of those heathens who've
616 got a impure Linux installation (which, <wince>, I'm one of).
617 This whole problem arises because IBM is actually non-standard with
618 the id to BIOS mappings. You'll find, in fdomain.c, a similar
619 comment about a few FD BIOS revisions. The Linux (and apparently
620 industry) standard is that C: maps to scsi id (0,0). Let's stick
621 with that standard.
622 - Since this is technically a branch of my own, I changed the
623 version number to 3.0e-cpb.
624
625 Jan 17, 1998: (v3.0f)
626 1) Addition of some statistical info for /proc in proc_info.
627 2) Taking care of the SCSI-assignment problem, dealed by Chris at Dec 15
628 1997. In fact, IBM is right, concerning the assignment of SCSI-devices
629 to driveletters. It is conform to the ANSI-definition of the SCSI-
630 standard to assign drive C: to SCSI-id 6, because it is the highest
631 hardware priority after the hostadapter (that has still today by
632 default everywhere id 7). Also realtime-operating systems that I use,
633 like LynxOS and OS9, which are quite industrial systems use top-down
634 numbering of the harddisks, that is also starting at id 6. Now, one
635 sits a bit between two chairs. On one hand side, using the define
636 IBMMCA_SCSI_ORDER_STANDARD makes Linux assigning disks conform to
637 the IBM- and ANSI-SCSI-standard and keeps this driver downward
638 compatible to older releases, on the other hand side, people is quite
639 habituated in believing that C: is assigned to (0,0) and much other
640 SCSI-BIOS do so. Therefore, I moved the IBMMCA_SCSI_ORDER_STANDARD
641 define out of the driver and put it into Config.in as subitem of
642 'IBM SCSI support'. A help, added to Documentation/Configure.help
643 explains the differences between saying 'y' or 'n' to the user, when
644 IBMMCA_SCSI_ORDER_STANDARD prompts, so the ordinary user is enabled to
645 choose the way of assignment, depending on his own situation and gusto.
646 3) Adapted SCSI_IBMMCA_DEV_RESET to the local naming convention, so it is
647 now called IBMMCA_SCSI_DEV_RESET.
648 4) Optimization of proc_info and its subroutines.
649 5) Added more in-source-comments and extended the driver description by
650 some explanation about the SCSI-device-assignment problem.
651 - Michael Lang
652
653 Jan 18, 1998: (v3.0g)
654 1) Correcting names to be absolutely conform to the later 2.1.x releases.
655 This is necessary for
656 IBMMCA_SCSI_DEV_RESET -> CONFIG_IBMMCA_SCSI_DEV_RESET
657 IBMMCA_SCSI_ORDER_STANDARD -> CONFIG_IBMMCA_SCSI_ORDER_STANDARD
658 - Michael Lang
659
660 Jan 18, 1999: (v3.1 MCA-team internal)
661 1) The multiple hosts structure is accessed from every subroutine, so there
662 is no longer the address of the device structure passed from function
663 to function, but only the hostindex. A call by value, nothing more. This
664 should really be understood by the compiler and the subsystem should get
665 the right values and addresses.
666 2) The SCSI-subsystem detection was not complete and quite hugely buggy up
667 to now, compared to the technical manual. The interpretation of the pos2
668 register is not as assumed by people before, therefore, I dropped a note
669 in the ibmmca_detect function to show the registers' interpretation.
670 The pos-registers of integrated SCSI-subsystems do not contain any
671 information concerning the IO-port offset, really. Instead, they contain
672 some info about the adapter, the chip, the NVRAM .... The I/O-port is
673 fixed to 0x3540 - 0x3547. There can be more than one adapters in the
674 slots and they get an offset for the I/O area in order to get their own
675 I/O-address area. See chapter 2 for detailed description. At least, the
676 detection should now work right, even on models other than 95. The 95ers
677 came happily around the bug, as their pos2 register contains always 0
678 in the critical area. Reserved bits are not allowed to be interpreted,
679 therefore, IBM is allowed to set those bits as they like and they may
680 really vary between different PS/2 models. So, now, no interpretation
681 of reserved bits - hopefully no trouble here anymore.
682 3) The command error, which you may get on models 55, 56, 57, 70, 77 and
683 P70 may have been caused by the fact, that adapters of older design do
684 not like sending commands to non-existing SCSI-devices and will react
685 with a command error as a sign of protest. While this error is not
686 present on IBM SCSI Adapter w/cache, it appears on IBM Integrated SCSI
687 Adapters. Therefore, I implemented a workarround to forgive those
688 adapters their protests, but it is marked up in the statisctis, so
689 after a successful boot, you can see in /proc/scsi/ibmmca/<host_number>
690 how often the command errors have been forgiven to the SCSI-subsystem.
691 If the number is bigger than 0, you have a SCSI subsystem of older
692 design, what should no longer matter.
693 4) ibmmca_getinfo() has been adapted very carefully, so it shows in the
694 slotn file really, what is senseful to be presented.
695 5) ibmmca_register() has been extended in its parameter list in order to
696 pass the right name of the SCSI-adapter to Linux.
697 - Michael Lang
698
699 Feb 6, 1999: (v3.1)
700 1) Finally, after some 3.1Beta-releases, the 3.1 release. Sorry, for
701 the delayed release, but it was not finished with the release of
702 Kernel 2.2.0.
703 - Michael Lang
704
705 Feb 10, 1999 (v3.1)
706 1) Added a new commandline parameter called 'bypass' in order to bypass
707 every integrated subsystem SCSI-command consequently in case of
708 troubles.
709 2) Concatenated read_capacity requests to the harddisks. It gave a lot
710 of troubles with some controllers and after I wanted to apply some
711 extensions, it jumped out in the same situation, on my w/cache, as like
712 on D. Weinehalls' Model 56, having integrated SCSI. This gave me the
713 descissive hint to move the code-part out and declare it global. Now,
714 it seems to work by far much better an more stable. Let us see, what
715 the world thinks of it...
716 3) By the way, only Sony DAT-drives seem to show density code 0x13. A
717 test with a HP drive gave right results, so the problem is vendor-
718 specific and not a problem of the OS or the driver.
719 - Michael Lang
720
721 Feb 18, 1999 (v3.1d)
722 1) The abort command and the reset function have been checked for
723 inconsistencies. From the logical point of thinking, they work
724 at their optimum, now, but as the subsystem does not answer with an
725 interrupt, abort never finishes, sigh...
726 2) Everything, that is accessed by a busmaster request from the adapter
727 is now declared as global variable, even the return-buffer in the
728 local checking phase. This assures, that no accesses to undefined memory
729 areas are performed.
730 3) In ibmmca.h, the line unchecked_isa_dma is added with 1 in order to
731 avoid memory-pointers for the areas higher than 16MByte in order to
732 be sure, it also works on 16-Bit Microchannel bus systems.
733 4) A lot of small things have been found, but nothing that endangered the
734 driver operations. Just it should be more stable, now.
735 - Michael Lang
736
737 Feb 20, 1999 (v3.1e)
738 1) I took the warning from the Linux Kernel Hackers Guide serious and
739 checked the cmd->result return value to the done-function very carefully.
740 It is obvious, that the IBM SCSI only delivers the tsb.dev_status, if
741 some error appeared, else it is undefined. Now, this is fixed. Before
742 any SCB command gets queued, the tsb.dev_status is set to 0, so the
743 cmd->result won't screw up Linux higher level drivers.
744 2) The reset-function has slightly improved. This is still planed for
745 abort. During the abort and the reset function, no interrupts are
746 allowed. This is however quite hard to cope with, so the INT-status
747 register is read. When the interrupt gets queued, one can find its
748 status immediately on that register and is enabled to continue in the
749 reset function. I had no chance to test this really, only in a bogus
750 situation, I got this function running, but the situation was too much
751 worse for Linux :-(, so tests will continue.
752 3) Buffers got now consistent. No open address mapping, as before and
753 therefore no further troubles with the unassigned memory segmentation
754 faults that scrambled probes on 95XX series and even on 85XX series,
755 when the kernel is done in a not so perfectly fitting way.
756 4) Spontaneous interrupts from the subsystem, appearing without any
757 command previously queued are answered with a DID_BAD_INTR result.
758 5) Taken into account ZP Gus' proposals to reverse the SCSI-device
759 scan order. As it does not work on Kernel 2.1.x or 2.2.x, as proposed
760 by him, I implemented it in a slightly derived way, which offers in
761 addition more flexibility.
762 - Michael Lang
763
764 Apr 23, 2000 (v3.2pre1)
765 1) During a very long time, I collected a huge amount of bugreports from
766 various people, trying really quite different things on their SCSI-
767 PS/2s. Today, all these bugreports are taken into account and should be
768 mostly solved. The major topics were:
769 - Driver crashes during boottime by no obvious reason.
770 - Driver panics while the midlevel-SCSI-driver is trying to inquire
771 the SCSI-device properties, even though hardware is in perfect state.
772 - Displayed info for the various slot-cards is interpreted wrong.
773 The main reasons for the crashes were two:
774 1) The commands to check for device information like INQUIRY,
775 TEST_UNIT_READY, REQUEST_SENSE and MODE_SENSE cause the devices
776 to deliver information of up to 255 bytes. Midlevel drivers offer
777 1024 bytes of space for the answer, but the IBM-SCSI-adapters do
778 not accept this, as they stick quite near to ANSI-SCSI and report
779 a COMMAND_ERROR message which causes the driver to panic. The main
780 problem was located around the INQUIRY command. Now, for all the
781 mentioned commands, the buffersize, sent to the adapter is at
782 maximum 255 which seems to be a quite reasonable solution.
783 TEST_UNIT_READY gets a buffersize of 0 to make sure, that no
784 data is transferred in order to avoid any possible command failure.
785 2) On unsuccessful TEST_UNIT_READY, the midlevel-driver has to send
786 a REQUEST_SENSE in order to see, where the problem is located. This
787 REQUEST_SENSE may have various length in its answer-buffer. IBM
788 SCSI-subsystems report a command failure, if the returned buffersize
789 is different from the sent buffersize, but this can be supressed by
790 a special bit, which is now done and problems seem to be solved.
791 2) Code adaption to all kernel-releases. Now, the 3.2 code compiles on
792 2.0.x, 2.1.x, 2.2.x and 2.3.x kernel releases without any code-changes.
793 3) Commandline-parameters are recognized again, even under Kernel 2.3.x or
794 higher.
795 - Michael Lang
796
797 April 27, 2000 (v3.2pre2)
798 1) Bypassed commands get read by the adapter by one cycle instead of two.
799 This increases SCSI-performance.
800 2) Synchronous datatransfer is provided for sure to be 5 MHz on older
801 SCSI and 10 MHz on internal F/W SCSI-adapter.
802 3) New commandline parameters allow to force the adapter to slow down while
803 in synchronous transfer. Could be helpful for very old devices.
804 - Michael Lang
805
806 June 2, 2000 (v3.2pre5)
807 1) Added Jim Shorney's contribution to make the activity indicator
808 flashing in addition to the LED-alphanumeric display-panel on
809 models 95A. To be enabled to choose this feature freely, a new
810 commandline parameter is added, called 'activity'.
811 2) Added the READ_CONTROL bit for test_unit_ready SCSI-command.
812 3) Added some suppress_exception bits to read_device_capacity and
813 all device_inquiry occurrences in the driver code.
814 4) Complaints about the various KERNEL_VERSION implementations are
815 taken into account. Every local_LinuxKernelVersion occurrence is
816 now replaced by KERNEL_VERSION, defined in linux/version.h.
817 Corresponding changes were applied to ibmmca.h, too. This was a
818 contribution to all kernel-parts by Philipp Hahn.
819 - Michael Lang
820
821 July 17, 2000 (v3.2pre8)
822 A long period of collecting bugreports from all corners of the world
823 now lead to the following corrections to the code:
824 1) SCSI-2 F/W support crashed with a COMMAND ERROR. The reason for this
825 was, that it is possible to disbale Fast-SCSI for the external bus.
826 The feature-control command, where this crash appeared regularly tried
827 to set the maximum speed of 10MHz synchronous transfer speed and that
828 reports a COMMAND ERROR, if external bus Fast-SCSI is disabled. Now,
829 the feature-command probes down from maximum speed until the adapter
830 stops to complain, which is at the same time the maximum possible
831 speed selected in the reference program. So, F/W external can run at
832 5 MHz (slow-) or 10 MHz (fast-SCSI). During feature probing, the
833 COMMAND ERROR message is used to detect if the adapter does not complain.
834 2) Up to now, only combined busmode is supported, if you use external
835 SCSI-devices, attached to the F/W-controller. If dual bus is selected,
836 only the internal SCSI-devices get accessed by Linux. For most
837 applications, this should do fine.
838 3) Wide-SCSI-addressing (16-Bit) is now possible for the internal F/W
839 bus on the F/W adapter. If F/W adapter is detected, the driver
840 automatically uses the extended PUN/LUN <-> LDN mapping tables, which
841 are now new from 3.2pre8. This allows PUNs between 0 and 15 and should
842 provide more fun with the F/W adapter.
843 4) Several machines use the SCSI: POS registers for internal/undocumented
844 storage of system relevant info. This confused the driver, mainly on
845 models 9595, as it expected no onboard SCSI only, if all POS in
846 the integrated SCSI-area are set to 0x00 or 0xff. Now, the mechanism
847 to check for integrated SCSI is much more restrictive and these problems
848 should be history.
849 - Michael Lang
850
851 July 18, 2000 (v3.2pre9)
852 This develop rather quickly at the moment. Two major things were still
853 missing in 3.2pre8:
854 1) The adapter PUN for F/W adapters has 4-bits, while all other adapters
855 have 3-bits. This is now taken into account for F/W.
856 2) When you select CONFIG_IBMMCA_SCSI_ORDER_STANDARD, you should
857 normally get the inverse probing order of your devices on the SCSI-bus.
858 The ANSI device order gets scrambled in version 3.2pre8!! Now, a new
859 and tested algorithm inverts the device-order on the SCSI-bus and
860 automatically avoids accidental access to whatever SCSI PUN the adapter
861 is set and works with SCSI- and Wide-SCSI-addressing.
862 - Michael Lang
863
864 July 23, 2000 (v3.2pre10 unpublished)
865 1) LED panel display supports wide-addressing in ibmmca=display mode.
866 2) Adapter-information and autoadaption to address-space is done.
867 3) Auto-probing for maximum synchronous SCSI transfer rate is working.
868 4) Optimization to some embedded function calls is applied.
869 5) Added some comment for the user to wait for SCSI-devices being probed.
870 6) Finished version 3.2 for Kernel 2.4.0. It least, I thought it is but...
871 - Michael Lang
872
873 July 26, 2000 (v3.2pre11)
874 1) I passed a horrible weekend getting mad with NMIs on kernel 2.2.14 and
875 a model 9595. Asking around in the community, nobody except of me has
876 seen such errors. Weired, but I am trying to recompile everything on
877 the model 9595. Maybe, as I use a specially modified gcc, that could
878 cause problems. But, it was not the reason. The true background was,
879 that the kernel was compiled for i386 and the 9595 has a 486DX-2.
880 Normally, no troubles should appear, but for this special machine,
881 only the right processor support is working fine!
882 2) Previous problems with synchronous speed, slowing down from one adapter
883 to the next during probing are corrected. Now, local variables store
884 the synchronous bitmask for every single adapter found on the MCA bus.
885 3) LED alphanumeric panel support for XX95 systems is now showing some
886 alive rotator during boottime. This makes sense, when no monitor is
887 connected to the system. You can get rid of all display activity, if
888 you do not use any parameter or just ibmmcascsi=activity, for the
889 harddrive activity LED, existant on all PS/2, except models 8595-XXX.
890 If no monitor is available, please use ibmmcascsi=display, which works
891 fine together with the linuxinfo utility for the LED-panel.
892 - Michael Lang
893
894 July 29, 2000 (v3.2)
895 1) Submission of this driver for kernel 2.4test-XX and 2.2.17.
896 - Michael Lang
897
898 December 28, 2000 (v3.2d / v4.0)
899 1) The interrupt handler had some wrong statement to wait for. This
900 was done due to experimental reasons during 3.2 development but it
901 has shown that this is not stable enough. Going back to wait for the
902 adapter to be not busy is best.
903 2) Inquiry requests can be shorter than 255 bytes of return buffer. Due
904 to a bug in the ibmmca_queuecommand routine, this buffer was forced
905 to 255 at minimum. If the memory address, this return buffer is pointing
906 to does not offer more space, invalid memory accesses destabilized the
907 kernel.
908 3) version 4.0 is only valid for kernel 2.4.0 or later. This is necessary
909 to remove old kernel version dependent waste from the driver. 3.2d is
910 only distributed with older kernels but keeps compatibility with older
911 kernel versions. 4.0 and higher versions cannot be used with older
912 kernels anymore!! You must have at least kernel 2.4.0!!
913 4) The commandline argument 'bypass' and all its functionality got removed
914 in version 4.0. This was never really necessary, as all troubles were
915 based on non-command related reasons up to now, so bypassing commands
916 did not help to avoid any bugs. It is kept in 3.2X for debugging reasons.
917 5) Dynamical reassignment of ldns was again verified and analyzed to be
918 completely inoperational. This is corrected and should work now.
919 6) All commands that get sent to the SCSI adapter were verified and
920 completed in such a way, that they are now completely conform to the
921 demands in the technical description of IBM. Main candidates were the
922 DEVICE_INQUIRY, REQUEST_SENSE and DEVICE_CAPACITY commands. They must
923 be tranferred by bypassing the internal command buffer of the adapter
924 or else the response can be a random result. GET_POS_INFO would be more
925 safe in usage, if one could use the SUPRESS_EXCEPTION_SHORT, but this
926 is not allowed by the technical references of IBM. (Sorry, folks, the
927 model 80 problem is still a task to be solved in a different way.)
928 7) v3.2d is still hold back for some days for testing, while 4.0 is
929 released.
930 - Michael Lang
931
932 January 3, 2001 (v4.0a)
933 1) A lot of complains after the 2.4.0-prerelease kernel came in about
934 the impossibility to compile the driver as a module. This problem is
935 solved. In combination with that problem, some unprecise declaration
936 of the function option_setup() gave some warnings during compilation.
937 This is solved, too by a forward declaration in ibmmca.c.
938 2) #ifdef argument concerning CONFIG_SCSI_IBMMCA is no longer needed and
939 was entirely removed.
940 3) Some switch statements got optimized in code, as some minor variables
941 in internal SCSI-command handlers.
942 - Michael Lang
943
944 4 To do
945 -------
946 - IBM SCSI-2 F/W external SCSI bus support in separate mode!
947 - It seems that the handling of bad disks is really bad -
948 non-existent, in fact. However, a low-level driver cannot help
949 much, if such things happen.
950
951 5 Users' Manual
952 ---------------
953 5.1 Commandline Parameters
954 --------------------------
955 There exist several features for the IBM SCSI-subsystem driver.
956 The commandline parameter format is:
957
958 ibmmcascsi=<command1>,<command2>,<command3>,...
959
960 where commandN can be one of the following:
961
962 display Owners of a model 95 or other PS/2 systems with an
963 alphanumeric LED display may set this to have their
964 display showing the following output of the 8 digits:
965
966 ------DA
967
968 where '-' stays dark, 'D' shows the SCSI-device id
969 and 'A' shows the SCSI hostindex, being currently
970 accessed. During boottime, this will give the message
971
972 SCSIini*
973
974 on the LED-panel, where the * represents a rotator,
975 showing the activity during the probing phase of the
976 driver which can take up to two minutes per SCSI-adapter.
977 adisplay This works like display, but gives more optical overview
978 of the activities on the SCSI-bus. The display will have
979 the following output:
980
981 6543210A
982
983 where the numbers 0 to 6 light up at the shown position,
984 when the SCSI-device is accessed. 'A' shows again the SCSI
985 hostindex. If display nor adisplay is set, the internal
986 PS/2 harddisk LED is used for media-activities. So, if
987 you really do not have a system with a LED-display, you
988 should not set display or adisplay. Keep in mind, that
989 display and adisplay can only be used alternatively. It
990 is not recommended to use this option, if you have some
991 wide-addressed devices e.g. at the SCSI-2 F/W adapter in
992 your system. In addition, the usage of the display for
993 other tasks in parallel, like the linuxinfo-utility makes
994 no sense with this option.
995 activity This enables the PS/2 harddisk LED activity indicator.
996 Most PS/2 have no alphanumeric LED display, but some
997 indicator. So you should use this parameter to activate it.
998 If you own model 9595 (Server95), you can have both, the
999 LED panel and the activity indicator in parallel. However,
1000 some PS/2s, like the 8595 do not have any harddisk LED
1001 activity indicator, which means, that you must use the
1002 alphanumeric LED display if you want to monitor SCSI-
1003 activity.
1004 bypass This is obsolete from driver version 4.0, as the adapters
1005 got that far understood, that the selection between
1006 integrated and bypassed commands should now work completely
1007 correct! For historical reasons, the old description is
1008 kept here:
1009 This commandline parameter forces the driver never to use
1010 SCSI-subsystems' integrated SCSI-command set. Except of
1011 the immediate assign, which is of vital importance for
1012 every IBM SCSI-subsystem to set its ldns right. Instead,
1013 the ordinary ANSI-SCSI-commands are used and passed by the
1014 controller to the SCSI-devices, therefore 'bypass'. The
1015 effort, done by the subsystem is quite bogus and at a
1016 minimum and therefore it should work everywhere. This
1017 could maybe solve troubles with old or integrated SCSI-
1018 controllers and nasty harddisks. Keep in mind, that using
1019 this flag will slow-down SCSI-accesses slightly, as the
1020 software generated commands are always slower than the
1021 hardware. Non-harddisk devices always get read/write-
1022 commands in bypass mode. On the most recent releases of
1023 the Linux IBM-SCSI-driver, the bypass command should be
1024 no longer a necessary thing, if you are sure about your
1025 SCSI-hardware!
1026 normal This is the parameter, introduced on the 2.0.x development
1027 rail by ZP Gu. This parameter defines the SCSI-device
1028 scan order in the new industry standard. This means, that
1029 the first SCSI-device is the one with the lowest pun.
1030 E.g. harddisk at pun=0 is scanned before harddisk at
1031 pun=6, which means, that harddisk at pun=0 gets sda
1032 and the one at pun=6 gets sdb.
1033 ansi The ANSI-standard for the right scan order, as done by
1034 IBM, Microware and Microsoft, scans SCSI-devices starting
1035 at the highest pun, which means, that e.g. harddisk at
1036 pun=6 gets sda and a harddisk at pun=0 gets sdb. If you
1037 like to have the same SCSI-device order, as in DOS, OS-9
1038 or OS/2, just use this parameter.
1039 fast SCSI-I/O in synchronous mode is done at 5 MHz for IBM-
1040 SCSI-devices. SCSI-2 Fast/Wide Adapter/A external bus
1041 should then run at 10 MHz if Fast-SCSI is enabled,
1042 and at 5 MHz if Fast-SCSI is disabled on the external
1043 bus. This is the default setting when nothing is
1044 specified here.
1045 medium Synchronous rate is at 50% approximately, which means
1046 2.5 MHz for IBM SCSI-adapters and 5.0 MHz for F/W ext.
1047 SCSI-bus (when Fast-SCSI speed enabled on external bus).
1048 slow The slowest possible synchronous transfer rate is set.
1049 This means 1.82 MHz for IBM SCSI-adapters and 2.0 MHz
1050 for F/W external bus at Fast-SCSI speed on the external
1051 bus.
1052
1053 A further option is that you can force the SCSI-driver to accept a SCSI-
1054 subsystem at a certain I/O-address with a predefined adapter PUN. This
1055 is done by entering
1056
1057 commandN = I/O-base
1058 commandN+1 = adapter PUN
1059
1060 e.g. ibmmcascsi=0x3540,7 will force the driver to detect a SCSI-subsystem
1061 at I/O-address 0x3540 with adapter PUN 7. Please only use this method, if
1062 the driver does really not recognize your SCSI-adapter! With driver version
1063 3.2, this recognition of various adapters was hugely improved and you
1064 should try first to remove your commandline arguments of such type with a
1065 newer driver. I bet, it will be recognized correctly. Even multiple and
1066 different types of IBM SCSI-adapters should be recognized correctly, too.
1067 Use the forced detection method only as last solution!
1068
1069 Examples:
1070
1071 ibmmcascsi=adisplay
1072
1073 This will use the advanced display mode for the model 95 LED alphanumeric
1074 display.
1075
1076 ibmmcascsi=display,0x3558,7
1077
1078 This will activate the default display mode for the model 95 LED display
1079 and will force the driver to accept a SCSI-subsystem at I/O-base 0x3558
1080 with adapter PUN 7.
1081
1082 5.2 Troubleshooting
1083 -------------------
1084 The following FAQs should help you to solve some major problems with this
1085 driver.
1086
1087 Q: "Reset SCSI-devices at boottime" halts the system at boottime, why?
1088 A: This is only tested with the IBM SCSI Adapter w/cache. It is not
1089 yet prooved to run on other adapters, however you may be lucky.
1090 In version 3.1d this has been hugely improved and should work better,
1091 now. Normally you really won't need to activate this flag in the
1092 kernel configuration, as all post 1989 SCSI-devices should accept
1093 the reset-signal, when the computer is switched on. The SCSI-
1094 subsystem generates this reset while being initialized. This flag
1095 is really reserved for users with very old, very strange or self-made
1096 SCSI-devices.
1097 Q: Why is the SCSI-order of my drives mirrored to the device-order
1098 seen from OS/2 or DOS ?
1099 A: It depends on the operating system, if it looks at the devices in
1100 ANSI-SCSI-standard (starting from pun 6 and going down to pun 0) or
1101 if it just starts at pun 0 and counts up. If you want to be conform
1102 with OS/2 and DOS, you have to activate this flag in the kernel
1103 configuration or you should set 'ansi' as parameter for the kernel.
1104 The parameter 'normal' sets the new industry standard, starting
1105 from pun 0, scanning up to pun 6. This allows you to change your
1106 opinion still after having already compiled the kernel.
1107 Q: Why I cannot find the IBM MCA SCSI support in the config menue?
1108 A: You have to activate MCA bus support, first.
1109 Q: Where can I find the latest info about this driver?
1110 A: See the file MAINTAINERS for the current WWW-address, which offers
1111 updates, info and Q/A lists. At this files' origin, the webaddress
1112 was: http://www.uni-mainz.de/~langm000/linux.html
1113 Q: My SCSI-adapter is not recognized by the driver, what can I do?
1114 A: Just force it to be recognized by kernel parameters. See section 5.1.
1115 If this really happens, do also send e-mail to the maintainer, as
1116 forced detection should be never necessary. Forced detection is in
1117 principal some flaw of the driver adapter detection and goes into
1118 bugreports.
1119 Q: The driver screws up, if it starts to probe SCSI-devices, is there
1120 some way out of it?
1121 A: Yes, that was some recognition problem of the correct SCSI-adapter
1122 and its I/O base addresses. Upgrade your driver to the latest release
1123 and it should be fine again.
1124 Q: I get a message: panic IBM MCA SCSI: command error .... , what can
1125 I do against this?
1126 A: Previously, I followed the way by ignoring command errors by using
1127 ibmmcascsi=forgiveall, but this command no longer exists and is
1128 obsolete. If such a problem appears, it is caused by some segmentation
1129 fault of the driver, which maps to some unallowed area. The latest
1130 version of the driver should be ok, as most bugs have been solved.
1131 Q: There are still kernel panics, even after having set
1132 ibmmcascsi=forgiveall. Are there other possibilities to prevent
1133 such panics?
1134 A: No, get just the latest release of the driver and it should work
1135 better and better with increasing version number. Forget about this
1136 ibmmcascsi=forgiveall, as also ignorecmd are obsolete.!
1137 Q: Linux panics or stops without any comment, but it is probable, that my
1138 harddisk(s) have bad blocks.
1139 A: Sorry, the bad-block handling is still a feeble point of this driver,
1140 but is on the schedule for development in the near future.
1141 Q: Linux panics while dynamically assigning SCSI-ids or ldns.
1142 A: If you disconnect a SCSI-device from the machine, while Linux is up
1143 and the driver uses dynamical reassignment of logical device numbers
1144 (ldn), it really gets "angry" if it won't find devices, that were still
1145 present at boottime and stops Linux.
1146 Q: The system does not recover after an abort-command has been generated.
1147 A: This is regrettably true, as it is not yet understood, why the
1148 SCSI-adapter does really NOT generate any interrupt at the end of
1149 the abort-command. As no interrupt is generated, the abort command
1150 cannot get finished and the system hangs, sorry, but checks are
1151 running to hunt down this problem. If there is a real pending command,
1152 the interrupt MUST get generated after abort. In this case, it
1153 should finish well.
1154 Q: The system gets in bad shape after a SCSI-reset, is this known?
1155 A: Yes, as there are a lot of prescriptions (see the Linux Hackers'
1156 Guide) what has to be done for reset, we still share the bad shape of
1157 the reset functions with all other low level SCSI-drivers.
1158 Astonishingly, reset works in most cases quite ok, but the harddisks
1159 won't run in synchonous mode anymore after a reset, until you reboot.
1160 Q: Why does my XXX w/Cache adapter not use read-prefetch?
1161 A: Ok, that is not completely possible. If a cache is present, the
1162 adapter tries to use it internally. Explicitly, one can use the cache
1163 with a read prefetch command, maybe in future, but this requires
1164 some major overhead of SCSI-commands that risks the performance to
1165 go down more than it gets improved. Tests with that are running.
1166 Q: I have a IBM SCSI-2 Fast/Wide adapter, it boots in some way and hangs.
1167 A: Yes, that is understood, as for sure, your SCSI-2 Fast/Wide adapter
1168 was in such a case recognized as integrated SCSI-adapter or something
1169 else, but not as the correct adapter. As the I/O-ports get assigned
1170 wrongly by that reason, the system should crash in most cases. You
1171 should upgrade to the latest release of the SCSI-driver. The
1172 recommended version is 3.2 or later. Here, the F/W support is in
1173 a stable and reliable condition. Wide-addressing is in addition
1174 supported.
1175 Q: I get a Ooops message and something like "killing interrupt".
1176 A: The reason for this is that the IBM SCSI-subsystem only sends a
1177 termination status back, if some error appeared. In former releases
1178 of the driver, it was not checked, if the termination status block
1179 is NULL. From version 3.2, it is taken care of this.
1180 Q: I have a F/W adapter and the driver sees my internal SCSI-devices,
1181 but ignores the external ones.
1182 A: Select combined busmode in the IBM config-program and check for that
1183 no SCSI-id on the external devices appears on internal devices.
1184 Reboot afterwards. Dual busmode is supported, but works only for the
1185 internal bus, yet. External bus is still ignored. Take care for your
1186 SCSI-ids. If combined bus-mode is activated, on some adapters,
1187 the wide-addressing is not possible, so devices with ids between 8
1188 and 15 get ignored by the driver & adapter!
1189 Q: I have a 9595 and I get a NMI during heavy SCSI I/O e.g. during fsck.
1190 A COMMAND ERROR is reported and characters on the screen are missing.
1191 Warm reboot is not possible. Things look like quite weired.
1192 A: Check the processor type of your 9595. If you have an 80486 or 486DX-2
1193 processor complex on your mainboard and you compiled a kernel that
1194 supports 80386 processors, it is possible, that the kernel cannot
1195 keep track of the PS/2 interrupt handling and stops on an NMI. Just
1196 compile a kernel for the correct processor type of your PS/2 and
1197 everything should be fine. This is necessary even if one assumes,
1198 that some 80486 system should be downward compatible to 80386
1199 software.
1200 Q: Some commands hang and interrupts block the machine. After some
1201 timeout, the syslog reports that it tries to call abort, but the
1202 machine is frozen.
1203 A: This can be a busy wait bug in the interrupt handler of driver
1204 version 3.2. You should at least upgrade to 3.2c if you use
1205 kernel < 2.4.0 and driver version 4.0 if you use kernel 2.4.0 or
1206 later (including all test releases).
1207 Q: I have a PS/2 model 80 and more than 16 MBytes of RAM. The driver
1208 completely refuses to work, reports NMIs, COMMAND ERRORs or other
1209 ambiguous stuff. When reducing the RAM size down below 16 MB,
1210 everything is running smoothly.
1211 A: No real answer, yet. In any case, one should force the kernel to
1212 present SCBs only below the 16 MBytes barrier. Maybe this solves the
1213 problem. Not yet tried, but guessing that it could work. To get this,
1214 set unchecked_isa_dma argument of ibmmca.h from 0 to 1.
1215
1216 5.3 Bugreports
1217 --------------
1218 If you really find bugs in the sourcecode or the driver will successfully
1219 refuse to work on your machine, you should send a bug report to me. The
1220 best for this is to follow the instructions on the WWW-page for this
1221 driver. Fill out the bug-report form, placed on the WWW-page and ship it,
1222 so the bugs can be taken into account with maximum efforts. But, please
1223 do not send bug reports about this driver to Linus Torvalds or Leonard
1224 Zubkoff, as Linus is burried in E-Mail and Leonard is supervising all
1225 SCSI-drivers and won't have the time left to look inside every single
1226 driver to fix a bug and especially DO NOT send modified code to Linus
1227 Torvalds or Alan J. Cox which has not been checked here!!! They are both
1228 quite burried in E-mail (as me, sometimes, too) and one should first check
1229 for problems on my local teststand. Recently, I got a lot of
1230 bugreports for errors in the ibmmca.c code, which I could not imagine, but
1231 a look inside some Linux-distribution showed me quite often some modified
1232 code, which did no longer work on most other machines than the one of the
1233 modifier. Ok, so now that there is maintenance service available for this
1234 driver, please use this address first in order to keep the level of
1235 confusion low. Thank you!
1236
1237 When you get a SCSI-error message that panics your system, a list of
1238 register-entries of the SCSI-subsystem is shown (from Version 3.1d). With
1239 this list, it is very easy for the maintainer to localize the problem in
1240 the driver or in the configuration of the user. Please write down all the
1241 values from this report and send them to the maintainer. This would really
1242 help a lot and makes life easier concerning misunderstandings.
1243
1244 Use the bug-report form (see 5.4 for its address) to send all the bug-
1245 stuff to the maintainer or write e-mail with the values from the table.
1246
1247 5.4 Support WWW-page
1248 --------------------
1249 The address of the IBM SCSI-subsystem supporting WWW-page is:
1250
1251 http://www.uni-mainz.de/~langm000/linux.html
1252
1253 Here you can find info about the background of this driver, patches,
1254 troubleshooting support, news and a bugreport form. Please check that
1255 WWW-page regularly for latest hints. If ever this URL changes, please
1256 refer to the MAINTAINERS file in order to get the latest address.
1257
1258 For the bugreport, please fill out the formular on the corresponding
1259 WWW-page. Read the dedicated instructions and write as much as you
1260 know about your problem. If you do not like such formulars, please send
1261 some e-mail directly, but at least with the same information as required by
1262 the formular.
1263
1264 If you have extensive bugreports, including Ooops messages and
1265 screen-shots, please feel free to send it directly to the address
1266 of the maintainer, too. The current address of the maintainer is:
1267
1268 Michael Lang <langa2@kph.uni-mainz.de>
1269
1270 6 References
1271 ------------
1272 IBM Corp., "Update for the PS/2 Hardware Interface Technical Reference,
1273 Common Interfaces", Armonk, September 1991, PN 04G3281,
1274 (available in the U.S. for $21.75 at 1-800-IBM-PCTB or in Germany for
1275 around 40,-DM at "Hallo IBM").
1276
1277 IBM Corp., "Personal System/2 Micro Channel SCSI
1278 Adapter with Cache Technical Reference", Armonk, March 1990, PN 68X2365.
1279
1280 IBM Corp., "Personal System/2 Micro Channel SCSI
1281 Adapter Technical Reference", Armonk, March 1990, PN 68X2397.
1282
1283 IBM Corp., "SCSI-2 Fast/Wide Adapter/A Technical Reference - Dual Bus",
1284 Armonk, March 1994, PN 83G7545.
1285
1286 Friedhelm Schmidt, "SCSI-Bus und IDE-Schnittstelle - Moderne Peripherie-
1287 Schnittstellen: Hardware, Protokollbeschreibung und Anwendung", 2. Aufl.
1288 Addison Wesley, 1996.
1289
1290 Michael K. Johnson, "The Linux Kernel Hackers' Guide", Version 0.6, Chapel
1291 Hill - North Carolina, 1995
1292
1293 Andreas Kaiser, "SCSI TAPE BACKUP for OS/2 2.0", Version 2.12, Stuttgart
1294 1993
1295
1296 Helmut Rompel, "IBM Computerwelt GUIDE", What is what bei IBM., Systeme *
1297 Programme * Begriffe, IWT-Verlag GmbH - Muenchen, 1988
1298
1299 7 Credits to
1300 ------------
1301 7.1 People
1302 ----------
1303 Klaus Grimm
1304 who already a long time ago gave me the old code from the
1305 SCSI-driver in order to get it running for some old machine
1306 in our institute.
1307 Martin Kolinek
1308 who wrote the first release of the IBM SCSI-subsystem driver.
1309 Chris Beauregard
1310 who for a long time maintained MCA-Linux and the SCSI-driver
1311 in the beginning. Chris, wherever you are: Cheers to you!
1312 Klaus Kudielka
1313 with whom in the 2.1.x times, I had a quite fruitful
1314 cooperation to get the driver running as a module and to get
1315 it running with multiple SCSI-adapters.
1316 David Weinehall
1317 for his excellent maintenance of the MCA-stuff and the quite
1318 detailed bug reports and ideas for this driver (and his
1319 patience ;-)).
1320 Alan J. Cox
1321 for his bugreports and his bold activities in cross-checking
1322 the driver-code with his teststand.
1323
1324 7.2 Sponsors & Supporters
1325 -------------------------
1326 "Hallo IBM",
1327 IBM-Deutschland GmbH
1328 the service of IBM-Deutschland for customers. Their E-Mail
1329 service is unbeatable. Whatever old stuff I asked for, I
1330 always got some helpful answers.
1331 Karl-Otto Reimers,
1332 IBM Klub - Sparte IBM Geschichte, Sindelfingen
1333 for sending me a copy of the w/Cache manual from the
1334 IBM-Deutschland archives.
1335 Harald Staiger
1336 for his extensive hardware donations which allows me today
1337 still to test the driver in various constellations.
1338 Erich Fritscher
1339 for his very kind sponsoring.
1340 Louis Ohland,
1341 Charles Lasitter
1342 for support by shipping me an IBM SCSI-2 Fast/Wide manual.
1343 In addition, the contribution of various hardware is quite
1344 decessive and will make it possible to add FWSR (RAID)
1345 adapter support to the driver in the near future! So,
1346 complaints about no RAID support won't remain forever.
1347 Yes, folks, that is no joke, RAID support is going to rise!
1348 Erik Weber
1349 for the great deal we made about a model 9595 and the nice
1350 surrounding equipment and the cool trip to Mannheim
1351 second-hand computer market. In addition, I would like
1352 to thank him for his exhaustive SCSI-driver testing on his
1353 95er PS/2 park.
1354 Anthony Hogbin
1355 for his direct shipment of a SCSI F/W adapter, which allowed
1356 me immediately on the first stage to try it on model 8557
1357 together with onboard SCSI adapter and some SCSI w/Cache.
1358 Andreas Hotz
1359 for his support by memory and an IBM SCSI-adapter. Collecting
1360 all this together now allows me to try really things with
1361 the driver at maximum load and variety on various models in
1362 a very quick and efficient way.
1363 Peter Jennewein
1364 for his model 30, which serves me as part of my teststand
1365 and his cool remark about how you make an ordinary diskette
1366 drive working and how to connect it to an IBM-diskette port.
1367 Johannes Gutenberg-Universitaet, Mainz &
1368 Institut fuer Kernphysik, Mainz Microtron (MAMI)
1369 for the offered space, the link, placed on the central
1370 homepage and the space to store and offer the driver and
1371 related material and the free working times, which allow
1372 me to answer all your e-mail.
1373
1374 8 Trademarks
1375 ------------
1376 IBM, PS/2, OS/2, Microchannel are registered trademarks of International
1377 Business Machines Corporation
1378
1379 MS-DOS is a registered trademark of Microsoft Corporation
1380
1381 Microware, OS-9 are registered trademarks of Microware Systems
1382
1383 9 Disclaimer
1384 ------------
1385 Beside the GNU General Public License and the dependent disclaimers and disclaimers
1386 concerning the Linux-kernel in special, this SCSI-driver comes without any
1387 warranty. Its functionality is tested as good as possible on certain
1388 machines and combinations of computer hardware, which does not exclude,
1389 that dataloss or severe damage of hardware is possible while using this
1390 part of software on some arbitrary computer hardware or in combination
1391 with other software packages. It is highly recommended to make backup
1392 copies of your data before using this software. Furthermore, personal
1393 injuries by hardware defects, that could be caused by this SCSI-driver are
1394 not excluded and it is highly recommended to handle this driver with a
1395 maximum of carefulness.
1396
1397 This driver supports hardware, produced by International Business Machines
1398 Corporation (IBM).
1399
1400------
1401Michael Lang
1402(langa2@kph.uni-mainz.de)
diff --git a/Documentation/scsi/in2000.txt b/Documentation/scsi/in2000.txt
new file mode 100644
index 000000000000..80f104042645
--- /dev/null
+++ b/Documentation/scsi/in2000.txt
@@ -0,0 +1,202 @@
1
2UPDATE NEWS: version 1.33 - 26 Aug 98
3
4 Interrupt management in this driver has become, over
5 time, increasingly odd and difficult to explain - this
6 has been mostly due to my own mental inadequacies. In
7 recent kernels, it has failed to function at all when
8 compiled for SMP. I've fixed that problem, and after
9 taking a fresh look at interrupts in general, greatly
10 reduced the number of places where they're fiddled
11 with. Done some heavy testing and it looks very good.
12 The driver now makes use of the __initfunc() and
13 __initdata macros to save about 4k of kernel memory.
14 Once again, the same code works for both 2.0.xx and
15 2.1.xx kernels.
16
17UPDATE NEWS: version 1.32 - 28 Mar 98
18
19 Removed the check for legal IN2000 hardware versions:
20 It appears that the driver works fine with serial
21 EPROMs (the 8-pin chip that defines hardware rev) as
22 old as 2.1, so we'll assume that all cards are OK.
23
24UPDATE NEWS: version 1.31 - 6 Jul 97
25
26 Fixed a bug that caused incorrect SCSI status bytes to be
27 returned from commands sent to LUN's greater than 0. This
28 means that CDROM changers work now! Fixed a bug in the
29 handling of command-line arguments when loaded as a module.
30 Also put all the header data in in2000.h where it belongs.
31 There are no longer any differences between this driver in
32 the 2.1.xx source tree and the 2.0.xx tree, as of 2.0.31
33 and 2.1.45 (or is it .46?) - this makes things much easier
34 for me...
35
36UPDATE NEWS: version 1.30 - 14 Oct 96
37
38 Fixed a bug in the code that sets the transfer direction
39 bit (DESTID_DPD in the WD_DESTINATION_ID register). There
40 are quite a few SCSI commands that do a write-to-device;
41 now we deal with all of them correctly. Thanks to Joerg
42 Dorchain for catching this one.
43
44UPDATE NEWS: version 1.29 - 24 Sep 96
45
46 The memory-mapped hardware on the card is now accessed via
47 the 'readb()' and 'readl()' macros - required by the new
48 memory management scheme in the 2.1.x kernel series.
49 As suggested by Andries Brouwer, 'bios_param()' no longer
50 forces an artificial 1023 track limit on drives. Also
51 removed some kludge-code left over from struggles with
52 older (buggy) compilers.
53
54UPDATE NEWS: version 1.28 - 07 May 96
55
56 Tightened up the "interrupts enabled/disabled" discipline
57 in 'in2000_queuecommand()' and maybe 1 or 2 other places.
58 I _think_ it may have been a little too lax, causing an
59 occasional crash during full moon. A fully functional
60 /proc interface is now in place - if you want to play
61 with it, start by doing 'cat /proc/scsi/in2000/0'. You
62 can also use it to change a few run-time parameters on
63 the fly, but it's mostly for debugging. The curious
64 should take a good look at 'in2000_proc_info()' in the
65 in2000.c file to get an understanding of what it's all
66 about; I figure that people who are really into it will
67 want to add features suited to their own needs...
68 Also, sync is now DISABLED by default.
69
70UPDATE NEWS: version 1.27 - 10 Apr 96
71
72 Fixed a well-hidden bug in the adaptive-disconnect code
73 that would show up every now and then during extreme
74 heavy loads involving 2 or more simultaneously active
75 devices. Thanks to Joe Mack for keeping my nose to the
76 grindstone on this one.
77
78UPDATE NEWS: version 1.26 - 07 Mar 96
79
80 1.25 had a nasty bug that bit people with swap partitions
81 and tape drives. Also, in my attempt to guess my way
82 through Intel assembly language, I made an error in the
83 inline code for IO writes. Made a few other changes and
84 repairs - this version (fingers crossed) should work well.
85
86UPDATE NEWS: version 1.25 - 05 Mar 96
87
88 Kernel 1.3.70 interrupt mods added; old kernels still OK.
89 Big help from Bill Earnest and David Willmore on speed
90 testing and optimizing: I think there's a real improvement
91 in this area.
92 New! User-friendly command-line interface for LILO and
93 module loading - the old method is gone, so you'll need
94 to read the comments for 'setup_strings' near the top
95 of in2000.c. For people with CDROM's or other devices
96 that have a tough time with sync negotiation, you can
97 now selectively disable sync on individual devices -
98 search for the 'nosync' keyword in the command-line
99 comments. Some of you disable the BIOS on the card, which
100 caused the auto-detect function to fail; there is now a
101 command-line option to force detection of a ROM-less card.
102
103UPDATE NEWS: version 1.24a - 24 Feb 96
104
105 There was a bug in the synchronous transfer code. Only
106 a few people downloaded before I caught it - could have
107 been worse.
108
109UPDATE NEWS: version 1.24 - 23 Feb 96
110
111 Lots of good changes. Advice from Bill Earnest resulted
112 in much better detection of cards, more efficient usage
113 of the fifo, and (hopefully) faster data transfers. The
114 jury is still out on speed - I hope it's improved some.
115 One nifty new feature is a cool way of doing disconnect/
116 reselect. The driver defaults to what I'm calling
117 'adaptive disconnect' - meaning that each command is
118 evaluated individually as to whether or not it should be
119 run with the option to disconnect/reselect (if the device
120 chooses), or as a "SCSI-bus-hog". When several devices
121 are operating simultaneously, disconnects are usually an
122 advantage. In a single device system, or if only 1 device
123 is being accessed, transfers usually go faster if disconnects
124 are not allowed.
125
126
127
128The default arguments (you get these when you don't give an 'in2000'
129command-line argument, or you give a blank argument) will cause
130the driver to do adaptive disconnect, synchronous transfers, and a
131minimum of debug messages. If you want to fool with the options,
132search for 'setup_strings' near the top of the in2000.c file and
133check the 'hostdata->args' section in in2000.h - but be warned! Not
134everything is working yet (some things will never work, probably).
135I believe that disabling disconnects (DIS_NEVER) will allow you
136to choose a LEVEL2 value higher than 'L2_BASIC', but I haven't
137spent a lot of time testing this. You might try 'ENABLE_CLUSTERING'
138to see what happens: my tests showed little difference either way.
139There's also a define called 'DEFAULT_SX_PER'; this sets the data
140transfer speed for the asynchronous mode. I've put it at 500 ns
141despite the fact that the card could handle settings of 376 or
142252, because higher speeds may be a problem with poor quality
143cables or improper termination; 500 ns is a compromise. You can
144choose your own default through the command-line with the
145'period' keyword.
146
147
148------------------------------------------------
149*********** DIP switch settings **************
150------------------------------------------------
151
152 sw1-1 sw1-2 BIOS address (hex)
153 -----------------------------------------
154 off off C8000 - CBFF0
155 on off D8000 - DBFF0
156 off on D0000 - D3FF0
157 on on BIOS disabled
158
159 sw1-3 sw1-4 IO port address (hex)
160 ------------------------------------
161 off off 220 - 22F
162 on off 200 - 20F
163 off on 110 - 11F
164 on on 100 - 10F
165
166 sw1-5 sw1-6 sw1-7 Interrupt
167 ------------------------------
168 off off off 15
169 off on off 14
170 off off on 11
171 off on on 10
172 on - - disabled
173
174 sw1-8 function depends on BIOS version. In earlier versions this
175 controlled synchronous data transfer support for MSDOS:
176 off = disabled
177 on = enabled
178 In later ROMs (starting with 01.3 in April 1994) sw1-8 controls
179 the "greater than 2 disk drive" feature that first appeared in
180 MSDOS 5.0 (ignored by Linux):
181 off = 2 drives maximum
182 on = 7 drives maximum
183
184 sw1-9 Floppy controller
185 --------------------------
186 off disabled
187 on enabled
188
189------------------------------------------------
190
191 I should mention that Drew Eckhardt's 'Generic NCR5380' sources
192 were my main inspiration, with lots of reference to the IN2000
193 driver currently distributed in the kernel source. I also owe
194 much to a driver written by Hamish Macdonald for Linux-m68k(!).
195 And to Eric Wright for being an ALPHA guinea pig. And to Bill
196 Earnest for 2 tons of great input and information. And to David
197 Willmore for extensive 'bonnie' testing. And to Joe Mack for
198 continual testing and feedback.
199
200
201 John Shifflett jshiffle@netcom.com
202
diff --git a/Documentation/scsi/megaraid.txt b/Documentation/scsi/megaraid.txt
new file mode 100644
index 000000000000..ff864c0f494c
--- /dev/null
+++ b/Documentation/scsi/megaraid.txt
@@ -0,0 +1,70 @@
1 Notes on Management Module
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4Overview:
5--------
6
7Different classes of controllers from LSI Logic, accept and respond to the
8user applications in a similar way. They understand the same firmware control
9commands. Furthermore, the applications also can treat different classes of
10the controllers uniformly. Hence it is logical to have a single module that
11interefaces with the applications on one side and all the low level drivers
12on the other.
13
14The advantages, though obvious, are listed for completeness:
15
16 i. Avoid duplicate code from the low level drivers.
17 ii. Unburden the low level drivers from having to export the
18 character node device and related handling.
19 iii. Implement any policy mechanisms in one place.
20 iv. Applications have to interface with only module instead of
21 multiple low level drivers.
22
23Currently this module (called Common Management Module) is used only to issue
24ioctl commands. But this module is envisioned to handle all user space level
25interactions. So any 'proc', 'sysfs' implementations will be localized in this
26common module.
27
28Credits:
29-------
30
31"Shared code in a third module, a "library module", is an acceptable
32solution. modprobe automatically loads dependent modules, so users
33running "modprobe driver1" or "modprobe driver2" would automatically
34load the shared library module."
35
36 - Jeff Garzik (jgarzik@pobox.com), 02.25.2004 LKML
37
38"As Jeff hinted, if your userspace<->driver API is consistent between
39your new MPT-based RAID controllers and your existing megaraid driver,
40then perhaps you need a single small helper module (lsiioctl or some
41better name), loaded by both mptraid and megaraid automatically, which
42handles registering the /dev/megaraid node dynamically. In this case,
43both mptraid and megaraid would register with lsiioctl for each
44adapter discovered, and lsiioctl would essentially be a switch,
45redirecting userspace tool ioctls to the appropriate driver."
46
47 - Matt Domsch, (Matt_Domsch@dell.com), 02.25.2004 LKML
48
49Design:
50------
51
52The Common Management Module is implemented in megaraid_mm.[ch] files. This
53module acts as a registry for low level hba drivers. The low level drivers
54(currently only megaraid) register each controller with the common module.
55
56The applications interface with the common module via the character device
57node exported by the module.
58
59The lower level drivers now understand only a new improved ioctl packet called
60uioc_t. The management module converts the older ioctl packets from the older
61applications into uioc_t. After driver handles the uioc_t, the common module
62will convert that back into the old format before returning to applications.
63
64As new applications evolve and replace the old ones, the old packet format
65will be retired.
66
67Common module dedicates one uioc_t packet to each controller registered. This
68can easily be more than one. But since megaraid is the only low level driver
69today, and it can handle only one ioctl, there is no reason to have more. But
70as new controller classes get added, this will be tuned appropriately.
diff --git a/Documentation/scsi/ncr53c7xx.txt b/Documentation/scsi/ncr53c7xx.txt
new file mode 100644
index 000000000000..91e9552d63e5
--- /dev/null
+++ b/Documentation/scsi/ncr53c7xx.txt
@@ -0,0 +1,40 @@
1README for WarpEngine/A4000T/A4091 SCSI kernels.
2
3Use the following options to disable options in the SCSI driver.
4
5Using amiboot for example.....
6
7To disable Synchronous Negotiation....
8
9 amiboot -k kernel 53c7xx=nosync:0
10
11To disable Disconnection....
12
13 amiboot -k kernel 53c7xx=nodisconnect:0
14
15To disable certain SCSI devices...
16
17 amiboot -k kernel 53c7xx=validids:0x3F
18
19 this allows only device ID's 0,1,2,3,4 and 5 for linux to handle.
20 (this is a bitmasked field - i.e. each bit represents a SCSI ID)
21
22These commands work on a per controller basis and use the option 'next' to
23move to the next controller in the system.
24
25e.g.
26 amiboot -k kernel 53c7xx=nodisconnect:0,next,nosync:0
27
28 this uses No Disconnection on the first controller and Asynchronous
29 SCSI on the second controller.
30
31Known Issues:
32
33Two devices are known not to function with the default settings of using
34synchronous SCSI. These are the Archive Viper 150 Tape Drive and the
35SyQuest SQ555 removeable hard drive. When using these devices on a controller
36use the 'nosync:0' option.
37
38Please try these options and post any problems/successes to me.
39
40Alan Hourihane <alanh@fairlite.demon.co.uk>
diff --git a/Documentation/scsi/ncr53c8xx.txt b/Documentation/scsi/ncr53c8xx.txt
new file mode 100644
index 000000000000..822d2aca3700
--- /dev/null
+++ b/Documentation/scsi/ncr53c8xx.txt
@@ -0,0 +1,1854 @@
1The Linux NCR53C8XX/SYM53C8XX drivers README file
2
3Written by Gerard Roudier <groudier@free.fr>
421 Rue Carnot
595170 DEUIL LA BARRE - FRANCE
6
729 May 1999
8===============================================================================
9
101. Introduction
112. Supported chips and SCSI features
123. Advantages of the enhanced 896 driver
13 3.1 Optimized SCSI SCRIPTS
14 3.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)
154. Memory mapped I/O versus normal I/O
165. Tagged command queueing
176. Parity checking
187. Profiling information
198. Control commands
20 8.1 Set minimum synchronous period
21 8.2 Set wide size
22 8.3 Set maximum number of concurrent tagged commands
23 8.4 Set order type for tagged command
24 8.5 Set debug mode
25 8.6 Clear profile counters
26 8.7 Set flag (no_disc)
27 8.8 Set verbose level
28 8.9 Reset all logical units of a target
29 8.10 Abort all tasks of all logical units of a target
309. Configuration parameters
3110. Boot setup commands
32 10.1 Syntax
33 10.2 Available arguments
34 10.2.1 Master parity checking
35 10.2.2 Scsi parity checking
36 10.2.3 Scsi disconnections
37 10.2.4 Special features
38 10.2.5 Ultra SCSI support
39 10.2.6 Default number of tagged commands
40 10.2.7 Default synchronous period factor
41 10.2.8 Negotiate synchronous with all devices
42 10.2.9 Verbosity level
43 10.2.10 Debug mode
44 10.2.11 Burst max
45 10.2.12 LED support
46 10.2.13 Max wide
47 10.2.14 Differential mode
48 10.2.15 IRQ mode
49 10.2.16 Reverse probe
50 10.2.17 Fix up PCI configuration space
51 10.2.18 Serial NVRAM
52 10.2.19 Check SCSI BUS
53 10.2.20 Exclude a host from being attached
54 10.2.21 Suggest a default SCSI id for hosts
55 10.2.22 Enable use of IMMEDIATE ARBITRATION
56 10.3 Advised boot setup commands
57 10.4 PCI configuration fix-up boot option
58 10.5 Serial NVRAM support boot option
59 10.6 SCSI BUS checking boot option
60 10.7 IMMEDIATE ARBITRATION boot option
6111. Some constants and flags of the ncr53c8xx.h header file
6212. Installation
6313. Architecture dependent features
6414. Known problems
65 14.1 Tagged commands with Iomega Jaz device
66 14.2 Device names change when another controller is added
67 14.3 Using only 8 bit devices with a WIDE SCSI controller.
68 14.4 Possible data corruption during a Memory Write and Invalidate
69 14.5 IRQ sharing problems
7015. SCSI problem troubleshooting
71 15.1 Problem tracking
72 15.2 Understanding hardware error reports
7316. Synchonous transfer negotiation tables
74 16.1 Synchronous timings for 53C875 and 53C860 Ultra-SCSI controllers
75 16.2 Synchronous timings for fast SCSI-2 53C8XX controllers
7617. Serial NVRAM support (by Richard Waltham)
77 17.1 Features
78 17.2 Symbios NVRAM layout
79 17.3 Tekram NVRAM layout
8018. Support for Big Endian
81 18.1 Big Endian CPU
82 18.2 NCR chip in Big Endian mode of operations
83
84===============================================================================
85
861. Introduction
87
88The initial Linux ncr53c8xx driver has been a port of the ncr driver from
89FreeBSD that has been achieved in November 1995 by:
90 Gerard Roudier <groudier@free.fr>
91
92The original driver has been written for 386bsd and FreeBSD by:
93 Wolfgang Stanglmeier <wolf@cologne.de>
94 Stefan Esser <se@mi.Uni-Koeln.de>
95
96It is now available as a bundle of 2 drivers:
97
98- ncr53c8xx generic driver that supports all the SYM53C8XX family including
99 the ealiest 810 rev. 1, the latest 896 (2 channel LVD SCSI controller) and
100 the new 895A (1 channel LVD SCSI controller).
101- sym53c8xx enhanced driver (a.k.a. 896 drivers) that drops support of oldest
102 chips in order to gain advantage of new features, as LOAD/STORE intructions
103 available since the 810A and hardware phase mismatch available with the
104 896 and the 895A.
105
106You can find technical information about the NCR 8xx family in the
107PCI-HOWTO written by Michael Will and in the SCSI-HOWTO written by
108Drew Eckhardt.
109
110Information about new chips is available at LSILOGIC web server:
111
112 http://www.lsilogic.com/
113
114SCSI standard documentations are available at SYMBIOS ftp server:
115
116 ftp://ftp.symbios.com/
117
118Usefull SCSI tools written by Eric Youngdale are available at tsx-11:
119
120 ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsiinfo-X.Y.tar.gz
121 ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsidev-X.Y.tar.gz
122
123These tools are not ALPHA but quite clean and work quite well.
124It is essential you have the 'scsiinfo' package.
125
126This short documentation describes the features of the generic and enhanced
127drivers, configuration parameters and control commands available through
128the proc SCSI file system read / write operations.
129
130This driver has been tested OK with linux/i386, Linux/Alpha and Linux/PPC.
131
132Latest driver version and patches are available at:
133
134 ftp://ftp.tux.org/pub/people/gerard-roudier
135or
136 ftp://ftp.symbios.com/mirror/ftp.tux.org/pub/tux/roudier/drivers
137
138I am not a native speaker of English and there are probably lots of
139mistakes in this README file. Any help will be welcome.
140
141
1422. Supported chips and SCSI features
143
144The following features are supported for all chips:
145
146 Synchronous negotiation
147 Disconnection
148 Tagged command queuing
149 SCSI parity checking
150 Master parity checking
151
152"Wide negotiation" is supported for chips that allow it. The
153following table shows some characteristics of NCR 8xx family chips
154and what drivers support them.
155
156 Supported by Supported by
157 On board the generic the enhanced
158Chip SDMS BIOS Wide SCSI std. Max. sync driver driver
159---- --------- ---- --------- ---------- ------------ -------------
160810 N N FAST10 10 MB/s Y N
161810A N N FAST10 10 MB/s Y Y
162815 Y N FAST10 10 MB/s Y N
163825 Y Y FAST10 20 MB/s Y N
164825A Y Y FAST10 20 MB/s Y Y
165860 N N FAST20 20 MB/s Y Y
166875 Y Y FAST20 40 MB/s Y Y
167876 Y Y FAST20 40 MB/s Y Y
168895 Y Y FAST40 80 MB/s Y Y
169895A Y Y FAST40 80 MB/s Y Y
170896 Y Y FAST40 80 MB/s Y Y
171897 Y Y FAST40 80 MB/s Y Y
1721510D Y Y FAST40 80 MB/s Y Y
1731010 Y Y FAST80 160 MB/s N Y
1741010_66* Y Y FAST80 160 MB/s N Y
175
176* Chip supports 33MHz and 66MHz PCI buses.
177
178
179Summary of other supported features:
180
181Module: allow to load the driver
182Memory mapped I/O: increases performance
183Profiling information: read operations from the proc SCSI file system
184Control commands: write operations to the proc SCSI file system
185Debugging information: written to syslog (expert only)
186Scatter / gather
187Shared interrupt
188Boot setup commands
189Serial NVRAM: Symbios and Tekram formats
190
191
1923. Advantages of the enhanced 896 driver
193
1943.1 Optimized SCSI SCRIPTS.
195
196The 810A, 825A, 875, 895, 896 and 895A support new SCSI SCRIPTS instructions
197named LOAD and STORE that allow to move up to 1 DWORD from/to an IO register
198to/from memory much faster that the MOVE MEMORY instruction that is supported
199by the 53c7xx and 53c8xx family.
200The LOAD/STORE instructions support absolute and DSA relative addressing
201modes. The SCSI SCRIPTS had been entirely rewritten using LOAD/STORE instead
202of MOVE MEMORY instructions.
203
2043.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)
205
206The 896 and the 895A allows handling of the phase mismatch context from
207SCRIPTS (avoids the phase mismatch interrupt that stops the SCSI processor
208until the C code has saved the context of the transfer).
209Implementing this without using LOAD/STORE instructions would be painfull
210and I did'nt even want to try it.
211
212The 896 chip supports 64 bit PCI transactions and addressing, while the
213895A supports 32 bit PCI transactions and 64 bit addressing.
214The SCRIPTS processor of these chips is not true 64 bit, but uses segment
215registers for bit 32-63. Another interesting feature is that LOAD/STORE
216instructions that address the on-chip RAM (8k) remain internal to the chip.
217
218Due to the use of LOAD/STORE SCRIPTS instructions, this driver does not
219support the following chips:
220- SYM53C810 revision < 0x10 (16)
221- SYM53C815 all revisions
222- SYM53C825 revision < 0x10 (16)
223
2244. Memory mapped I/O versus normal I/O
225
226Memory mapped I/O has less latency than normal I/O. Since
227linux-1.3.x, memory mapped I/O is used rather than normal I/O. Memory
228mapped I/O seems to work fine on most hardware configurations, but
229some poorly designed motherboards may break this feature.
230
231The configuration option CONFIG_SCSI_NCR53C8XX_IOMAPPED forces the
232driver to use normal I/O in all cases.
233
234
2355. Tagged command queueing
236
237Queuing more than 1 command at a time to a device allows it to perform
238optimizations based on actual head positions and its mechanical
239characteristics. This feature may also reduce average command latency.
240In order to really gain advantage of this feature, devices must have
241a reasonable cache size (No miracle is to be expected for a low-end
242hard disk with 128 KB or less).
243Some kown SCSI devices do not properly support tagged command queuing.
244Generally, firmware revisions that fix this kind of problems are available
245at respective vendor web/ftp sites.
246All I can say is that the hard disks I use on my machines behave well with
247this driver with tagged command queuing enabled:
248
249- IBM S12 0662
250- Conner 1080S
251- Quantum Atlas I
252- Quantum Atlas II
253
254If your controller has NVRAM, you can configure this feature per target
255from the user setup tool. The Tekram Setup program allows to tune the
256maximum number of queued commands up to 32. The Symbios Setup only allows
257to enable or disable this feature.
258
259The maximum number of simultaneous tagged commands queued to a device
260is currently set to 8 by default. This value is suitable for most SCSI
261disks. With large SCSI disks (>= 2GB, cache >= 512KB, average seek time
262<= 10 ms), using a larger value may give better performances.
263
264The sym53c8xx driver supports up to 255 commands per device, and the
265generic ncr53c8xx driver supports up to 64, but using more than 32 is
266generally not worth-while, unless you are using a very large disk or disk
267array. It is noticeable that most of recent hard disks seem not to accept
268more than 64 simultaneous commands. So, using more than 64 queued commands
269is probably just resource wasting.
270
271If your controller does not have NVRAM or if it is managed by the SDMS
272BIOS/SETUP, you can configure tagged queueing feature and device queue
273depths from the boot command-line. For example:
274
275 ncr53c8xx=tags:4/t2t3q15-t4q7/t1u0q32
276
277will set tagged commands queue depths as follow:
278
279- target 2 all luns on controller 0 --> 15
280- target 3 all luns on controller 0 --> 15
281- target 4 all luns on controller 0 --> 7
282- target 1 lun 0 on controller 1 --> 32
283- all other target/lun --> 4
284
285In some special conditions, some SCSI disk firmwares may return a
286QUEUE FULL status for a SCSI command. This behaviour is managed by the
287driver using the following heuristic:
288
289- Each time a QUEUE FULL status is returned, tagged queue depth is reduced
290 to the actual number of disconnected commands.
291
292- Every 1000 successfully completed SCSI commands, if allowed by the
293 current limit, the maximum number of queueable commands is incremented.
294
295Since QUEUE FULL status reception and handling is resource wasting, the
296driver notifies by default this problem to user by indicating the actual
297number of commands used and their status, as well as its decision on the
298device queue depth change.
299The heuristic used by the driver in handling QUEUE FULL ensures that the
300impact on performances is not too bad. You can get rid of the messages by
301setting verbose level to zero, as follow:
302
3031st method: boot your system using 'ncr53c8xx=verb:0' option.
3042nd method: apply "setverbose 0" control command to the proc fs entry
305 corresponding to your controller after boot-up.
306
3076. Parity checking
308
309The driver supports SCSI parity checking and PCI bus master parity
310checking. These features must be enabled in order to ensure safe data
311transfers. However, some flawed devices or mother boards will have
312problems with parity. You can disable either PCI parity or SCSI parity
313checking by entering appropriate options from the boot command line.
314(See 10: Boot setup commands).
315
3167. Profiling information
317
318Profiling information is available through the proc SCSI file system.
319Since gathering profiling information may impact performances, this
320feature is disabled by default and requires a compilation configuration
321option to be set to Y.
322
323The device associated with a host has the following pathname:
324
325 /proc/scsi/ncr53c8xx/N (N=0,1,2 ....)
326
327Generally, only 1 board is used on hardware configuration, and that device is:
328 /proc/scsi/ncr53c8xx/0
329
330However, if the driver has been made as module, the number of the
331hosts is incremented each time the driver is loaded.
332
333In order to display profiling information, just enter:
334
335 cat /proc/scsi/ncr53c8xx/0
336
337and you will get something like the following text:
338
339-------------------------------------------------------
340General information:
341 Chip NCR53C810, device id 0x1, revision id 0x2
342 IO port address 0x6000, IRQ number 10
343 Using memory mapped IO at virtual address 0x282c000
344 Synchronous transfer period 25, max commands per lun 4
345Profiling information:
346 num_trans = 18014
347 num_kbytes = 671314
348 num_disc = 25763
349 num_break = 1673
350 num_int = 1685
351 num_fly = 18038
352 ms_setup = 4940
353 ms_data = 369940
354 ms_disc = 183090
355 ms_post = 1320
356-------------------------------------------------------
357
358General information is easy to understand. The device ID and the
359revision ID identify the SCSI chip as follows:
360
361Chip Device id Revision Id
362---- --------- -----------
363810 0x1 < 0x10
364810A 0x1 >= 0x10
365815 0x4
366825 0x3 < 0x10
367860 0x6
368825A 0x3 >= 0x10
369875 0xf
370895 0xc
371
372The profiling information is updated upon completion of SCSI commands.
373A data structure is allocated and zeroed when the host adapter is
374attached. So, if the driver is a module, the profile counters are
375cleared each time the driver is loaded. The "clearprof" command
376allows you to clear these counters at any time.
377
378The following counters are available:
379
380("num" prefix means "number of",
381"ms" means milli-seconds)
382
383num_trans
384 Number of completed commands
385 Example above: 18014 completed commands
386
387num_kbytes
388 Number of kbytes transferred
389 Example above: 671 MB transferred
390
391num_disc
392 Number of SCSI disconnections
393 Example above: 25763 SCSI disconnections
394
395num_break
396 number of script interruptions (phase mismatch)
397 Example above: 1673 script interruptions
398
399num_int
400 Number of interrupts other than "on the fly"
401 Example above: 1685 interruptions not "on the fly"
402
403num_fly
404 Number of interrupts "on the fly"
405 Example above: 18038 interruptions "on the fly"
406
407ms_setup
408 Elapsed time for SCSI commands setups
409 Example above: 4.94 seconds
410
411ms_data
412 Elapsed time for data transfers
413 Example above: 369.94 seconds spent for data transfer
414
415ms_disc
416 Elapsed time for SCSI disconnections
417 Example above: 183.09 seconds spent disconnected
418
419ms_post
420 Elapsed time for command post processing
421 (time from SCSI status get to command completion call)
422 Example above: 1.32 seconds spent for post processing
423
424Due to the 1/100 second tick of the system clock, "ms_post" time may
425be wrong.
426
427In the example above, we got 18038 interrupts "on the fly" and only
4281673 script breaks generally due to disconnections inside a segment
429of the scatter list.
430
431
4328. Control commands
433
434Control commands can be sent to the driver with write operations to
435the proc SCSI file system. The generic command syntax is the
436following:
437
438 echo "<verb> <parameters>" >/proc/scsi/ncr53c8xx/0
439 (assumes controller number is 0)
440
441Using "all" for "<target>" parameter with the commands below will
442apply to all targets of the SCSI chain (except the controller).
443
444Available commands:
445
4468.1 Set minimum synchronous period factor
447
448 setsync <target> <period factor>
449
450 target: target number
451 period: minimum synchronous period.
452 Maximum speed = 1000/(4*period factor) except for special
453 cases below.
454
455 Specify a period of 255, to force asynchronous transfer mode.
456
457 10 means 25 nano-seconds synchronous period
458 11 means 30 nano-seconds synchronous period
459 12 means 50 nano-seconds synchronous period
460
4618.2 Set wide size
462
463 setwide <target> <size>
464
465 target: target number
466 size: 0=8 bits, 1=16bits
467
4688.3 Set maximum number of concurrent tagged commands
469
470 settags <target> <tags>
471
472 target: target number
473 tags: number of concurrent tagged commands
474 must not be greater than SCSI_NCR_MAX_TAGS (default: 8)
475
4768.4 Set order type for tagged command
477
478 setorder <order>
479
480 order: 3 possible values:
481 simple: use SIMPLE TAG for all operations (read and write)
482 ordered: use ORDERED TAG for all operations
483 default: use default tag type,
484 SIMPLE TAG for read operations
485 ORDERED TAG for write operations
486
487
4888.5 Set debug mode
489
490 setdebug <list of debug flags>
491
492 Available debug flags:
493 alloc: print info about memory allocations (ccb, lcb)
494 queue: print info about insertions into the command start queue
495 result: print sense data on CHECK CONDITION status
496 scatter: print info about the scatter process
497 scripts: print info about the script binding process
498 tiny: print minimal debugging information
499 timing: print timing information of the NCR chip
500 nego: print information about SCSI negotiations
501 phase: print information on script interruptions
502
503 Use "setdebug" with no argument to reset debug flags.
504
505
5068.6 Clear profile counters
507
508 clearprof
509
510 The profile counters are automatically cleared when the amount of
511 data transferred reaches 1000 GB in order to avoid overflow.
512 The "clearprof" command allows you to clear these counters at any time.
513
514
5158.7 Set flag (no_disc)
516
517 setflag <target> <flag>
518
519 target: target number
520
521 For the moment, only one flag is available:
522
523 no_disc: not allow target to disconnect.
524
525 Do not specify any flag in order to reset the flag. For example:
526 - setflag 4
527 will reset no_disc flag for target 4, so will allow it disconnections.
528 - setflag all
529 will allow disconnection for all devices on the SCSI bus.
530
531
5328.8 Set verbose level
533
534 setverbose #level
535
536 The driver default verbose level is 1. This command allows to change
537 th driver verbose level after boot-up.
538
5398.9 Reset all logical units of a target
540
541 resetdev <target>
542
543 target: target number
544 The driver will try to send a BUS DEVICE RESET message to the target.
545 (Only supported by the SYM53C8XX driver and provided for test purpose)
546
5478.10 Abort all tasks of all logical units of a target
548
549 cleardev <target>
550
551 target: target number
552 The driver will try to send a ABORT message to all the logical units
553 of the target.
554 (Only supported by the SYM53C8XX driver and provided for test purpose)
555
556
5579. Configuration parameters
558
559If the firmware of all your devices is perfect enough, all the
560features supported by the driver can be enabled at start-up. However,
561if only one has a flaw for some SCSI feature, you can disable the
562support by the driver of this feature at linux start-up and enable
563this feature after boot-up only for devices that support it safely.
564
565CONFIG_SCSI_NCR53C8XX_PROFILE_SUPPORT (default answer: n)
566 This option must be set for profiling information to be gathered
567 and printed out through the proc file system. This features may
568 impact performances.
569
570CONFIG_SCSI_NCR53C8XX_IOMAPPED (default answer: n)
571 Answer "y" if you suspect your mother board to not allow memory mapped I/O.
572 May slow down performance a little. This option is required by
573 Linux/PPC and is used no matter what you select here. Linux/PPC
574 suffers no performance loss with this option since all IO is memory
575 mapped anyway.
576
577CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS (default answer: 8)
578 Default tagged command queue depth.
579
580CONFIG_SCSI_NCR53C8XX_MAX_TAGS (default answer: 8)
581 This option allows you to specify the maximum number of tagged commands
582 that can be queued to a device. The maximum supported value is 32.
583
584CONFIG_SCSI_NCR53C8XX_SYNC (default answer: 5)
585 This option allows you to specify the frequency in MHz the driver
586 will use at boot time for synchronous data transfer negotiations.
587 This frequency can be changed later with the "setsync" control command.
588 0 means "asynchronous data transfers".
589
590CONFIG_SCSI_NCR53C8XX_FORCE_SYNC_NEGO (default answer: n)
591 Force synchronous negotiation for all SCSI-2 devices.
592 Some SCSI-2 devices do not report this feature in byte 7 of inquiry
593 response but do support it properly (TAMARACK scanners for example).
594
595CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT (default and only reasonable answer: n)
596 If you suspect a device of yours does not properly support disconnections,
597 you can answer "y". Then, all SCSI devices will never disconnect the bus
598 even while performing long SCSI operations.
599
600CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
601 Genuine SYMBIOS boards use GPIO0 in output for controller LED and GPIO3
602 bit as a flag indicating singled-ended/differential interface.
603 If all the boards of your system are genuine SYMBIOS boards or use
604 BIOS and drivers from SYMBIOS, you would want to enable this option.
605 This option must NOT be enabled if your system has at least one 53C8XX
606 based scsi board with a vendor-specific BIOS.
607 For example, Tekram DC-390/U, DC-390/W and DC-390/F scsi controllers
608 use a vendor-specific BIOS and are known to not use SYMBIOS compatible
609 GPIO wiring. So, this option must not be enabled if your system has
610 such a board installed.
611
612CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
613 Enable support for reading the serial NVRAM data on Symbios and
614 some Symbios compatible cards, and Tekram DC390W/U/F cards. Useful for
615 systems with more than one Symbios compatible controller where at least
616 one has a serial NVRAM, or for a system with a mixture of Symbios and
617 Tekram cards. Enables setting the boot order of host adaptors
618 to something other than the default order or "reverse probe" order.
619 Also enables Symbios and Tekram cards to be distinguished so
620 CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT may be set in a system with a
621 mixture of Symbios and Tekram cards so the Symbios cards can make use of
622 the full range of Symbios features, differential, led pin, without
623 causing problems for the Tekram card(s).
624
62510. Boot setup commands
626
62710.1 Syntax
628
629Setup commands can be passed to the driver either at boot time or as a
630string variable using 'insmod'.
631
632A boot setup command for the ncr53c8xx (sym53c8xx) driver begins with the
633driver name "ncr53c8xx="(sym53c8xx). The kernel syntax parser then expects
634an optionnal list of integers separated with comma followed by an optional
635list of comma-separated strings. Example of boot setup command under lilo
636prompt:
637
638lilo: linux root=/dev/hda2 ncr53c8xx=tags:4,sync:10,debug:0x200
639
640- enable tagged commands, up to 4 tagged commands queued.
641- set synchronous negotiation speed to 10 Mega-transfers / second.
642- set DEBUG_NEGO flag.
643
644Since comma seems not to be allowed when defining a string variable using
645'insmod', the driver also accepts <space> as option separator.
646The following command will install driver module with the same options as
647above.
648
649 insmod ncr53c8xx.o ncr53c8xx="tags:4 sync:10 debug:0x200"
650
651For the moment, the integer list of arguments is discarded by the driver.
652It will be used in the future in order to allow a per controller setup.
653
654Each string argument must be specified as "keyword:value". Only lower-case
655characters and digits are allowed.
656
657In a system that contains multiple 53C8xx adapters insmod will install the
658specified driver on each adapter. To exclude a chip use the 'excl' keyword.
659
660The sequence of commands,
661
662 insmod sym53c8xx sym53c8xx=excl:0x1400
663 insmod ncr53c8xx
664
665installs the sym53c8xx driver on all adapters except the one at IO port
666address 0x1400 and then installs the ncr53c8xx driver to the adapter at IO
667port address 0x1400.
668
669
67010.2 Available arguments
671
67210.2.1 Master parity checking
673 mpar:y enabled
674 mpar:n disabled
675
67610.2.2 Scsi parity checking
677 spar:y enabled
678 spar:n disabled
679
68010.2.3 Scsi disconnections
681 disc:y enabled
682 disc:n disabled
683
68410.2.4 Special features
685 Only apply to 810A, 825A, 860, 875 and 895 controllers.
686 Have no effect with other ones.
687 specf:y (or 1) enabled
688 specf:n (or 0) disabled
689 specf:3 enabled except Memory Write And Invalidate
690 The default driver setup is 'specf:3'. As a consequence, option 'specf:y'
691 must be specified in the boot setup command to enable Memory Write And
692 Invalidate.
693
69410.2.5 Ultra SCSI support
695 Only apply to 860, 875, 895, 895a, 896, 1010 and 1010_66 controllers.
696 Have no effect with other ones.
697 ultra:n All ultra speeds enabled
698 ultra:2 Ultra2 enabled
699 ultra:1 Ultra enabled
700 ultra:0 Ultra speeds disabled
701
70210.2.6 Default number of tagged commands
703 tags:0 (or tags:1 ) tagged command queuing disabled
704 tags:#tags (#tags > 1) tagged command queuing enabled
705 #tags will be truncated to the max queued commands configuration parameter.
706 This option also allows to specify a command queue depth for each device
707 that support tagged command queueing.
708 Example:
709 ncr53c8xx=tags:10/t2t3q16-t5q24/t1u2q32
710 will set devices queue depth as follow:
711 - controller #0 target #2 and target #3 -> 16 commands,
712 - controller #0 target #5 -> 24 commands,
713 - controller #1 target #1 logical unit #2 -> 32 commands,
714 - all other logical units (all targets, all controllers) -> 10 commands.
715
71610.2.7 Default synchronous period factor
717 sync:255 disabled (asynchronous transfer mode)
718 sync:#factor
719 #factor = 10 Ultra-2 SCSI 40 Mega-transfers / second
720 #factor = 11 Ultra-2 SCSI 33 Mega-transfers / second
721 #factor < 25 Ultra SCSI 20 Mega-transfers / second
722 #factor < 50 Fast SCSI-2
723
724 In all cases, the driver will use the minimum transfer period supported by
725 controllers according to NCR53C8XX chip type.
726
72710.2.8 Negotiate synchronous with all devices
728 (force sync nego)
729 fsn:y enabled
730 fsn:n disabled
731
73210.2.9 Verbosity level
733 verb:0 minimal
734 verb:1 normal
735 verb:2 too much
736
73710.2.10 Debug mode
738 debug:0 clear debug flags
739 debug:#x set debug flags
740 #x is an integer value combining the following power-of-2 values:
741 DEBUG_ALLOC 0x1
742 DEBUG_PHASE 0x2
743 DEBUG_POLL 0x4
744 DEBUG_QUEUE 0x8
745 DEBUG_RESULT 0x10
746 DEBUG_SCATTER 0x20
747 DEBUG_SCRIPT 0x40
748 DEBUG_TINY 0x80
749 DEBUG_TIMING 0x100
750 DEBUG_NEGO 0x200
751 DEBUG_TAGS 0x400
752 DEBUG_FREEZE 0x800
753 DEBUG_RESTART 0x1000
754
755 You can play safely with DEBUG_NEGO. However, some of these flags may
756 generate bunches of syslog messages.
757
75810.2.11 Burst max
759 burst:0 burst disabled
760 burst:255 get burst length from initial IO register settings.
761 burst:#x burst enabled (1<<#x burst transfers max)
762 #x is an integer value which is log base 2 of the burst transfers max.
763 The NCR53C875 and NCR53C825A support up to 128 burst transfers (#x = 7).
764 Other chips only support up to 16 (#x = 4).
765 This is a maximum value. The driver set the burst length according to chip
766 and revision ids. By default the driver uses the maximum value supported
767 by the chip.
768
76910.2.12 LED support
770 led:1 enable LED support
771 led:0 disable LED support
772 Donnot enable LED support if your scsi board does not use SDMS BIOS.
773 (See 'Configuration parameters')
774
77510.2.13 Max wide
776 wide:1 wide scsi enabled
777 wide:0 wide scsi disabled
778 Some scsi boards use a 875 (ultra wide) and only supply narrow connectors.
779 If you have connected a wide device with a 50 pins to 68 pins cable
780 converter, any accepted wide negotiation will break further data transfers.
781 In such a case, using "wide:0" in the bootup command will be helpfull.
782
78310.2.14 Differential mode
784 diff:0 never set up diff mode
785 diff:1 set up diff mode if BIOS set it
786 diff:2 always set up diff mode
787 diff:3 set diff mode if GPIO3 is not set
788
78910.2.15 IRQ mode
790 irqm:0 always open drain
791 irqm:1 same as initial settings (assumed BIOS settings)
792 irqm:2 always totem pole
793 irqm:0x10 driver will not use SA_SHIRQ flag when requesting irq
794 irqm:0x20 driver will not use SA_INTERRUPT flag when requesting irq
795
796 (Bits 0x10 and 0x20 can be combined with hardware irq mode option)
797
79810.2.16 Reverse probe
799 revprob:n probe chip ids from the PCI configuration in this order:
800 810, 815, 820, 860, 875, 885, 895, 896
801 revprob:y probe chip ids in the reverse order.
802
80310.2.17 Fix up PCI configuration space
804 pcifix:<option bits>
805
806 Available option bits:
807 0x0: No attempt to fix PCI configuration space registers values.
808 0x1: Set PCI cache-line size register if not set.
809 0x2: Set write and invalidate bit in PCI command register.
810 0x4: Increase if necessary PCI latency timer according to burst max.
811
812 Use 'pcifix:7' in order to allow the driver to fix up all PCI features.
813
81410.2.18 Serial NVRAM
815 nvram:n do not look for serial NVRAM
816 nvram:y test controllers for onboard serial NVRAM
817 (alternate binary form)
818 mvram=<bits options>
819 0x01 look for NVRAM (equivalent to nvram=y)
820 0x02 ignore NVRAM "Synchronous negotiation" parameters for all devices
821 0x04 ignore NVRAM "Wide negotiation" parameter for all devices
822 0x08 ignore NVRAM "Scan at boot time" parameter for all devices
823 0x80 also attach controllers set to OFF in the NVRAM (sym53c8xx only)
824
82510.2.19 Check SCSI BUS
826 buschk:<option bits>
827
828 Available option bits:
829 0x0: No check.
830 0x1: Check and do not attach the controller on error.
831 0x2: Check and just warn on error.
832 0x4: Disable SCSI bus integrity checking.
833
83410.2.20 Exclude a host from being attached
835 excl=<io_address>
836
837 Prevent host at a given io address from being attached.
838 For example 'ncr53c8xx=excl:0xb400,excl:0xc000' indicate to the
839 ncr53c8xx driver not to attach hosts at address 0xb400 and 0xc000.
840
84110.2.21 Suggest a default SCSI id for hosts
842 hostid:255 no id suggested.
843 hostid:#x (0 < x < 7) x suggested for hosts SCSI id.
844
845 If a host SCSI id is available from the NVRAM, the driver will ignore
846 any value suggested as boot option. Otherwise, if a suggested value
847 different from 255 has been supplied, it will use it. Otherwise, it will
848 try to deduce the value previously set in the hardware and use value
849 7 if the hardware value is zero.
850
85110.2.22 Enable use of IMMEDIATE ARBITRATION
852 (only supported by the sym53c8xx driver. See 10.7 for more details)
853 iarb:0 do not use this feature.
854 iarb:#x use this feature according to bit fields as follow:
855
856 bit 0 (1) : enable IARB each time the initiator has been reselected
857 when it arbitrated for the SCSI BUS.
858 (#x >> 4) : maximum number of successive settings of IARB if the initiator
859 win arbitration and it has other commands to send to a device.
860
861Boot fail safe
862 safe:y load the following assumed fail safe initial setup
863
864 master parity disabled mpar:n
865 scsi parity enabled spar:y
866 disconnections not allowed disc:n
867 special features disabled specf:n
868 ultra scsi disabled ultra:n
869 force sync negotiation disabled fsn:n
870 reverse probe disabled revprob:n
871 PCI fix up disabled pcifix:0
872 serial NVRAM enabled nvram:y
873 verbosity level 2 verb:2
874 tagged command queuing disabled tags:0
875 synchronous negotiation disabled sync:255
876 debug flags none debug:0
877 burst length from BIOS settings burst:255
878 LED support disabled led:0
879 wide support disabled wide:0
880 settle time 10 seconds settle:10
881 differential support from BIOS settings diff:1
882 irq mode from BIOS settings irqm:1
883 SCSI BUS check do not attach on error buschk:1
884 immediate arbitration disabled iarb:0
885
88610.3 Advised boot setup commands
887
888If the driver has been configured with default options, the equivalent
889boot setup is:
890
891 ncr53c8xx=mpar:y,spar:y,disc:y,specf:3,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
892 tags:0,sync:50,debug:0,burst:7,led:0,wide:1,settle:2,diff:0,irqm:0
893
894For an installation diskette or a safe but not fast system,
895boot setup can be:
896
897 ncr53c8xx=safe:y,mpar:y,disc:y
898 ncr53c8xx=safe:y,disc:y
899 ncr53c8xx=safe:y,mpar:y
900 ncr53c8xx=safe:y
901
902My personnal system works flawlessly with the following equivalent setup:
903
904 ncr53c8xx=mpar:y,spar:y,disc:y,specf:1,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
905 tags:32,sync:12,debug:0,burst:7,led:1,wide:1,settle:2,diff:0,irqm:0
906
907The driver prints its actual setup when verbosity level is 2. You can try
908"ncr53c8xx=verb:2" to get the "static" setup of the driver, or add "verb:2"
909to your boot setup command in order to check the actual setup the driver is
910using.
911
91210.4 PCI configuration fix-up boot option
913
914pcifix:<option bits>
915
916Available option bits:
917 0x1: Set PCI cache-line size register if not set.
918 0x2: Set write and invalidate bit in PCI command register.
919
920Use 'pcifix:3' in order to allow the driver to fix both PCI features.
921
922These options only apply to new SYMBIOS chips 810A, 825A, 860, 875
923and 895 and are only supported for Pentium and 486 class processors.
924Recent SYMBIOS 53C8XX scsi processors are able to use PCI read multiple
925and PCI write and invalidate commands. These features require the
926cache line size register to be properly set in the PCI configuration
927space of the chips. On the other hand, chips will use PCI write and
928invalidate commands only if the corresponding bit is set to 1 in the
929PCI command register.
930
931Not all PCI bioses set the PCI cache line register and the PCI write and
932invalidate bit in the PCI configuration space of 53C8XX chips.
933Optimized PCI accesses may be broken for some PCI/memory controllers or
934make problems with some PCI boards.
935
936This fix-up worked flawlessly on my previous system.
937(MB Triton HX / 53C875 / 53C810A)
938I use these options at my own risks as you will do if you decide to
939use them too.
940
941
94210.5 Serial NVRAM support boot option
943
944nvram:n do not look for serial NVRAM
945nvram:y test controllers for onboard serial NVRAM
946
947This option can also been entered as an hexadecimal value that allows
948to control what information the driver will get from the NVRAM and what
949information it will ignore.
950For details see '17. Serial NVRAM support'.
951
952When this option is enabled, the driver tries to detect all boards using
953a Serial NVRAM. This memory is used to hold user set up parameters.
954
955The parameters the driver is able to get from the NVRAM depend on the
956data format used, as follow:
957
958 Tekram format Symbios format
959General and host parameters
960 Boot order N Y
961 Host SCSI ID Y Y
962 SCSI parity checking Y Y
963 Verbose boot messages N Y
964SCSI devices parameters
965 Synchronous transfer speed Y Y
966 Wide 16 / Narrow Y Y
967 Tagged Command Queuing enabled Y Y
968 Disconnections enabled Y Y
969 Scan at boot time N Y
970
971In order to speed up the system boot, for each device configured without
972the "scan at boot time" option, the driver forces an error on the
973first TEST UNIT READY command received for this device.
974
975Some SDMS BIOS revisions seem to be unable to boot cleanly with very fast
976hard disks. In such a situation you cannot configure the NVRAM with
977optimized parameters value.
978
979The 'nvram' boot option can be entered in hexadecimal form in order
980to ignore some options configured in the NVRAM, as follow:
981
982mvram=<bits options>
983 0x01 look for NVRAM (equivalent to nvram=y)
984 0x02 ignore NVRAM "Synchronous negotiation" parameters for all devices
985 0x04 ignore NVRAM "Wide negotiation" parameter for all devices
986 0x08 ignore NVRAM "Scan at boot time" parameter for all devices
987 0x80 also attach controllers set to OFF in the NVRAM (sym53c8xx only)
988
989Option 0x80 is only supported by the sym53c8xx driver and is disabled by
990default. Result is that, by default (option not set), the sym53c8xx driver
991will not attach controllers set to OFF in the NVRAM.
992
993The ncr53c8xx always tries to attach all the controllers. Option 0x80 has
994not been added to the ncr53c8xx driver, since it has been reported to
995confuse users who use this driver since a long time. If you desire a
996controller not to be attached by the ncr53c8xx driver at Linux boot, you
997must use the 'excl' driver boot option.
998
99910.6 SCSI BUS checking boot option.
1000
1001When this option is set to a non-zero value, the driver checks SCSI lines
1002logic state, 100 micro-seconds after having asserted the SCSI RESET line.
1003The driver just reads SCSI lines and checks all lines read FALSE except RESET.
1004Since SCSI devices shall release the BUS at most 800 nano-seconds after SCSI
1005RESET has been asserted, any signal to TRUE may indicate a SCSI BUS problem.
1006Unfortunately, the following common SCSI BUS problems are not detected:
1007- Only 1 terminator installed.
1008- Misplaced terminators.
1009- Bad quality terminators.
1010On the other hand, either bad cabling, broken devices, not conformant
1011devices, ... may cause a SCSI signal to be wrong when te driver reads it.
1012
101310.7 IMMEDIATE ARBITRATION boot option
1014
1015This option is only supported by the SYM53C8XX driver (not by the NCR53C8XX).
1016
1017SYMBIOS 53C8XX chips are able to arbitrate for the SCSI BUS as soon as they
1018have detected an expected disconnection (BUS FREE PHASE). For this process
1019to be started, bit 1 of SCNTL1 IO register must be set when the chip is
1020connected to the SCSI BUS.
1021
1022When this feature has been enabled for the current connection, the chip has
1023every chance to win arbitration if only devices with lower priority are
1024competing for the SCSI BUS. By the way, when the chip is using SCSI id 7,
1025then it will for sure win the next SCSI BUS arbitration.
1026
1027Since, there is no way to know what devices are trying to arbitrate for the
1028BUS, using this feature can be extremely unfair. So, you are not advised
1029to enable it, or at most enable this feature for the case the chip lost
1030the previous arbitration (boot option 'iarb:1').
1031
1032This feature has the following advantages:
1033
1034a) Allow the initiator with ID 7 to win arbitration when it wants so.
1035b) Overlap at least 4 micro-seconds of arbitration time with the execution
1036 of SCRIPTS that deal with the end of the current connection and that
1037 starts the next job.
1038
1039Hmmm... But (a) may just prevent other devices from reselecting the initiator,
1040and delay data transfers or status/completions, and (b) may just waste
1041SCSI BUS bandwidth if the SCRIPTS execution lasts more than 4 micro-seconds.
1042
1043The use of IARB needs the SCSI_NCR_IARB_SUPPORT option to have been defined
1044at compile time and the 'iarb' boot option to have been set to a non zero
1045value at boot time. It is not that useful for real work, but can be used
1046to stress SCSI devices or for some applications that can gain advantage of
1047it. By the way, if you experience badnesses like 'unexpected disconnections',
1048'bad reselections', etc... when using IARB on heavy IO load, you should not
1049be surprised, because force-feeding anything and blocking its arse at the
1050same time cannot work for a long time. :-))
1051
1052
105311. Some constants and flags of the ncr53c8xx.h header file
1054
1055Some of these are defined from the configuration parameters. To
1056change other "defines", you must edit the header file. Do that only
1057if you know what you are doing.
1058
1059SCSI_NCR_SETUP_SPECIAL_FEATURES (default: defined)
1060 If defined, the driver will enable some special features according
1061 to chip and revision id.
1062 For 810A, 860, 825A, 875 and 895 scsi chips, this option enables
1063 support of features that reduce load of PCI bus and memory accesses
1064 during scsi transfer processing: burst op-code fetch, read multiple,
1065 read line, prefetch, cache line, write and invalidate,
1066 burst 128 (875 only), large dma fifo (875 only), offset 16 (875 only).
1067 Can be changed by the following boot setup command:
1068 ncr53c8xx=specf:n
1069
1070SCSI_NCR_IOMAPPED (default: not defined)
1071 If defined, normal I/O is forced.
1072
1073SCSI_NCR_SHARE_IRQ (default: defined)
1074 If defined, request shared IRQ.
1075
1076SCSI_NCR_MAX_TAGS (default: 8)
1077 Maximum number of simultaneous tagged commands to a device.
1078 Can be changed by "settags <target> <maxtags>"
1079
1080SCSI_NCR_SETUP_DEFAULT_SYNC (default: 50)
1081 Transfer period factor the driver will use at boot time for synchronous
1082 negotiation. 0 means asynchronous.
1083 Can be changed by "setsync <target> <period factor>"
1084
1085SCSI_NCR_SETUP_DEFAULT_TAGS (default: 8)
1086 Default number of simultaneous tagged commands to a device.
1087 < 1 means tagged command queuing disabled at start-up.
1088
1089SCSI_NCR_ALWAYS_SIMPLE_TAG (default: defined)
1090 Use SIMPLE TAG for read and write commands.
1091 Can be changed by "setorder <ordered|simple|default>"
1092
1093SCSI_NCR_SETUP_DISCONNECTION (default: defined)
1094 If defined, targets are allowed to disconnect.
1095
1096SCSI_NCR_SETUP_FORCE_SYNC_NEGO (default: not defined)
1097 If defined, synchronous negotiation is tried for all SCSI-2 devices.
1098 Can be changed by "setsync <target> <period>"
1099
1100SCSI_NCR_SETUP_MASTER_PARITY (default: defined)
1101 If defined, master parity checking is enabled.
1102
1103SCSI_NCR_SETUP_MASTER_PARITY (default: defined)
1104 If defined, SCSI parity checking is enabled.
1105
1106SCSI_NCR_PROFILE_SUPPORT (default: not defined)
1107 If defined, profiling information is gathered.
1108
1109SCSI_NCR_MAX_SCATTER (default: 128)
1110 Scatter list size of the driver ccb.
1111
1112SCSI_NCR_MAX_TARGET (default: 16)
1113 Max number of targets per host.
1114
1115SCSI_NCR_MAX_HOST (default: 2)
1116 Max number of host controllers.
1117
1118SCSI_NCR_SETTLE_TIME (default: 2)
1119 Number of seconds the driver will wait after reset.
1120
1121SCSI_NCR_TIMEOUT_ALERT (default: 3)
1122 If a pending command will time out after this amount of seconds,
1123 an ordered tag is used for the next command.
1124 Avoids timeouts for unordered tagged commands.
1125
1126SCSI_NCR_CAN_QUEUE (default: 7*SCSI_NCR_MAX_TAGS)
1127 Max number of commands that can be queued to a host.
1128
1129SCSI_NCR_CMD_PER_LUN (default: SCSI_NCR_MAX_TAGS)
1130 Max number of commands queued to a host for a device.
1131
1132SCSI_NCR_SG_TABLESIZE (default: SCSI_NCR_MAX_SCATTER-1)
1133 Max size of the Linux scatter/gather list.
1134
1135SCSI_NCR_MAX_LUN (default: 8)
1136 Max number of LUNs per target.
1137
1138
113912. Installation
1140
1141This driver is part of the linux kernel distribution.
1142Driver files are located in the sub-directory "drivers/scsi" of the
1143kernel source tree.
1144
1145Driver files:
1146
1147 README.ncr53c8xx : this file
1148 ChangeLog.ncr53c8xx : change log
1149 ncr53c8xx.h : definitions
1150 ncr53c8xx.c : the driver code
1151
1152New driver versions are made available separately in order to allow testing
1153changes and new features prior to including them into the linux kernel
1154distribution. The following URL provides informations on latest avalaible
1155patches:
1156
1157 ftp://ftp.tux.org/pub/people/gerard-roudier/README
1158
1159
116013. Architecture dependent features.
1161
1162<Not yet written>
1163
1164
116514. Known problems
1166
116714.1 Tagged commands with Iomega Jaz device
1168
1169I have not tried this device, however it has been reported to me the
1170following: This device is capable of Tagged command queuing. However
1171while spinning up, it rejects Tagged commands. This behaviour is
1172conforms to 6.8.2 of SCSI-2 specifications. The current behaviour of
1173the driver in that situation is not satisfying. So do not enable
1174Tagged command queuing for devices that are able to spin down. The
1175other problem that may appear is timeouts. The only way to avoid
1176timeouts seems to edit linux/drivers/scsi/sd.c and to increase the
1177current timeout values.
1178
117914.2 Device names change when another controller is added.
1180
1181When you add a new NCR53C8XX chip based controller to a system that already
1182has one or more controllers of this family, it may happen that the order
1183the driver registers them to the kernel causes problems due to device
1184name changes.
1185When at least one controller uses NvRAM, SDMS BIOS version 4 allows you to
1186define the order the BIOS will scan the scsi boards. The driver attaches
1187controllers according to BIOS information if NvRAM detect option is set.
1188
1189If your controllers do not have NvRAM, you can:
1190
1191- Ask the driver to probe chip ids in reverse order from the boot command
1192 line: ncr53c8xx=revprob:y
1193- Make appropriate changes in the fstab.
1194- Use the 'scsidev' tool from Eric Youngdale.
1195
119614.3 Using only 8 bit devices with a WIDE SCSI controller.
1197
1198When only 8 bit NARROW devices are connected to a 16 bit WIDE SCSI controller,
1199you must ensure that lines of the wide part of the SCSI BUS are pulled-up.
1200This can be achieved by ENABLING the WIDE TERMINATOR portion of the SCSI
1201controller card.
1202The TYAN 1365 documentation revision 1.2 is not correct about such settings.
1203(page 10, figure 3.3).
1204
120514.4 Possible data corruption during a Memory Write and Invalidate
1206
1207This problem is described in SYMBIOS DEL 397, Part Number 69-039241, ITEM 4.
1208
1209In some complex situations, 53C875 chips revision <= 3 may start a PCI
1210Write and Invalidate Command at a not cache-line-aligned 4 DWORDS boundary.
1211This is only possible when Cache Line Size is 8 DWORDS or greater.
1212Pentium systems use a 8 DWORDS cache line size and so are concerned by
1213this chip bug, unlike i486 systems that use a 4 DWORDS cache line size.
1214
1215When this situation occurs, the chip may complete the Write and Invalidate
1216command after having only filled part of the last cache line involved in
1217the transfer, leaving to data corruption the remainder of this cache line.
1218
1219Not using Write And Invalidate obviously gets rid of this chip bug, and so
1220it is now the default setting of the driver.
1221However, for people like me who want to enable this feature, I have added
1222part of a work-around suggested by SYMBIOS. This work-around resets the
1223addressing logic when the DATA IN phase is entered and so prevents the bug
1224from being triggered for the first SCSI MOVE of the phase. This work-around
1225should be enough according to the following:
1226
1227The only driver internal data structure that is greater than 8 DWORDS and
1228that is moved by the SCRIPTS processor is the 'CCB header' that contains
1229the context of the SCSI transfer. This data structure is aligned on 8 DWORDS
1230boundary (Pentium Cache Line Size), and so is immune to this chip bug, at
1231least on Pentium systems.
1232But the conditions of this bug can be met when a SCSI read command is
1233performed using a buffer that is 4 DWORDS but not cache-line aligned.
1234This cannot happen under Linux when scatter/gather lists are used since
1235they only refer to system buffers that are well aligned. So, a work around
1236may only be needed under Linux when a scatter/gather list is not used and
1237when the SCSI DATA IN phase is reentered after a phase mismatch.
1238
123914.5 IRQ sharing problems
1240
1241When an IRQ is shared by devices that are handled by different drivers, it
1242may happen that one driver complains about the request of the IRQ having
1243failed. Inder Linux-2.0, this may be due to one driver having requested the
1244IRQ using the SA_INTERRUPT flag but some other having requested the same IRQ
1245without this flag. Under both Linux-2.0 and linux-2.2, this may be caused by
1246one driver not having requested the IRQ with the SA_SHIRQ flag.
1247
1248By default, the ncr53c8xx and sym53c8xx drivers request IRQs with both the
1249SA_INTERRUPT and the SA_SHIRQ flag under Linux-2.0 and with only the SA_SHIRQ
1250flag under Linux-2.2.
1251
1252Under Linux-2.0, you can disable use of SA_INTERRUPT flag from the boot
1253command line by using the following option:
1254
1255 ncr53c8xx=irqm:0x20 (for the generic ncr53c8xx driver)
1256 sym53c8xx=irqm:0x20 (for the sym53c8xx driver)
1257
1258If this does not fix the problem, then you may want to check how all other
1259drivers are requesting the IRQ and report the problem. Note that if at least
1260a single driver does not request the IRQ with the SA_SHIRQ flag (share IRQ),
1261then the request of the IRQ obviously will not succeed for all the drivers.
1262
126315. SCSI problem troubleshooting
1264
126515.1 Problem tracking
1266
1267Most SCSI problems are due to a non conformant SCSI bus or to buggy
1268devices. If infortunately you have SCSI problems, you can check the
1269following things:
1270
1271- SCSI bus cables
1272- terminations at both end of the SCSI chain
1273- linux syslog messages (some of them may help you)
1274
1275If you do not find the source of problems, you can configure the
1276driver with no features enabled.
1277
1278- only asynchronous data transfers
1279- tagged commands disabled
1280- disconnections not allowed
1281
1282Now, if your SCSI bus is ok, your system have every chance to work
1283with this safe configuration but performances will not be optimal.
1284
1285If it still fails, then you can send your problem description to
1286appropriate mailing lists or news-groups. Send me a copy in order to
1287be sure I will receive it. Obviously, a bug in the driver code is
1288possible.
1289
1290 My email address: Gerard Roudier <groudier@free.fr>
1291
1292Allowing disconnections is important if you use several devices on
1293your SCSI bus but often causes problems with buggy devices.
1294Synchronous data transfers increases throughput of fast devices like
1295hard disks. Good SCSI hard disks with a large cache gain advantage of
1296tagged commands queuing.
1297
1298Try to enable one feature at a time with control commands. For example:
1299
1300- echo "setsync all 25" >/proc/scsi/ncr53c8xx/0
1301 Will enable fast synchronous data transfer negotiation for all targets.
1302
1303- echo "setflag 3" >/proc/scsi/ncr53c8xx/0
1304 Will reset flags (no_disc) for target 3, and so will allow it to disconnect
1305 the SCSI Bus.
1306
1307- echo "settags 3 8" >/proc/scsi/ncr53c8xx/0
1308 Will enable tagged command queuing for target 3 if that device supports it.
1309
1310Once you have found the device and the feature that cause problems, just
1311disable that feature for that device.
1312
131315.2 Understanding hardware error reports
1314
1315When the driver detects an unexpected error condition, it may display a
1316message of the following pattern.
1317
1318sym53c876-0:1: ERROR (0:48) (1-21-65) (f/95) @ (script 7c0:19000000).
1319sym53c876-0: script cmd = 19000000
1320sym53c876-0: regdump: da 10 80 95 47 0f 01 07 75 01 81 21 80 01 09 00.
1321
1322Some fields in such a message may help you understand the cause of the
1323problem, as follows:
1324
1325sym53c876-0:1: ERROR (0:48) (1-21-65) (f/95) @ (script 7c0:19000000).
1326............A.........B.C....D.E..F....G.H.......I.....J...K.......
1327
1328Field A : target number.
1329 SCSI ID of the device the controller was talking with at the moment the
1330 error occurs.
1331
1332Field B : DSTAT io register (DMA STATUS)
1333 Bit 0x40 : MDPE Master Data Parity Error
1334 Data parity error detected on the PCI BUS.
1335 Bit 0x20 : BF Bus Fault
1336 PCI bus fault condition detected
1337 Bit 0x01 : IID Illegal Instruction Detected
1338 Set by the chip when it detects an Illegal Instruction format
1339 on some condition that makes an instruction illegal.
1340 Bit 0x80 : DFE Dma Fifo Empty
1341 Pure status bit that does not indicate an error.
1342 If the reported DSTAT value contains a combination of MDPE (0x40),
1343 BF (0x20), then the cause may be likely due to a PCI BUS problem.
1344
1345Field C : SIST io register (SCSI Interrupt Status)
1346 Bit 0x08 : SGE SCSI GROSS ERROR
1347 Indicates that the chip detected a severe error condition
1348 on the SCSI BUS that prevents the SCSI protocol from functioning
1349 properly.
1350 Bit 0x04 : UDC Unexpected Disconnection
1351 Indicates that the device released the SCSI BUS when the chip
1352 was not expecting this to happen. A device may behave so to
1353 indicate the SCSI initiator that an error condition not reportable using the SCSI protocol has occurred.
1354 Bit 0x02 : RST SCSI BUS Reset
1355 Generally SCSI targets do not reset the SCSI BUS, although any
1356 device on the BUS can reset it at any time.
1357 Bit 0x01 : PAR Parity
1358 SCSI parity error detected.
1359 On a faulty SCSI BUS, any error condition among SGE (0x08), UDC (0x04) and
1360 PAR (0x01) may be detected by the chip. If your SCSI system sometimes
1361 encounters such error conditions, especially SCSI GROSS ERROR, then a SCSI
1362 BUS problem is likely the cause of these errors.
1363
1364For fields D,E,F,G and H, you may look into the sym53c8xx_defs.h file
1365that contains some minimal comments on IO register bits.
1366Field D : SOCL Scsi Output Control Latch
1367 This register reflects the state of the SCSI control lines the
1368 chip want to drive or compare against.
1369Field E : SBCL Scsi Bus Control Lines
1370 Actual value of control lines on the SCSI BUS.
1371Field F : SBDL Scsi Bus Data Lines
1372 Actual value of data lines on the SCSI BUS.
1373Field G : SXFER SCSI Transfer
1374 Contains the setting of the Synchronous Period for output and
1375 the current Synchronous offset (offset 0 means asynchronous).
1376Field H : SCNTL3 Scsi Control Register 3
1377 Contains the setting of timing values for both asynchronous and
1378 synchronous data transfers.
1379
1380Understanding Fields I, J, K and dumps requires to have good knowledge of
1381SCSI standards, chip cores functionnals and internal driver data structures.
1382You are not required to decode and understand them, unless you want to help
1383maintain the driver code.
1384
138516. Synchonous transfer negotiation tables
1386
1387Tables below have been created by calling the routine the driver uses
1388for synchronisation negotiation timing calculation and chip setting.
1389The first table corresponds to Ultra chips 53875 and 53C860 with 80 MHz
1390clock and 5 clock divisors.
1391The second one has been calculated by setting the scsi clock to 40 Mhz
1392and using 4 clock divisors and so applies to all NCR53C8XX chips in fast
1393SCSI-2 mode.
1394
1395Periods are in nano-seconds and speeds are in Mega-transfers per second.
13961 Mega-transfers/second means 1 MB/s with 8 bits SCSI and 2 MB/s with
1397Wide16 SCSI.
1398
139916.1 Synchronous timings for 53C895, 53C875 and 53C860 SCSI controllers
1400
1401 ----------------------------------------------
1402 Negotiated NCR settings
1403 Factor Period Speed Period Speed
1404 ------ ------ ------ ------ ------
1405 10 25 40.000 25 40.000 (53C895 only)
1406 11 30.2 33.112 31.25 32.000 (53C895 only)
1407 12 50 20.000 50 20.000
1408 13 52 19.230 62 16.000
1409 14 56 17.857 62 16.000
1410 15 60 16.666 62 16.000
1411 16 64 15.625 75 13.333
1412 17 68 14.705 75 13.333
1413 18 72 13.888 75 13.333
1414 19 76 13.157 87 11.428
1415 20 80 12.500 87 11.428
1416 21 84 11.904 87 11.428
1417 22 88 11.363 93 10.666
1418 23 92 10.869 93 10.666
1419 24 96 10.416 100 10.000
1420 25 100 10.000 100 10.000
1421 26 104 9.615 112 8.888
1422 27 108 9.259 112 8.888
1423 28 112 8.928 112 8.888
1424 29 116 8.620 125 8.000
1425 30 120 8.333 125 8.000
1426 31 124 8.064 125 8.000
1427 32 128 7.812 131 7.619
1428 33 132 7.575 150 6.666
1429 34 136 7.352 150 6.666
1430 35 140 7.142 150 6.666
1431 36 144 6.944 150 6.666
1432 37 148 6.756 150 6.666
1433 38 152 6.578 175 5.714
1434 39 156 6.410 175 5.714
1435 40 160 6.250 175 5.714
1436 41 164 6.097 175 5.714
1437 42 168 5.952 175 5.714
1438 43 172 5.813 175 5.714
1439 44 176 5.681 187 5.333
1440 45 180 5.555 187 5.333
1441 46 184 5.434 187 5.333
1442 47 188 5.319 200 5.000
1443 48 192 5.208 200 5.000
1444 49 196 5.102 200 5.000
1445
1446
144716.2 Synchronous timings for fast SCSI-2 53C8XX controllers
1448
1449 ----------------------------------------------
1450 Negotiated NCR settings
1451 Factor Period Speed Period Speed
1452 ------ ------ ------ ------ ------
1453 25 100 10.000 100 10.000
1454 26 104 9.615 125 8.000
1455 27 108 9.259 125 8.000
1456 28 112 8.928 125 8.000
1457 29 116 8.620 125 8.000
1458 30 120 8.333 125 8.000
1459 31 124 8.064 125 8.000
1460 32 128 7.812 131 7.619
1461 33 132 7.575 150 6.666
1462 34 136 7.352 150 6.666
1463 35 140 7.142 150 6.666
1464 36 144 6.944 150 6.666
1465 37 148 6.756 150 6.666
1466 38 152 6.578 175 5.714
1467 39 156 6.410 175 5.714
1468 40 160 6.250 175 5.714
1469 41 164 6.097 175 5.714
1470 42 168 5.952 175 5.714
1471 43 172 5.813 175 5.714
1472 44 176 5.681 187 5.333
1473 45 180 5.555 187 5.333
1474 46 184 5.434 187 5.333
1475 47 188 5.319 200 5.000
1476 48 192 5.208 200 5.000
1477 49 196 5.102 200 5.000
1478
1479
148017. Serial NVRAM (added by Richard Waltham: dormouse@farsrobt.demon.co.uk)
1481
148217.1 Features
1483
1484Enabling serial NVRAM support enables detection of the serial NVRAM included
1485on Symbios and some Symbios compatible host adaptors, and Tekram boards. The
1486serial NVRAM is used by Symbios and Tekram to hold set up parameters for the
1487host adaptor and it's attached drives.
1488
1489The Symbios NVRAM also holds data on the boot order of host adaptors in a
1490system with more than one host adaptor. This enables the order of scanning
1491the cards for drives to be changed from the default used during host adaptor
1492detection.
1493
1494This can be done to a limited extent at the moment using "reverse probe" but
1495this only changes the order of detection of different types of cards. The
1496NVRAM boot order settings can do this as well as change the order the same
1497types of cards are scanned in, something "reverse probe" cannot do.
1498
1499Tekram boards using Symbios chips, DC390W/F/U, which have NVRAM are detected
1500and this is used to distinguish between Symbios compatible and Tekram host
1501adaptors. This is used to disable the Symbios compatible "diff" setting
1502incorrectly set on Tekram boards if the CONFIG_SCSI_53C8XX_SYMBIOS_COMPAT
1503configuration parameter is set enabling both Symbios and Tekram boards to be
1504used together with the Symbios cards using all their features, including
1505"diff" support. ("led pin" support for Symbios compatible cards can remain
1506enabled when using Tekram cards. It does nothing useful for Tekram host
1507adaptors but does not cause problems either.)
1508
1509
151017.2 Symbios NVRAM layout
1511
1512typical data at NVRAM address 0x100 (53c810a NVRAM)
1513-----------------------------------------------------------
151400 00
151564 01
15168e 0b
1517
151800 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
1519
152004 00 0f 00 00 10 00 50 00 00 01 00 00 62
152104 00 03 00 00 10 00 58 00 00 01 00 00 63
152204 00 01 00 00 10 00 48 00 00 01 00 00 61
152300 00 00 00 00 00 00 00 00 00 00 00 00 00
1524
15250f 00 08 08 64 00 0a 00
15260f 00 08 08 64 00 0a 00
15270f 00 08 08 64 00 0a 00
15280f 00 08 08 64 00 0a 00
15290f 00 08 08 64 00 0a 00
15300f 00 08 08 64 00 0a 00
15310f 00 08 08 64 00 0a 00
15320f 00 08 08 64 00 0a 00
1533
15340f 00 08 08 64 00 0a 00
15350f 00 08 08 64 00 0a 00
15360f 00 08 08 64 00 0a 00
15370f 00 08 08 64 00 0a 00
15380f 00 08 08 64 00 0a 00
15390f 00 08 08 64 00 0a 00
15400f 00 08 08 64 00 0a 00
15410f 00 08 08 64 00 0a 00
1542
154300 00 00 00 00 00 00 00
154400 00 00 00 00 00 00 00
154500 00 00 00 00 00 00 00
154600 00 00 00 00 00 00 00
154700 00 00 00 00 00 00 00
154800 00 00 00 00 00 00 00
154900 00 00 00 00 00 00 00
155000 00 00 00 00 00 00 00
1551
155200 00 00 00 00 00 00 00
155300 00 00 00 00 00 00 00
155400 00 00 00 00 00 00 00
155500 00 00 00 00 00 00 00
155600 00 00 00 00 00 00 00
155700 00 00 00 00 00 00 00
155800 00 00 00 00 00 00 00
155900 00 00 00 00 00 00 00
1560
156100 00 00 00 00 00 00 00
156200 00 00 00 00 00 00 00
156300 00 00 00 00 00 00 00
1564
1565fe fe
156600 00
156700 00
1568-----------------------------------------------------------
1569NVRAM layout details
1570
1571NVRAM Address 0x000-0x0ff not used
1572 0x100-0x26f initialised data
1573 0x270-0x7ff not used
1574
1575general layout
1576
1577 header - 6 bytes,
1578 data - 356 bytes (checksum is byte sum of this data)
1579 trailer - 6 bytes
1580 ---
1581 total 368 bytes
1582
1583data area layout
1584
1585 controller set up - 20 bytes
1586 boot configuration - 56 bytes (4x14 bytes)
1587 device set up - 128 bytes (16x8 bytes)
1588 unused (spare?) - 152 bytes (19x8 bytes)
1589 ---
1590 total 356 bytes
1591
1592-----------------------------------------------------------
1593header
1594
159500 00 - ?? start marker
159664 01 - byte count (lsb/msb excludes header/trailer)
15978e 0b - checksum (lsb/msb excludes header/trailer)
1598-----------------------------------------------------------
1599controller set up
1600
160100 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
1602 | | | |
1603 | | | -- host ID
1604 | | |
1605 | | --Removable Media Support
1606 | | 0x00 = none
1607 | | 0x01 = Bootable Device
1608 | | 0x02 = All with Media
1609 | |
1610 | --flag bits 2
1611 | 0x00000001= scan order hi->low
1612 | (default 0x00 - scan low->hi)
1613 --flag bits 1
1614 0x00000001 scam enable
1615 0x00000010 parity enable
1616 0x00000100 verbose boot msgs
1617
1618remaining bytes unknown - they do not appear to change in my
1619current set up for any of the controllers.
1620
1621default set up is identical for 53c810a and 53c875 NVRAM
1622(Removable Media added Symbios BIOS version 4.09)
1623-----------------------------------------------------------
1624boot configuration
1625
1626boot order set by order of the devices in this table
1627
162804 00 0f 00 00 10 00 50 00 00 01 00 00 62 -- 1st controller
162904 00 03 00 00 10 00 58 00 00 01 00 00 63 2nd controller
163004 00 01 00 00 10 00 48 00 00 01 00 00 61 3rd controller
163100 00 00 00 00 00 00 00 00 00 00 00 00 00 4th controller
1632 | | | | | | | |
1633 | | | | | | ---- PCI io port adr
1634 | | | | | --0x01 init/scan at boot time
1635 | | | | --PCI device/function number (0xdddddfff)
1636 | | ----- ?? PCI vendor ID (lsb/msb)
1637 ----PCI device ID (lsb/msb)
1638
1639?? use of this data is a guess but seems reasonable
1640
1641remaining bytes unknown - they do not appear to change in my
1642current set up
1643
1644default set up is identical for 53c810a and 53c875 NVRAM
1645-----------------------------------------------------------
1646device set up (up to 16 devices - includes controller)
1647
16480f 00 08 08 64 00 0a 00 - id 0
16490f 00 08 08 64 00 0a 00
16500f 00 08 08 64 00 0a 00
16510f 00 08 08 64 00 0a 00
16520f 00 08 08 64 00 0a 00
16530f 00 08 08 64 00 0a 00
16540f 00 08 08 64 00 0a 00
16550f 00 08 08 64 00 0a 00
1656
16570f 00 08 08 64 00 0a 00
16580f 00 08 08 64 00 0a 00
16590f 00 08 08 64 00 0a 00
16600f 00 08 08 64 00 0a 00
16610f 00 08 08 64 00 0a 00
16620f 00 08 08 64 00 0a 00
16630f 00 08 08 64 00 0a 00
16640f 00 08 08 64 00 0a 00 - id 15
1665 | | | | | |
1666 | | | | ----timeout (lsb/msb)
1667 | | | --synch period (0x?? 40 Mtrans/sec- fast 40) (probably 0x28)
1668 | | | (0x30 20 Mtrans/sec- fast 20)
1669 | | | (0x64 10 Mtrans/sec- fast )
1670 | | | (0xc8 5 Mtrans/sec)
1671 | | | (0x00 asynchronous)
1672 | | -- ?? max sync offset (0x08 in NVRAM on 53c810a)
1673 | | (0x10 in NVRAM on 53c875)
1674 | --device bus width (0x08 narrow)
1675 | (0x10 16 bit wide)
1676 --flag bits
1677 0x00000001 - disconnect enabled
1678 0x00000010 - scan at boot time
1679 0x00000100 - scan luns
1680 0x00001000 - queue tags enabled
1681
1682remaining bytes unknown - they do not appear to change in my
1683current set up
1684
1685?? use of this data is a guess but seems reasonable
1686(but it could be max bus width)
1687
1688default set up for 53c810a NVRAM
1689default set up for 53c875 NVRAM - bus width - 0x10
1690 - sync offset ? - 0x10
1691 - sync period - 0x30
1692-----------------------------------------------------------
1693?? spare device space (32 bit bus ??)
1694
169500 00 00 00 00 00 00 00 (19x8bytes)
1696.
1697.
169800 00 00 00 00 00 00 00
1699
1700default set up is identical for 53c810a and 53c875 NVRAM
1701-----------------------------------------------------------
1702trailer
1703
1704fe fe - ? end marker ?
170500 00
170600 00
1707
1708default set up is identical for 53c810a and 53c875 NVRAM
1709-----------------------------------------------------------
1710
1711
1712
171317.3 Tekram NVRAM layout
1714
1715nvram 64x16 (1024 bit)
1716
1717Drive settings
1718
1719Drive ID 0-15 (addr 0x0yyyy0 = device setup, yyyy = ID)
1720 (addr 0x0yyyy1 = 0x0000)
1721
1722 x x x x x x x x x x x x x x x x
1723 | | | | | | | | |
1724 | | | | | | | | ----- parity check 0 - off
1725 | | | | | | | | 1 - on
1726 | | | | | | | |
1727 | | | | | | | ------- sync neg 0 - off
1728 | | | | | | | 1 - on
1729 | | | | | | |
1730 | | | | | | --------- disconnect 0 - off
1731 | | | | | | 1 - on
1732 | | | | | |
1733 | | | | | ----------- start cmd 0 - off
1734 | | | | | 1 - on
1735 | | | | |
1736 | | | | -------------- tagged cmds 0 - off
1737 | | | | 1 - on
1738 | | | |
1739 | | | ---------------- wide neg 0 - off
1740 | | | 1 - on
1741 | | |
1742 --------------------------- sync rate 0 - 10.0 Mtrans/sec
1743 1 - 8.0
1744 2 - 6.6
1745 3 - 5.7
1746 4 - 5.0
1747 5 - 4.0
1748 6 - 3.0
1749 7 - 2.0
1750 7 - 2.0
1751 8 - 20.0
1752 9 - 16.7
1753 a - 13.9
1754 b - 11.9
1755
1756Global settings
1757
1758Host flags 0 (addr 0x100000, 32)
1759
1760 x x x x x x x x x x x x x x x x
1761 | | | | | | | | | | | |
1762 | | | | | | | | ----------- host ID 0x00 - 0x0f
1763 | | | | | | | |
1764 | | | | | | | ----------------------- support for 0 - off
1765 | | | | | | | > 2 drives 1 - on
1766 | | | | | | |
1767 | | | | | | ------------------------- support drives 0 - off
1768 | | | | | | > 1Gbytes 1 - on
1769 | | | | | |
1770 | | | | | --------------------------- bus reset on 0 - off
1771 | | | | | power on 1 - on
1772 | | | | |
1773 | | | | ----------------------------- active neg 0 - off
1774 | | | | 1 - on
1775 | | | |
1776 | | | -------------------------------- imm seek 0 - off
1777 | | | 1 - on
1778 | | |
1779 | | ---------------------------------- scan luns 0 - off
1780 | | 1 - on
1781 | |
1782 -------------------------------------- removable 0 - disable
1783 as BIOS dev 1 - boot device
1784 2 - all
1785
1786Host flags 1 (addr 0x100001, 33)
1787
1788 x x x x x x x x x x x x x x x x
1789 | | | | | |
1790 | | | --------- boot delay 0 - 3 sec
1791 | | | 1 - 5
1792 | | | 2 - 10
1793 | | | 3 - 20
1794 | | | 4 - 30
1795 | | | 5 - 60
1796 | | | 6 - 120
1797 | | |
1798 --------------------------- max tag cmds 0 - 2
1799 1 - 4
1800 2 - 8
1801 3 - 16
1802 4 - 32
1803
1804Host flags 2 (addr 0x100010, 34)
1805
1806 x x x x x x x x x x x x x x x x
1807 |
1808 ----- F2/F6 enable 0 - off ???
1809 1 - on ???
1810
1811checksum (addr 0x111111)
1812
1813checksum = 0x1234 - (sum addr 0-63)
1814
1815----------------------------------------------------------------------------
1816
1817default nvram data:
1818
18190x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
18200x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
18210x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
18220x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1823
18240x0f07 0x0400 0x0001 0x0000 0x0000 0x0000 0x0000 0x0000
18250x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
18260x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
18270x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0xfbbc
1828
1829
183018. Support for Big Endian
1831
1832The PCI local bus has been primarily designed for x86 architecture.
1833As a consequence, PCI devices generally expect DWORDS using little endian
1834byte ordering.
1835
183618.1 Big Endian CPU
1837
1838In order to support NCR chips on a Big Endian architecture the driver has to
1839perform byte reordering each time it is needed. This feature has been
1840added to the driver by Cort <cort@cs.nmt.edu> and is available in driver
1841version 2.5 and later ones. For the moment Big Endian support has only
1842been tested on Linux/PPC (PowerPC).
1843
184418.2 NCR chip in Big Endian mode of operations
1845
1846It can be read in SYMBIOS documentation that some chips support a special
1847Big Endian mode, on paper: 53C815, 53C825A, 53C875, 53C875N, 53C895.
1848This mode of operations is not software-selectable, but needs pin named
1849BigLit to be pulled-up. Using this mode, most of byte reorderings should
1850be avoided when the driver is running on a Big Endian CPU.
1851Driver version 2.5 is also, in theory, ready for this feature.
1852
1853===============================================================================
1854End of NCR53C8XX driver README file
diff --git a/Documentation/scsi/osst.txt b/Documentation/scsi/osst.txt
new file mode 100644
index 000000000000..ce574e7791ab
--- /dev/null
+++ b/Documentation/scsi/osst.txt
@@ -0,0 +1,219 @@
1README file for the osst driver
2===============================
3(w) Kurt Garloff <garloff@suse.de> 12/2000
4
5This file describes the osst driver as of version 0.8.x/0.9.x, the released
6version of the osst driver.
7It is intended to help advanced users to understand the role of osst and to
8get them started using (and maybe debugging) it.
9It won't address issues like "How do I compile a kernel?" or "How do I load
10a module?", as these are too basic.
11Once the OnStream got merged into the official kernel, the distro makers
12will provide the OnStream support for those who are not familiar with
13hacking their kernels.
14
15
16Purpose
17-------
18The osst driver was developed, because the standard SCSI tape driver in
19Linux, st, does not support the OnStream SC-x0 SCSI tape. The st is not to
20blame for that, as the OnStream tape drives do not support the standard SCSI
21command set for Serial Access Storage Devices (SASDs), which basically
22corresponds to the QIC-157 spec.
23Nevertheless, the OnStream tapes are nice pieces of hardware and therefore
24the osst driver has been written to make these tape devs supported by Linux.
25The driver is free software. It's released under the GNU GPL and planned to
26be integrated into the mainstream kernel.
27
28
29Implementation
30--------------
31The osst is a new high-level SCSI driver, just like st, sr, sd and sg. It
32can be compiled into the kernel or loaded as a module.
33As it represents a new device, it got assigned a new device node: /dev/osstX
34are character devices with major no 206 and minor numbers like the /dev/stX
35devices. If those are not present, you may create them by calling
36Makedevs.sh as root (see below).
37The driver started being a copy of st and as such, the osst devices'
38behavior looks very much the same as st to the userspace applications.
39
40
41History
42-------
43In the first place, osst shared it's identity very much with st. That meant
44that it used the same kernel structures and the same device node as st.
45So you could only have either of them being present in the kernel. This has
46been fixed by registering an own device, now.
47st and osst can coexist, each only accessing the devices it can support by
48themselves.
49
50
51Installation
52------------
53osst got integrated into the linux kernel. Select it during kernel
54configuration as module or compile statically into the kernel.
55Compile your kernel and install the modules.
56
57Now, your osst driver is inside the kernel or available as a module,
58depending on your choice during kernel config. You may still need to create
59the device nodes by calling the Makedevs.sh script (see below) manually,
60unless you use a devfs kernel, where this won't be needed.
61
62To load your module, you may use the command
63modprobe osst
64as root. dmesg should show you, whether your OnStream tapes have been
65recognized.
66
67If you want to have the module autoloaded on access to /dev/osst, you may
68add something like
69alias char-major-206 osst
70to your /etc/modprobe.conf (before 2.6: modules.conf).
71
72You may find it convenient to create a symbolic link
73ln -s nosst0 /dev/tape
74to make programs assuming a default name of /dev/tape more convenient to
75use.
76
77The device nodes for osst have to be created. Use the Makedevs.sh script
78attached to this file.
79
80
81Using it
82--------
83You may use the OnStream tape driver with your standard backup software,
84which may be tar, cpio, amanda, arkeia, BRU, Lone Tar, ...
85by specifying /dev/(n)osst0 as the tape device to use or using the above
86symlink trick. The IOCTLs to control tape operation are also mostly
87supported and you may try the mt (or mt_st) program to jump between
88filemarks, eject the tape, ...
89
90There's one limitation: You need to use a block size of 32kB.
91
92(This limitation is worked on and will be fixed in version 0.8.8 of
93 this driver.)
94
95If you just want to get started with standard software, here is an example
96for creating and restoring a full backup:
97# Backup
98tar cvf - / --exclude /proc | buffer -s 32k -m 24M -B -t -o /dev/nosst0
99# Restore
100buffer -s 32k -m 8M -B -t -i /dev/osst0 | tar xvf - -C /
101
102The buffer command has been used to buffer the data before it goes to the
103tape (or the file system) in order to smooth out the data stream and prevent
104the tape from needing to stop and rewind. The OnStream does have an internal
105buffer and a variable speed which help this, but especially on writing, the
106buffering still proves useful in most cases. It also pads the data to
107guarantees the block size of 32k. (Otherwise you may pass the -b64 option to
108tar.)
109Expect something like 1.8MB/s for the SC-x0 drives and 0.9MB/s for the DI-30.
110The USB drive will give you about 0.7MB/s.
111On a fast machine, you may profit from software data compression (z flag for
112tar).
113
114
115USB and IDE
116-----------
117Via the SCSI emulation layers usb-storage and ide-scsi, you can also use the
118osst driver to drive the USB-30 and the DI-30 drives. (Unfortunately, there
119is no such layer for the parallel port, otherwise the DP-30 would work as
120well.) For the USB support, you need the latest 2.4.0-test kernels and the
121latest usb-storage driver from
122http://www.linux-usb.org/
123http://sourceforge.net/cvs/?group_id=3581
124
125Note that the ide-tape driver as of 1.16f uses a slightly outdated on-tape
126format and therefore is not completely interoperable with osst tapes.
127
128The ADR-x0 line is fully SCSI-2 compliant and is supported by st, not osst.
129The on-tape format is supposed to be compatible with the one used by osst.
130
131
132Feedback and updates
133--------------------
134The driver development is coordinated through a mailing list
135<osst@linux1.onstream.nl>
136a CVS repository and some web pages.
137The tester's pages which contain recent news and updated drivers to download
138can be found on
139http://linux1.onstream.nl/test/
140
141If you find any problems, please have a look at the tester's page in order
142to see whether the problem is already known and solved. Otherwise, please
143report it to the mailing list. Your feedback is welcome. (This holds also
144for reports of successful usage, of course.)
145In case of trouble, please do always provide the following info:
146* driver and kernel version used (see syslog)
147* driver messages (syslog)
148* SCSI config and OnStream Firmware (/proc/scsi/scsi)
149* description of error. Is it reproducible?
150* software and commands used
151
152You may subscribe to the mailing list, BTW, it's a majordomo list.
153
154
155Status
156------
1570.8.0 was the first widespread BETA release. Since then a lot of reports
158have been sent, but mostly reported success or only minor trouble.
159All the issues have been addressed.
160Check the web pages for more info about the current developments.
1610.9.x is the tree for the 2.3/2.4 kernel.
162
163
164Acknowledgments
165----------------
166The driver has been started by making a copy of Kai Makisara's st driver.
167Most of the development has been done by Willem Riede. The presence of the
168userspace program osg (onstreamsg) from Terry Hardie has been rather
169helpful. The same holds for Gadi Oxman's ide-tape support for the DI-30.
170I did add some patches to those drivers as well and coordinated things a
171little bit.
172Note that most of them did mostly spend their spare time for the creation of
173this driver.
174The people from OnStream, especially Jack Bombeeck did support this project
175and always tried to answer HW or FW related questions. Furthermore, he
176pushed the FW developers to do the right things.
177SuSE did support this project by allowing me to work on it during my working
178time for them and by integrating the driver into their distro.
179
180More people did help by sending useful comments. Sorry to those who have
181been forgotten. Thanks to all the GNU/FSF and Linux developers who made this
182platform such an interesting, nice and stable platform.
183Thanks go to those who tested the drivers and did send useful reports. Your
184help is needed!
185
186
187Makedevs.sh
188-----------
189#!/bin/sh
190# Script to create OnStream SC-x0 device nodes (major 206)
191# Usage: Makedevs.sh [nos [path to dev]]
192# $Id: README.osst.kernel,v 1.4 2000/12/20 14:13:15 garloff Exp $
193major=206
194nrs=4
195dir=/dev
196test -z "$1" || nrs=$1
197test -z "$2" || dir=$2
198declare -i nr
199nr=0
200test -d $dir || mkdir -p $dir
201while test $nr -lt $nrs; do
202 mknod $dir/osst$nr c $major $nr
203 chown 0.disk $dir/osst$nr; chmod 660 $dir/osst$nr;
204 mknod $dir/nosst$nr c $major $[nr+128]
205 chown 0.disk $dir/nosst$nr; chmod 660 $dir/nosst$nr;
206 mknod $dir/osst${nr}l c $major $[nr+32]
207 chown 0.disk $dir/osst${nr}l; chmod 660 $dir/osst${nr}l;
208 mknod $dir/nosst${nr}l c $major $[nr+160]
209 chown 0.disk $dir/nosst${nr}l; chmod 660 $dir/nosst${nr}l;
210 mknod $dir/osst${nr}m c $major $[nr+64]
211 chown 0.disk $dir/osst${nr}m; chmod 660 $dir/osst${nr}m;
212 mknod $dir/nosst${nr}m c $major $[nr+192]
213 chown 0.disk $dir/nosst${nr}m; chmod 660 $dir/nosst${nr}m;
214 mknod $dir/osst${nr}a c $major $[nr+96]
215 chown 0.disk $dir/osst${nr}a; chmod 660 $dir/osst${nr}a;
216 mknod $dir/nosst${nr}a c $major $[nr+224]
217 chown 0.disk $dir/nosst${nr}a; chmod 660 $dir/nosst${nr}a;
218 let nr+=1
219done
diff --git a/Documentation/scsi/ppa.txt b/Documentation/scsi/ppa.txt
new file mode 100644
index 000000000000..0dac88d86d87
--- /dev/null
+++ b/Documentation/scsi/ppa.txt
@@ -0,0 +1,16 @@
1-------- Terse where to get ZIP Drive help info --------
2
3General Iomega ZIP drive page for Linux:
4http://www.torque.net/~campbell/
5
6Driver achive for old drivers:
7http://www.torque.net/~campbell/ppa/
8
9Linux Parport page (parallel port)
10http://www.torque.net/parport/
11
12Email list for Linux Parport
13linux-parport@torque.net
14
15Email for problems with ZIP or ZIP Plus drivers
16campbell@torque.net
diff --git a/Documentation/scsi/qla2xxx.revision.notes b/Documentation/scsi/qla2xxx.revision.notes
new file mode 100644
index 000000000000..290cdaf84f8f
--- /dev/null
+++ b/Documentation/scsi/qla2xxx.revision.notes
@@ -0,0 +1,457 @@
1/*
2 * QLogic ISP2200 and ISP2300 Linux Driver Revision List File.
3 *
4 ********************************************************************
5 *
6 * Revision History
7 *
8 * Rev 8.00.00b8 December 5, 2003 AV
9 * - Instruct mid-layer to perform initial scan.
10 *
11 * Rev 8.00.00b7 December 5, 2003 AV
12 * - Resync with Linux Kernel 2.6.0-test11.
13 * - Add basic NVRAM parser (extras/qla_nvr).
14 *
15 * Rev 8.00.00b7-pre11 December 3, 2003 AV
16 * - Sanitize the scsi_qla_host structure:
17 * - Purge unused elements.
18 * - Reorganize high-priority members (cache coherency).
19 * - Add support for NVRAM access via a sysfs binary attribute:
20 * - Consolidate semaphore locking access.
21 * - Fix more PCI posting issues.
22 * - Add extras directory for dump/NVRAM tools.
23 * - Remove unused qla_vendor.c file.
24 *
25 * Rev 8.00.00b7-pre11 November 26, 2003 DG/AV
26 * - Merge several patches from Christoph Hellwig [hch@lst.de]:
27 * - in Linux 2.6 both pci and the scsi layer use the generic
28 * dma direction bits, use them directly instead of the scsi
29 * and pci variants and the (noop) conversion routines.
30 * - Fix _IOXX_BAD() usage for external IOCTL interface.
31 * - Use atomic construct for HA loop_state member.
32 * - Add generic model description text for HBA types.
33 *
34 * Rev 8.00.00b7-pre5 November 17, 2003 AV
35 * - Merge several patches from Christoph Hellwig [hch@lst.de]:
36 * - patch to split the driver into a common qla2xxx.ko and a
37 * qla2?00.ko for each HBA type - the latter modules are
38 * only very small wrappers, mostly for the firmware
39 * images, all the meat is in the common qla2xxx.ko.
40 * - make the failover code optional.
41 * - kill useless lock_kernel in dpc thread startup.
42 * - no need for modversions hacks in 2.6 (or 2.4).
43 * - kill qla2x00_register_with_Linux.
44 * - simplify EH code, cmd or it's hostdata can't be NULL, no
45 * need to search whether the host it's ours, the midlayer
46 * makes sure it won't call into a driver for some else
47 * host.
48 * - Merge several patches from Jes Sorensen
49 * [jes@wildopensource.com]:
50 * - Call qla2x00_config_dma_addressing() before performing
51 * any consistent allocations. This is required since the
52 * dma mask settings will affect the memory
53 * pci_alloc_consistent() will return.
54 * - Call pci_set_consistent_dma_mask() to allow for 64 bit
55 * consistent allocations, required on some platforms such
56 * as the SN2.
57 * - Wait 20 usecs (not sure how long is really necessary,
58 * but this seems safe) after setting CSR_ISP_SOFT_RESET in
59 * the ctrl_status register as the card doesn't respond to
60 * PCI reads while in reset state. This causes a machine
61 * check on some architectures.
62 * - Flush PCI writes before calling udelay() to ensure the
63 * write is not sitting idle in-flight for a while before
64 * hitting the hardware.
65 * - Include linux/vmalloc.h in qla_os.c since it uses
66 * vmalloc().
67 * - Use auto-negotiate link speed when using default
68 * parameters rather than NVRAM settings. Disable NVRAM
69 * reading on SN2 since it's not possible to execute the
70 * HBA's BIOS on an SN2. I suggest doing something similar
71 * for all architectures that do not provide x86 BIOS
72 * emulation.
73 * - Clean-up slab-cache allocations:
74 * - locking.
75 * - mempool allocations in case of low-memory situations.
76 * - Fallback to GA_NXT scan if GID_PT call returns more than
77 * MAX_FIBRE_DEVICES.
78 * - Preserve iterating port ID across GA_NXT calls in
79 * qla2x00_find_all_fabric_devs().
80 * - Pre-calculate ASCII firmware dump length as to not incur the
81 * cost-to-calculate at each invocation of a read().
82 *
83 * Rev 8.00.00b6 November 4, 2003 AV
84 * - Add new 2300 TPX firmware (3.02.18).
85 *
86 * Rev 8.00.00b6-pre25 October 20, 2003 RA/AV
87 * - Resync with Linux Kernel 2.6.0-test9.
88 * - Rework firmware dump process:
89 * - Use binary attribute within sysfs tree.
90 * - Add user-space tool (gdump.sh) to retrieve formatted
91 * buffer.
92 * - Add ISP2100 support.
93 * - Use a slab cache for SRB allocations to reduce memory
94 * pressure.
95 * - Initial conversion of driver logging methods to a new
96 * qla_printk() function which uses dev_printk (Daniel
97 * Stekloff, IBM).
98 * - Further reduce stack usage in qla2x00_configure_local_loop()
99 * and qla2x00_find_all_fabric_devs().
100 * - Separate port state used for routing of I/O's from port
101 * mgmt-login retry etc.
102 *
103 * Rev 8.00.00b6-pre19 October 13, 2003 AV
104 * - Resync with Linux Kernel 2.6.0-test7-bk5.
105 * - Add intelligent RSCN event handling:
106 * - reduce scan time during 'port' RSCN events by only
107 * querying specified port ids.
108 * - Available on ISP23xx cards only.
109 * - Increase maximum number of recognizable targets from 256
110 * to 512.
111 * - Backend changes were previously added to support TPX
112 * (2K logins) firmware. Mid-layer can now scan for targets
113 * (H, B, T, L) where 512 < T >= 0.
114 * - Remove IP support from driver.
115 * - Switch firmware types from IP->TP for ISP22xx and
116 * IPX->TPX for ISP23xx cards.
117 * - Remove files qla_ip.[ch].
118 * - Remove type designations from firmware filenames.
119 *
120 * Rev 8.00.00b6-pre11 September 15, 2003 DG/AV
121 * - Resync with 6.06.00.
122 * - Resync with Linux Kernel 2.6.0-test5-bk3.
123 * - Add new 2300 IPX firmware (3.02.15).
124 *
125 * Rev 8.00.00b5 July 31, 2003 AV
126 * - Always create an fc_lun_t entry for lun 0 - as the mid-
127 * layer requires access to this lun for discovery to occur.
128 * - General sanitizing:
129 * - Add generic firmware option definitions.
130 * - Generalize retrieval/update of firmware options.
131 * - Fix compile errors which occur with extended debug.
132 * - Handle failure cases for scsi_add_host() and
133 * down_interruptible().
134 * - Host template updates:
135 * - Use standard bios_param callback function.
136 * - Disable clustering.
137 * - Remove unchecked_is_dma entry.
138 *
139 * Rev 8.00.00b5-pre5 July 29, 2003 DG/AV
140 * - Resync with 6.06.00b13.
141 * - Resync with Linux Kernel 2.6.0-test2.
142 * - Pass the complete loop_id, not the masked (0xff) value
143 * while issuing mailbox commands (qla_mbx.c/qla_fo.c/
144 * qla_iocb.c/qla_init.c).
145 * - Properly handle zero-length return status for an RLC CDB.
146 * - Create an fclun_t structure for 'disconnected' luns,
147 * peripheral-qualifier of 001b.
148 * - Remove unused LIP-sequence register access during AE 8010.
149 * - Generalize qla2x00_mark_device_lost() to handle forced
150 * login request -- modify all direct/indirect invocations
151 * with proper flag.
152 * - Save RSCN notification (AE 8015h) data in a proper and
153 * consistent format (domain, area, al_pa).
154 * - General sanitizing:
155 * - scsi_qla_host structure member reordering for cache-line
156 * coherency.
157 * - Remove unused SCSI opcodes, endian-swap definitions.
158 * - Remove CMD_* pre-processor defines.
159 * - Remove unused SCSIFCHOTSWAP/GAMAP/MULTIHOST codes.
160 * - Backout patch which added a per-scsi_qla_host scsi host
161 * spinlock, since mid-layer already defines one.
162 * - Add new 2300 IPX firmware (3.02.15).
163 *
164 * Rev 8.00.00b4 July 14, 2003 RA/DG/AV
165 * - Resync with 6.06.00b12.
166 * - Resync with Linux Kernel 2.6.0-test1.
167 * - Remove IOCB throttling code -- originally #if'd.
168 * - Remove apidev_*() routines since proc_mknod() has been
169 * removed -- need alternate IOCTL interface.
170 * - Merge several performance/fix patches from Arjan van de
171 * Ven:
172 * - Undefined operation >> 32.
173 * - No need to acquire mid-layer lock during command
174 * callback.
175 * - Use a per-HBA mid-layer lock.
176 * - Use a non-locked cycle for setting the count of the
177 * newly allocated sp (qla2x00_get_new_sp()).
178 * - Modify semantic behavior of qla2x00_queuecommand():
179 * - Reduce cacheline bouncing by having I/Os submitted
180 * by the IRQ handler.
181 * - Remove extraneous calls to qla2x00_next() during I/O
182 * queuing.
183 * - Use list_splice_init() during qla2x00_done() handling
184 * of commands to reduce list_lock contention.
185 * - RIO mode support for ISP2200:
186 * - Implementation differs slightly from original patch.
187 * - Do not use bottom-half handler (tasklet/work queue)
188 * for qla2x00_done() processing.
189 *
190 * Rev 8.00.00b4-pre22 July 12, 2003 AV
191 * - Check for 'Process Response Queue' requests early during
192 * the Host Status check.
193 * - General sanitizing:
194 * - srb_t structure rewrite, removal of unused members.
195 * - Remove unused fcdev array, fabricid, and PORT_*
196 * definitions.
197 * - Remove unused config_reg_t PCI definitions.
198 * - Add new 2200 IP firmware (2.02.06).
199 * - Add new 2300 IPX firmware (3.02.14).
200 *
201 * Rev 8.00.00b4-pre19 June 30, 2003 AV
202 * - Resync with Linux Kernel 2.5.73-bk8.
203 * - Rework IOCB command queuing methods:
204 * - Upper-layer driver *MUST* properly set the direction
205 * bit of SCSI commands.
206 * - Generalize 32bit/64bit queuing path functions.
207 * - Remove costly page-boundary cross check when using
208 * 64bit address capable IOCBs.
209 *
210 * Rev 8.00.00b4-pre15 June 19, 2003 AV
211 * - Resync with 6.06.00b11.
212 * - Continue fcport list consolidation work:
213 * - Updated IOCTL implementations to use new fcports
214 * list.
215 * - Modified product ID check to not verify ISP chip
216 * revision -- ISP2312 v3 (qla2x00_chip_diag()).
217 * - Add new 2300 IPX firmware (3.02.13):
218 *
219 * Rev 8.00.00b4-pre13 June 19, 2003 AV
220 * - Fix build process for qla2100 driver -- no support
221 * for IP.
222 * - SCSI host template modifications:
223 * - Set sg_tablesize based on the derived DMA mask.
224 * - Increase max_sectors since only limit within RISC
225 * is transfer of (((2^32) - 1) >> 9) sectors.
226 *
227 * Rev 8.00.00b4-pre12 June 18, 2003 RA, DG, RL, AV
228 * - Resync with 6.06.00b10.
229 * - Resync with Linux Kernel 2.5.72.
230 * - Initial fcport list consolidation work:
231 * - fcports/fcinitiators/fcdev/fc_ip --> ha->fcports
232 * list.
233 *
234 * Rev 8.00.00b4-pre7 June 05, 2003 AV
235 * - Properly release PCI resouces in init-failure case.
236 * - Reconcile disparite function return code definitions.
237 *
238 * Rev 8.00.00b4-pre4 June 03, 2003 AV
239 * - Resync with Linux Kernel 2.5.70-bk8:
240 * - SHT proc_info() changes.
241 * - Restructure SNS Generic Services routines:
242 * - Add qla_gs.c file to driver distribution.
243 * - Configure PCI latency timer for ISP23xx.
244 *
245 * Rev 8.00.00b4-pre3 June 02, 2003 RA, DG, RL, AV
246 * - Resync with 6.06.00b5.
247 * - Rework (again) PCI I/O space configuration
248 * (Anton Blanchard):
249 * - Use pci_set_mwi() routine;
250 * - Remove uneeded qla2x00_set_cache_line() function.
251 * - Remove extraneous modification of PCI_COMMAND word.
252 *
253 * Rev 8.00.00b3 May 29, 2003 AV
254 * - Resync with Linux Kernel 2.5.70.
255 * - Move RISC paused check from ISR fast-path.
256 *
257 * Rev 8.00.00b3-pre8 May 26, 2003 AV
258 * - Add new 2300 IPX firmware (3.02.12):
259 * - Rework PCI I/O space configuration.
260 *
261 * Rev 8.00.00b3-pre6 May 22, 2003 RA, DG, RL, AV
262 * - Resync with 6.06.00b3.
263 *
264 * Rev 8.00.00b3-pre4 May 21 2003 AV
265 * - Add new 2300 IPX firmware (3.02.11):
266 * - Remove 2300 TPX firmware from distribution.
267 *
268 * Rev 8.00.00b3-pre3 May 21 2003 AV
269 * - Properly setup PCI configuation space during
270 * initialization:
271 * - Properly configure Memory-Mapped I/O during early
272 * configuration stage.
273 * - Rework IP functionality to support 2k logins.
274 * - Add new 2300 IPX firmware (3.02.11):
275 * - Remove 2300 TPX firmware from distribution.
276 *
277 * Rev 8.00.00b3-pre2 May ??, 2003 RA, DG, RL, AV
278 * - Resync with 6.06.00b1.
279 *
280 * Rev 8.00.00b3-pre1 May ??, 2003 RA, DG, RL, AV
281 * - Resync with 6.05.00.
282 *
283 * Rev 8.00.00b2 May 19, 2003 AV
284 * - Simplify dma_addr_t handling during command queuing given
285 * new block-layer defined restrictions:
286 * - Physical addresses not spanning 4GB boundaries.
287 * - Firmware versions: 2100 TP (1.19.24), 2200 IP (2.02.05),
288 * 2300 TPX (3.02.10).
289 *
290 * Rev 8.00.00b2-pre1 May 13, 2003 AV
291 * - Add support for new 'Hotplug initialization' model.
292 * - Simplify host template by removing unused callbacks.
293 * - Use scsicam facilities to determine geometry.
294 * - Fix compilation issues for non-ISP23xx builds:
295 * - Correct register references in qla_dbg.c.
296 * - Correct Makefile build process.
297 *
298 * Rev 8.00.00b1 May 05, 2003 AV
299 * - Resync with Linux Kernel 2.5.69.
300 * - Firmware versions: 2100 TP (1.19.24), 2200 TP (2.02.05),
301 * 2300 TPX (3.02.10).
302 *
303 * Rev 8.00.00b1-pre45 April ??, 2003 AV
304 * - Resync with Linux Kernel 2.5.68-bk11:
305 * - Fix improper return-code assignment during fabric
306 * discovery.
307 * - Remove additional extraneous #defines from
308 * qla_settings.h.
309 * - USE_PORTNAME -- FO will always use portname.
310 * - Default queue depth size set to 64.
311 *
312 * Rev 8.00.00b1-pre42 April ??, 2003 AV
313 * - Convert bottom-half tasklet to a work_queue.
314 * - Initial basic coding of dynamic queue depth handling
315 * during QUEUE FULL statuses.
316 * - Fix mailbox interface problem with
317 * qla2x00_get_retry_cnt().
318 *
319 * Rev 8.00.00b1-pre41 April ??, 2003 AV
320 * - Convert build defines qla2[1|2|3]00 macros to
321 * qla2[1|2|3]xx due to module name stringification clashes.
322 * - Add additional ISP2322 checks during board configuration.
323 *
324 * Rev 8.00.00b1-pre40 April ??, 2003 AV
325 * - Resync with Linux Kernel 2.5.68-bk8:
326 * - Updated IRQ handler interface.
327 * - Add ISP dump code (stub) in case of SYSTEM_ERROR on
328 * ISP2100.
329 * - Add new 2200 IP firmware (2.02.05).
330 *
331 * Rev 8.00.00b1-pre39 April ??, 2003 AV
332 * - Resync with Linux Kernel 2.5.68.
333 * - Add simple build.sh script to aid in external compilation.
334 * - Clean-break with Kernel 2.4 compatibility.
335 * - Rework DPC routine -- completion routines for signaling.
336 * - Re-add HBAAPI character device node for IOCTL support.
337 * - Remove residual QLA2X_PERFORMANCE defines.
338 * - Allocate SP pool via __get_free_pages() rather than
339 * individual kmalloc()'s.
340 * - Inform SCSI mid-layer of 16-byte CDB support
341 * (host->max_cmd_len):
342 * - Remove unecessary 'more_cdb' handling code from
343 * qla_iocb.c and qla_xioct.c.
344 * - Reduce duplicate code in fabric scanning logic (MS IOCB
345 * preparation).
346 * - Add ISP dump code in case of SYSTEM_ERROR.
347 * - Remove 2300 VIX firmware from distribution:
348 * - Add initial code for IPX support.
349 * - Add new 2300 TPX firmware (3.02.10).
350 *
351 * Rev 8.00.00b1-pre34 April ??, 2003 AV
352 * - Resync with Linux Kernel 2.5.67.
353 * - Use domain/area/al_pa fields when displaying PortID
354 * values -- addresses endianess issues.
355 * - Rework large case statement to check 'common' CDB commands
356 * early in qla2x00_get_cmd_direction().
357 *
358 * Rev 8.00.00b1-pre31 April ??, 2003 AV
359 * - Update makefile to support PPC64 build.
360 * - Retool NVRAM configuration routine and structures:
361 * - Consoldate ISP21xx/ISP22xx/ISP23xx configuration
362 * (struct nvram_t).
363 * - Remove big/little endian support structures in favor of
364 * simplified bit-operations within byte fields.
365 * - Fix long-standing 'static' buffer sharing problem in
366 * qla2x00_configure_fabric().
367 *
368 * Rev 8.00.00b1-pre30 April ??, 2003 AV
369 * - Complete implementation of GID_PT scan.
370 * - Use consistent MS IOCB invocation method to query SNS:
371 * - Add RNN_ID and RSNN_NN registrations in a fabric.
372 * - Remove unused Mailbox Command 6Eh (Send SNS) support
373 * structures.
374 * - Use 64bit safe IOCBs while issuing INQUIRY and RLC during
375 * topology scan.
376 * - Until reimplementation of fcdev_t/fcport list
377 * consolidation, valid loop_id ranges are still limited from
378 * 0x00 through 0xFF -- enforce this within the code.
379 *
380 * Rev 8.00.00b1-pre27 March ??, 2003 AV
381 * - Resync with 6.05.00b9.
382 * - Retool HBA PCI configuration -- qla2x00_pci_config().
383 * - Remove inconsistent use of delay routines (UDELAY/SYS*).
384 * - Continue to teardown/clean/add comments and debug
385 * routines.
386 * - Properly swap bytes of the device's nodename in
387 * qla2x00_configure_local_loop().
388 *
389 * Rev 8.00.00b1-pre25 March ??, 2003 AV
390 * - Resync with 6.05.00b8.
391 *
392 * Rev 8.00.00b1-pre23 March ??, 2003 AV
393 * - Remove (#define) IOCB usage throttling.
394 * - Abstract interrupt polling with qla2x00_poll().
395 * - Modify lun scanning logic:
396 * - If the device does not support the SCSI Report Luns
397 * command, the driver will now only scan from 0 to the
398 * max#-luns as defined in the NVRAM (BIOS), rather than
399 * blindly scanning from 0 to 255 -- which could result in
400 * an increase in startup time when running against slow
401 * (JBOD) devices.
402 * - Rework reset logic in qla2x00_reset_chip() (spec).
403 *
404 * Rev 8.00.00b1-pre22 March ??, 2003 AV
405 * - Resync with 6.05.00b7.
406 * - Cleanup (rewrite) ISR handler.
407 * - Rename kmem_zalloc --> qla2x00_kmem_zalloc():
408 * - This function will eventually be removed.
409 * - Add new 2300 VIX firmware (3.02.09):
410 * - Support for Tape, Fabric, 2K logins, IP, and VI.
411 *
412 * Rev 8.00.00b1-pre18 March ??, 2003 AV
413 * - Support 232x type ISPs.
414 * - Support single firmware for each ISP type:
415 * - Restructure brd_info/fw_info methods.
416 * - Streamline firmware load process.
417 * - Properly query firmware for version information.
418 * - Remove extraneous scsi_qla_host members:
419 * - device_id ==> pdev->device
420 * - Fix fc4 features (RFF_ID) registration.
421 * - Convert kmem_zalloc --> qla2x00_kmem_zalloc().
422 * - Remove unused/extraneous #defines (USE_PORTNAME).
423 *
424 * Rev 8.00.00b1-pre14 March ??, 2003 AV
425 * - Resync with 6.05.00b6.
426 * - Initial source-code restructuring effort.
427 * - Build procedure.
428 * - Source file layout -- intuitive component layout.
429 * - Remove unused #defines (*PERFORMANCE, WORD_FW_LOAD, etc).
430 * - Add support for 2K logins (TPX -- firmware).
431 * - Add module parameter ql2xsuspendcount.
432 * - Add new 2200 IP/TP firmware (2.02.04).
433 *
434 * Rev 8.00.00b1-pre9 March ??, 2003 RL/DG/RA/AV
435 * - Use kernel struct list_head for fcport and fclun lists.
436 * - Remove extraneous (L|M)S_64BITS() and QL21_64*() defines.
437 *
438 * Rev 8.00.00b1-pre8 February 28, 2003 RL/DG/RA/AV
439 * - Resync with 6.05.00b3.
440 *
441 * Rev 8.00.00b1-pre7 February 23, 2003 RL/DG/RA/AV
442 * - Add alternate fabric scanning logic (GID_PT/GNN_ID/GPN_ID).
443 * - Remove use of deprecated function check_region().
444 * - Add new 2300 IP/TP firmware (3.02.08).
445 *
446 * Rev 8.00.00b1-pre5 January 28, 2003 RL/DG/RA/AV
447 * - Resync with 6.05.00b3.
448 * - Consolidate device_reg structure definitions for ISP types.
449 * - Add support for new queue-depth selection.
450 * - Add new 2300 IP/TP firmware (3.02.07).
451 *
452 * Rev 8.00.00b1-pre1 January 17, 2003 AV
453 * - Initial branch from 6.04.00b8 driver.
454 * - Remove VMWARE specific code.
455 * - Add support for pci_driver interface.
456 *
457 ********************************************************************/
diff --git a/Documentation/scsi/qlogicfas.txt b/Documentation/scsi/qlogicfas.txt
new file mode 100644
index 000000000000..398f99168077
--- /dev/null
+++ b/Documentation/scsi/qlogicfas.txt
@@ -0,0 +1,79 @@
1
2This driver supports the Qlogic FASXXX family of chips. This driver
3only works with the ISA, VLB, and PCMCIA versions of the Qlogic
4FastSCSI! cards as well as any other card based on the FASXX chip
5(including the Control Concepts SCSI/IDE/SIO/PIO/FDC cards).
6
7This driver does NOT support the PCI version. Support for these PCI
8Qlogic boards:
9
10 * IQ-PCI
11 * IQ-PCI-10
12 * IQ-PCI-D
13
14is provided by the qlogicisp.c driver. Check README.qlogicisp for
15details.
16
17Nor does it support the PCI-Basic, which is supported by the
18'am53c974' driver.
19
20PCMCIA SUPPORT
21
22This currently only works if the card is enabled first from DOS. This
23means you will have to load your socket and card services, and
24QL41DOS.SYS and QL40ENBL.SYS. These are a minimum, but loading the
25rest of the modules won't interfere with the operation. The next
26thing to do is load the kernel without resetting the hardware, which
27can be a simple ctrl-alt-delete with a boot floppy, or by using
28loadlin with the kernel image accessible from DOS. If you are using
29the Linux PCMCIA driver, you will have to adjust it or otherwise stop
30it from configuring the card.
31
32I am working with the PCMCIA group to make it more flexible, but that
33may take a while.
34
35ALL CARDS
36
37The top of the qlogic.c file has a number of defines that controls
38configuration. As shipped, it provides a balance between speed and
39function. If there are any problems, try setting SLOW_CABLE to 1, and
40then try changing USE_IRQ and TURBO_PDMA to zero. If you are familiar
41with SCSI, there are other settings which can tune the bus.
42
43It may be a good idea to enable RESET_AT_START, especially if the
44devices may not have been just powered up, or if you are restarting
45after a crash, since they may be busy trying to complete the last
46command or something. It comes up faster if this is set to zero, and
47if you have reliable hardware and connections it may be more useful to
48not reset things.
49
50SOME TROUBLESHOOTING TIPS
51
52Make sure it works properly under DOS. You should also do an initial FDISK
53on a new drive if you want partitions.
54
55Don't enable all the speedups first. If anything is wrong, they will make
56any problem worse.
57
58IMPORTANT
59
60The best way to test if your cables, termination, etc. are good is to
61copy a very big file (e.g. a doublespace container file, or a very
62large executable or archive). It should be at least 5 megabytes, but
63you can do multiple tests on smaller files. Then do a COMP to verify
64that the file copied properly. (Turn off all caching when doing these
65tests, otherwise you will test your RAM and not the files). Then do
6610 COMPs, comparing the same file on the SCSI hard drive, i.e. "COMP
67realbig.doc realbig.doc". Then do it after the computer gets warm.
68
69I noticed my system which seems to work 100% would fail this test if
70the computer was left on for a few hours. It was worse with longer
71cables, and more devices on the SCSI bus. What seems to happen is
72that it gets a false ACK causing an extra byte to be inserted into the
73stream (and this is not detected). This can be caused by bad
74termination (the ACK can be reflected), or by noise when the chips
75work less well because of the heat, or when cables get too long for
76the speed.
77
78Remember, if it doesn't work under DOS, it probably won't work under
79Linux.
diff --git a/Documentation/scsi/qlogicisp.txt b/Documentation/scsi/qlogicisp.txt
new file mode 100644
index 000000000000..6920f6c76a9f
--- /dev/null
+++ b/Documentation/scsi/qlogicisp.txt
@@ -0,0 +1,30 @@
1Notes for the QLogic ISP1020 PCI SCSI Driver:
2
3This driver works well in practice, but does not support disconnect/
4reconnect, which makes using it with tape drives impractical.
5
6It should work for most host adaptors with the ISP1020 chip. The
7QLogic Corporation produces several PCI SCSI adapters which should
8work:
9
10 * IQ-PCI
11 * IQ-PCI-10
12 * IQ-PCI-D
13
14This driver may work with boards containing the ISP1020A or ISP1040A
15chips, but that has not been tested.
16
17This driver will NOT work with:
18
19 * ISA or VL Bus Qlogic cards (they use the 'qlogicfas' driver)
20 * PCI-basic (it uses the 'am53c974' driver)
21
22Much thanks to QLogic's tech support for providing the latest ISP1020
23firmware, and for taking the time to review my code.
24
25Erik Moe
26ehm@cris.com
27
28Revised:
29Michael A. Griffith
30grif@cs.ucr.edu
diff --git a/Documentation/scsi/scsi-generic.txt b/Documentation/scsi/scsi-generic.txt
new file mode 100644
index 000000000000..c38e2b3648e4
--- /dev/null
+++ b/Documentation/scsi/scsi-generic.txt
@@ -0,0 +1,101 @@
1 Notes on Linux SCSI Generic (sg) driver
2 ---------------------------------------
3 20020126
4Introduction
5============
6The SCSI Generic driver (sg) is one of the four "high level" SCSI device
7drivers along with sd, st and sr (disk, tape and CDROM respectively). Sg
8is more generalized (but lower level) than its siblings and tends to be
9used on SCSI devices that don't fit into the already serviced categories.
10Thus sg is used for scanners, CD writers and reading audio CDs digitally
11amongst other things.
12
13Rather than document the driver's interface here, version information
14is provided plus pointers (i.e. URLs) where to find documentation
15and examples.
16
17
18Major versions of the sg driver
19===============================
20There are three major versions of sg found in the linux kernel (lk):
21 - sg version 1 (original) from 1992 to early 1999 (lk 2.2.5) .
22 It is based in the sg_header interface structure.
23 - sg version 2 from lk 2.2.6 in the 2.2 series. It is based on
24 an extended version of the sg_header interface structure.
25 - sg version 3 found in the lk 2.4 series (and the lk 2.5 series).
26 It adds the sg_io_hdr interface structure.
27
28
29Sg driver documentation
30=======================
31The most recent documentation of the sg driver is kept at the Linux
32Documentation Project's (LDP) site:
33http://www.tldp.org/HOWTO/SCSI-Generic-HOWTO
34This describes the sg version 3 driver found in the lk 2.4 series.
35The LDP renders documents in single and multiple page HTML, postscript
36and pdf. This document can also be found at:
37http://www.torque.net/sg/p/sg_v3_ho.html
38
39Documentation for the version 2 sg driver found in the lk 2.2 series can
40be found at http://www.torque.net/sg/p/scsi-generic.txt . A larger version
41is at: http://www.torque.net/sg/p/scsi-generic_long.txt .
42
43The original documentation for the sg driver (prior to lk 2.2.6) can be
44found at http://www.torque.net/sg/p/original/SCSI-Programming-HOWTO.txt
45and in the LDP archives.
46
47A changelog with brief notes can be found in the
48/usr/src/linux/include/scsi/sg.h file. Note that the glibc maintainers copy
49and edit this file (removing its changelog for example) before placing it
50in /usr/include/scsi/sg.h . Driver debugging information and other notes
51can be found at the top of the /usr/src/linux/drivers/scsi/sg.c file.
52
53A more general description of the Linux SCSI subsystem of which sg is a
54part can be found at http://www.tldp.org/HOWTO/SCSI-2.4-HOWTO .
55
56
57Example code and utilities
58==========================
59There are two packages of sg utilities:
60 - sg3_utils for the sg version 3 driver found in lk 2.4
61 - sg_utils for the sg version 2 (and original) driver found in lk 2.2
62 and earlier
63Both packages will work in the lk 2.4 series however sg3_utils offers more
64capabilities. They can be found at: http://www.torque.net/sg and
65freshmeat.net
66
67Another approach is to look at the applications that use the sg driver.
68These include cdrecord, cdparanoia, SANE and cdrdao.
69
70
71Mapping of Linux kernel versions to sg driver versions
72======================================================
73Here is a list of linux kernels in the 2.4 series that had new version
74of the sg driver:
75 lk 2.4.0 : sg version 3.1.17
76 lk 2.4.7 : sg version 3.1.19
77 lk 2.4.10 : sg version 3.1.20 **
78 lk 2.4.17 : sg version 3.1.22
79
80** There were 3 changes to sg version 3.1.20 by third parties in the
81 next six linux kernel versions.
82
83For reference here is a list of linux kernels in the 2.2 series that had
84new version of the sg driver:
85 lk 2.2.0 : original sg version [with no version number]
86 lk 2.2.6 : sg version 2.1.31
87 lk 2.2.8 : sg version 2.1.32
88 lk 2.2.10 : sg version 2.1.34 [SG_GET_VERSION_NUM ioctl first appeared]
89 lk 2.2.14 : sg version 2.1.36
90 lk 2.2.16 : sg version 2.1.38
91 lk 2.2.17 : sg version 2.1.39
92 lk 2.2.20 : sg version 2.1.40
93
94The lk 2.5 development series has recently commenced and it currently
95contains sg version 3.5.23 which is functionally equivalent to sg
96version 3.1.22 found in lk 2.4.17 .
97
98
99Douglas Gilbert
10026th January 2002
101dgilbert@interlog.com
diff --git a/Documentation/scsi/scsi.txt b/Documentation/scsi/scsi.txt
new file mode 100644
index 000000000000..dd1bbf4e98e3
--- /dev/null
+++ b/Documentation/scsi/scsi.txt
@@ -0,0 +1,44 @@
1SCSI subsystem documentation
2============================
3The Linux Documentation Project (LDP) maintains a document describing
4the SCSI subsystem in the Linux kernel (lk) 2.4 series. See:
5http://www.tldp.org/HOWTO/SCSI-2.4-HOWTO . The LDP has single
6and multiple page HTML renderings as well as postscript and pdf.
7It can also be found at http://www.torque.net/scsi/SCSI-2.4-HOWTO .
8
9
10Notes on using modules in the SCSI subsystem
11============================================
12The scsi support in the linux kernel can be modularized in a number of
13different ways depending upon the needs of the end user. To understand
14your options, we should first define a few terms.
15
16The scsi-core (also known as the "mid level") contains the core of scsi
17support. Without it you can do nothing with any of the other scsi drivers.
18The scsi core support can be a module (scsi_mod.o), or it can be built into
19the kernel. If the core is a module, it must be the first scsi module
20loaded, and if you unload the modules, it will have to be the last one
21unloaded. In practice the modprobe and rmmod commands (and "autoclean")
22will enforce the correct ordering of loading and unloading modules in
23the SCSI subsystem.
24
25The individual upper and lower level drivers can be loaded in any order
26once the scsi core is present in the kernel (either compiled in or loaded
27as a module). The disk driver (sd_mod.o), cdrom driver (sr_mod.o),
28tape driver ** (st.o) and scsi generics driver (sg.o) represent the upper
29level drivers to support the various assorted devices which can be
30controlled. You can for example load the tape driver to use the tape drive,
31and then unload it once you have no further need for the driver (and release
32the associated memory).
33
34The lower level drivers are the ones that support the individual cards that
35are supported for the hardware platform that you are running under. Those
36individual cards are often called Host Bus Adapters (HBAs). For example the
37aic7xxx.o driver is used to control all recent SCSI controller cards from
38Adaptec. Almost all lower level drivers can be built either as modules or
39built into the kernel.
40
41
42** There is a variant of the st driver for controlling OnStream tape
43 devices. Its module name is osst.o .
44
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
new file mode 100644
index 000000000000..1f24129a3099
--- /dev/null
+++ b/Documentation/scsi/scsi_mid_low_api.txt
@@ -0,0 +1,1546 @@
1 Linux Kernel 2.6 series
2 SCSI mid_level - lower_level driver interface
3 =============================================
4
5Introduction
6============
7This document outlines the interface between the Linux SCSI mid level and
8SCSI lower level drivers. Lower level drivers (LLDs) are variously called
9host bus adapter (HBA) drivers and host drivers (HD). A "host" in this
10context is a bridge between a computer IO bus (e.g. PCI or ISA) and a
11single SCSI initiator port on a SCSI transport. An "initiator" port
12(SCSI terminology, see SAM-3 at http://www.t10.org) sends SCSI commands
13to "target" SCSI ports (e.g. disks). There can be many LLDs in a running
14system, but only one per hardware type. Most LLDs can control one or more
15SCSI HBAs. Some HBAs contain multiple hosts.
16
17In some cases the SCSI transport is an external bus that already has
18its own subsystem in Linux (e.g. USB and ieee1394). In such cases the
19SCSI subsystem LLD is a software bridge to the other driver subsystem.
20Examples are the usb-storage driver (found in the drivers/usb/storage
21directory) and the ieee1394/sbp2 driver (found in the drivers/ieee1394
22directory).
23
24For example, the aic7xxx LLD controls Adaptec SCSI parallel interface
25(SPI) controllers based on that company's 7xxx chip series. The aic7xxx
26LLD can be built into the kernel or loaded as a module. There can only be
27one aic7xxx LLD running in a Linux system but it may be controlling many
28HBAs. These HBAs might be either on PCI daughter-boards or built into
29the motherboard (or both). Some aic7xxx based HBAs are dual controllers
30and thus represent two hosts. Like most modern HBAs, each aic7xxx host
31has its own PCI device address. [The one-to-one correspondence between
32a SCSI host and a PCI device is common but not required (e.g. with
33ISA or MCA adapters).]
34
35The SCSI mid level isolates an LLD from other layers such as the SCSI
36upper layer drivers and the block layer.
37
38This version of the document roughly matches linux kernel version 2.6.8 .
39
40Documentation
41=============
42There is a SCSI documentation directory within the kernel source tree,
43typically Documentation/scsi . Most documents are in plain
44(i.e. ASCII) text. This file is named scsi_mid_low_api.txt and can be
45found in that directory. A more recent copy of this document may be found
46at http://www.torque.net/scsi/scsi_mid_low_api.txt.gz .
47Many LLDs are documented there (e.g. aic7xxx.txt). The SCSI mid-level is
48briefly described in scsi.txt which contains a url to a document
49describing the SCSI subsystem in the lk 2.4 series. Two upper level
50drivers have documents in that directory: st.txt (SCSI tape driver) and
51scsi-generic.txt (for the sg driver).
52
53Some documentation (or urls) for LLDs may be found in the C source code
54or in the same directory as the C source code. For example to find a url
55about the USB mass storage driver see the
56/usr/src/linux/drivers/usb/storage directory.
57
58The Linux kernel source Documentation/DocBook/scsidrivers.tmpl file
59refers to this file. With the appropriate DocBook tool-set, this permits
60users to generate html, ps and pdf renderings of information within this
61file (e.g. the interface functions).
62
63Driver structure
64================
65Traditionally an LLD for the SCSI subsystem has been at least two files in
66the drivers/scsi directory. For example, a driver called "xyz" has a header
67file "xyz.h" and a source file "xyz.c". [Actually there is no good reason
68why this couldn't all be in one file; the header file is superfluous.] Some
69drivers that have been ported to several operating systems have more than
70two files. For example the aic7xxx driver has separate files for generic
71and OS-specific code (e.g. FreeBSD and Linux). Such drivers tend to have
72their own directory under the drivers/scsi directory.
73
74When a new LLD is being added to Linux, the following files (found in the
75drivers/scsi directory) will need some attention: Makefile and Kconfig .
76It is probably best to study how existing LLDs are organized.
77
78As the 2.5 series development kernels evolve into the 2.6 series
79production series, changes are being introduced into this interface. An
80example of this is driver initialization code where there are now 2 models
81available. The older one, similar to what was found in the lk 2.4 series,
82is based on hosts that are detected at HBA driver load time. This will be
83referred to the "passive" initialization model. The newer model allows HBAs
84to be hot plugged (and unplugged) during the lifetime of the LLD and will
85be referred to as the "hotplug" initialization model. The newer model is
86preferred as it can handle both traditional SCSI equipment that is
87permanently connected as well as modern "SCSI" devices (e.g. USB or
88IEEE 1394 connected digital cameras) that are hotplugged. Both
89initialization models are discussed in the following sections.
90
91An LLD interfaces to the SCSI subsystem several ways:
92 a) directly invoking functions supplied by the mid level
93 b) passing a set of function pointers to a registration function
94 supplied by the mid level. The mid level will then invoke these
95 functions at some point in the future. The LLD will supply
96 implementations of these functions.
97 c) direct access to instances of well known data structures maintained
98 by the mid level
99
100Those functions in group a) are listed in a section entitled "Mid level
101supplied functions" below.
102
103Those functions in group b) are listed in a section entitled "Interface
104functions" below. Their function pointers are placed in the members of
105"struct scsi_host_template", an instance of which is passed to
106scsi_host_alloc() ** . Those interface functions that the LLD does not
107wish to supply should have NULL placed in the corresponding member of
108struct scsi_host_template. Defining an instance of struct
109scsi_host_template at file scope will cause NULL to be placed in function
110 pointer members not explicitly initialized.
111
112Those usages in group c) should be handled with care, especially in a
113"hotplug" environment. LLDs should be aware of the lifetime of instances
114that are shared with the mid level and other layers.
115
116All functions defined within an LLD and all data defined at file scope
117should be static. For example the slave_alloc() function in an LLD
118called "xxx" could be defined as
119"static int xxx_slave_alloc(struct scsi_device * sdev) { /* code */ }"
120
121** the scsi_host_alloc() function is a replacement for the rather vaguely
122named scsi_register() function in most situations. The scsi_register()
123and scsi_unregister() functions remain to support legacy LLDs that use
124the passive initialization model.
125
126
127Hotplug initialization model
128============================
129In this model an LLD controls when SCSI hosts are introduced and removed
130from the SCSI subsystem. Hosts can be introduced as early as driver
131initialization and removed as late as driver shutdown. Typically a driver
132will respond to a sysfs probe() callback that indicates an HBA has been
133detected. After confirming that the new device is one that the LLD wants
134to control, the LLD will initialize the HBA and then register a new host
135with the SCSI mid level.
136
137During LLD initialization the driver should register itself with the
138appropriate IO bus on which it expects to find HBA(s) (e.g. the PCI bus).
139This can probably be done via sysfs. Any driver parameters (especially
140those that are writable after the driver is loaded) could also be
141registered with sysfs at this point. The SCSI mid level first becomes
142aware of an LLD when that LLD registers its first HBA.
143
144At some later time, the LLD becomes aware of an HBA and what follows
145is a typical sequence of calls between the LLD and the mid level.
146This example shows the mid level scanning the newly introduced HBA for 3
147scsi devices of which only the first 2 respond:
148
149 HBA PROBE: assume 2 SCSI devices found in scan
150LLD mid level LLD
151===-------------------=========--------------------===------
152scsi_host_alloc() -->
153scsi_add_host() --------+
154 |
155 slave_alloc()
156 slave_configure() --> scsi_adjust_queue_depth()
157 |
158 slave_alloc()
159 slave_configure()
160 |
161 slave_alloc() ***
162 slave_destroy() ***
163------------------------------------------------------------
164
165If the LLD wants to adjust the default queue settings, it can invoke
166scsi_adjust_queue_depth() in its slave_configure() routine.
167
168*** For scsi devices that the mid level tries to scan but do not
169 respond, a slave_alloc(), slave_destroy() pair is called.
170
171When an HBA is being removed it could be as part of an orderly shutdown
172associated with the LLD module being unloaded (e.g. with the "rmmod"
173command) or in response to a "hot unplug" indicated by sysfs()'s
174remove() callback being invoked. In either case, the sequence is the
175same:
176
177 HBA REMOVE: assume 2 SCSI devices attached
178LLD mid level LLD
179===----------------------=========-----------------===------
180scsi_remove_host() ---------+
181 |
182 slave_destroy()
183 slave_destroy()
184scsi_host_put()
185------------------------------------------------------------
186
187It may be useful for a LLD to keep track of struct Scsi_Host instances
188(a pointer is returned by scsi_host_alloc()). Such instances are "owned"
189by the mid-level. struct Scsi_Host instances are freed from
190scsi_host_put() when the reference count hits zero.
191
192Hot unplugging an HBA that controls a disk which is processing SCSI
193commands on a mounted file system is an interesting situation. Reference
194counting logic is being introduced into the mid level to cope with many
195of the issues involved. See the section on reference counting below.
196
197
198The hotplug concept may be extended to SCSI devices. Currently, when an
199HBA is added, the scsi_add_host() function causes a scan for SCSI devices
200attached to the HBA's SCSI transport. On newer SCSI transports the HBA
201may become aware of a new SCSI device _after_ the scan has completed.
202An LLD can use this sequence to make the mid level aware of a SCSI device:
203
204 SCSI DEVICE hotplug
205LLD mid level LLD
206===-------------------=========--------------------===------
207scsi_add_device() ------+
208 |
209 slave_alloc()
210 slave_configure() [--> scsi_adjust_queue_depth()]
211------------------------------------------------------------
212
213In a similar fashion, an LLD may become aware that a SCSI device has been
214removed (unplugged) or the connection to it has been interrupted. Some
215existing SCSI transports (e.g. SPI) may not become aware that a SCSI
216device has been removed until a subsequent SCSI command fails which will
217probably cause that device to be set offline by the mid level. An LLD that
218detects the removal of a SCSI device can instigate its removal from
219upper layers with this sequence:
220
221 SCSI DEVICE hot unplug
222LLD mid level LLD
223===----------------------=========-----------------===------
224scsi_remove_device() -------+
225 |
226 slave_destroy()
227------------------------------------------------------------
228
229It may be useful for an LLD to keep track of struct scsi_device instances
230(a pointer is passed as the parameter to slave_alloc() and
231slave_configure() callbacks). Such instances are "owned" by the mid-level.
232struct scsi_device instances are freed after slave_destroy().
233
234
235Passive initialization model
236============================
237These older LLDs include a file called "scsi_module.c" [yes the ".c" is a
238little surprising] in their source code. For that file to work an
239instance of struct scsi_host_template with the name "driver_template"
240needs to be defined. Here is a typical code sequence used in this model:
241 static struct scsi_host_template driver_template = {
242 ...
243 };
244 #include "scsi_module.c"
245
246The scsi_module.c file contains two functions:
247 - init_this_scsi_driver() which is executed when the LLD is
248 initialized (i.e. boot time or module load time)
249 - exit_this_scsi_driver() which is executed when the LLD is shut
250 down (i.e. module unload time)
251Note: since these functions are tagged with __init and __exit qualifiers
252an LLD should not call them explicitly (since the kernel does that).
253
254Here is an example of an initialization sequence when two hosts are
255detected (so detect() returns 2) and the SCSI bus scan on each host
256finds 1 SCSI device (and a second device does not respond).
257
258LLD mid level LLD
259===----------------------=========-----------------===------
260init_this_scsi_driver() ----+
261 |
262 detect() -----------------+
263 | |
264 | scsi_register()
265 | scsi_register()
266 |
267 slave_alloc()
268 slave_configure() --> scsi_adjust_queue_depth()
269 slave_alloc() ***
270 slave_destroy() ***
271 |
272 slave_alloc()
273 slave_configure()
274 slave_alloc() ***
275 slave_destroy() ***
276------------------------------------------------------------
277
278The mid level invokes scsi_adjust_queue_depth() with tagged queuing off and
279"cmd_per_lun" for that host as the queue length. These settings can be
280overridden by a slave_configure() supplied by the LLD.
281
282*** For scsi devices that the mid level tries to scan but do not
283 respond, a slave_alloc(), slave_destroy() pair is called.
284
285Here is an LLD shutdown sequence:
286
287LLD mid level LLD
288===----------------------=========-----------------===------
289exit_this_scsi_driver() ----+
290 |
291 slave_destroy()
292 release() --> scsi_unregister()
293 |
294 slave_destroy()
295 release() --> scsi_unregister()
296------------------------------------------------------------
297
298An LLD need not define slave_destroy() (i.e. it is optional).
299
300The shortcoming of the "passive initialization model" is that host
301registration and de-registration are (typically) tied to LLD initialization
302and shutdown. Once the LLD is initialized then a new host that appears
303(e.g. via hotplugging) cannot easily be added without a redundant
304driver shutdown and re-initialization. It may be possible to write an LLD
305that uses both initialization models.
306
307
308Reference Counting
309==================
310The Scsi_Host structure has had reference counting infrastructure added.
311This effectively spreads the ownership of struct Scsi_Host instances
312across the various SCSI layers which use them. Previously such instances
313were exclusively owned by the mid level. LLDs would not usually need to
314directly manipulate these reference counts but there may be some cases
315where they do.
316
317There are 3 reference counting functions of interest associated with
318struct Scsi_Host:
319 - scsi_host_alloc(): returns a pointer to new instance of struct
320 Scsi_Host which has its reference count ^^ set to 1
321 - scsi_host_get(): adds 1 to the reference count of the given instance
322 - scsi_host_put(): decrements 1 from the reference count of the given
323 instance. If the reference count reaches 0 then the given instance
324 is freed
325
326The Scsi_device structure has had reference counting infrastructure added.
327This effectively spreads the ownership of struct Scsi_device instances
328across the various SCSI layers which use them. Previously such instances
329were exclusively owned by the mid level. See the access functions declared
330towards the end of include/scsi/scsi_device.h . If an LLD wants to keep
331a copy of a pointer to a Scsi_device instance it should use scsi_device_get()
332to bump its reference count. When it is finished with the pointer it can
333use scsi_device_put() to decrement its reference count (and potentially
334delete it).
335
336^^ struct Scsi_Host actually has 2 reference counts which are manipulated
337in parallel by these functions.
338
339
340Conventions
341===========
342First, Linus Torvalds's thoughts on C coding style can be found in the
343Documentation/CodingStyle file.
344
345Next, there is a movement to "outlaw" typedefs introducing synonyms for
346struct tags. Both can be still found in the SCSI subsystem, but
347the typedefs have been moved to a single file, scsi_typedefs.h to
348make their future removal easier, for example:
349"typedef struct scsi_host_template Scsi_Host_Template;"
350
351Also, most C99 enhancements are encouraged to the extent they are supported
352by the relevant gcc compilers. So C99 style structure and array
353initializers are encouraged where appropriate. Don't go too far,
354VLAs are not properly supported yet. An exception to this is the use of
355"//" style comments; /*...*/ comments are still preferred in Linux.
356
357Well written, tested and documented code, need not be re-formatted to
358comply with the above conventions. For example, the aic7xxx driver
359comes to Linux from FreeBSD and Adaptec's own labs. No doubt FreeBSD
360and Adaptec have their own coding conventions.
361
362
363Mid level supplied functions
364============================
365These functions are supplied by the SCSI mid level for use by LLDs.
366The names (i.e. entry points) of these functions are exported
367so an LLD that is a module can access them. The kernel will
368arrange for the SCSI mid level to be loaded and initialized before any LLD
369is initialized. The functions below are listed alphabetically and their
370names all start with "scsi_".
371
372Summary:
373 scsi_activate_tcq - turn on tag command queueing
374 scsi_add_device - creates new scsi device (lu) instance
375 scsi_add_host - perform sysfs registration and SCSI bus scan.
376 scsi_add_timer - (re-)start timer on a SCSI command.
377 scsi_adjust_queue_depth - change the queue depth on a SCSI device
378 scsi_assign_lock - replace default host_lock with given lock
379 scsi_bios_ptable - return copy of block device's partition table
380 scsi_block_requests - prevent further commands being queued to given host
381 scsi_deactivate_tcq - turn off tag command queueing
382 scsi_delete_timer - cancel timer on a SCSI command.
383 scsi_host_alloc - return a new scsi_host instance whose refcount==1
384 scsi_host_get - increments Scsi_Host instance's refcount
385 scsi_host_put - decrements Scsi_Host instance's refcount (free if 0)
386 scsi_partsize - parse partition table into cylinders, heads + sectors
387 scsi_register - create and register a scsi host adapter instance.
388 scsi_remove_device - detach and remove a SCSI device
389 scsi_remove_host - detach and remove all SCSI devices owned by host
390 scsi_report_bus_reset - report scsi _bus_ reset observed
391 scsi_set_device - place device reference in host structure
392 scsi_to_pci_dma_dir - convert SCSI subsystem direction flag to PCI
393 scsi_to_sbus_dma_dir - convert SCSI subsystem direction flag to SBUS
394 scsi_track_queue_full - track successive QUEUE_FULL events
395 scsi_unblock_requests - allow further commands to be queued to given host
396 scsi_unregister - [calls scsi_host_put()]
397
398
399Details:
400
401/**
402 * scsi_activate_tcq - turn on tag command queueing ("ordered" task attribute)
403 * @sdev: device to turn on TCQ for
404 * @depth: queue depth
405 *
406 * Returns nothing
407 *
408 * Might block: no
409 *
410 * Notes: Eventually, it is hoped depth would be the maximum depth
411 * the device could cope with and the real queue depth
412 * would be adjustable from 0 to depth.
413 *
414 * Defined (inline) in: include/scsi/scsi_tcq.h
415 **/
416void scsi_activate_tcq(struct scsi_device *sdev, int depth)
417
418
419/**
420 * scsi_add_device - creates new scsi device (lu) instance
421 * @shost: pointer to scsi host instance
422 * @channel: channel number (rarely other than 0)
423 * @id: target id number
424 * @lun: logical unit number
425 *
426 * Returns pointer to new struct scsi_device instance or
427 * ERR_PTR(-ENODEV) (or some other bent pointer) if something is
428 * wrong (e.g. no lu responds at given address)
429 *
430 * Might block: yes
431 *
432 * Notes: This call is usually performed internally during a scsi
433 * bus scan when an HBA is added (i.e. scsi_add_host()). So it
434 * should only be called if the HBA becomes aware of a new scsi
435 * device (lu) after scsi_add_host() has completed. If successful
436 * this call we lead to slave_alloc() and slave_configure() callbacks
437 * into the LLD.
438 *
439 * Defined in: drivers/scsi/scsi_scan.c
440 **/
441struct scsi_device * scsi_add_device(struct Scsi_Host *shost,
442 unsigned int channel,
443 unsigned int id, unsigned int lun)
444
445
446/**
447 * scsi_add_host - perform sysfs registration and SCSI bus scan.
448 * @shost: pointer to scsi host instance
449 * @dev: pointer to struct device of type scsi class
450 *
451 * Returns 0 on success, negative errno of failure (e.g. -ENOMEM)
452 *
453 * Might block: no
454 *
455 * Notes: Only required in "hotplug initialization model" after a
456 * successful call to scsi_host_alloc().
457 *
458 * Defined in: drivers/scsi/hosts.c
459 **/
460int scsi_add_host(struct Scsi_Host *shost, struct device * dev)
461
462
463/**
464 * scsi_add_timer - (re-)start timer on a SCSI command.
465 * @scmd: pointer to scsi command instance
466 * @timeout: duration of timeout in "jiffies"
467 * @complete: pointer to function to call if timeout expires
468 *
469 * Returns nothing
470 *
471 * Might block: no
472 *
473 * Notes: Each scsi command has its own timer, and as it is added
474 * to the queue, we set up the timer. When the command completes,
475 * we cancel the timer. An LLD can use this function to change
476 * the existing timeout value.
477 *
478 * Defined in: drivers/scsi/scsi_error.c
479 **/
480void scsi_add_timer(struct scsi_cmnd *scmd, int timeout,
481 void (*complete)(struct scsi_cmnd *))
482
483
484/**
485 * scsi_adjust_queue_depth - allow LLD to change queue depth on a SCSI device
486 * @sdev: pointer to SCSI device to change queue depth on
487 * @tagged: 0 - no tagged queuing
488 * MSG_SIMPLE_TAG - simple tagged queuing
489 * MSG_ORDERED_TAG - ordered tagged queuing
490 * @tags Number of tags allowed if tagged queuing enabled,
491 * or number of commands the LLD can queue up
492 * in non-tagged mode (as per cmd_per_lun).
493 *
494 * Returns nothing
495 *
496 * Might block: no
497 *
498 * Notes: Can be invoked any time on a SCSI device controlled by this
499 * LLD. [Specifically during and after slave_configure() and prior to
500 * slave_destroy().] Can safely be invoked from interrupt code. Actual
501 * queue depth change may be delayed until the next command is being
502 * processed. See also scsi_activate_tcq() and scsi_deactivate_tcq().
503 *
504 * Defined in: drivers/scsi/scsi.c [see source code for more notes]
505 *
506 **/
507void scsi_adjust_queue_depth(struct scsi_device * sdev, int tagged,
508 int tags)
509
510
511/**
512 * scsi_assign_lock - replace default host_lock with given lock
513 * @shost: a pointer to a scsi host instance
514 * @lock: pointer to lock to replace host_lock for this host
515 *
516 * Returns nothing
517 *
518 * Might block: no
519 *
520 * Defined in: include/scsi/scsi_host.h .
521 **/
522void scsi_assign_lock(struct Scsi_Host *shost, spinlock_t *lock)
523
524
525/**
526 * scsi_bios_ptable - return copy of block device's partition table
527 * @dev: pointer to block device
528 *
529 * Returns pointer to partition table, or NULL for failure
530 *
531 * Might block: yes
532 *
533 * Notes: Caller owns memory returned (free with kfree() )
534 *
535 * Defined in: drivers/scsi/scsicam.c
536 **/
537unsigned char *scsi_bios_ptable(struct block_device *dev)
538
539
540/**
541 * scsi_block_requests - prevent further commands being queued to given host
542 *
543 * @shost: pointer to host to block commands on
544 *
545 * Returns nothing
546 *
547 * Might block: no
548 *
549 * Notes: There is no timer nor any other means by which the requests
550 * get unblocked other than the LLD calling scsi_unblock_requests().
551 *
552 * Defined in: drivers/scsi/scsi_lib.c
553**/
554void scsi_block_requests(struct Scsi_Host * shost)
555
556
557/**
558 * scsi_deactivate_tcq - turn off tag command queueing
559 * @sdev: device to turn off TCQ for
560 * @depth: queue depth (stored in sdev)
561 *
562 * Returns nothing
563 *
564 * Might block: no
565 *
566 * Defined (inline) in: include/scsi/scsi_tcq.h
567 **/
568void scsi_deactivate_tcq(struct scsi_device *sdev, int depth)
569
570
571/**
572 * scsi_delete_timer - cancel timer on a SCSI command.
573 * @scmd: pointer to scsi command instance
574 *
575 * Returns 1 if able to cancel timer else 0 (i.e. too late or already
576 * cancelled).
577 *
578 * Might block: no [may in the future if it invokes del_timer_sync()]
579 *
580 * Notes: All commands issued by upper levels already have a timeout
581 * associated with them. An LLD can use this function to cancel the
582 * timer.
583 *
584 * Defined in: drivers/scsi/scsi_error.c
585 **/
586int scsi_delete_timer(struct scsi_cmnd *scmd)
587
588
589/**
590 * scsi_host_alloc - create a scsi host adapter instance and perform basic
591 * initialization.
592 * @sht: pointer to scsi host template
593 * @privsize: extra bytes to allocate in hostdata array (which is the
594 * last member of the returned Scsi_Host instance)
595 *
596 * Returns pointer to new Scsi_Host instance or NULL on failure
597 *
598 * Might block: yes
599 *
600 * Notes: When this call returns to the LLD, the SCSI bus scan on
601 * this host has _not_ yet been done.
602 * The hostdata array (by default zero length) is a per host scratch
603 * area for the LLD's exclusive use.
604 * Both associated refcounting objects have their refcount set to 1.
605 * Full registration (in sysfs) and a bus scan are performed later when
606 * scsi_add_host() is called.
607 *
608 * Defined in: drivers/scsi/hosts.c .
609 **/
610struct Scsi_Host * scsi_host_alloc(struct scsi_host_template * sht,
611 int privsize)
612
613
614/**
615 * scsi_host_get - increment Scsi_Host instance refcount
616 * @shost: pointer to struct Scsi_Host instance
617 *
618 * Returns nothing
619 *
620 * Might block: currently may block but may be changed to not block
621 *
622 * Notes: Actually increments the counts in two sub-objects
623 *
624 * Defined in: drivers/scsi/hosts.c
625 **/
626void scsi_host_get(struct Scsi_Host *shost)
627
628
629/**
630 * scsi_host_put - decrement Scsi_Host instance refcount, free if 0
631 * @shost: pointer to struct Scsi_Host instance
632 *
633 * Returns nothing
634 *
635 * Might block: currently may block but may be changed to not block
636 *
637 * Notes: Actually decrements the counts in two sub-objects. If the
638 * latter refcount reaches 0, the Scsi_Host instance is freed.
639 * The LLD need not worry exactly when the Scsi_Host instance is
640 * freed, it just shouldn't access the instance after it has balanced
641 * out its refcount usage.
642 *
643 * Defined in: drivers/scsi/hosts.c
644 **/
645void scsi_host_put(struct Scsi_Host *shost)
646
647
648/**
649 * scsi_partsize - parse partition table into cylinders, heads + sectors
650 * @buf: pointer to partition table
651 * @capacity: size of (total) disk in 512 byte sectors
652 * @cyls: outputs number of cylinders calculated via this pointer
653 * @hds: outputs number of heads calculated via this pointer
654 * @secs: outputs number of sectors calculated via this pointer
655 *
656 * Returns 0 on success, -1 on failure
657 *
658 * Might block: no
659 *
660 * Notes: Caller owns memory returned (free with kfree() )
661 *
662 * Defined in: drivers/scsi/scsicam.c
663 **/
664int scsi_partsize(unsigned char *buf, unsigned long capacity,
665 unsigned int *cyls, unsigned int *hds, unsigned int *secs)
666
667
668/**
669 * scsi_register - create and register a scsi host adapter instance.
670 * @sht: pointer to scsi host template
671 * @privsize: extra bytes to allocate in hostdata array (which is the
672 * last member of the returned Scsi_Host instance)
673 *
674 * Returns pointer to new Scsi_Host instance or NULL on failure
675 *
676 * Might block: yes
677 *
678 * Notes: When this call returns to the LLD, the SCSI bus scan on
679 * this host has _not_ yet been done.
680 * The hostdata array (by default zero length) is a per host scratch
681 * area for the LLD.
682 *
683 * Defined in: drivers/scsi/hosts.c .
684 **/
685struct Scsi_Host * scsi_register(struct scsi_host_template * sht,
686 int privsize)
687
688
689/**
690 * scsi_remove_device - detach and remove a SCSI device
691 * @sdev: a pointer to a scsi device instance
692 *
693 * Returns value: 0 on success, -EINVAL if device not attached
694 *
695 * Might block: yes
696 *
697 * Notes: If an LLD becomes aware that a scsi device (lu) has
698 * been removed but its host is still present then it can request
699 * the removal of that scsi device. If successful this call will
700 * lead to the slave_destroy() callback being invoked. sdev is an
701 * invalid pointer after this call.
702 *
703 * Defined in: drivers/scsi/scsi_sysfs.c .
704 **/
705int scsi_remove_device(struct scsi_device *sdev)
706
707
708/**
709 * scsi_remove_host - detach and remove all SCSI devices owned by host
710 * @shost: a pointer to a scsi host instance
711 *
712 * Returns value: 0 on success, 1 on failure (e.g. LLD busy ??)
713 *
714 * Might block: yes
715 *
716 * Notes: Should only be invoked if the "hotplug initialization
717 * model" is being used. It should be called _prior_ to
718 * scsi_unregister().
719 *
720 * Defined in: drivers/scsi/hosts.c .
721 **/
722int scsi_remove_host(struct Scsi_Host *shost)
723
724
725/**
726 * scsi_report_bus_reset - report scsi _bus_ reset observed
727 * @shost: a pointer to a scsi host involved
728 * @channel: channel (within) host on which scsi bus reset occurred
729 *
730 * Returns nothing
731 *
732 * Might block: no
733 *
734 * Notes: This only needs to be called if the reset is one which
735 * originates from an unknown location. Resets originated by the
736 * mid level itself don't need to call this, but there should be
737 * no harm. The main purpose of this is to make sure that a
738 * CHECK_CONDITION is properly treated.
739 *
740 * Defined in: drivers/scsi/scsi_error.c .
741 **/
742void scsi_report_bus_reset(struct Scsi_Host * shost, int channel)
743
744
745/**
746 * scsi_set_device - place device reference in host structure
747 * @shost: a pointer to a scsi host instance
748 * @pdev: pointer to device instance to assign
749 *
750 * Returns nothing
751 *
752 * Might block: no
753 *
754 * Defined in: include/scsi/scsi_host.h .
755 **/
756void scsi_set_device(struct Scsi_Host * shost, struct device * dev)
757
758
759/**
760 * scsi_to_pci_dma_dir - convert SCSI subsystem direction flag to PCI
761 * @scsi_data_direction: SCSI subsystem direction flag
762 *
763 * Returns DMA_TO_DEVICE given SCSI_DATA_WRITE,
764 * DMA_FROM_DEVICE given SCSI_DATA_READ
765 * DMA_BIDIRECTIONAL given SCSI_DATA_UNKNOWN
766 * else returns DMA_NONE
767 *
768 * Might block: no
769 *
770 * Notes: The SCSI subsystem now uses the same values for these
771 * constants as the PCI subsystem so this function is a nop.
772 * The recommendation is not to use this conversion function anymore
773 * (in the 2.6 kernel series) as it is not needed.
774 *
775 * Defined in: drivers/scsi/scsi.h .
776 **/
777int scsi_to_pci_dma_dir(unsigned char scsi_data_direction)
778
779
780/**
781 * scsi_to_sbus_dma_dir - convert SCSI subsystem direction flag to SBUS
782 * @scsi_data_direction: SCSI subsystem direction flag
783 *
784 * Returns DMA_TO_DEVICE given SCSI_DATA_WRITE,
785 * FROM_DEVICE given SCSI_DATA_READ
786 * DMA_BIDIRECTIONAL given SCSI_DATA_UNKNOWN
787 * else returns DMA_NONE
788 *
789 * Notes: The SCSI subsystem now uses the same values for these
790 * constants as the SBUS subsystem so this function is a nop.
791 * The recommendation is not to use this conversion function anymore
792 * (in the 2.6 kernel series) as it is not needed.
793 *
794 * Might block: no
795 *
796 * Defined in: drivers/scsi/scsi.h .
797 **/
798int scsi_to_sbus_dma_dir(unsigned char scsi_data_direction)
799
800
801/**
802 * scsi_track_queue_full - track successive QUEUE_FULL events on given
803 * device to determine if and when there is a need
804 * to adjust the queue depth on the device.
805 * @sdev: pointer to SCSI device instance
806 * @depth: Current number of outstanding SCSI commands on this device,
807 * not counting the one returned as QUEUE_FULL.
808 *
809 * Returns 0 - no change needed
810 * >0 - adjust queue depth to this new depth
811 * -1 - drop back to untagged operation using host->cmd_per_lun
812 * as the untagged command depth
813 *
814 * Might block: no
815 *
816 * Notes: LLDs may call this at any time and we will do "The Right
817 * Thing"; interrupt context safe.
818 *
819 * Defined in: drivers/scsi/scsi.c .
820 **/
821int scsi_track_queue_full(Scsi_Device *sdev, int depth)
822
823
824/**
825 * scsi_unblock_requests - allow further commands to be queued to given host
826 *
827 * @shost: pointer to host to unblock commands on
828 *
829 * Returns nothing
830 *
831 * Might block: no
832 *
833 * Defined in: drivers/scsi/scsi_lib.c .
834**/
835void scsi_unblock_requests(struct Scsi_Host * shost)
836
837
838/**
839 * scsi_unregister - unregister and free memory used by host instance
840 * @shp: pointer to scsi host instance to unregister.
841 *
842 * Returns nothing
843 *
844 * Might block: no
845 *
846 * Notes: Should not be invoked if the "hotplug initialization
847 * model" is being used. Called internally by exit_this_scsi_driver()
848 * in the "passive initialization model". Hence a LLD has no need to
849 * call this function directly.
850 *
851 * Defined in: drivers/scsi/hosts.c .
852 **/
853void scsi_unregister(struct Scsi_Host * shp)
854
855
856
857
858Interface Functions
859===================
860Interface functions are supplied (defined) by LLDs and their function
861pointers are placed in an instance of struct scsi_host_template which
862is passed to scsi_host_alloc() [or scsi_register() / init_this_scsi_driver()].
863Some are mandatory. Interface functions should be declared static. The
864accepted convention is that driver "xyz" will declare its slave_configure()
865function as:
866 static int xyz_slave_configure(struct scsi_device * sdev);
867and so forth for all interface functions listed below.
868
869A pointer to this function should be placed in the 'slave_configure' member
870of a "struct scsi_host_template" instance. A pointer to such an instance
871should be passed to the mid level's scsi_host_alloc() [or scsi_register() /
872init_this_scsi_driver()].
873
874The interface functions are also described in the include/scsi/scsi_host.h
875file immediately above their definition point in "struct scsi_host_template".
876In some cases more detail is given in scsi_host.h than below.
877
878The interface functions are listed below in alphabetical order.
879
880Summary:
881 bios_param - fetch head, sector, cylinder info for a disk
882 detect - detects HBAs this driver wants to control
883 eh_timed_out - notify the host that a command timer expired
884 eh_abort_handler - abort given command
885 eh_bus_reset_handler - issue SCSI bus reset
886 eh_device_reset_handler - issue SCSI device reset
887 eh_host_reset_handler - reset host (host bus adapter)
888 eh_strategy_handler - driver supplied alternate to scsi_unjam_host()
889 info - supply information about given host
890 ioctl - driver can respond to ioctls
891 proc_info - supports /proc/scsi/{driver_name}/{host_no}
892 queuecommand - queue scsi command, invoke 'done' on completion
893 release - release all resources associated with given host
894 slave_alloc - prior to any commands being sent to a new device
895 slave_configure - driver fine tuning for given device after attach
896 slave_destroy - given device is about to be shut down
897
898
899Details:
900
901/**
902 * bios_param - fetch head, sector, cylinder info for a disk
903 * @sdev: pointer to scsi device context (defined in
904 * include/scsi/scsi_device.h)
905 * @bdev: pointer to block device context (defined in fs.h)
906 * @capacity: device size (in 512 byte sectors)
907 * @params: three element array to place output:
908 * params[0] number of heads (max 255)
909 * params[1] number of sectors (max 63)
910 * params[2] number of cylinders
911 *
912 * Return value is ignored
913 *
914 * Locks: none
915 *
916 * Calling context: process (sd)
917 *
918 * Notes: an arbitrary geometry (based on READ CAPACITY) is used
919 * if this function is not provided. The params array is
920 * pre-initialized with made up values just in case this function
921 * doesn't output anything.
922 *
923 * Optionally defined in: LLD
924 **/
925 int bios_param(struct scsi_device * sdev, struct block_device *bdev,
926 sector_t capacity, int params[3])
927
928
929/**
930 * detect - detects HBAs this driver wants to control
931 * @shtp: host template for this driver.
932 *
933 * Returns number of hosts this driver wants to control. 0 means no
934 * suitable hosts found.
935 *
936 * Locks: none held
937 *
938 * Calling context: process [invoked from init_this_scsi_driver()]
939 *
940 * Notes: First function called from the SCSI mid level on this
941 * driver. Upper level drivers (e.g. sd) may not (yet) be present.
942 * For each host found, this method should call scsi_register()
943 * [see hosts.c].
944 *
945 * Defined in: LLD (required if "passive initialization mode" is used,
946 * not invoked in "hotplug initialization mode")
947 **/
948 int detect(struct scsi_host_template * shtp)
949
950
951/**
952 * eh_timed_out - The timer for the command has just fired
953 * @scp: identifies command timing out
954 *
955 * Returns:
956 *
957 * EH_HANDLED: I fixed the error, please complete the command
958 * EH_RESET_TIMER: I need more time, reset the timer and
959 * begin counting again
960 * EH_NOT_HANDLED Begin normal error recovery
961 *
962 *
963 * Locks: None held
964 *
965 * Calling context: interrupt
966 *
967 * Notes: This is to give the LLD an opportunity to do local recovery.
968 * This recovery is limited to determining if the outstanding command
969 * will ever complete. You may not abort and restart the command from
970 * this callback.
971 *
972 * Optionally defined in: LLD
973 **/
974 int eh_timed_out(struct scsi_cmnd * scp)
975
976
977/**
978 * eh_abort_handler - abort command associated with scp
979 * @scp: identifies command to be aborted
980 *
981 * Returns SUCCESS if command aborted else FAILED
982 *
983 * Locks: struct Scsi_Host::host_lock held (with irqsave) on entry
984 * and assumed to be held on return.
985 *
986 * Calling context: kernel thread
987 *
988 * Notes: Invoked from scsi_eh thread. No other commands will be
989 * queued on current host during eh.
990 *
991 * Optionally defined in: LLD
992 **/
993 int eh_abort_handler(struct scsi_cmnd * scp)
994
995
996/**
997 * eh_bus_reset_handler - issue SCSI bus reset
998 * @scp: SCSI bus that contains this device should be reset
999 *
1000 * Returns SUCCESS if command aborted else FAILED
1001 *
1002 * Locks: struct Scsi_Host::host_lock held (with irqsave) on entry
1003 * and assumed to be held on return.
1004 *
1005 * Calling context: kernel thread
1006 *
1007 * Notes: Invoked from scsi_eh thread. No other commands will be
1008 * queued on current host during eh.
1009 *
1010 * Optionally defined in: LLD
1011 **/
1012 int eh_bus_reset_handler(struct scsi_cmnd * scp)
1013
1014
1015/**
1016 * eh_device_reset_handler - issue SCSI device reset
1017 * @scp: identifies SCSI device to be reset
1018 *
1019 * Returns SUCCESS if command aborted else FAILED
1020 *
1021 * Locks: struct Scsi_Host::host_lock held (with irqsave) on entry
1022 * and assumed to be held on return.
1023 *
1024 * Calling context: kernel thread
1025 *
1026 * Notes: Invoked from scsi_eh thread. No other commands will be
1027 * queued on current host during eh.
1028 *
1029 * Optionally defined in: LLD
1030 **/
1031 int eh_device_reset_handler(struct scsi_cmnd * scp)
1032
1033
1034/**
1035 * eh_host_reset_handler - reset host (host bus adapter)
1036 * @scp: SCSI host that contains this device should be reset
1037 *
1038 * Returns SUCCESS if command aborted else FAILED
1039 *
1040 * Locks: struct Scsi_Host::host_lock held (with irqsave) on entry
1041 * and assumed to be held on return.
1042 *
1043 * Calling context: kernel thread
1044 *
1045 * Notes: Invoked from scsi_eh thread. No other commands will be
1046 * queued on current host during eh.
1047 * With the default eh_strategy in place, if none of the _abort_,
1048 * _device_reset_, _bus_reset_ or this eh handler function are
1049 * defined (or they all return FAILED) then the device in question
1050 * will be set offline whenever eh is invoked.
1051 *
1052 * Optionally defined in: LLD
1053 **/
1054 int eh_host_reset_handler(struct scsi_cmnd * scp)
1055
1056
1057/**
1058 * eh_strategy_handler - driver supplied alternate to scsi_unjam_host()
1059 * @shp: host on which error has occurred
1060 *
1061 * Returns TRUE if host unjammed, else FALSE.
1062 *
1063 * Locks: none
1064 *
1065 * Calling context: kernel thread
1066 *
1067 * Notes: Invoked from scsi_eh thread. LLD supplied alternate to
1068 * scsi_unjam_host() found in scsi_error.c
1069 *
1070 * Optionally defined in: LLD
1071 **/
1072 int eh_strategy_handler(struct Scsi_Host * shp)
1073
1074
1075/**
1076 * info - supply information about given host: driver name plus data
1077 * to distinguish given host
1078 * @shp: host to supply information about
1079 *
1080 * Return ASCII null terminated string. [This driver is assumed to
1081 * manage the memory pointed to and maintain it, typically for the
1082 * lifetime of this host.]
1083 *
1084 * Locks: none
1085 *
1086 * Calling context: process
1087 *
1088 * Notes: Often supplies PCI or ISA information such as IO addresses
1089 * and interrupt numbers. If not supplied struct Scsi_Host::name used
1090 * instead. It is assumed the returned information fits on one line
1091 * (i.e. does not included embedded newlines).
1092 * The SCSI_IOCTL_PROBE_HOST ioctl yields the string returned by this
1093 * function (or struct Scsi_Host::name if this function is not
1094 * available).
1095 * In a similar manner, init_this_scsi_driver() outputs to the console
1096 * each host's "info" (or name) for the driver it is registering.
1097 * Also if proc_info() is not supplied, the output of this function
1098 * is used instead.
1099 *
1100 * Optionally defined in: LLD
1101 **/
1102 const char * info(struct Scsi_Host * shp)
1103
1104
1105/**
1106 * ioctl - driver can respond to ioctls
1107 * @sdp: device that ioctl was issued for
1108 * @cmd: ioctl number
1109 * @arg: pointer to read or write data from. Since it points to
1110 * user space, should use appropriate kernel functions
1111 * (e.g. copy_from_user() ). In the Unix style this argument
1112 * can also be viewed as an unsigned long.
1113 *
1114 * Returns negative "errno" value when there is a problem. 0 or a
1115 * positive value indicates success and is returned to the user space.
1116 *
1117 * Locks: none
1118 *
1119 * Calling context: process
1120 *
1121 * Notes: The SCSI subsystem uses a "trickle down" ioctl model.
1122 * The user issues an ioctl() against an upper level driver
1123 * (e.g. /dev/sdc) and if the upper level driver doesn't recognize
1124 * the 'cmd' then it is passed to the SCSI mid level. If the SCSI
1125 * mid level does not recognize it, then the LLD that controls
1126 * the device receives the ioctl. According to recent Unix standards
1127 * unsupported ioctl() 'cmd' numbers should return -ENOTTY.
1128 *
1129 * Optionally defined in: LLD
1130 **/
1131 int ioctl(struct scsi_device *sdp, int cmd, void *arg)
1132
1133
1134/**
1135 * proc_info - supports /proc/scsi/{driver_name}/{host_no}
1136 * @buffer: anchor point to output to (0==writeto1_read0) or fetch from
1137 * (1==writeto1_read0).
1138 * @start: where "interesting" data is written to. Ignored when
1139 * 1==writeto1_read0.
1140 * @offset: offset within buffer 0==writeto1_read0 is actually
1141 * interested in. Ignored when 1==writeto1_read0 .
1142 * @length: maximum (or actual) extent of buffer
1143 * @host_no: host number of interest (struct Scsi_Host::host_no)
1144 * @writeto1_read0: 1 -> data coming from user space towards driver
1145 * (e.g. "echo some_string > /proc/scsi/xyz/2")
1146 * 0 -> user what data from this driver
1147 * (e.g. "cat /proc/scsi/xyz/2")
1148 *
1149 * Returns length when 1==writeto1_read0. Otherwise number of chars
1150 * output to buffer past offset.
1151 *
1152 * Locks: none held
1153 *
1154 * Calling context: process
1155 *
1156 * Notes: Driven from scsi_proc.c which interfaces to proc_fs. proc_fs
1157 * support can now be configured out of the scsi subsystem.
1158 *
1159 * Optionally defined in: LLD
1160 **/
1161 int proc_info(char * buffer, char ** start, off_t offset,
1162 int length, int host_no, int writeto1_read0)
1163
1164
1165/**
1166 * queuecommand - queue scsi command, invoke 'done' on completion
1167 * @scp: pointer to scsi command object
1168 * @done: function pointer to be invoked on completion
1169 *
1170 * Returns 0 on success.
1171 *
1172 * If there's a failure, return either:
1173 *
1174 * SCSI_MLQUEUE_DEVICE_BUSY if the device queue is full, or
1175 * SCSI_MLQUEUE_HOST_BUSY if the entire host queue is full
1176 *
1177 * On both of these returns, the mid-layer will requeue the I/O
1178 *
1179 * - if the return is SCSI_MLQUEUE_DEVICE_BUSY, only that particular
1180 * device will be paused, and it will be unpaused when a command to
1181 * the device returns (or after a brief delay if there are no more
1182 * outstanding commands to it). Commands to other devices continue
1183 * to be processed normally.
1184 *
1185 * - if the return is SCSI_MLQUEUE_HOST_BUSY, all I/O to the host
1186 * is paused and will be unpaused when any command returns from
1187 * the host (or after a brief delay if there are no outstanding
1188 * commands to the host).
1189 *
1190 * For compatibility with earlier versions of queuecommand, any
1191 * other return value is treated the same as
1192 * SCSI_MLQUEUE_HOST_BUSY.
1193 *
1194 * Other types of errors that are detected immediately may be
1195 * flagged by setting scp->result to an appropriate value,
1196 * invoking the 'done' callback, and then returning 0 from this
1197 * function. If the command is not performed immediately (and the
1198 * LLD is starting (or will start) the given command) then this
1199 * function should place 0 in scp->result and return 0.
1200 *
1201 * Command ownership. If the driver returns zero, it owns the
1202 * command and must take responsibility for ensuring the 'done'
1203 * callback is executed. Note: the driver may call done before
1204 * returning zero, but after it has called done, it may not
1205 * return any value other than zero. If the driver makes a
1206 * non-zero return, it must not execute the command's done
1207 * callback at any time.
1208 *
1209 * Locks: struct Scsi_Host::host_lock held on entry (with "irqsave")
1210 * and is expected to be held on return.
1211 *
1212 * Calling context: in interrupt (soft irq) or process context
1213 *
1214 * Notes: This function should be relatively fast. Normally it will
1215 * not wait for IO to complete. Hence the 'done' callback is invoked
1216 * (often directly from an interrupt service routine) some time after
1217 * this function has returned. In some cases (e.g. pseudo adapter
1218 * drivers that manufacture the response to a SCSI INQUIRY)
1219 * the 'done' callback may be invoked before this function returns.
1220 * If the 'done' callback is not invoked within a certain period
1221 * the SCSI mid level will commence error processing.
1222 * If a status of CHECK CONDITION is placed in "result" when the
1223 * 'done' callback is invoked, then the LLD driver should
1224 * perform autosense and fill in the struct scsi_cmnd::sense_buffer
1225 * array. The scsi_cmnd::sense_buffer array is zeroed prior to
1226 * the mid level queuing a command to an LLD.
1227 *
1228 * Defined in: LLD
1229 **/
1230 int queuecommand(struct scsi_cmnd * scp,
1231 void (*done)(struct scsi_cmnd *))
1232
1233
1234/**
1235 * release - release all resources associated with given host
1236 * @shp: host to be released.
1237 *
1238 * Return value ignored (could soon be a function returning void).
1239 *
1240 * Locks: none held
1241 *
1242 * Calling context: process
1243 *
1244 * Notes: Invoked from scsi_module.c's exit_this_scsi_driver().
1245 * LLD's implementation of this function should call
1246 * scsi_unregister(shp) prior to returning.
1247 * Only needed for old-style host templates.
1248 *
1249 * Defined in: LLD (required in "passive initialization model",
1250 * should not be defined in hotplug model)
1251 **/
1252 int release(struct Scsi_Host * shp)
1253
1254
1255/**
1256 * slave_alloc - prior to any commands being sent to a new device
1257 * (i.e. just prior to scan) this call is made
1258 * @sdp: pointer to new device (about to be scanned)
1259 *
1260 * Returns 0 if ok. Any other return is assumed to be an error and
1261 * the device is ignored.
1262 *
1263 * Locks: none
1264 *
1265 * Calling context: process
1266 *
1267 * Notes: Allows the driver to allocate any resources for a device
1268 * prior to its initial scan. The corresponding scsi device may not
1269 * exist but the mid level is just about to scan for it (i.e. send
1270 * and INQUIRY command plus ...). If a device is found then
1271 * slave_configure() will be called while if a device is not found
1272 * slave_destroy() is called.
1273 * For more details see the include/scsi/scsi_host.h file.
1274 *
1275 * Optionally defined in: LLD
1276 **/
1277 int slave_alloc(struct scsi_device *sdp)
1278
1279
1280/**
1281 * slave_configure - driver fine tuning for given device just after it
1282 * has been first scanned (i.e. it responded to an
1283 * INQUIRY)
1284 * @sdp: device that has just been attached
1285 *
1286 * Returns 0 if ok. Any other return is assumed to be an error and
1287 * the device is taken offline. [offline devices will _not_ have
1288 * slave_destroy() called on them so clean up resources.]
1289 *
1290 * Locks: none
1291 *
1292 * Calling context: process
1293 *
1294 * Notes: Allows the driver to inspect the response to the initial
1295 * INQUIRY done by the scanning code and take appropriate action.
1296 * For more details see the include/scsi/scsi_host.h file.
1297 *
1298 * Optionally defined in: LLD
1299 **/
1300 int slave_configure(struct scsi_device *sdp)
1301
1302
1303/**
1304 * slave_destroy - given device is about to be shut down. All
1305 * activity has ceased on this device.
1306 * @sdp: device that is about to be shut down
1307 *
1308 * Returns nothing
1309 *
1310 * Locks: none
1311 *
1312 * Calling context: process
1313 *
1314 * Notes: Mid level structures for given device are still in place
1315 * but are about to be torn down. Any per device resources allocated
1316 * by this driver for given device should be freed now. No further
1317 * commands will be sent for this sdp instance. [However the device
1318 * could be re-attached in the future in which case a new instance
1319 * of struct scsi_device would be supplied by future slave_alloc()
1320 * and slave_configure() calls.]
1321 *
1322 * Optionally defined in: LLD
1323 **/
1324 void slave_destroy(struct scsi_device *sdp)
1325
1326
1327
1328Data Structures
1329===============
1330struct scsi_host_template
1331-------------------------
1332There is one "struct scsi_host_template" instance per LLD ***. It is
1333typically initialized as a file scope static in a driver's header file. That
1334way members that are not explicitly initialized will be set to 0 or NULL.
1335Member of interest:
1336 name - name of driver (may contain spaces, please limit to
1337 less than 80 characters)
1338 proc_name - name used in "/proc/scsi/<proc_name>/<host_no>" and
1339 by sysfs in one of its "drivers" directories. Hence
1340 "proc_name" should only contain characters acceptable
1341 to a Unix file name.
1342 (*queuecommand)() - primary callback that the mid level uses to inject
1343 SCSI commands into an LLD.
1344The structure is defined and commented in include/scsi/scsi_host.h
1345
1346*** In extreme situations a single driver may have several instances
1347 if it controls several different classes of hardware (e.g. an LLD
1348 that handles both ISA and PCI cards and has a separate instance of
1349 struct scsi_host_template for each class).
1350
1351struct Scsi_Host
1352----------------
1353There is one struct Scsi_Host instance per host (HBA) that an LLD
1354controls. The struct Scsi_Host structure has many members in common
1355with "struct scsi_host_template". When a new struct Scsi_Host instance
1356is created (in scsi_host_alloc() in hosts.c) those common members are
1357initialized from the driver's struct scsi_host_template instance. Members
1358of interest:
1359 host_no - system wide unique number that is used for identifying
1360 this host. Issued in ascending order from 0.
1361 can_queue - must be greater than 0; do not send more than can_queue
1362 commands to the adapter.
1363 this_id - scsi id of host (scsi initiator) or -1 if not known
1364 sg_tablesize - maximum scatter gather elements allowed by host.
1365 0 implies scatter gather not supported by host
1366 max_sectors - maximum number of sectors (usually 512 bytes) allowed
1367 in a single SCSI command. The default value of 0 leads
1368 to a setting of SCSI_DEFAULT_MAX_SECTORS (defined in
1369 scsi_host.h) which is currently set to 1024. So for a
1370 disk the maximum transfer size is 512 KB when max_sectors
1371 is not defined. Note that this size may not be sufficient
1372 for disk firmware uploads.
1373 cmd_per_lun - maximum number of commands that can be queued on devices
1374 controlled by the host. Overridden by LLD calls to
1375 scsi_adjust_queue_depth().
1376 unchecked_isa_dma - 1=>only use bottom 16 MB of ram (ISA DMA addressing
1377 restriction), 0=>can use full 32 bit (or better) DMA
1378 address space
1379 use_clustering - 1=>SCSI commands in mid level's queue can be merged,
1380 0=>disallow SCSI command merging
1381 hostt - pointer to driver's struct scsi_host_template from which
1382 this struct Scsi_Host instance was spawned
1383 hostt->proc_name - name of LLD. This is the driver name that sysfs uses
1384 transportt - pointer to driver's struct scsi_transport_template instance
1385 (if any). FC and SPI transports currently supported.
1386 sh_list - a double linked list of pointers to all struct Scsi_Host
1387 instances (currently ordered by ascending host_no)
1388 my_devices - a double linked list of pointers to struct scsi_device
1389 instances that belong to this host.
1390 hostdata[0] - area reserved for LLD at end of struct Scsi_Host. Size
1391 is set by the second argument (named 'xtr_bytes') to
1392 scsi_host_alloc() or scsi_register().
1393
1394The scsi_host structure is defined in include/scsi/scsi_host.h
1395
1396struct scsi_device
1397------------------
1398Generally, there is one instance of this structure for each SCSI logical unit
1399on a host. Scsi devices connected to a host are uniquely identified by a
1400channel number, target id and logical unit number (lun).
1401The structure is defined in include/scsi/scsi_device.h
1402
1403struct scsi_cmnd
1404----------------
1405Instances of this structure convey SCSI commands to the LLD and responses
1406back to the mid level. The SCSI mid level will ensure that no more SCSI
1407commands become queued against the LLD than are indicated by
1408scsi_adjust_queue_depth() (or struct Scsi_Host::cmd_per_lun). There will
1409be at least one instance of struct scsi_cmnd available for each SCSI device.
1410Members of interest:
1411 cmnd - array containing SCSI command
1412 cmnd_len - length (in bytes) of SCSI command
1413 sc_data_direction - direction of data transfer in data phase. See
1414 "enum dma_data_direction" in include/linux/dma-mapping.h
1415 request_bufflen - number of data bytes to transfer (0 if no data phase)
1416 use_sg - ==0 -> no scatter gather list, hence transfer data
1417 to/from request_buffer
1418 - >0 -> scatter gather list (actually an array) in
1419 request_buffer with use_sg elements
1420 request_buffer - either contains data buffer or scatter gather list
1421 depending on the setting of use_sg. Scatter gather
1422 elements are defined by 'struct scatterlist' found
1423 in include/asm/scatterlist.h .
1424 done - function pointer that should be invoked by LLD when the
1425 SCSI command is completed (successfully or otherwise).
1426 Should only be called by an LLD if the LLD has accepted
1427 the command (i.e. queuecommand() returned or will return
1428 0). The LLD may invoke 'done' prior to queuecommand()
1429 finishing.
1430 result - should be set by LLD prior to calling 'done'. A value
1431 of 0 implies a successfully completed command (and all
1432 data (if any) has been transferred to or from the SCSI
1433 target device). 'result' is a 32 bit unsigned integer that
1434 can be viewed as 4 related bytes. The SCSI status value is
1435 in the LSB. See include/scsi/scsi.h status_byte(),
1436 msg_byte(), host_byte() and driver_byte() macros and
1437 related constants.
1438 sense_buffer - an array (maximum size: SCSI_SENSE_BUFFERSIZE bytes) that
1439 should be written when the SCSI status (LSB of 'result')
1440 is set to CHECK_CONDITION (2). When CHECK_CONDITION is
1441 set, if the top nibble of sense_buffer[0] has the value 7
1442 then the mid level will assume the sense_buffer array
1443 contains a valid SCSI sense buffer; otherwise the mid
1444 level will issue a REQUEST_SENSE SCSI command to
1445 retrieve the sense buffer. The latter strategy is error
1446 prone in the presence of command queuing so the LLD should
1447 always "auto-sense".
1448 device - pointer to scsi_device object that this command is
1449 associated with.
1450 resid - an LLD should set this signed integer to the requested
1451 transfer length (i.e. 'request_bufflen') less the number
1452 of bytes that are actually transferred. 'resid' is
1453 preset to 0 so an LLD can ignore it if it cannot detect
1454 underruns (overruns should be rare). If possible an LLD
1455 should set 'resid' prior to invoking 'done'. The most
1456 interesting case is data transfers from a SCSI target
1457 device device (i.e. READs) that underrun.
1458 underflow - LLD should place (DID_ERROR << 16) in 'result' if
1459 actual number of bytes transferred is less than this
1460 figure. Not many LLDs implement this check and some that
1461 do just output an error message to the log rather than
1462 report a DID_ERROR. Better for an LLD to implement
1463 'resid'.
1464
1465The scsi_cmnd structure is defined in include/scsi/scsi_cmnd.h
1466
1467
1468Locks
1469=====
1470Each struct Scsi_Host instance has a spin_lock called struct
1471Scsi_Host::default_lock which is initialized in scsi_host_alloc() [found in
1472hosts.c]. Within the same function the struct Scsi_Host::host_lock pointer
1473is initialized to point at default_lock with the scsi_assign_lock() function.
1474Thereafter lock and unlock operations performed by the mid level use the
1475struct Scsi_Host::host_lock pointer.
1476
1477LLDs can override the use of struct Scsi_Host::default_lock by
1478using scsi_assign_lock(). The earliest opportunity to do this would
1479be in the detect() function after it has invoked scsi_register(). It
1480could be replaced by a coarser grain lock (e.g. per driver) or a
1481lock of equal granularity (i.e. per host). Using finer grain locks
1482(e.g. per SCSI device) may be possible by juggling locks in
1483queuecommand().
1484
1485Autosense
1486=========
1487Autosense (or auto-sense) is defined in the SAM-2 document as "the
1488automatic return of sense data to the application client coincident
1489with the completion of a SCSI command" when a status of CHECK CONDITION
1490occurs. LLDs should perform autosense. This should be done when the LLD
1491detects a CHECK CONDITION status by either:
1492 a) instructing the SCSI protocol (e.g. SCSI Parallel Interface (SPI))
1493 to perform an extra data in phase on such responses
1494 b) or, the LLD issuing a REQUEST SENSE command itself
1495
1496Either way, when a status of CHECK CONDITION is detected, the mid level
1497decides whether the LLD has performed autosense by checking struct
1498scsi_cmnd::sense_buffer[0] . If this byte has an upper nibble of 7 (or 0xf)
1499then autosense is assumed to have taken place. If it has another value (and
1500this byte is initialized to 0 before each command) then the mid level will
1501issue a REQUEST SENSE command.
1502
1503In the presence of queued commands the "nexus" that maintains sense
1504buffer data from the command that failed until a following REQUEST SENSE
1505may get out of synchronization. This is why it is best for the LLD
1506to perform autosense.
1507
1508
1509Changes since lk 2.4 series
1510===========================
1511io_request_lock has been replaced by several finer grained locks. The lock
1512relevant to LLDs is struct Scsi_Host::host_lock and there is
1513one per SCSI host.
1514
1515The older error handling mechanism has been removed. This means the
1516LLD interface functions abort() and reset() have been removed.
1517The struct scsi_host_template::use_new_eh_code flag has been removed.
1518
1519In the 2.4 series the SCSI subsystem configuration descriptions were
1520aggregated with the configuration descriptions from all other Linux
1521subsystems in the Documentation/Configure.help file. In the 2.6 series,
1522the SCSI subsystem now has its own (much smaller) drivers/scsi/Kconfig
1523file that contains both configuration and help information.
1524
1525struct SHT has been renamed to struct scsi_host_template.
1526
1527Addition of the "hotplug initialization model" and many extra functions
1528to support it.
1529
1530
1531Credits
1532=======
1533The following people have contributed to this document:
1534 Mike Anderson <andmike at us dot ibm dot com>
1535 James Bottomley <James dot Bottomley at steeleye dot com>
1536 Patrick Mansfield <patmans at us dot ibm dot com>
1537 Christoph Hellwig <hch at infradead dot org>
1538 Doug Ledford <dledford at redhat dot com>
1539 Andries Brouwer <Andries dot Brouwer at cwi dot nl>
1540 Randy Dunlap <rddunlap at osdl dot org>
1541 Alan Stern <stern at rowland dot harvard dot edu>
1542
1543
1544Douglas Gilbert
1545dgilbert at interlog dot com
154621st September 2004
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt
new file mode 100644
index 000000000000..20e30cf31877
--- /dev/null
+++ b/Documentation/scsi/st.txt
@@ -0,0 +1,499 @@
1This file contains brief information about the SCSI tape driver.
2The driver is currently maintained by Kai Mäkisara (email
3Kai.Makisara@kolumbus.fi)
4
5Last modified: Mon Mar 7 21:14:44 2005 by kai.makisara
6
7
8BASICS
9
10The driver is generic, i.e., it does not contain any code tailored
11to any specific tape drive. The tape parameters can be specified with
12one of the following three methods:
13
141. Each user can specify the tape parameters he/she wants to use
15directly with ioctls. This is administratively a very simple and
16flexible method and applicable to single-user workstations. However,
17in a multiuser environment the next user finds the tape parameters in
18state the previous user left them.
19
202. The system manager (root) can define default values for some tape
21parameters, like block size and density using the MTSETDRVBUFFER ioctl.
22These parameters can be programmed to come into effect either when a
23new tape is loaded into the drive or if writing begins at the
24beginning of the tape. The second method is applicable if the tape
25drive performs auto-detection of the tape format well (like some
26QIC-drives). The result is that any tape can be read, writing can be
27continued using existing format, and the default format is used if
28the tape is rewritten from the beginning (or a new tape is written
29for the first time). The first method is applicable if the drive
30does not perform auto-detection well enough and there is a single
31"sensible" mode for the device. An example is a DAT drive that is
32used only in variable block mode (I don't know if this is sensible
33or not :-).
34
35The user can override the parameters defined by the system
36manager. The changes persist until the defaults again come into
37effect.
38
393. By default, up to four modes can be defined and selected using the minor
40number (bits 5 and 6). The number of modes can be changed by changing
41ST_NBR_MODE_BITS in st.h. Mode 0 corresponds to the defaults discussed
42above. Additional modes are dormant until they are defined by the
43system manager (root). When specification of a new mode is started,
44the configuration of mode 0 is used to provide a starting point for
45definition of the new mode.
46
47Using the modes allows the system manager to give the users choices
48over some of the buffering parameters not directly accessible to the
49users (buffered and asynchronous writes). The modes also allow choices
50between formats in multi-tape operations (the explicitly overridden
51parameters are reset when a new tape is loaded).
52
53If more than one mode is used, all modes should contain definitions
54for the same set of parameters.
55
56Many Unices contain internal tables that associate different modes to
57supported devices. The Linux SCSI tape driver does not contain such
58tables (and will not do that in future). Instead of that, a utility
59program can be made that fetches the inquiry data sent by the device,
60scans its database, and sets up the modes using the ioctls. Another
61alternative is to make a small script that uses mt to set the defaults
62tailored to the system.
63
64The driver supports fixed and variable block size (within buffer
65limits). Both the auto-rewind (minor equals device number) and
66non-rewind devices (minor is 128 + device number) are implemented.
67
68In variable block mode, the byte count in write() determines the size
69of the physical block on tape. When reading, the drive reads the next
70tape block and returns to the user the data if the read() byte count
71is at least the block size. Otherwise, error ENOMEM is returned.
72
73In fixed block mode, the data transfer between the drive and the
74driver is in multiples of the block size. The write() byte count must
75be a multiple of the block size. This is not required when reading but
76may be advisable for portability.
77
78Support is provided for changing the tape partition and partitioning
79of the tape with one or two partitions. By default support for
80partitioned tape is disabled for each driver and it can be enabled
81with the ioctl MTSETDRVBUFFER.
82
83By default the driver writes one filemark when the device is closed after
84writing and the last operation has been a write. Two filemarks can be
85optionally written. In both cases end of data is signified by
86returning zero bytes for two consecutive reads.
87
88If rewind, offline, bsf, or seek is done and previous tape operation was
89write, a filemark is written before moving tape.
90
91The compile options are defined in the file linux/drivers/scsi/st_options.h.
92
934. If the open option O_NONBLOCK is used, open succeeds even if the
94drive is not ready. If O_NONBLOCK is not used, the driver waits for
95the drive to become ready. If this does not happen in ST_BLOCK_SECONDS
96seconds, open fails with the errno value EIO. With O_NONBLOCK the
97device can be opened for writing even if there is a write protected
98tape in the drive (commands trying to write something return error if
99attempted).
100
101
102MINOR NUMBERS
103
104The tape driver currently supports 128 drives by default. This number
105can be increased by editing st.h and recompiling the driver if
106necessary. The upper limit is 2^17 drives if 4 modes for each drive
107are used.
108
109The minor numbers consist of the following bit fields:
110
111dev_upper non-rew mode dev-lower
112 20 - 8 7 6 5 4 0
113The non-rewind bit is always bit 7 (the uppermost bit in the lowermost
114byte). The bits defining the mode are below the non-rewind bit. The
115remaining bits define the tape device number. This numbering is
116backward compatible with the numbering used when the minor number was
117only 8 bits wide.
118
119
120SYSFS SUPPORT
121
122The driver creates the directory /sys/class/scsi_tape and populates it with
123directories corresponding to the existing tape devices. There are autorewind
124and non-rewind entries for each mode. The names are stxy and nstxy, where x
125is the tape number and y a character corresponding to the mode (none, l, m,
126a). For example, the directories for the first tape device are (assuming four
127modes): st0 nst0 st0l nst0l st0m nst0m st0a nst0a.
128
129Each directory contains the entries: default_blksize default_compression
130default_density defined dev device driver. The file 'defined' contains 1
131if the mode is defined and zero if not defined. The files 'default_*' contain
132the defaults set by the user. The value -1 means the default is not set. The
133file 'dev' contains the device numbers corresponding to this device. The links
134'device' and 'driver' point to the SCSI device and driver entries.
135
136A link named 'tape' is made from the SCSI device directory to the class
137directory corresponding to the mode 0 auto-rewind device (e.g., st0).
138
139
140BSD AND SYS V SEMANTICS
141
142The user can choose between these two behaviours of the tape driver by
143defining the value of the symbol ST_SYSV. The semantics differ when a
144file being read is closed. The BSD semantics leaves the tape where it
145currently is whereas the SYS V semantics moves the tape past the next
146filemark unless the filemark has just been crossed.
147
148The default is BSD semantics.
149
150
151BUFFERING
152
153The driver tries to do transfers directly to/from user space. If this
154is not possible, a driver buffer allocated at run-time is used. If
155direct i/o is not possible for the whole transfer, the driver buffer
156is used (i.e., bounce buffers for individual pages are not
157used). Direct i/o can be impossible because of several reasons, e.g.:
158- one or more pages are at addresses not reachable by the HBA
159- the number of pages in the transfer exceeds the number of
160 scatter/gather segments permitted by the HBA
161- one or more pages can't be locked into memory (should not happen in
162 any reasonable situation)
163
164The size of the driver buffers is always at least one tape block. In fixed
165block mode, the minimum buffer size is defined (in 1024 byte units) by
166ST_FIXED_BUFFER_BLOCKS. With small block size this allows buffering of
167several blocks and using one SCSI read or write to transfer all of the
168blocks. Buffering of data across write calls in fixed block mode is
169allowed if ST_BUFFER_WRITES is non-zero and direct i/o is not used.
170Buffer allocation uses chunks of memory having sizes 2^n * (page
171size). Because of this the actual buffer size may be larger than the
172minimum allowable buffer size.
173
174NOTE that if direct i/o is used, the small writes are not buffered. This may
175cause a surprise when moving from 2.4. There small writes (e.g., tar without
176-b option) may have had good throughput but this is not true any more with
1772.6. Direct i/o can be turned off to solve this problem but a better solution
178is to use bigger write() byte counts (e.g., tar -b 64).
179
180Asynchronous writing. Writing the buffer contents to the tape is
181started and the write call returns immediately. The status is checked
182at the next tape operation. Asynchronous writes are not done with
183direct i/o and not in fixed block mode.
184
185Buffered writes and asynchronous writes may in some rare cases cause
186problems in multivolume operations if there is not enough space on the
187tape after the early-warning mark to flush the driver buffer.
188
189Read ahead for fixed block mode (ST_READ_AHEAD). Filling the buffer is
190attempted even if the user does not want to get all of the data at
191this read command. Should be disabled for those drives that don't like
192a filemark to truncate a read request or that don't like backspacing.
193
194Scatter/gather buffers (buffers that consist of chunks non-contiguous
195in the physical memory) are used if contiguous buffers can't be
196allocated. To support all SCSI adapters (including those not
197supporting scatter/gather), buffer allocation is using the following
198three kinds of chunks:
1991. The initial segment that is used for all SCSI adapters including
200those not supporting scatter/gather. The size of this buffer will be
201(PAGE_SIZE << ST_FIRST_ORDER) bytes if the system can give a chunk of
202this size (and it is not larger than the buffer size specified by
203ST_BUFFER_BLOCKS). If this size is not available, the driver halves
204the size and tries again until the size of one page. The default
205settings in st_options.h make the driver to try to allocate all of the
206buffer as one chunk.
2072. The scatter/gather segments to fill the specified buffer size are
208allocated so that as many segments as possible are used but the number
209of segments does not exceed ST_FIRST_SG.
2103. The remaining segments between ST_MAX_SG (or the module parameter
211max_sg_segs) and the number of segments used in phases 1 and 2
212are used to extend the buffer at run-time if this is necessary. The
213number of scatter/gather segments allowed for the SCSI adapter is not
214exceeded if it is smaller than the maximum number of scatter/gather
215segments specified. If the maximum number allowed for the SCSI adapter
216is smaller than the number of segments used in phases 1 and 2,
217extending the buffer will always fail.
218
219
220EOM BEHAVIOUR WHEN WRITING
221
222When the end of medium early warning is encountered, the current write
223is finished and the number of bytes is returned. The next write
224returns -1 and errno is set to ENOSPC. To enable writing a trailer,
225the next write is allowed to proceed and, if successful, the number of
226bytes is returned. After this, -1 and the number of bytes are
227alternately returned until the physical end of medium (or some other
228error) is encountered.
229
230
231MODULE PARAMETERS
232
233The buffer size, write threshold, and the maximum number of allocated buffers
234are configurable when the driver is loaded as a module. The keywords are:
235
236buffer_kbs=xxx the buffer size for fixed block mode is set
237 to xxx kilobytes
238write_threshold_kbs=xxx the write threshold in kilobytes set to xxx
239max_sg_segs=xxx the maximum number of scatter/gather
240 segments
241try_direct_io=x try direct transfer between user buffer and
242 tape drive if this is non-zero
243
244Note that if the buffer size is changed but the write threshold is not
245set, the write threshold is set to the new buffer size - 2 kB.
246
247
248BOOT TIME CONFIGURATION
249
250If the driver is compiled into the kernel, the same parameters can be
251also set using, e.g., the LILO command line. The preferred syntax is
252is to use the same keyword used when loading as module but prepended
253with 'st.'. For instance, to set the maximum number of scatter/gather
254segments, the parameter 'st.max_sg_segs=xx' should be used (xx is the
255number of scatter/gather segments).
256
257For compatibility, the old syntax from early 2.5 and 2.4 kernel
258versions is supported. The same keywords can be used as when loading
259the driver as module. If several parameters are set, the keyword-value
260pairs are separated with a comma (no spaces allowed). A colon can be
261used instead of the equal mark. The definition is prepended by the
262string st=. Here is an example:
263
264 st=buffer_kbs:64,write_threhold_kbs:60
265
266The following syntax used by the old kernel versions is also supported:
267
268 st=aa[,bb[,dd]]
269
270where
271 aa is the buffer size for fixed block mode in 1024 byte units
272 bb is the write threshold in 1024 byte units
273 dd is the maximum number of scatter/gather segments
274
275
276IOCTLS
277
278The tape is positioned and the drive parameters are set with ioctls
279defined in mtio.h The tape control program 'mt' uses these ioctls. Try
280to find an mt that supports all of the Linux SCSI tape ioctls and
281opens the device for writing if the tape contents will be modified
282(look for a package mt-st* from the Linux ftp sites; the GNU mt does
283not open for writing for, e.g., erase).
284
285The supported ioctls are:
286
287The following use the structure mtop:
288
289MTFSF Space forward over count filemarks. Tape positioned after filemark.
290MTFSFM As above but tape positioned before filemark.
291MTBSF Space backward over count filemarks. Tape positioned before
292 filemark.
293MTBSFM As above but ape positioned after filemark.
294MTFSR Space forward over count records.
295MTBSR Space backward over count records.
296MTFSS Space forward over count setmarks.
297MTBSS Space backward over count setmarks.
298MTWEOF Write count filemarks.
299MTWSM Write count setmarks.
300MTREW Rewind tape.
301MTOFFL Set device off line (often rewind plus eject).
302MTNOP Do nothing except flush the buffers.
303MTRETEN Re-tension tape.
304MTEOM Space to end of recorded data.
305MTERASE Erase tape. If the argument is zero, the short erase command
306 is used. The long erase command is used with all other values
307 of the argument.
308MTSEEK Seek to tape block count. Uses Tandberg-compatible seek (QFA)
309 for SCSI-1 drives and SCSI-2 seek for SCSI-2 drives. The file and
310 block numbers in the status are not valid after a seek.
311MTSETBLK Set the drive block size. Setting to zero sets the drive into
312 variable block mode (if applicable).
313MTSETDENSITY Sets the drive density code to arg. See drive
314 documentation for available codes.
315MTLOCK and MTUNLOCK Explicitly lock/unlock the tape drive door.
316MTLOAD and MTUNLOAD Explicitly load and unload the tape. If the
317 command argument x is between MT_ST_HPLOADER_OFFSET + 1 and
318 MT_ST_HPLOADER_OFFSET + 6, the number x is used sent to the
319 drive with the command and it selects the tape slot to use of
320 HP C1553A changer.
321MTCOMPRESSION Sets compressing or uncompressing drive mode using the
322 SCSI mode page 15. Note that some drives other methods for
323 control of compression. Some drives (like the Exabytes) use
324 density codes for compression control. Some drives use another
325 mode page but this page has not been implemented in the
326 driver. Some drives without compression capability will accept
327 any compression mode without error.
328MTSETPART Moves the tape to the partition given by the argument at the
329 next tape operation. The block at which the tape is positioned
330 is the block where the tape was previously positioned in the
331 new active partition unless the next tape operation is
332 MTSEEK. In this case the tape is moved directly to the block
333 specified by MTSEEK. MTSETPART is inactive unless
334 MT_ST_CAN_PARTITIONS set.
335MTMKPART Formats the tape with one partition (argument zero) or two
336 partitions (the argument gives in megabytes the size of
337 partition 1 that is physically the first partition of the
338 tape). The drive has to support partitions with size specified
339 by the initiator. Inactive unless MT_ST_CAN_PARTITIONS set.
340MTSETDRVBUFFER
341 Is used for several purposes. The command is obtained from count
342 with mask MT_SET_OPTIONS, the low order bits are used as argument.
343 This command is only allowed for the superuser (root). The
344 subcommands are:
345 0
346 The drive buffer option is set to the argument. Zero means
347 no buffering.
348 MT_ST_BOOLEANS
349 Sets the buffering options. The bits are the new states
350 (enabled/disabled) the following options (in the
351 parenthesis is specified whether the option is global or
352 can be specified differently for each mode):
353 MT_ST_BUFFER_WRITES write buffering (mode)
354 MT_ST_ASYNC_WRITES asynchronous writes (mode)
355 MT_ST_READ_AHEAD read ahead (mode)
356 MT_ST_TWO_FM writing of two filemarks (global)
357 MT_ST_FAST_EOM using the SCSI spacing to EOD (global)
358 MT_ST_AUTO_LOCK automatic locking of the drive door (global)
359 MT_ST_DEF_WRITES the defaults are meant only for writes (mode)
360 MT_ST_CAN_BSR backspacing over more than one records can
361 be used for repositioning the tape (global)
362 MT_ST_NO_BLKLIMS the driver does not ask the block limits
363 from the drive (block size can be changed only to
364 variable) (global)
365 MT_ST_CAN_PARTITIONS enables support for partitioned
366 tapes (global)
367 MT_ST_SCSI2LOGICAL the logical block number is used in
368 the MTSEEK and MTIOCPOS for SCSI-2 drives instead of
369 the device dependent address. It is recommended to set
370 this flag unless there are tapes using the device
371 dependent (from the old times) (global)
372 MT_ST_SYSV sets the SYSV sematics (mode)
373 MT_ST_NOWAIT enables immediate mode (i.e., don't wait for
374 the command to finish) for some commands (e.g., rewind)
375 MT_ST_DEBUGGING debugging (global; debugging must be
376 compiled into the driver)
377 MT_ST_SETBOOLEANS
378 MT_ST_CLEARBOOLEANS
379 Sets or clears the option bits.
380 MT_ST_WRITE_THRESHOLD
381 Sets the write threshold for this device to kilobytes
382 specified by the lowest bits.
383 MT_ST_DEF_BLKSIZE
384 Defines the default block size set automatically. Value
385 0xffffff means that the default is not used any more.
386 MT_ST_DEF_DENSITY
387 MT_ST_DEF_DRVBUFFER
388 Used to set or clear the density (8 bits), and drive buffer
389 state (3 bits). If the value is MT_ST_CLEAR_DEFAULT
390 (0xfffff) the default will not be used any more. Otherwise
391 the lowermost bits of the value contain the new value of
392 the parameter.
393 MT_ST_DEF_COMPRESSION
394 The compression default will not be used if the value of
395 the lowermost byte is 0xff. Otherwise the lowermost bit
396 contains the new default. If the bits 8-15 are set to a
397 non-zero number, and this number is not 0xff, the number is
398 used as the compression algorithm. The value
399 MT_ST_CLEAR_DEFAULT can be used to clear the compression
400 default.
401 MT_ST_SET_TIMEOUT
402 Set the normal timeout in seconds for this device. The
403 default is 900 seconds (15 minutes). The timeout should be
404 long enough for the retries done by the device while
405 reading/writing.
406 MT_ST_SET_LONG_TIMEOUT
407 Set the long timeout that is used for operations that are
408 known to take a long time. The default is 14000 seconds
409 (3.9 hours). For erase this value is further multiplied by
410 eight.
411 MT_ST_SET_CLN
412 Set the cleaning request interpretation parameters using
413 the lowest 24 bits of the argument. The driver can set the
414 generic status bit GMT_CLN if a cleaning request bit pattern
415 is found from the extended sense data. Many drives set one or
416 more bits in the extended sense data when the drive needs
417 cleaning. The bits are device-dependent. The driver is
418 given the number of the sense data byte (the lowest eight
419 bits of the argument; must be >= 18 (values 1 - 17
420 reserved) and <= the maximum requested sense data sixe),
421 a mask to select the relevant bits (the bits 9-16), and the
422 bit pattern (bits 17-23). If the bit pattern is zero, one
423 or more bits under the mask indicate cleaning request. If
424 the pattern is non-zero, the pattern must match the masked
425 sense data byte.
426
427 (The cleaning bit is set if the additional sense code and
428 qualifier 00h 17h are seen regardless of the setting of
429 MT_ST_SET_CLN.)
430
431The following ioctl uses the structure mtpos:
432MTIOCPOS Reads the current position from the drive. Uses
433 Tandberg-compatible QFA for SCSI-1 drives and the SCSI-2
434 command for the SCSI-2 drives.
435
436The following ioctl uses the structure mtget to return the status:
437MTIOCGET Returns some status information.
438 The file number and block number within file are returned. The
439 block is -1 when it can't be determined (e.g., after MTBSF).
440 The drive type is either MTISSCSI1 or MTISSCSI2.
441 The number of recovered errors since the previous status call
442 is stored in the lower word of the field mt_erreg.
443 The current block size and the density code are stored in the field
444 mt_dsreg (shifts for the subfields are MT_ST_BLKSIZE_SHIFT and
445 MT_ST_DENSITY_SHIFT).
446 The GMT_xxx status bits reflect the drive status. GMT_DR_OPEN
447 is set if there is no tape in the drive. GMT_EOD means either
448 end of recorded data or end of tape. GMT_EOT means end of tape.
449
450
451MISCELLANEOUS COMPILE OPTIONS
452
453The recovered write errors are considered fatal if ST_RECOVERED_WRITE_FATAL
454is defined.
455
456The maximum number of tape devices is determined by the define
457ST_MAX_TAPES. If more tapes are detected at driver initialization, the
458maximum is adjusted accordingly.
459
460Immediate return from tape positioning SCSI commands can be enabled by
461defining ST_NOWAIT. If this is defined, the user should take care that
462the next tape operation is not started before the previous one has
463finished. The drives and SCSI adapters should handle this condition
464gracefully, but some drive/adapter combinations are known to hang the
465SCSI bus in this case.
466
467The MTEOM command is by default implemented as spacing over 32767
468filemarks. With this method the file number in the status is
469correct. The user can request using direct spacing to EOD by setting
470ST_FAST_EOM 1 (or using the MT_ST_OPTIONS ioctl). In this case the file
471number will be invalid.
472
473When using read ahead or buffered writes the position within the file
474may not be correct after the file is closed (correct position may
475require backspacing over more than one record). The correct position
476within file can be obtained if ST_IN_FILE_POS is defined at compile
477time or the MT_ST_CAN_BSR bit is set for the drive with an ioctl.
478(The driver always backs over a filemark crossed by read ahead if the
479user does not request data that far.)
480
481
482DEBUGGING HINTS
483
484To enable debugging messages, edit st.c and #define DEBUG 1. As seen
485above, debugging can be switched off with an ioctl if debugging is
486compiled into the driver. The debugging output is not voluminous.
487
488If the tape seems to hang, I would be very interested to hear where
489the driver is waiting. With the command 'ps -l' you can see the state
490of the process using the tape. If the state is D, the process is
491waiting for something. The field WCHAN tells where the driver is
492waiting. If you have the current System.map in the correct place (in
493/boot for the procps I use) or have updated /etc/psdatabase (for kmem
494ps), ps writes the function name in the WCHAN field. If not, you have
495to look up the function from System.map.
496
497Note also that the timeouts are very long compared to most other
498drivers. This means that the Linux driver may appear hung although the
499real reason is that the tape firmware has got confused.
diff --git a/Documentation/scsi/sym53c500_cs.txt b/Documentation/scsi/sym53c500_cs.txt
new file mode 100644
index 000000000000..75febcf9298c
--- /dev/null
+++ b/Documentation/scsi/sym53c500_cs.txt
@@ -0,0 +1,23 @@
1The sym53c500_cs driver originated as an add-on to David Hinds' pcmcia-cs
2package, and was written by Tom Corner (tcorner@via.at). A rewrite was
3long overdue, and the current version addresses the following concerns:
4
5 (1) extensive kernel changes between 2.4 and 2.6.
6 (2) deprecated PCMCIA support outside the kernel.
7
8All the USE_BIOS code has been ripped out. It was never used, and could
9not have worked anyway. The USE_DMA code is likewise gone. Many thanks
10to YOKOTA Hiroshi (nsp_cs driver) and David Hinds (qlogic_cs driver) for
11the code fragments I shamelessly adapted for this work. Thanks also to
12Christoph Hellwig for his patient tutelage while I stumbled about.
13
14The Symbios Logic 53c500 chip was used in the "newer" (circa 1997) version
15of the New Media Bus Toaster PCMCIA SCSI controller. Presumably there are
16other products using this chip, but I've never laid eyes (much less hands)
17on one.
18
19Through the years, there have been a number of downloads of the pcmcia-cs
20version of this driver, and I guess it worked for those users. It worked
21for Tom Corner, and it works for me. Your mileage will probably vary.
22
23--Bob Tracy (rct@frus.com)
diff --git a/Documentation/scsi/sym53c8xx_2.txt b/Documentation/scsi/sym53c8xx_2.txt
new file mode 100644
index 000000000000..7f516cdcd262
--- /dev/null
+++ b/Documentation/scsi/sym53c8xx_2.txt
@@ -0,0 +1,1059 @@
1The Linux SYM-2 driver documentation file
2
3Written by Gerard Roudier <groudier@free.fr>
421 Rue Carnot
595170 DEUIL LA BARRE - FRANCE
6
7Updated by Matthew Wilcox <matthew@wil.cx>
8
92004-10-09
10===============================================================================
11
121. Introduction
132. Supported chips and SCSI features
143. Advantages of this driver for newer chips.
15 3.1 Optimized SCSI SCRIPTS
16 3.2 New features appeared with the SYM53C896
174. Memory mapped I/O versus normal I/O
185. Tagged command queueing
196. Parity checking
207. Profiling information
218. Control commands
22 8.1 Set minimum synchronous period
23 8.2 Set wide size
24 8.3 Set maximum number of concurrent tagged commands
25 8.4 Set debug mode
26 8.5 Set flag (no_disc)
27 8.6 Set verbose level
28 8.7 Reset all logical units of a target
29 8.8 Abort all tasks of all logical units of a target
309. Configuration parameters
3110. Boot setup commands
32 10.1 Syntax
33 10.2 Available arguments
34 10.2.1 Default number of tagged commands
35 10.2.2 Burst max
36 10.2.3 LED support
37 10.2.4 Differential mode
38 10.2.5 IRQ mode
39 10.2.6 Check SCSI BUS
40 10.2.7 Suggest a default SCSI id for hosts
41 10.2.8 Verbosity level
42 10.2.9 Debug mode
43 10.2.10 Settle delay
44 10.2.11 Serial NVRAM
45 10.2.12 Exclude a host from being attached
46 10.3 Converting from old options
47 10.4 SCSI BUS checking boot option
4811. SCSI problem troubleshooting
49 15.1 Problem tracking
50 15.2 Understanding hardware error reports
5112. Serial NVRAM support (by Richard Waltham)
52 17.1 Features
53 17.2 Symbios NVRAM layout
54 17.3 Tekram NVRAM layout
55
56===============================================================================
57
581. Introduction
59
60This driver supports the whole SYM53C8XX family of PCI-SCSI controllers.
61It also support the subset of LSI53C10XX PCI-SCSI controllers that are based
62on the SYM53C8XX SCRIPTS language.
63
64It replaces the sym53c8xx+ncr53c8xx driver bundle and shares its core code
65with the FreeBSD SYM-2 driver. The `glue' that allows this driver to work
66under Linux is contained in 2 files named sym_glue.h and sym_glue.c.
67Other drivers files are intended not to depend on the Operating System
68on which the driver is used.
69
70The history of this driver can be summerized as follows:
71
721993: ncr driver written for 386bsd and FreeBSD by:
73 Wolfgang Stanglmeier <wolf@cologne.de>
74 Stefan Esser <se@mi.Uni-Koeln.de>
75
761996: port of the ncr driver to Linux-1.2.13 and rename it ncr53c8xx.
77 Gerard Roudier
78
791998: new sym53c8xx driver for Linux based on LOAD/STORE instruction and that
80 adds full support for the 896 but drops support for early NCR devices.
81 Gerard Roudier
82
831999: port of the sym53c8xx driver to FreeBSD and support for the LSI53C1010
84 33 MHz and 66MHz Ultra-3 controllers. The new driver is named `sym'.
85 Gerard Roudier
86
872000: Add support for early NCR devices to FreeBSD `sym' driver.
88 Break the driver into several sources and separate the OS glue
89 code from the core code that can be shared among different O/Ses.
90 Write a glue code for Linux.
91 Gerard Roudier
92
932004: Remove FreeBSD compatibility code. Remove support for versions of
94 Linux before 2.6. Start using Linux facilities.
95
96This README file addresses the Linux version of the driver. Under FreeBSD,
97the driver documentation is the sym.8 man page.
98
99Information about new chips is available at LSILOGIC web server:
100
101 http://www.lsilogic.com/
102
103SCSI standard documentations are available at T10 site:
104
105 http://www.t10.org/
106
107Useful SCSI tools written by Eric Youngdale are part of most Linux
108distributions:
109 scsiinfo: command line tool
110 scsi-config: TCL/Tk tool using scsiinfo
111
1122. Supported chips and SCSI features
113
114The following features are supported for all chips:
115
116 Synchronous negotiation
117 Disconnection
118 Tagged command queuing
119 SCSI parity checking
120 PCI Master parity checking
121
122Other features depends on chip capabilities.
123The driver notably uses optimized SCRIPTS for devices that support
124LOAD/STORE and handles PHASE MISMATCH from SCRIPTS for devices that
125support the corresponding feature.
126
127The following table shows some characteristics of the chip family.
128
129 On board LOAD/STORE HARDWARE
130Chip SDMS BIOS Wide SCSI std. Max. sync SCRIPTS PHASE MISMATCH
131---- --------- ---- --------- ---------- ---------- --------------
132810 N N FAST10 10 MB/s N N
133810A N N FAST10 10 MB/s Y N
134815 Y N FAST10 10 MB/s N N
135825 Y Y FAST10 20 MB/s N N
136825A Y Y FAST10 20 MB/s Y N
137860 N N FAST20 20 MB/s Y N
138875 Y Y FAST20 40 MB/s Y N
139875A Y Y FAST20 40 MB/s Y Y
140876 Y Y FAST20 40 MB/s Y N
141895 Y Y FAST40 80 MB/s Y N
142895A Y Y FAST40 80 MB/s Y Y
143896 Y Y FAST40 80 MB/s Y Y
144897 Y Y FAST40 80 MB/s Y Y
1451510D Y Y FAST40 80 MB/s Y Y
1461010 Y Y FAST80 160 MB/s Y Y
1471010_66* Y Y FAST80 160 MB/s Y Y
148
149* Chip supports 33MHz and 66MHz PCI bus clock.
150
151
152Summary of other supported features:
153
154Module: allow to load the driver
155Memory mapped I/O: increases performance
156Control commands: write operations to the proc SCSI file system
157Debugging information: written to syslog (expert only)
158Scatter / gather
159Shared interrupt
160Boot setup commands
161Serial NVRAM: Symbios and Tekram formats
162
163
1643. Advantages of this driver for newer chips.
165
1663.1 Optimized SCSI SCRIPTS.
167
168All chips except the 810, 815 and 825, support new SCSI SCRIPTS instructions
169named LOAD and STORE that allow to move up to 1 DWORD from/to an IO register
170to/from memory much faster that the MOVE MEMORY instruction that is supported
171by the 53c7xx and 53c8xx family.
172
173The LOAD/STORE instructions support absolute and DSA relative addressing
174modes. The SCSI SCRIPTS had been entirely rewritten using LOAD/STORE instead
175of MOVE MEMORY instructions.
176
177Due to the lack of LOAD/STORE SCRIPTS instructions by earlier chips, this
178driver also incorporates a different SCRIPTS set based on MEMORY MOVE, in
179order to provide support for the entire SYM53C8XX chips family.
180
1813.2 New features appeared with the SYM53C896
182
183Newer chips (see above) allows handling of the phase mismatch context from
184SCRIPTS (avoids the phase mismatch interrupt that stops the SCSI processor
185until the C code has saved the context of the transfer).
186
187The 896 and 1010 chips support 64 bit PCI transactions and addressing,
188while the 895A supports 32 bit PCI transactions and 64 bit addressing.
189The SCRIPTS processor of these chips is not true 64 bit, but uses segment
190registers for bit 32-63. Another interesting feature is that LOAD/STORE
191instructions that address the on-chip RAM (8k) remain internal to the chip.
192
1934. Memory mapped I/O versus normal I/O
194
195Memory mapped I/O has less latency than normal I/O and is the recommended
196way for doing IO with PCI devices. Memory mapped I/O seems to work fine on
197most hardware configurations, but some poorly designed chipsets may break
198this feature. A configuration option is provided for normal I/O to be
199used but the driver defaults to MMIO.
200
2015. Tagged command queueing
202
203Queuing more than 1 command at a time to a device allows it to perform
204optimizations based on actual head positions and its mechanical
205characteristics. This feature may also reduce average command latency.
206In order to really gain advantage of this feature, devices must have
207a reasonable cache size (No miracle is to be expected for a low-end
208hard disk with 128 KB or less).
209Some kown old SCSI devices do not properly support tagged command queuing.
210Generally, firmware revisions that fix this kind of problems are available
211at respective vendor web/ftp sites.
212All I can say is that I never have had problem with tagged queuing using
213this driver and its predecessors. Hard disks that behaved correctly for
214me using tagged commands are the following:
215
216- IBM S12 0662
217- Conner 1080S
218- Quantum Atlas I
219- Quantum Atlas II
220- Seagate Cheetah I
221- Quantum Viking II
222- IBM DRVS
223- Quantum Atlas IV
224- Seagate Cheetah II
225
226If your controller has NVRAM, you can configure this feature per target
227from the user setup tool. The Tekram Setup program allows to tune the
228maximum number of queued commands up to 32. The Symbios Setup only allows
229to enable or disable this feature.
230
231The maximum number of simultaneous tagged commands queued to a device
232is currently set to 16 by default. This value is suitable for most SCSI
233disks. With large SCSI disks (>= 2GB, cache >= 512KB, average seek time
234<= 10 ms), using a larger value may give better performances.
235
236This driver supports up to 255 commands per device, and but using more than
23764 is generally not worth-while, unless you are using a very large disk or
238disk arrays. It is noticeable that most of recent hard disks seem not to
239accept more than 64 simultaneous commands. So, using more than 64 queued
240commands is probably just resource wasting.
241
242If your controller does not have NVRAM or if it is managed by the SDMS
243BIOS/SETUP, you can configure tagged queueing feature and device queue
244depths from the boot command-line. For example:
245
246 sym53c8xx=tags:4/t2t3q15-t4q7/t1u0q32
247
248will set tagged commands queue depths as follow:
249
250- target 2 all luns on controller 0 --> 15
251- target 3 all luns on controller 0 --> 15
252- target 4 all luns on controller 0 --> 7
253- target 1 lun 0 on controller 1 --> 32
254- all other target/lun --> 4
255
256In some special conditions, some SCSI disk firmwares may return a
257QUEUE FULL status for a SCSI command. This behaviour is managed by the
258driver using the following heuristic:
259
260- Each time a QUEUE FULL status is returned, tagged queue depth is reduced
261 to the actual number of disconnected commands.
262
263- Every 200 successfully completed SCSI commands, if allowed by the
264 current limit, the maximum number of queueable commands is incremented.
265
266Since QUEUE FULL status reception and handling is resource wasting, the
267driver notifies by default this problem to user by indicating the actual
268number of commands used and their status, as well as its decision on the
269device queue depth change.
270The heuristic used by the driver in handling QUEUE FULL ensures that the
271impact on performances is not too bad. You can get rid of the messages by
272setting verbose level to zero, as follow:
273
2741st method: boot your system using 'sym53c8xx=verb:0' option.
2752nd method: apply "setverbose 0" control command to the proc fs entry
276 corresponding to your controller after boot-up.
277
2786. Parity checking
279
280The driver supports SCSI parity checking and PCI bus master parity
281checking. These features must be enabled in order to ensure safe
282data transfers. Some flawed devices or mother boards may have problems
283with parity. The options to defeat parity checking have been removed
284from the driver.
285
2867. Profiling information
287
288This driver does not provide profiling informations as did its predecessors.
289This feature was not this useful and added complexity to the code.
290As the driver code got more complex, I have decided to remove everything
291that didn't seem actually useful.
292
2938. Control commands
294
295Control commands can be sent to the driver with write operations to
296the proc SCSI file system. The generic command syntax is the
297following:
298
299 echo "<verb> <parameters>" >/proc/scsi/sym53c8xx/0
300 (assumes controller number is 0)
301
302Using "all" for "<target>" parameter with the commands below will
303apply to all targets of the SCSI chain (except the controller).
304
305Available commands:
306
3078.1 Set minimum synchronous period factor
308
309 setsync <target> <period factor>
310
311 target: target number
312 period: minimum synchronous period.
313 Maximum speed = 1000/(4*period factor) except for special
314 cases below.
315
316 Specify a period of 0, to force asynchronous transfer mode.
317
318 9 means 12.5 nano-seconds synchronous period
319 10 means 25 nano-seconds synchronous period
320 11 means 30 nano-seconds synchronous period
321 12 means 50 nano-seconds synchronous period
322
3238.2 Set wide size
324
325 setwide <target> <size>
326
327 target: target number
328 size: 0=8 bits, 1=16bits
329
3308.3 Set maximum number of concurrent tagged commands
331
332 settags <target> <tags>
333
334 target: target number
335 tags: number of concurrent tagged commands
336 must not be greater than configured (default: 16)
337
3388.4 Set debug mode
339
340 setdebug <list of debug flags>
341
342 Available debug flags:
343 alloc: print info about memory allocations (ccb, lcb)
344 queue: print info about insertions into the command start queue
345 result: print sense data on CHECK CONDITION status
346 scatter: print info about the scatter process
347 scripts: print info about the script binding process
348 tiny: print minimal debugging information
349 timing: print timing information of the NCR chip
350 nego: print information about SCSI negotiations
351 phase: print information on script interruptions
352
353 Use "setdebug" with no argument to reset debug flags.
354
355
3568.5 Set flag (no_disc)
357
358 setflag <target> <flag>
359
360 target: target number
361
362 For the moment, only one flag is available:
363
364 no_disc: not allow target to disconnect.
365
366 Do not specify any flag in order to reset the flag. For example:
367 - setflag 4
368 will reset no_disc flag for target 4, so will allow it disconnections.
369 - setflag all
370 will allow disconnection for all devices on the SCSI bus.
371
372
3738.6 Set verbose level
374
375 setverbose #level
376
377 The driver default verbose level is 1. This command allows to change
378 th driver verbose level after boot-up.
379
3808.7 Reset all logical units of a target
381
382 resetdev <target>
383
384 target: target number
385 The driver will try to send a BUS DEVICE RESET message to the target.
386
3878.8 Abort all tasks of all logical units of a target
388
389 cleardev <target>
390
391 target: target number
392 The driver will try to send a ABORT message to all the logical units
393 of the target.
394
395
3969. Configuration parameters
397
398Under kernel configuration tools (make menuconfig, for example), it is
399possible to change some default driver configuration parameters.
400If the firmware of all your devices is perfect enough, all the
401features supported by the driver can be enabled at start-up. However,
402if only one has a flaw for some SCSI feature, you can disable the
403support by the driver of this feature at linux start-up and enable
404this feature after boot-up only for devices that support it safely.
405
406Configuration parameters:
407
408Use normal IO (default answer: n)
409 Answer "y" if you suspect your mother board to not allow memory mapped I/O.
410 May slow down performance a little.
411
412Default tagged command queue depth (default answer: 16)
413 Entering 0 defaults to tagged commands not being used.
414 This parameter can be specified from the boot command line.
415
416Maximum number of queued commands (default answer: 32)
417 This option allows you to specify the maximum number of tagged commands
418 that can be queued to a device. The maximum supported value is 255.
419
420Synchronous transfers frequency (default answer: 80)
421 This option allows you to specify the frequency in MHz the driver
422 will use at boot time for synchronous data transfer negotiations.
423 0 means "asynchronous data transfers".
424
42510. Boot setup commands
426
42710.1 Syntax
428
429Setup commands can be passed to the driver either at boot time or as
430parameters to modprobe, as described in Documentation/kernel-parameters.txt
431
432Example of boot setup command under lilo prompt:
433
434lilo: linux root=/dev/sda2 sym53c8xx.cmd_per_lun=4 sym53c8xx.sync=10 sym53c8xx.debug=0x200
435
436- enable tagged commands, up to 4 tagged commands queued.
437- set synchronous negotiation speed to 10 Mega-transfers / second.
438- set DEBUG_NEGO flag.
439
440The following command will install the driver module with the same
441options as above.
442
443 modprobe sym53c8xx cmd_per_lun=4 sync=10 debug=0x200
444
44510.2 Available arguments
446
44710.2.1 Default number of tagged commands
448 cmd_per_lun=0 (or cmd_per_lun=1) tagged command queuing disabled
449 cmd_per_lun=#tags (#tags > 1) tagged command queuing enabled
450 #tags will be truncated to the max queued commands configuration parameter.
451
45210.2.2 Detailed control of tagged commands
453 This option allows you to specify a command queue depth for each device
454 that supports tagged command queueing.
455 Example:
456 tag_ctrl=10/t2t3q16-t5q24/t1u2q32
457 will set devices queue depth as follow:
458 - controller #0 target #2 and target #3 -> 16 commands,
459 - controller #0 target #5 -> 24 commands,
460 - controller #1 target #1 logical unit #2 -> 32 commands,
461 - all other logical units (all targets, all controllers) -> 10 commands.
462
46310.2.3 Burst max
464 burst=0 burst disabled
465 burst=255 get burst length from initial IO register settings.
466 burst=#x burst enabled (1<<#x burst transfers max)
467 #x is an integer value which is log base 2 of the burst transfers max.
468 By default the driver uses the maximum value supported by the chip.
469
47010.2.4 LED support
471 led=1 enable LED support
472 led=0 disable LED support
473 Do not enable LED support if your scsi board does not use SDMS BIOS.
474 (See 'Configuration parameters')
475
47610.2.4 Differential mode
477 diff=0 never set up diff mode
478 diff=1 set up diff mode if BIOS set it
479 diff=2 always set up diff mode
480 diff=3 set diff mode if GPIO3 is not set
481
48210.2.5 IRQ mode
483 irqm=0 always open drain
484 irqm=1 same as initial settings (assumed BIOS settings)
485 irqm=2 always totem pole
486
48710.2.6 Check SCSI BUS
488 buschk=<option bits>
489
490 Available option bits:
491 0x0: No check.
492 0x1: Check and do not attach the controller on error.
493 0x2: Check and just warn on error.
494
49510.2.7 Suggest a default SCSI id for hosts
496 hostid=255 no id suggested.
497 hostid=#x (0 < x < 7) x suggested for hosts SCSI id.
498
499 If a host SCSI id is available from the NVRAM, the driver will ignore
500 any value suggested as boot option. Otherwise, if a suggested value
501 different from 255 has been supplied, it will use it. Otherwise, it will
502 try to deduce the value previously set in the hardware and use value
503 7 if the hardware value is zero.
504
50510.2.8 Verbosity level
506 verb=0 minimal
507 verb=1 normal
508 verb=2 too much
509
51010.2.9 Debug mode
511 debug=0 clear debug flags
512 debug=#x set debug flags
513 #x is an integer value combining the following power-of-2 values:
514 DEBUG_ALLOC 0x1
515 DEBUG_PHASE 0x2
516 DEBUG_POLL 0x4
517 DEBUG_QUEUE 0x8
518 DEBUG_RESULT 0x10
519 DEBUG_SCATTER 0x20
520 DEBUG_SCRIPT 0x40
521 DEBUG_TINY 0x80
522 DEBUG_TIMING 0x100
523 DEBUG_NEGO 0x200
524 DEBUG_TAGS 0x400
525 DEBUG_FREEZE 0x800
526 DEBUG_RESTART 0x1000
527
528 You can play safely with DEBUG_NEGO. However, some of these flags may
529 generate bunches of syslog messages.
530
53110.2.10 Settle delay
532 settle=n delay for n seconds
533
534 After a bus reset, the driver will delay for n seconds before talking
535 to any device on the bus. The default is 3 seconds and safe mode will
536 default it to 10.
537
53810.2.11 Serial NVRAM
539 NB: option not currently implemented.
540 nvram=n do not look for serial NVRAM
541 nvram=y test controllers for onboard serial NVRAM
542 (alternate binary form)
543 nvram=<bits options>
544 0x01 look for NVRAM (equivalent to nvram=y)
545 0x02 ignore NVRAM "Synchronous negotiation" parameters for all devices
546 0x04 ignore NVRAM "Wide negotiation" parameter for all devices
547 0x08 ignore NVRAM "Scan at boot time" parameter for all devices
548 0x80 also attach controllers set to OFF in the NVRAM (sym53c8xx only)
549
55010.2.12 Exclude a host from being attached
551 excl=<io_address>,...
552
553 Prevent host at a given io address from being attached.
554 For example 'excl=0xb400,0xc000' indicate to the
555 driver not to attach hosts at address 0xb400 and 0xc000.
556
55710.3 Converting from old style options
558
559Previously, the sym2 driver accepted arguments of the form
560 sym53c8xx=tags:4,sync:10,debug:0x200
561
562As a result of the new module parameters, this is no longer available.
563Most of the options have remained the same, but tags has split into
564cmd_per_lun and tag_ctrl for its two different purposes. The sample above
565would be specified as:
566 modprobe sym53c8xx cmd_per_lun=4 sync=10 debug=0x200
567
568or on the kernel boot line as:
569 sym53c8xx.cmd_per_lun=4 sym53c8xx.sync=10 sym53c8xx.debug=0x200
570
57110.4 SCSI BUS checking boot option.
572
573When this option is set to a non-zero value, the driver checks SCSI lines
574logic state, 100 micro-seconds after having asserted the SCSI RESET line.
575The driver just reads SCSI lines and checks all lines read FALSE except RESET.
576Since SCSI devices shall release the BUS at most 800 nano-seconds after SCSI
577RESET has been asserted, any signal to TRUE may indicate a SCSI BUS problem.
578Unfortunately, the following common SCSI BUS problems are not detected:
579- Only 1 terminator installed.
580- Misplaced terminators.
581- Bad quality terminators.
582On the other hand, either bad cabling, broken devices, not conformant
583devices, ... may cause a SCSI signal to be wrong when te driver reads it.
584
58515. SCSI problem troubleshooting
586
58715.1 Problem tracking
588
589Most SCSI problems are due to a non conformant SCSI bus or too buggy
590devices. If infortunately you have SCSI problems, you can check the
591following things:
592
593- SCSI bus cables
594- terminations at both end of the SCSI chain
595- linux syslog messages (some of them may help you)
596
597If you do not find the source of problems, you can configure the
598driver or devices in the NVRAM with minimal features.
599
600- only asynchronous data transfers
601- tagged commands disabled
602- disconnections not allowed
603
604Now, if your SCSI bus is ok, your system has every chance to work
605with this safe configuration but performances will not be optimal.
606
607If it still fails, then you can send your problem description to
608appropriate mailing lists or news-groups. Send me a copy in order to
609be sure I will receive it. Obviously, a bug in the driver code is
610possible.
611
612 My cyrrent email address: Gerard Roudier <groudier@free.fr>
613
614Allowing disconnections is important if you use several devices on
615your SCSI bus but often causes problems with buggy devices.
616Synchronous data transfers increases throughput of fast devices like
617hard disks. Good SCSI hard disks with a large cache gain advantage of
618tagged commands queuing.
619
62015.2 Understanding hardware error reports
621
622When the driver detects an unexpected error condition, it may display a
623message of the following pattern.
624
625sym0:1: ERROR (0:48) (1-21-65) (f/95/0) @ (script 7c0:19000000).
626sym0: script cmd = 19000000
627sym0: regdump: da 10 80 95 47 0f 01 07 75 01 81 21 80 01 09 00.
628
629Some fields in such a message may help you understand the cause of the
630problem, as follows:
631
632sym0:1: ERROR (0:48) (1-21-65) (f/95/0) @ (script 7c0:19000000).
633.....A.........B.C....D.E..F....G.H..I.......J.....K...L.......
634
635Field A : target number.
636 SCSI ID of the device the controller was talking with at the moment the
637 error occurs.
638
639Field B : DSTAT io register (DMA STATUS)
640 Bit 0x40 : MDPE Master Data Parity Error
641 Data parity error detected on the PCI BUS.
642 Bit 0x20 : BF Bus Fault
643 PCI bus fault condition detected
644 Bit 0x01 : IID Illegal Instruction Detected
645 Set by the chip when it detects an Illegal Instruction format
646 on some condition that makes an instruction illegal.
647 Bit 0x80 : DFE Dma Fifo Empty
648 Pure status bit that does not indicate an error.
649 If the reported DSTAT value contains a combination of MDPE (0x40),
650 BF (0x20), then the cause may be likely due to a PCI BUS problem.
651
652Field C : SIST io register (SCSI Interrupt Status)
653 Bit 0x08 : SGE SCSI GROSS ERROR
654 Indicates that the chip detected a severe error condition
655 on the SCSI BUS that prevents the SCSI protocol from functioning
656 properly.
657 Bit 0x04 : UDC Unexpected Disconnection
658 Indicates that the device released the SCSI BUS when the chip
659 was not expecting this to happen. A device may behave so to
660 indicate the SCSI initiator that an error condition not reportable using the SCSI protocol has occurred.
661 Bit 0x02 : RST SCSI BUS Reset
662 Generally SCSI targets do not reset the SCSI BUS, although any
663 device on the BUS can reset it at any time.
664 Bit 0x01 : PAR Parity
665 SCSI parity error detected.
666 On a faulty SCSI BUS, any error condition among SGE (0x08), UDC (0x04) and
667 PAR (0x01) may be detected by the chip. If your SCSI system sometimes
668 encounters such error conditions, especially SCSI GROSS ERROR, then a SCSI
669 BUS problem is likely the cause of these errors.
670
671For fields D,E,F,G and H, you may look into the sym53c8xx_defs.h file
672that contains some minimal comments on IO register bits.
673Field D : SOCL Scsi Output Control Latch
674 This register reflects the state of the SCSI control lines the
675 chip want to drive or compare against.
676Field E : SBCL Scsi Bus Control Lines
677 Actual value of control lines on the SCSI BUS.
678Field F : SBDL Scsi Bus Data Lines
679 Actual value of data lines on the SCSI BUS.
680Field G : SXFER SCSI Transfer
681 Contains the setting of the Synchronous Period for output and
682 the current Synchronous offset (offset 0 means asynchronous).
683Field H : SCNTL3 Scsi Control Register 3
684 Contains the setting of timing values for both asynchronous and
685 synchronous data transfers.
686Field I : SCNTL4 Scsi Control Register 4
687 Only meaninful for 53C1010 Ultra3 controllers.
688
689Understanding Fields J, K, L and dumps requires to have good knowledge of
690SCSI standards, chip cores functionnals and internal driver data structures.
691You are not required to decode and understand them, unless you want to help
692maintain the driver code.
693
69417. Serial NVRAM (added by Richard Waltham: dormouse@farsrobt.demon.co.uk)
695
69617.1 Features
697
698Enabling serial NVRAM support enables detection of the serial NVRAM included
699on Symbios and some Symbios compatible host adaptors, and Tekram boards. The
700serial NVRAM is used by Symbios and Tekram to hold set up parameters for the
701host adaptor and it's attached drives.
702
703The Symbios NVRAM also holds data on the boot order of host adaptors in a
704system with more than one host adaptor. This information is no longer used
705as it's fundamentally incompatible with the hotplug PCI model.
706
707Tekram boards using Symbios chips, DC390W/F/U, which have NVRAM are detected
708and this is used to distinguish between Symbios compatible and Tekram host
709adaptors. This is used to disable the Symbios compatible "diff" setting
710incorrectly set on Tekram boards if the CONFIG_SCSI_53C8XX_SYMBIOS_COMPAT
711configuration parameter is set enabling both Symbios and Tekram boards to be
712used together with the Symbios cards using all their features, including
713"diff" support. ("led pin" support for Symbios compatible cards can remain
714enabled when using Tekram cards. It does nothing useful for Tekram host
715adaptors but does not cause problems either.)
716
717The parameters the driver is able to get from the NVRAM depend on the
718data format used, as follow:
719
720 Tekram format Symbios format
721General and host parameters
722 Boot order N Y
723 Host SCSI ID Y Y
724 SCSI parity checking Y Y
725 Verbose boot messages N Y
726SCSI devices parameters
727 Synchronous transfer speed Y Y
728 Wide 16 / Narrow Y Y
729 Tagged Command Queuing enabled Y Y
730 Disconnections enabled Y Y
731 Scan at boot time N Y
732
733In order to speed up the system boot, for each device configured without
734the "scan at boot time" option, the driver forces an error on the
735first TEST UNIT READY command received for this device.
736
737
73817.2 Symbios NVRAM layout
739
740typical data at NVRAM address 0x100 (53c810a NVRAM)
741-----------------------------------------------------------
74200 00
74364 01
7448e 0b
745
74600 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
747
74804 00 0f 00 00 10 00 50 00 00 01 00 00 62
74904 00 03 00 00 10 00 58 00 00 01 00 00 63
75004 00 01 00 00 10 00 48 00 00 01 00 00 61
75100 00 00 00 00 00 00 00 00 00 00 00 00 00
752
7530f 00 08 08 64 00 0a 00
7540f 00 08 08 64 00 0a 00
7550f 00 08 08 64 00 0a 00
7560f 00 08 08 64 00 0a 00
7570f 00 08 08 64 00 0a 00
7580f 00 08 08 64 00 0a 00
7590f 00 08 08 64 00 0a 00
7600f 00 08 08 64 00 0a 00
761
7620f 00 08 08 64 00 0a 00
7630f 00 08 08 64 00 0a 00
7640f 00 08 08 64 00 0a 00
7650f 00 08 08 64 00 0a 00
7660f 00 08 08 64 00 0a 00
7670f 00 08 08 64 00 0a 00
7680f 00 08 08 64 00 0a 00
7690f 00 08 08 64 00 0a 00
770
77100 00 00 00 00 00 00 00
77200 00 00 00 00 00 00 00
77300 00 00 00 00 00 00 00
77400 00 00 00 00 00 00 00
77500 00 00 00 00 00 00 00
77600 00 00 00 00 00 00 00
77700 00 00 00 00 00 00 00
77800 00 00 00 00 00 00 00
779
78000 00 00 00 00 00 00 00
78100 00 00 00 00 00 00 00
78200 00 00 00 00 00 00 00
78300 00 00 00 00 00 00 00
78400 00 00 00 00 00 00 00
78500 00 00 00 00 00 00 00
78600 00 00 00 00 00 00 00
78700 00 00 00 00 00 00 00
788
78900 00 00 00 00 00 00 00
79000 00 00 00 00 00 00 00
79100 00 00 00 00 00 00 00
792
793fe fe
79400 00
79500 00
796-----------------------------------------------------------
797NVRAM layout details
798
799NVRAM Address 0x000-0x0ff not used
800 0x100-0x26f initialised data
801 0x270-0x7ff not used
802
803general layout
804
805 header - 6 bytes,
806 data - 356 bytes (checksum is byte sum of this data)
807 trailer - 6 bytes
808 ---
809 total 368 bytes
810
811data area layout
812
813 controller set up - 20 bytes
814 boot configuration - 56 bytes (4x14 bytes)
815 device set up - 128 bytes (16x8 bytes)
816 unused (spare?) - 152 bytes (19x8 bytes)
817 ---
818 total 356 bytes
819
820-----------------------------------------------------------
821header
822
82300 00 - ?? start marker
82464 01 - byte count (lsb/msb excludes header/trailer)
8258e 0b - checksum (lsb/msb excludes header/trailer)
826-----------------------------------------------------------
827controller set up
828
82900 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
830 | | | |
831 | | | -- host ID
832 | | |
833 | | --Removable Media Support
834 | | 0x00 = none
835 | | 0x01 = Bootable Device
836 | | 0x02 = All with Media
837 | |
838 | --flag bits 2
839 | 0x00000001= scan order hi->low
840 | (default 0x00 - scan low->hi)
841 --flag bits 1
842 0x00000001 scam enable
843 0x00000010 parity enable
844 0x00000100 verbose boot msgs
845
846remaining bytes unknown - they do not appear to change in my
847current set up for any of the controllers.
848
849default set up is identical for 53c810a and 53c875 NVRAM
850(Removable Media added Symbios BIOS version 4.09)
851-----------------------------------------------------------
852boot configuration
853
854boot order set by order of the devices in this table
855
85604 00 0f 00 00 10 00 50 00 00 01 00 00 62 -- 1st controller
85704 00 03 00 00 10 00 58 00 00 01 00 00 63 2nd controller
85804 00 01 00 00 10 00 48 00 00 01 00 00 61 3rd controller
85900 00 00 00 00 00 00 00 00 00 00 00 00 00 4th controller
860 | | | | | | | |
861 | | | | | | ---- PCI io port adr
862 | | | | | --0x01 init/scan at boot time
863 | | | | --PCI device/function number (0xdddddfff)
864 | | ----- ?? PCI vendor ID (lsb/msb)
865 ----PCI device ID (lsb/msb)
866
867?? use of this data is a guess but seems reasonable
868
869remaining bytes unknown - they do not appear to change in my
870current set up
871
872default set up is identical for 53c810a and 53c875 NVRAM
873-----------------------------------------------------------
874device set up (up to 16 devices - includes controller)
875
8760f 00 08 08 64 00 0a 00 - id 0
8770f 00 08 08 64 00 0a 00
8780f 00 08 08 64 00 0a 00
8790f 00 08 08 64 00 0a 00
8800f 00 08 08 64 00 0a 00
8810f 00 08 08 64 00 0a 00
8820f 00 08 08 64 00 0a 00
8830f 00 08 08 64 00 0a 00
884
8850f 00 08 08 64 00 0a 00
8860f 00 08 08 64 00 0a 00
8870f 00 08 08 64 00 0a 00
8880f 00 08 08 64 00 0a 00
8890f 00 08 08 64 00 0a 00
8900f 00 08 08 64 00 0a 00
8910f 00 08 08 64 00 0a 00
8920f 00 08 08 64 00 0a 00 - id 15
893 | | | | | |
894 | | | | ----timeout (lsb/msb)
895 | | | --synch period (0x?? 40 Mtrans/sec- fast 40) (probably 0x28)
896 | | | (0x30 20 Mtrans/sec- fast 20)
897 | | | (0x64 10 Mtrans/sec- fast )
898 | | | (0xc8 5 Mtrans/sec)
899 | | | (0x00 asynchronous)
900 | | -- ?? max sync offset (0x08 in NVRAM on 53c810a)
901 | | (0x10 in NVRAM on 53c875)
902 | --device bus width (0x08 narrow)
903 | (0x10 16 bit wide)
904 --flag bits
905 0x00000001 - disconnect enabled
906 0x00000010 - scan at boot time
907 0x00000100 - scan luns
908 0x00001000 - queue tags enabled
909
910remaining bytes unknown - they do not appear to change in my
911current set up
912
913?? use of this data is a guess but seems reasonable
914(but it could be max bus width)
915
916default set up for 53c810a NVRAM
917default set up for 53c875 NVRAM - bus width - 0x10
918 - sync offset ? - 0x10
919 - sync period - 0x30
920-----------------------------------------------------------
921?? spare device space (32 bit bus ??)
922
92300 00 00 00 00 00 00 00 (19x8bytes)
924.
925.
92600 00 00 00 00 00 00 00
927
928default set up is identical for 53c810a and 53c875 NVRAM
929-----------------------------------------------------------
930trailer
931
932fe fe - ? end marker ?
93300 00
93400 00
935
936default set up is identical for 53c810a and 53c875 NVRAM
937-----------------------------------------------------------
938
939
940
94117.3 Tekram NVRAM layout
942
943nvram 64x16 (1024 bit)
944
945Drive settings
946
947Drive ID 0-15 (addr 0x0yyyy0 = device setup, yyyy = ID)
948 (addr 0x0yyyy1 = 0x0000)
949
950 x x x x x x x x x x x x x x x x
951 | | | | | | | | |
952 | | | | | | | | ----- parity check 0 - off
953 | | | | | | | | 1 - on
954 | | | | | | | |
955 | | | | | | | ------- sync neg 0 - off
956 | | | | | | | 1 - on
957 | | | | | | |
958 | | | | | | --------- disconnect 0 - off
959 | | | | | | 1 - on
960 | | | | | |
961 | | | | | ----------- start cmd 0 - off
962 | | | | | 1 - on
963 | | | | |
964 | | | | -------------- tagged cmds 0 - off
965 | | | | 1 - on
966 | | | |
967 | | | ---------------- wide neg 0 - off
968 | | | 1 - on
969 | | |
970 --------------------------- sync rate 0 - 10.0 Mtrans/sec
971 1 - 8.0
972 2 - 6.6
973 3 - 5.7
974 4 - 5.0
975 5 - 4.0
976 6 - 3.0
977 7 - 2.0
978 7 - 2.0
979 8 - 20.0
980 9 - 16.7
981 a - 13.9
982 b - 11.9
983
984Global settings
985
986Host flags 0 (addr 0x100000, 32)
987
988 x x x x x x x x x x x x x x x x
989 | | | | | | | | | | | |
990 | | | | | | | | ----------- host ID 0x00 - 0x0f
991 | | | | | | | |
992 | | | | | | | ----------------------- support for 0 - off
993 | | | | | | | > 2 drives 1 - on
994 | | | | | | |
995 | | | | | | ------------------------- support drives 0 - off
996 | | | | | | > 1Gbytes 1 - on
997 | | | | | |
998 | | | | | --------------------------- bus reset on 0 - off
999 | | | | | power on 1 - on
1000 | | | | |
1001 | | | | ----------------------------- active neg 0 - off
1002 | | | | 1 - on
1003 | | | |
1004 | | | -------------------------------- imm seek 0 - off
1005 | | | 1 - on
1006 | | |
1007 | | ---------------------------------- scan luns 0 - off
1008 | | 1 - on
1009 | |
1010 -------------------------------------- removable 0 - disable
1011 as BIOS dev 1 - boot device
1012 2 - all
1013
1014Host flags 1 (addr 0x100001, 33)
1015
1016 x x x x x x x x x x x x x x x x
1017 | | | | | |
1018 | | | --------- boot delay 0 - 3 sec
1019 | | | 1 - 5
1020 | | | 2 - 10
1021 | | | 3 - 20
1022 | | | 4 - 30
1023 | | | 5 - 60
1024 | | | 6 - 120
1025 | | |
1026 --------------------------- max tag cmds 0 - 2
1027 1 - 4
1028 2 - 8
1029 3 - 16
1030 4 - 32
1031
1032Host flags 2 (addr 0x100010, 34)
1033
1034 x x x x x x x x x x x x x x x x
1035 |
1036 ----- F2/F6 enable 0 - off ???
1037 1 - on ???
1038
1039checksum (addr 0x111111)
1040
1041checksum = 0x1234 - (sum addr 0-63)
1042
1043----------------------------------------------------------------------------
1044
1045default nvram data:
1046
10470x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
10480x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
10490x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
10500x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1051
10520x0f07 0x0400 0x0001 0x0000 0x0000 0x0000 0x0000 0x0000
10530x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
10540x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
10550x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0xfbbc
1056
1057
1058===============================================================================
1059End of Linux SYM-2 driver documentation file
diff --git a/Documentation/scsi/tmscsim.txt b/Documentation/scsi/tmscsim.txt
new file mode 100644
index 000000000000..e165229adf50
--- /dev/null
+++ b/Documentation/scsi/tmscsim.txt
@@ -0,0 +1,449 @@
1The tmscsim driver
2==================
3
41. Purpose and history
52. Installation
63. Features
74. Configuration via /proc/scsi/tmscsim/?
85. Configuration via boot/module params
96. Potential improvements
107. Bug reports, debugging and updates
118. Acknowledgements
129. Copyright
13
14
151. Purpose and history
16----------------------
17The tmscsim driver supports PCI SCSI Host Adapters based on the AM53C974
18chip. AM53C974 based SCSI adapters include:
19 Tekram DC390, DC390T
20 Dawicontrol 2974
21 QLogic Fast! PCI Basic
22 some on-board adapters
23(This is most probably not a complete list)
24
25It has originally written by C.L. Huang from the Tekram corp. to support the
26Tekram DC390(T) adapter. This is where the name comes from: tm = Tekram
27scsi = SCSI driver, m = AMD (?) as opposed to w for the DC390W/U/F
28(NCR53c8X5, X=2/7) driver. Yes, there was also a driver for the latter,
29tmscsiw, which supported DC390W/U/F adapters. It's not maintained any more,
30as the ncr53c8xx is perfectly supporting these adpaters since some time.
31
32The driver first appeared in April 1996, exclusively supported the DC390
33and has been enhanced since then in various steps. In May 1998 support for
34general AM53C974 based adapters and some possibilities to configure it were
35added. The non-DC390 support works by assuming some values for the data
36normally taken from the DC390 EEPROM. See below (chapter 5) for details.
37
38When using the DC390, the configuration is still be done using the DC390
39BIOS setup. The DC390 EEPROM is read and used by the driver, any boot or
40module parameters (chapter 5) are ignored! However, you can change settings
41dynamically, as described in chapter 4.
42
43For a more detailed description of the driver's history, see the first lines
44of tmscsim.c.
45The numbering scheme isn't consistent. The first versions went from 1.00 to
461.12, then 1.20a to 1.20t. Finally I decided to use the ncr53c8xx scheme. So
47the next revisions will be 2.0a to 2.0X (stable), 2.1a to 2.1X (experimental),
482.2a to 2.2X (stable, again) etc. (X = anything between a and z.) If I send
49fixes to people for testing, I create intermediate versions with a digit
50appended, e.g. 2.0c3.
51
52
532. Installation
54---------------
55If you got any recent kernel with this driver and document included in
56linux/drivers/scsi, you basically have to do nothing special to use this
57driver. Of course you have to choose to compile SCSI support and DC390(T)
58support into your kernel or as module when configuring your kernel for
59compiling.
60NEW: You may as well compile this module outside your kernel, using the
61supplied Makefile.
62
63 If you got an old kernel (pre 2.1.127, pre 2.0.37p1) with an old version of
64 this driver: Get dc390-21125-20b.diff.gz or dc390-2036p21-20b1.diff.gz from
65 my web page and apply the patch. Apply further patches to upgrade to the
66 latest version of the driver.
67
68 If you want to do it manually, you should copy the files (dc390.h,
69 tmscsim.h, tmscsim.c, scsiiom.c and README.tmscsim) from this directory to
70 linux/drivers/scsi. You have to recompile your kernel/module of course.
71
72 You should apply the three patches included in dc390-120-kernel.diff
73 (Applying them: cd /usr/src; patch -p0 <~/dc390-120-kernel.diff)
74 The patches are against 2.1.125, so you might have to manually resolve
75 rejections when applying to another kernel version.
76
77 The patches will update the kernel startup code to allow boot parameters to
78 be passed to the driver, update the Documentation and finally offer you the
79 possibility to omit the non-DC390 parts of the driver.
80 (By selecting "Omit support for non DC390" you basically disable the
81 emulation of a DC390 EEPROM for non DC390 adapters. This saves a few bytes
82 of memory.)
83
84If you got a very old kernel without the tmscsim driver (pre 2.0.31)
85I recommend upgrading your kernel. However, if you don't want to, please
86contact me to get the appropriate patches.
87
88
89Upgrading a SCSI driver is always a delicate thing to do. The 2.0 driver has
90proven stable on many systems, but it's still a good idea to take some
91precautions. In an ideal world you would have a full backup of your disks.
92The world isn't ideal and most people don't have full backups (me neither).
93So take at least the following measures:
94* make your kernel remount the FS read-only on detecting an error:
95 tune2fs -e remount-ro /dev/sd??
96* have copies of your SCSI disk's partition tables on some safe location:
97 dd if=/dev/sda of=/mnt/floppy/sda bs=512 count=1
98 or just print it with:
99 fdisk -l | lpr
100* make sure you are able to boot Linux (e.g. from floppy disk using InitRD)
101 if your SCSI disk gets corrupted. You can use
102 ftp://student.physik.uni-dortmund.de/pub/linux/kernel/bootdisk.gz
103
104One more warning: I used to overclock my PCI bus to 41.67 MHz. My Tekram
105DC390F (Sym53c875) accepted this as well as my Millenium. But the Am53C974
106produced errors and started to corrupt my disks. So don't do that! A 37.50
107MHz PCI bus works for me, though, but I don't recommend using higher clocks
108than the 33.33 MHz being in the PCI spec.
109
110If you want to share the IRQ with another device and the driver refuses to
111do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to
112SA_SHIRQ | SA_INTERRUPT.
113
114
1153.Features
116----------
117- SCSI
118 * Tagged command queueing
119 * Sync speed up to 10 MHz
120 * Disconnection
121 * Multiple LUNs
122
123- General / Linux interface
124 * Support for up to 4 AM53C974 adapters.
125 * DC390 EEPROM usage or boot/module params
126 * Information via cat /proc/scsi/tmscsim/?
127 * Dynamically configurable by writing to /proc/scsi/tmscsim/?
128 * Dynamic allocation of resources
129 * SMP support: Locking on io_request lock (Linux 2.1/2.2) or adapter
130 specific locks (Linux 2.5?)
131 * Uniform source code for Linux-2.x.y
132 * Support for dyn. addition/removal of devices via add/remove-single-device
133 (Try: echo "scsi add-single-device C B T U" >/proc/scsi/scsi
134 C = Controller, B = Bus, T = Target SCSI ID, U = Unit SCSI LUN.)
135 Use with care!
136 * Try to use the partition table for the determination of the mapping
137
138
1394. Configuration via /proc/scsi/tmscsim/?
140-----------------------------------------
141First of all look at the output of /proc/scsi/tmscsim/? by typing
142 cat /proc/scsi/tmscsim/?
143The "?" should be replaced by the SCSI host number. (The shell might do this
144for you.)
145You will see some info regarding the adapter and, at the end, a listing of
146the attached devices and their settings.
147
148Here's an example:
149garloff@kurt:/home/garloff > cat /proc/scsi/tmscsim/0
150Tekram DC390/AM53C974 PCI SCSI Host Adapter, Driver Version 2.0e7 2000-11-28
151SCSI Host Nr 1, AM53C974 Adapter Nr 0
152IOPortBase 0xb000, IRQ 10
153MaxID 8, MaxLUN 8, AdapterID 6, SelTimeout 250 ms, DelayReset 1 s
154TagMaxNum 16, Status 0x00, ACBFlag 0x00, GlitchEater 24 ns
155Statistics: Cmnds 1470165, Cmnds not sent directly 0, Out of SRB conds 0
156 Lost arbitrations 587, Sel. connected 0, Connected: No
157Nr of attached devices: 4, Nr of DCBs: 4
158Map of attached LUNs: 01 00 00 03 01 00 00 00
159Idx ID LUN Prty Sync DsCn SndS TagQ NegoPeriod SyncSpeed SyncOffs MaxCmd
16000 00 00 Yes Yes Yes Yes Yes 100 ns 10.0 M 15 16
16101 03 00 Yes Yes Yes Yes No 100 ns 10.0 M 15 01
16202 03 01 Yes Yes Yes Yes No 100 ns 10.0 M 15 01
16303 04 00 Yes Yes Yes Yes No 100 ns 10.0 M 15 01
164
165Note that the settings MaxID and MaxLUN are not zero- but one-based, which
166means that a setting MaxLUN=4, will result in the support of LUNs 0..3. This
167is somehow inconvenient, but the way the mid-level SCSI code expects it to be.
168
169ACB and DCB are acronyms for Adapter Control Block and Device Control Block.
170These are data structures of the driver containing information about the
171adapter and the connected SCSI devices respectively.
172
173Idx is the device index (just a consecutive number for the driver), ID and
174LUN are the SCSI ID and LUN, Prty means Parity checking, Sync synchronous
175negotiation, DsCn Disconnection, SndS Send Start command on startup (not
176used by the driver) and TagQ Tagged Command Queueing. NegoPeriod and
177SyncSpeed are somehow redundant, because they are reciprocal values
178(1 / 112 ns = 8.9 MHz). At least in theory. The driver is able to adjust the
179NegoPeriod more accurate (4ns) than the SyncSpeed (1 / 25ns). I don't know
180if certain devices will have problems with this discrepancy. Max. speed is
18110 MHz corresp. to a min. NegoPeriod of 100 ns.
182(The driver allows slightly higher speeds if the devices (Ultra SCSI) accept
183it, but that's out of adapter spec, on your own risk and unlikely to improve
184performance. You're likely to crash your disks.)
185SyncOffs is the offset used for synchronous negotiations; max. is 15.
186The last values are only shown, if Sync is enabled. (NegoPeriod is still
187displayed in brackets to show the values which will be used after enabling
188Sync.)
189MaxCmd ist the number of commands (=tags) which can be processed at the same
190time by the device.
191
192If you want to change a setting, you can do that by writing to
193/proc/scsi/tmscsim/?. Basically you have to imitate the output of driver.
194(Don't use the brackets for NegoPeriod on Sync disabled devices.)
195You don't have to care about capitalisation. The driver will accept space,
196tab, comma, = and : as separators.
197
198There are three kinds of changes:
199
200(1) Change driver settings:
201 You type the names of the parameters and the params following it.
202 Example:
203 echo "MaxLUN=8 seltimeout 200" >/proc/scsi/tmscsim/0
204
205 Note that you can only change MaxID, MaxLUN, AdapterID, SelTimeOut,
206 TagMaxNum, ACBFlag, GlitchEater and DelayReset. Don't change ACBFlag
207 unless you want to see what happens, if the driver hangs.
208
209(2) Change device settings: You write a config line to the driver. The Nr
210 must match the ID and LUN given. If you give "-" as parameter, it is
211 ignored and the corresponding setting won't be changed.
212 You can use "y" or "n" instead of "Yes" and "No" if you want to.
213 You don't need to specify a full line. The driver automatically performs
214 an INQUIRY on the device if necessary to check if it is capable to operate
215 with the given settings (Sync, TagQ).
216 Examples:
217 echo "0 0 0 y y y - y - 10 " >/proc/scsi/tmscsim/0
218 echo "3 5 0 y n y " >/proc/scsi/tmscsim/0
219
220 To give a short explanation of the first example:
221 The first three numbers, "0 0 0" (Device index 0, SCSI ID 0, SCSI LUN 0),
222 select the device to which the following parameters apply. Note that it
223 would be sufficient to use the index or both SCSI ID and LUN, but I chose
224 to require all three to have a syntax similar to the output.
225 The following "y y y - y" enables Parity checking, enables Synchronous
226 transfers, Disconnection, leaves Send Start (not used) untouched and
227 enables Tagged Command Queueing for the selected device. The "-" skips
228 the Negotiation Period setting but the "10" sets the max sync. speed to
229 10 MHz. It's useless to specify both NegoPeriod and SyncSpeed as
230 discussed above. The values used in this example will result in maximum
231 performance.
232
233(3) Special commands: You can force a SCSI bus reset, an INQUIRY command, the
234 removal or the addition of a device's DCB and a SCSI register dump.
235 This is only used for debugging when you meet problems. The parameter of
236 the INQUIRY and REMOVE commands is the device index as shown by the
237 output of /proc/scsi/tmscsim/? in the device listing in the first column
238 (Idx). ADD takes the SCSI ID and LUN.
239 Examples:
240 echo "reset" >/proc/scsi/tmscsim/0
241 echo "inquiry 1" >/proc/scsi/tmscsim/0
242 echo "remove 2" >/proc/scsi/tmscsim/1
243 echo "add 2 3" >/proc/scsi/tmscsim/?
244 echo "dump" >/proc/scsi/tmscsim/0
245
246 Note that you will meet problems when you REMOVE a device's DCB with the
247 remove command if it contains partitions which are mounted. Only use it
248 after unmounting its partitions, telling the SCSI mid-level code to
249 remove it (scsi remove-single-device) and you really need a few bytes of
250 memory.
251 The ADD command allows you to configure a device before you tell the
252 mid-level code to try detection.
253
254
255I'd suggest reviewing the output of /proc/scsi/tmscsim/? after changing
256settings to see if everything changed as requested.
257
258
2595. Configuration via boot/module parameters
260-------------------------------------------
261With the DC390, the driver reads its EEPROM settings and tries to use them.
262But you may want to override the settings prior to being able to change the
263driver configuration via /proc/scsi/tmscsim/?.
264If you do have another AM53C974 based adapter, that's even the only
265possibility to adjust settings before you are able to write to the
266/proc/scsi/tmscsim/? pseudo-file, e.g. if you want to use another
267adapter ID than 7.
268(BTW, the log message "DC390: No EEPROM found!" is normal without a DC390.)
269For this purpose, you can pass options to the driver before it is initialised
270by using kernel or module parameters. See lilo(8) or modprobe(1) manual
271pages on how to pass params to the kernel or a module.
272[NOTE: Formerly, it was not possible to override the EEPROM supplied
273 settings of the DC390 with cmd line parameters. This has changed since
274 2.0e7]
275
276The syntax of the params is much shorter than the syntax of the /proc/...
277interface. This makes it a little bit more difficult to use. However, long
278parameter lines have the risk to be misinterpreted and the length of kernel
279parameters is limited.
280
281As the support for non-DC390 adapters works by simulating the values of the
282DC390 EEPROM, the settings are given in a DC390 BIOS' way.
283
284Here's the syntax:
285tmscsim=AdaptID,SpdIdx,DevMode,AdaptMode,TaggedCmnds,DelayReset
286
287Each of the parameters is a number, containing the described information:
288
289* AdaptID: The SCSI ID of the host adapter. Must be in the range 0..7
290 Default is 7.
291
292* SpdIdx: The index of the maximum speed as in the DC390 BIOS. The values
293 0..7 mean 10, 8.0, 6.7, 5.7, 5.0, 4.0, 3.1 and 2 MHz resp. Default is
294 0 (10.0 MHz).
295
296* DevMode is a bit mapped value describing the per-device features. It
297 applies to all devices. (Sync, Disc and TagQ will only apply, if the
298 device supports it.) The meaning of the bits (* = default):
299
300 Bit Val(hex) Val(dec) Meaning
301 *0 0x01 1 Parity check
302 *1 0x02 2 Synchronous Negotiation
303 *2 0x04 4 Disconnection
304 *3 0x08 8 Send Start command on startup. (Not used)
305 *4 0x10 16 Tagged Command Queueing
306
307 As usual, the desired value is obtained by adding the wanted values. If
308 you want to enable all values, e.g., you would use 31(0x1f). Default is 31.
309
310* AdaptMode is a bit mapped value describing the enabled adapter features.
311
312 Bit Val(hex) Val(dec) Meaning
313 *0 0x01 1 Support more than two drives. (Not used)
314 *1 0x02 2 Use DOS compatible mapping for HDs greater than 1GB.
315 *2 0x04 4 Reset SCSI Bus on startup.
316 *3 0x08 8 Active Negation: Improves SCSI Bus noise immunity.
317 4 0x10 16 Immediate return on BIOS seek command. (Not used)
318 (*)5 0x20 32 Check for LUNs >= 1.
319
320 The default for LUN Check depends on CONFIG_SCSI_MULTI_LUN.
321
322* TaggedCmnds is a number indicating the maximum number of Tagged Commands.
323 It is the binary logarithm - 1 of the actual number. Max is 4 (32).
324 Value Number of Tagged Commands
325 0 2
326 1 4
327 2 8
328 *3 16
329 4 32
330
331* DelayReset is the time in seconds (minus 0.5s), the adapter waits, after a
332 bus reset. Default is 1 (corresp. to 1.5s).
333
334Example:
335 modprobe tmscsim tmscsim=6,2,31
336would set the adapter ID to 6, max. speed to 6.7 MHz, enable all device
337features and leave the adapter features, the number of Tagged Commands
338and the Delay after a reset to the defaults.
339
340As you can see, you don't need to specify all of the six params.
341If you want values to be ignored (i.e. the EEprom settings or the defaults
342will be used), you may pass -2 (not 0!) at the corresponding position.
343
344The defaults (7,0,31,15,3,1) are aggressive to allow good performance. You
345can use tmscsim=7,0,31,63,4,0 for maximum performance, if your SCSI chain
346allows it. If you meet problems, you can use tmscsim=-1 which is a shortcut
347for tmscsim=7,4,9,15,2,10.
348
349
3506. Potential improvements
351-------------------------
352Most of the intended work on the driver has been done. Here are a few ideas
353to further improve its usability:
354
355* Cleanly separate per-Target and per-LUN properties (DCB)
356* More intelligent abort() routine
357* Use new_eh code (Linux-2.1+)
358* Have the mid-level (ML) code (and not the driver) handle more of the
359 various conditions.
360* Command queueing in the driver: Eliminate Query list and use ML instead.
361* More user friendly boot/module param syntax
362
363Further investigation on these problems:
364
365* Driver hangs with sync readcdda (xcdroast) (most probably VIA PCI error)
366
367Known problems:
368Please see http://www.garloff.de/kurt/linux/dc390/problems.html
369
370* Changing the parameters of multi-lun by the tmscsim/? interface will
371 cause problems, cause these settings are mostly per Target and not per LUN
372 and should be updated accordingly. To be fixed for 2.0d24.
373* CDRs (eg Yam CRW4416) not recognized, because some buggy devices don't
374 recover from a SCSI reset in time. Use a higher delay or don't issue
375 a SCSI bus reset on driver initialization. See problems page.
376 For the CRW4416S, this seems to be solved with firmware 1.0g (reported by
377 Jean-Yves Barbier).
378* TEAC CD-532S not being recognized. (Works with 1.11).
379* Scanners (eg. Astra UMAX 1220S) don't work: Disable Sync Negotiation.
380 If this does not help, try echo "INQUIRY t" >/proc/scsi/tmscsim/? (t
381 replaced by the dev index of your scanner). You may try to reset your SCSI
382 bus afterwards (echo "RESET" >/proc/scsi/tmscsim/?).
383 The problem seems to be solved as of 2.0d18, thanks to Andreas Rick.
384* If there is a valid partition table, the driver will use it for determing
385 the mapping. If there's none, a reasonable mapping (Symbios-like) will be
386 assumed. Other operating systems may not like this mapping, though
387 it's consistent with the BIOS' behaviour. Old DC390 drivers ignored the
388 partition table and used a H/S = 64/32 or 255/63 translation. So if you
389 want to be compatible to those, use this old mapping when creating
390 partition tables. Even worse, on bootup the DC390 might complain if other
391 mappings are found, so auto rebooting may fail.
392* In some situations, the driver will get stuck in an abort loop. This is a
393 bad interaction between the Mid-Layer of Linux' SCSI code and the driver.
394 Try to disable DsCn, if you meet this problem. Please contact me for
395 further debugging.
396
397
3987. Bug reports, debugging and updates
399-------------------------------------
400Whenever you have problems with the driver, you are invited to ask the
401author for help. However, I'd suggest reading the docs and trying to solve
402the problem yourself, first.
403If you find something, which you believe to be a bug, please report it to me.
404Please append the output of /proc/scsi/scsi, /proc/scsi/tmscsim/? and
405maybe the DC390 log messages to the report.
406
407Bug reports should be send to me (Kurt Garloff <dc390@garloff.de>) as well
408as to the linux-scsi list (<linux-scsi@vger.kernel.org>), as sometimes bugs
409are caused by the SCSI mid-level code.
410
411I will ask you for some more details and probably I will also ask you to
412enable some of the DEBUG options in the driver (tmscsim.c:DC390_DEBUGXXX
413defines). The driver will produce some data for the syslog facility then.
414Beware: If your syslog gets written to a SCSI disk connected to your
415AM53C974, the logging might produce log output again, and you might end
416having your box spending most of its time doing the logging.
417
418The latest version of the driver can be found at:
419 http://www.garloff.de/kurt/linux/dc390/
420 ftp://ftp.suse.com/pub/people/garloff/linux/dc390/
421
422
4238. Acknowledgements
424-------------------
425Thanks to Linus Torvalds, Alan Cox, the FSF people, the XFree86 team and
426all the others for the wonderful OS and software.
427Thanks to C.L. Huang and Philip Giang (Tekram) for the initial driver
428release and support.
429Thanks to Doug Ledford, Gérard Roudier for support with SCSI coding.
430Thanks to a lot of people (espec. Chiaki Ishikawa, Andreas Haumer, Hubert
431Tonneau) for intensively testing the driver (and even risking data loss
432doing this during early revisions).
433Recently, SuSE GmbH, Nuernberg, FRG, has been paying me for the driver
434development and maintenance. Special thanks!
435
436
4379. Copyright
438------------
439 This driver is free software; you can redistribute it and/or modify
440 it under the terms of the GNU General Public License as published by
441 the Free Software Foundation; version 2 of the License.
442 If you want to use any later version of the GNU GPL, you will probably
443 be allowed to, but you have to ask me and Tekram <erich@tekram.com.tw>
444 before.
445
446-------------------------------------------------------------------------
447Written by Kurt Garloff <kurt@garloff.de> 1998/06/11
448Last updated 2000/11/28, driver revision 2.0e7
449$Id: README.tmscsim,v 2.25.2.7 2000/12/20 01:07:12 garloff Exp $