xref: /OK3568_Linux_fs/kernel/Documentation/scsi/sym53c8xx_2.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun=========================================
4*4882a593SmuzhiyunThe Linux SYM-2 driver documentation file
5*4882a593Smuzhiyun=========================================
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunWritten by Gerard Roudier <groudier@free.fr>
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun21 Rue Carnot
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun95170 DEUIL LA BARRE - FRANCE
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunUpdated by Matthew Wilcox <matthew@wil.cx>
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun2004-10-09
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun.. Contents
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun   1.  Introduction
20*4882a593Smuzhiyun   2.  Supported chips and SCSI features
21*4882a593Smuzhiyun   3.  Advantages of this driver for newer chips.
22*4882a593Smuzhiyun         3.1 Optimized SCSI SCRIPTS
23*4882a593Smuzhiyun         3.2 New features appeared with the SYM53C896
24*4882a593Smuzhiyun   4.  Memory mapped I/O versus normal I/O
25*4882a593Smuzhiyun   5.  Tagged command queueing
26*4882a593Smuzhiyun   6.  Parity checking
27*4882a593Smuzhiyun   7.  Profiling information
28*4882a593Smuzhiyun   8.  Control commands
29*4882a593Smuzhiyun         8.1  Set minimum synchronous period
30*4882a593Smuzhiyun         8.2  Set wide size
31*4882a593Smuzhiyun         8.3  Set maximum number of concurrent tagged commands
32*4882a593Smuzhiyun         8.4  Set debug mode
33*4882a593Smuzhiyun         8.5  Set flag (no_disc)
34*4882a593Smuzhiyun         8.6  Set verbose level
35*4882a593Smuzhiyun         8.7  Reset all logical units of a target
36*4882a593Smuzhiyun         8.8  Abort all tasks of all logical units of a target
37*4882a593Smuzhiyun   9.  Configuration parameters
38*4882a593Smuzhiyun   10. Boot setup commands
39*4882a593Smuzhiyun         10.1 Syntax
40*4882a593Smuzhiyun         10.2 Available arguments
41*4882a593Smuzhiyun                10.2.1  Default number of tagged commands
42*4882a593Smuzhiyun                10.2.2  Burst max
43*4882a593Smuzhiyun                10.2.3  LED support
44*4882a593Smuzhiyun                10.2.4  Differential mode
45*4882a593Smuzhiyun                10.2.5  IRQ mode
46*4882a593Smuzhiyun                10.2.6  Check SCSI BUS
47*4882a593Smuzhiyun                10.2.7  Suggest a default SCSI id for hosts
48*4882a593Smuzhiyun                10.2.8  Verbosity level
49*4882a593Smuzhiyun                10.2.9  Debug mode
50*4882a593Smuzhiyun                10.2.10 Settle delay
51*4882a593Smuzhiyun                10.2.11 Serial NVRAM
52*4882a593Smuzhiyun                10.2.12 Exclude a host from being attached
53*4882a593Smuzhiyun         10.3 Converting from old options
54*4882a593Smuzhiyun         10.4 SCSI BUS checking boot option
55*4882a593Smuzhiyun   11. SCSI problem troubleshooting
56*4882a593Smuzhiyun         15.1 Problem tracking
57*4882a593Smuzhiyun         15.2 Understanding hardware error reports
58*4882a593Smuzhiyun   12. Serial NVRAM support (by Richard Waltham)
59*4882a593Smuzhiyun         17.1 Features
60*4882a593Smuzhiyun         17.2 Symbios NVRAM layout
61*4882a593Smuzhiyun         17.3 Tekram  NVRAM layout
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun1. Introduction
65*4882a593Smuzhiyun===============
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunThis driver supports the whole SYM53C8XX family of PCI-SCSI controllers.
68*4882a593SmuzhiyunIt also support the subset of LSI53C10XX PCI-SCSI controllers that are based
69*4882a593Smuzhiyunon the SYM53C8XX SCRIPTS language.
70*4882a593Smuzhiyun
71*4882a593SmuzhiyunIt replaces the sym53c8xx+ncr53c8xx driver bundle and shares its core code
72*4882a593Smuzhiyunwith the FreeBSD SYM-2 driver. The 'glue' that allows this driver to work
73*4882a593Smuzhiyununder Linux is contained in 2 files named sym_glue.h and sym_glue.c.
74*4882a593SmuzhiyunOther drivers files are intended not to depend on the Operating System
75*4882a593Smuzhiyunon which the driver is used.
76*4882a593Smuzhiyun
77*4882a593SmuzhiyunThe history of this driver can be summarized as follows:
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun1993: ncr driver written for 386bsd and FreeBSD by:
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun          - Wolfgang Stanglmeier        <wolf@cologne.de>
82*4882a593Smuzhiyun          - Stefan Esser                <se@mi.Uni-Koeln.de>
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun1996: port of the ncr driver to Linux-1.2.13 and rename it ncr53c8xx.
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun          - Gerard Roudier
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun1998: new sym53c8xx driver for Linux based on LOAD/STORE instruction and that
89*4882a593Smuzhiyun      adds full support for the 896 but drops support for early NCR devices.
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun          - Gerard Roudier
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun1999: port of the sym53c8xx driver to FreeBSD and support for the LSI53C1010
94*4882a593Smuzhiyun      33 MHz and 66MHz Ultra-3 controllers. The new driver is named 'sym'.
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun          - Gerard Roudier
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun2000: Add support for early NCR devices to FreeBSD 'sym' driver.
99*4882a593Smuzhiyun      Break the driver into several sources and separate the OS glue
100*4882a593Smuzhiyun      code from the core code that can be shared among different O/Ses.
101*4882a593Smuzhiyun      Write a glue code for Linux.
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun          - Gerard Roudier
104*4882a593Smuzhiyun
105*4882a593Smuzhiyun2004: Remove FreeBSD compatibility code.  Remove support for versions of
106*4882a593Smuzhiyun      Linux before 2.6.  Start using Linux facilities.
107*4882a593Smuzhiyun
108*4882a593SmuzhiyunThis README file addresses the Linux version of the driver. Under FreeBSD,
109*4882a593Smuzhiyunthe driver documentation is the sym.8 man page.
110*4882a593Smuzhiyun
111*4882a593SmuzhiyunInformation about new chips is available at LSILOGIC web server:
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun          http://www.lsilogic.com/
114*4882a593Smuzhiyun
115*4882a593SmuzhiyunSCSI standard documentations are available at T10 site:
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun          http://www.t10.org/
118*4882a593Smuzhiyun
119*4882a593SmuzhiyunUseful SCSI tools written by Eric Youngdale are part of most Linux
120*4882a593Smuzhiyundistributions:
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun   ============ ==========================
123*4882a593Smuzhiyun   scsiinfo     command line tool
124*4882a593Smuzhiyun   scsi-config  TCL/Tk tool using scsiinfo
125*4882a593Smuzhiyun   ============ ==========================
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun2. Supported chips and SCSI features
128*4882a593Smuzhiyun====================================
129*4882a593Smuzhiyun
130*4882a593SmuzhiyunThe following features are supported for all chips:
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun	- Synchronous negotiation
133*4882a593Smuzhiyun	- Disconnection
134*4882a593Smuzhiyun	- Tagged command queuing
135*4882a593Smuzhiyun	- SCSI parity checking
136*4882a593Smuzhiyun	- PCI Master parity checking
137*4882a593Smuzhiyun
138*4882a593SmuzhiyunOther features depends on chip capabilities.
139*4882a593Smuzhiyun
140*4882a593SmuzhiyunThe driver notably uses optimized SCRIPTS for devices that support
141*4882a593SmuzhiyunLOAD/STORE and handles PHASE MISMATCH from SCRIPTS for devices that
142*4882a593Smuzhiyunsupport the corresponding feature.
143*4882a593Smuzhiyun
144*4882a593SmuzhiyunThe following table shows some characteristics of the chip family.
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
147*4882a593Smuzhiyun|        |           |     |           |            |Load/store  |Hardware |
148*4882a593Smuzhiyun|        |On board   |     |           |            |scripts     |phase    |
149*4882a593Smuzhiyun|Chip    |SDMS BIOS  |Wide |SCSI std.  | Max. sync  |            |mismatch |
150*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
151*4882a593Smuzhiyun|810     |     N     |  N  | FAST10    | 10 MB/s    |      N     |    N    |
152*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
153*4882a593Smuzhiyun|810A    |     N     |  N  | FAST10    | 10 MB/s    |      Y     |    N    |
154*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
155*4882a593Smuzhiyun|815     |     Y     |  N  | FAST10    | 10 MB/s    |      N     |    N    |
156*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
157*4882a593Smuzhiyun|825     |     Y     |  Y  | FAST10    | 20 MB/s    |      N     |    N    |
158*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
159*4882a593Smuzhiyun|825A    |     Y     |  Y  | FAST10    | 20 MB/s    |      Y     |    N    |
160*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
161*4882a593Smuzhiyun|860     |     N     |  N  | FAST20    | 20 MB/s    |      Y     |    N    |
162*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
163*4882a593Smuzhiyun|875     |     Y     |  Y  | FAST20    | 40 MB/s    |      Y     |    N    |
164*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
165*4882a593Smuzhiyun|875A    |     Y     |  Y  | FAST20    | 40 MB/s    |      Y     |    Y    |
166*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
167*4882a593Smuzhiyun|876     |     Y     |  Y  | FAST20    | 40 MB/s    |      Y     |    N    |
168*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
169*4882a593Smuzhiyun|895     |     Y     |  Y  | FAST40    | 80 MB/s    |      Y     |    N    |
170*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
171*4882a593Smuzhiyun|895A    |     Y     |  Y  | FAST40    | 80 MB/s    |      Y     |    Y    |
172*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
173*4882a593Smuzhiyun|896     |     Y     |  Y  | FAST40    | 80 MB/s    |      Y     |    Y    |
174*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
175*4882a593Smuzhiyun|897     |     Y     |  Y  | FAST40    | 80 MB/s    |      Y     |    Y    |
176*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
177*4882a593Smuzhiyun|1510D   |     Y     |  Y  | FAST40    | 80 MB/s    |      Y     |    Y    |
178*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
179*4882a593Smuzhiyun|1010    |     Y     |  Y  | FAST80    |160 MB/s    |      Y     |    Y    |
180*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
181*4882a593Smuzhiyun|1010_66 |     Y     |  Y  | FAST80    |160 MB/s    |      Y     |    Y    |
182*4882a593Smuzhiyun|[1]_    |           |     |           |            |            |         |
183*4882a593Smuzhiyun+--------+-----------+-----+-----------+------------+------------+---------+
184*4882a593Smuzhiyun
185*4882a593Smuzhiyun.. [1] Chip supports 33MHz and 66MHz PCI bus clock.
186*4882a593Smuzhiyun
187*4882a593Smuzhiyun
188*4882a593SmuzhiyunSummary of other supported features:
189*4882a593Smuzhiyun
190*4882a593Smuzhiyun:Module:                allow to load the driver
191*4882a593Smuzhiyun:Memory mapped I/O:     increases performance
192*4882a593Smuzhiyun:Control commands:      write operations to the proc SCSI file system
193*4882a593Smuzhiyun:Debugging information: written to syslog (expert only)
194*4882a593Smuzhiyun:Serial NVRAM:          Symbios and Tekram formats
195*4882a593Smuzhiyun
196*4882a593Smuzhiyun- Scatter / gather
197*4882a593Smuzhiyun- Shared interrupt
198*4882a593Smuzhiyun- Boot setup commands
199*4882a593Smuzhiyun
200*4882a593Smuzhiyun
201*4882a593Smuzhiyun3. Advantages of this driver for newer chips.
202*4882a593Smuzhiyun=============================================
203*4882a593Smuzhiyun
204*4882a593Smuzhiyun3.1 Optimized SCSI SCRIPTS
205*4882a593Smuzhiyun--------------------------
206*4882a593Smuzhiyun
207*4882a593SmuzhiyunAll chips except the 810, 815 and 825, support new SCSI SCRIPTS instructions
208*4882a593Smuzhiyunnamed LOAD and STORE that allow to move up to 1 DWORD from/to an IO register
209*4882a593Smuzhiyunto/from memory much faster that the MOVE MEMORY instruction that is supported
210*4882a593Smuzhiyunby the 53c7xx and 53c8xx family.
211*4882a593Smuzhiyun
212*4882a593SmuzhiyunThe LOAD/STORE instructions support absolute and DSA relative addressing
213*4882a593Smuzhiyunmodes. The SCSI SCRIPTS had been entirely rewritten using LOAD/STORE instead
214*4882a593Smuzhiyunof MOVE MEMORY instructions.
215*4882a593Smuzhiyun
216*4882a593SmuzhiyunDue to the lack of LOAD/STORE SCRIPTS instructions by earlier chips, this
217*4882a593Smuzhiyundriver also incorporates a different SCRIPTS set based on MEMORY MOVE, in
218*4882a593Smuzhiyunorder to provide support for the entire SYM53C8XX chips family.
219*4882a593Smuzhiyun
220*4882a593Smuzhiyun3.2 New features appeared with the SYM53C896
221*4882a593Smuzhiyun--------------------------------------------
222*4882a593Smuzhiyun
223*4882a593SmuzhiyunNewer chips (see above) allows handling of the phase mismatch context from
224*4882a593SmuzhiyunSCRIPTS (avoids the phase mismatch interrupt that stops the SCSI processor
225*4882a593Smuzhiyununtil the C code has saved the context of the transfer).
226*4882a593Smuzhiyun
227*4882a593SmuzhiyunThe 896 and 1010 chips support 64 bit PCI transactions and addressing,
228*4882a593Smuzhiyunwhile the 895A supports 32 bit PCI transactions and 64 bit addressing.
229*4882a593SmuzhiyunThe SCRIPTS processor of these chips is not true 64 bit, but uses segment
230*4882a593Smuzhiyunregisters for bit 32-63. Another interesting feature is that LOAD/STORE
231*4882a593Smuzhiyuninstructions that address the on-chip RAM (8k) remain internal to the chip.
232*4882a593Smuzhiyun
233*4882a593Smuzhiyun4. Memory mapped I/O versus normal I/O
234*4882a593Smuzhiyun======================================
235*4882a593Smuzhiyun
236*4882a593SmuzhiyunMemory mapped I/O has less latency than normal I/O and is the recommended
237*4882a593Smuzhiyunway for doing IO with PCI devices. Memory mapped I/O seems to work fine on
238*4882a593Smuzhiyunmost hardware configurations, but some poorly designed chipsets may break
239*4882a593Smuzhiyunthis feature. A configuration option is provided for normal I/O to be
240*4882a593Smuzhiyunused but the driver defaults to MMIO.
241*4882a593Smuzhiyun
242*4882a593Smuzhiyun5. Tagged command queueing
243*4882a593Smuzhiyun==========================
244*4882a593Smuzhiyun
245*4882a593SmuzhiyunQueuing more than 1 command at a time to a device allows it to perform
246*4882a593Smuzhiyunoptimizations based on actual head positions and its mechanical
247*4882a593Smuzhiyuncharacteristics. This feature may also reduce average command latency.
248*4882a593SmuzhiyunIn order to really gain advantage of this feature, devices must have
249*4882a593Smuzhiyuna reasonable cache size (No miracle is to be expected for a low-end
250*4882a593Smuzhiyunhard disk with 128 KB or less).
251*4882a593Smuzhiyun
252*4882a593SmuzhiyunSome known old SCSI devices do not properly support tagged command queuing.
253*4882a593SmuzhiyunGenerally, firmware revisions that fix this kind of problems are available
254*4882a593Smuzhiyunat respective vendor web/ftp sites.
255*4882a593Smuzhiyun
256*4882a593SmuzhiyunAll I can say is that I never have had problem with tagged queuing using
257*4882a593Smuzhiyunthis driver and its predecessors. Hard disks that behaved correctly for
258*4882a593Smuzhiyunme using tagged commands are the following:
259*4882a593Smuzhiyun
260*4882a593Smuzhiyun- IBM S12 0662
261*4882a593Smuzhiyun- Conner 1080S
262*4882a593Smuzhiyun- Quantum Atlas I
263*4882a593Smuzhiyun- Quantum Atlas II
264*4882a593Smuzhiyun- Seagate Cheetah I
265*4882a593Smuzhiyun- Quantum Viking II
266*4882a593Smuzhiyun- IBM DRVS
267*4882a593Smuzhiyun- Quantum Atlas IV
268*4882a593Smuzhiyun- Seagate Cheetah II
269*4882a593Smuzhiyun
270*4882a593SmuzhiyunIf your controller has NVRAM, you can configure this feature per target
271*4882a593Smuzhiyunfrom the user setup tool. The Tekram Setup program allows to tune the
272*4882a593Smuzhiyunmaximum number of queued commands up to 32. The Symbios Setup only allows
273*4882a593Smuzhiyunto enable or disable this feature.
274*4882a593Smuzhiyun
275*4882a593SmuzhiyunThe maximum number of simultaneous tagged commands queued to a device
276*4882a593Smuzhiyunis currently set to 16 by default.  This value is suitable for most SCSI
277*4882a593Smuzhiyundisks.  With large SCSI disks (>= 2GB, cache >= 512KB, average seek time
278*4882a593Smuzhiyun<= 10 ms), using a larger value may give better performances.
279*4882a593Smuzhiyun
280*4882a593SmuzhiyunThis driver supports up to 255 commands per device, and but using more than
281*4882a593Smuzhiyun64 is generally not worth-while, unless you are using a very large disk or
282*4882a593Smuzhiyundisk arrays. It is noticeable that most of recent hard disks seem not to
283*4882a593Smuzhiyunaccept more than 64 simultaneous commands. So, using more than 64 queued
284*4882a593Smuzhiyuncommands is probably just resource wasting.
285*4882a593Smuzhiyun
286*4882a593SmuzhiyunIf your controller does not have NVRAM or if it is managed by the SDMS
287*4882a593SmuzhiyunBIOS/SETUP, you can configure tagged queueing feature and device queue
288*4882a593Smuzhiyundepths from the boot command-line. For example::
289*4882a593Smuzhiyun
290*4882a593Smuzhiyun  sym53c8xx=tags:4/t2t3q15-t4q7/t1u0q32
291*4882a593Smuzhiyun
292*4882a593Smuzhiyunwill set tagged commands queue depths as follow:
293*4882a593Smuzhiyun
294*4882a593Smuzhiyun- target 2  all luns  on controller 0 --> 15
295*4882a593Smuzhiyun- target 3  all luns  on controller 0 --> 15
296*4882a593Smuzhiyun- target 4  all luns  on controller 0 -->  7
297*4882a593Smuzhiyun- target 1  lun 0     on controller 1 --> 32
298*4882a593Smuzhiyun- all other target/lun                -->  4
299*4882a593Smuzhiyun
300*4882a593SmuzhiyunIn some special conditions, some SCSI disk firmwares may return a
301*4882a593SmuzhiyunQUEUE FULL status for a SCSI command. This behaviour is managed by the
302*4882a593Smuzhiyundriver using the following heuristic:
303*4882a593Smuzhiyun
304*4882a593Smuzhiyun- Each time a QUEUE FULL status is returned, tagged queue depth is reduced
305*4882a593Smuzhiyun  to the actual number of disconnected commands.
306*4882a593Smuzhiyun
307*4882a593Smuzhiyun- Every 200 successfully completed SCSI commands, if allowed by the
308*4882a593Smuzhiyun  current limit, the maximum number of queueable commands is incremented.
309*4882a593Smuzhiyun
310*4882a593SmuzhiyunSince QUEUE FULL status reception and handling is resource wasting, the
311*4882a593Smuzhiyundriver notifies by default this problem to user by indicating the actual
312*4882a593Smuzhiyunnumber of commands used and their status, as well as its decision on the
313*4882a593Smuzhiyundevice queue depth change.
314*4882a593SmuzhiyunThe heuristic used by the driver in handling QUEUE FULL ensures that the
315*4882a593Smuzhiyunimpact on performances is not too bad. You can get rid of the messages by
316*4882a593Smuzhiyunsetting verbose level to zero, as follow:
317*4882a593Smuzhiyun
318*4882a593Smuzhiyun1st method:
319*4882a593Smuzhiyun	    boot your system using 'sym53c8xx=verb:0' option.
320*4882a593Smuzhiyun2nd method:
321*4882a593Smuzhiyun	    apply "setverbose 0" control command to the proc fs entry
322*4882a593Smuzhiyun            corresponding to your controller after boot-up.
323*4882a593Smuzhiyun
324*4882a593Smuzhiyun6. Parity checking
325*4882a593Smuzhiyun==================
326*4882a593Smuzhiyun
327*4882a593SmuzhiyunThe driver supports SCSI parity checking and PCI bus master parity
328*4882a593Smuzhiyunchecking.  These features must be enabled in order to ensure safe
329*4882a593Smuzhiyundata transfers.  Some flawed devices or mother boards may have problems
330*4882a593Smuzhiyunwith parity.  The options to defeat parity checking have been removed
331*4882a593Smuzhiyunfrom the driver.
332*4882a593Smuzhiyun
333*4882a593Smuzhiyun7. Profiling information
334*4882a593Smuzhiyun========================
335*4882a593Smuzhiyun
336*4882a593SmuzhiyunThis driver does not provide profiling information as did its predecessors.
337*4882a593SmuzhiyunThis feature was not this useful and added complexity to the code.
338*4882a593SmuzhiyunAs the driver code got more complex, I have decided to remove everything
339*4882a593Smuzhiyunthat didn't seem actually useful.
340*4882a593Smuzhiyun
341*4882a593Smuzhiyun8. Control commands
342*4882a593Smuzhiyun===================
343*4882a593Smuzhiyun
344*4882a593SmuzhiyunControl commands can be sent to the driver with write operations to
345*4882a593Smuzhiyunthe proc SCSI file system. The generic command syntax is the
346*4882a593Smuzhiyunfollowing::
347*4882a593Smuzhiyun
348*4882a593Smuzhiyun      echo "<verb> <parameters>" >/proc/scsi/sym53c8xx/0
349*4882a593Smuzhiyun      (assumes controller number is 0)
350*4882a593Smuzhiyun
351*4882a593SmuzhiyunUsing "all" for "<target>" parameter with the commands below will
352*4882a593Smuzhiyunapply to all targets of the SCSI chain (except the controller).
353*4882a593Smuzhiyun
354*4882a593SmuzhiyunAvailable commands:
355*4882a593Smuzhiyun
356*4882a593Smuzhiyun8.1 Set minimum synchronous period factor
357*4882a593Smuzhiyun-----------------------------------------
358*4882a593Smuzhiyun
359*4882a593Smuzhiyun    setsync <target> <period factor>
360*4882a593Smuzhiyun
361*4882a593Smuzhiyun    :target:   target number
362*4882a593Smuzhiyun    :period:   minimum synchronous period.
363*4882a593Smuzhiyun               Maximum speed = 1000/(4*period factor) except for special
364*4882a593Smuzhiyun               cases below.
365*4882a593Smuzhiyun
366*4882a593Smuzhiyun    Specify a period of 0, to force asynchronous transfer mode.
367*4882a593Smuzhiyun
368*4882a593Smuzhiyun     -  9 means 12.5 nano-seconds synchronous period
369*4882a593Smuzhiyun     - 10 means 25 nano-seconds synchronous period
370*4882a593Smuzhiyun     - 11 means 30 nano-seconds synchronous period
371*4882a593Smuzhiyun     - 12 means 50 nano-seconds synchronous period
372*4882a593Smuzhiyun
373*4882a593Smuzhiyun8.2 Set wide size
374*4882a593Smuzhiyun-----------------
375*4882a593Smuzhiyun
376*4882a593Smuzhiyun    setwide <target> <size>
377*4882a593Smuzhiyun
378*4882a593Smuzhiyun    :target:   target number
379*4882a593Smuzhiyun    :size:     0=8 bits, 1=16bits
380*4882a593Smuzhiyun
381*4882a593Smuzhiyun8.3 Set maximum number of concurrent tagged commands
382*4882a593Smuzhiyun----------------------------------------------------
383*4882a593Smuzhiyun
384*4882a593Smuzhiyun    settags <target> <tags>
385*4882a593Smuzhiyun
386*4882a593Smuzhiyun    :target:   target number
387*4882a593Smuzhiyun    :tags:     number of concurrent tagged commands
388*4882a593Smuzhiyun               must not be greater than configured (default: 16)
389*4882a593Smuzhiyun
390*4882a593Smuzhiyun8.4 Set debug mode
391*4882a593Smuzhiyun------------------
392*4882a593Smuzhiyun
393*4882a593Smuzhiyun    setdebug <list of debug flags>
394*4882a593Smuzhiyun
395*4882a593Smuzhiyun    Available debug flags:
396*4882a593Smuzhiyun
397*4882a593Smuzhiyun	======== ========================================================
398*4882a593Smuzhiyun        alloc    print info about memory allocations (ccb, lcb)
399*4882a593Smuzhiyun        queue    print info about insertions into the command start queue
400*4882a593Smuzhiyun        result   print sense data on CHECK CONDITION status
401*4882a593Smuzhiyun        scatter  print info about the scatter process
402*4882a593Smuzhiyun        scripts  print info about the script binding process
403*4882a593Smuzhiyun	tiny     print minimal debugging information
404*4882a593Smuzhiyun	timing   print timing information of the NCR chip
405*4882a593Smuzhiyun	nego     print information about SCSI negotiations
406*4882a593Smuzhiyun	phase    print information on script interruptions
407*4882a593Smuzhiyun	======== ========================================================
408*4882a593Smuzhiyun
409*4882a593Smuzhiyun    Use "setdebug" with no argument to reset debug flags.
410*4882a593Smuzhiyun
411*4882a593Smuzhiyun
412*4882a593Smuzhiyun8.5 Set flag (no_disc)
413*4882a593Smuzhiyun----------------------
414*4882a593Smuzhiyun
415*4882a593Smuzhiyun    setflag <target> <flag>
416*4882a593Smuzhiyun
417*4882a593Smuzhiyun    :target:    target number
418*4882a593Smuzhiyun
419*4882a593Smuzhiyun    For the moment, only one flag is available:
420*4882a593Smuzhiyun
421*4882a593Smuzhiyun        no_disc:   not allow target to disconnect.
422*4882a593Smuzhiyun
423*4882a593Smuzhiyun    Do not specify any flag in order to reset the flag. For example:
424*4882a593Smuzhiyun
425*4882a593Smuzhiyun    setflag 4
426*4882a593Smuzhiyun      will reset no_disc flag for target 4, so will allow it disconnections.
427*4882a593Smuzhiyun    setflag all
428*4882a593Smuzhiyun      will allow disconnection for all devices on the SCSI bus.
429*4882a593Smuzhiyun
430*4882a593Smuzhiyun
431*4882a593Smuzhiyun8.6 Set verbose level
432*4882a593Smuzhiyun---------------------
433*4882a593Smuzhiyun
434*4882a593Smuzhiyun    setverbose #level
435*4882a593Smuzhiyun
436*4882a593Smuzhiyun    The driver default verbose level is 1. This command allows to change
437*4882a593Smuzhiyun    th driver verbose level after boot-up.
438*4882a593Smuzhiyun
439*4882a593Smuzhiyun8.7 Reset all logical units of a target
440*4882a593Smuzhiyun---------------------------------------
441*4882a593Smuzhiyun
442*4882a593Smuzhiyun    resetdev <target>
443*4882a593Smuzhiyun
444*4882a593Smuzhiyun    :target:    target number
445*4882a593Smuzhiyun
446*4882a593Smuzhiyun    The driver will try to send a BUS DEVICE RESET message to the target.
447*4882a593Smuzhiyun
448*4882a593Smuzhiyun8.8 Abort all tasks of all logical units of a target
449*4882a593Smuzhiyun----------------------------------------------------
450*4882a593Smuzhiyun
451*4882a593Smuzhiyun    cleardev <target>
452*4882a593Smuzhiyun
453*4882a593Smuzhiyun    :target:    target number
454*4882a593Smuzhiyun
455*4882a593Smuzhiyun    The driver will try to send a ABORT message to all the logical units
456*4882a593Smuzhiyun    of the target.
457*4882a593Smuzhiyun
458*4882a593Smuzhiyun
459*4882a593Smuzhiyun9. Configuration parameters
460*4882a593Smuzhiyun===========================
461*4882a593Smuzhiyun
462*4882a593SmuzhiyunUnder kernel configuration tools (make menuconfig, for example), it is
463*4882a593Smuzhiyunpossible to change some default driver configuration parameters.
464*4882a593SmuzhiyunIf the firmware of all your devices is perfect enough, all the
465*4882a593Smuzhiyunfeatures supported by the driver can be enabled at start-up. However,
466*4882a593Smuzhiyunif only one has a flaw for some SCSI feature, you can disable the
467*4882a593Smuzhiyunsupport by the driver of this feature at linux start-up and enable
468*4882a593Smuzhiyunthis feature after boot-up only for devices that support it safely.
469*4882a593Smuzhiyun
470*4882a593SmuzhiyunConfiguration parameters:
471*4882a593Smuzhiyun
472*4882a593SmuzhiyunUse normal IO                         (default answer: n)
473*4882a593Smuzhiyun    Answer "y" if you suspect your mother board to not allow memory mapped I/O.
474*4882a593Smuzhiyun    May slow down performance a little.
475*4882a593Smuzhiyun
476*4882a593SmuzhiyunDefault tagged command queue depth    (default answer: 16)
477*4882a593Smuzhiyun    Entering 0 defaults to tagged commands not being used.
478*4882a593Smuzhiyun    This parameter can be specified from the boot command line.
479*4882a593Smuzhiyun
480*4882a593SmuzhiyunMaximum number of queued commands     (default answer: 32)
481*4882a593Smuzhiyun    This option allows you to specify the maximum number of tagged commands
482*4882a593Smuzhiyun    that can be queued to a device. The maximum supported value is 255.
483*4882a593Smuzhiyun
484*4882a593SmuzhiyunSynchronous transfers frequency       (default answer: 80)
485*4882a593Smuzhiyun    This option allows you to specify the frequency in MHz the driver
486*4882a593Smuzhiyun    will use at boot time for synchronous data transfer negotiations.
487*4882a593Smuzhiyun    0 means "asynchronous data transfers".
488*4882a593Smuzhiyun
489*4882a593Smuzhiyun10. Boot setup commands
490*4882a593Smuzhiyun=======================
491*4882a593Smuzhiyun
492*4882a593Smuzhiyun10.1 Syntax
493*4882a593Smuzhiyun-----------
494*4882a593Smuzhiyun
495*4882a593SmuzhiyunSetup commands can be passed to the driver either at boot time or as
496*4882a593Smuzhiyunparameters to modprobe, as described in Documentation/admin-guide/kernel-parameters.rst
497*4882a593Smuzhiyun
498*4882a593SmuzhiyunExample of boot setup command under lilo prompt::
499*4882a593Smuzhiyun
500*4882a593Smuzhiyun    lilo: linux root=/dev/sda2 sym53c8xx.cmd_per_lun=4 sym53c8xx.sync=10 sym53c8xx.debug=0x200
501*4882a593Smuzhiyun
502*4882a593Smuzhiyun- enable tagged commands, up to 4 tagged commands queued.
503*4882a593Smuzhiyun- set synchronous negotiation speed to 10 Mega-transfers / second.
504*4882a593Smuzhiyun- set DEBUG_NEGO flag.
505*4882a593Smuzhiyun
506*4882a593SmuzhiyunThe following command will install the driver module with the same
507*4882a593Smuzhiyunoptions as above::
508*4882a593Smuzhiyun
509*4882a593Smuzhiyun    modprobe sym53c8xx cmd_per_lun=4 sync=10 debug=0x200
510*4882a593Smuzhiyun
511*4882a593Smuzhiyun10.2 Available arguments
512*4882a593Smuzhiyun------------------------
513*4882a593Smuzhiyun
514*4882a593Smuzhiyun10.2.1  Default number of tagged commands
515*4882a593Smuzhiyun^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
516*4882a593Smuzhiyun        - cmd_per_lun=0 (or cmd_per_lun=1) tagged command queuing disabled
517*4882a593Smuzhiyun        - cmd_per_lun=#tags (#tags > 1) tagged command queuing enabled
518*4882a593Smuzhiyun
519*4882a593Smuzhiyun  #tags will be truncated to the max queued commands configuration parameter.
520*4882a593Smuzhiyun
521*4882a593Smuzhiyun10.2.2 Burst max
522*4882a593Smuzhiyun^^^^^^^^^^^^^^^^
523*4882a593Smuzhiyun
524*4882a593Smuzhiyun	========== ======================================================
525*4882a593Smuzhiyun        burst=0    burst disabled
526*4882a593Smuzhiyun        burst=255  get burst length from initial IO register settings.
527*4882a593Smuzhiyun        burst=#x   burst enabled (1<<#x burst transfers max)
528*4882a593Smuzhiyun
529*4882a593Smuzhiyun		   #x is an integer value which is log base 2 of the burst
530*4882a593Smuzhiyun		   transfers max.
531*4882a593Smuzhiyun	========== ======================================================
532*4882a593Smuzhiyun
533*4882a593Smuzhiyun  By default the driver uses the maximum value supported by the chip.
534*4882a593Smuzhiyun
535*4882a593Smuzhiyun10.2.3 LED support
536*4882a593Smuzhiyun^^^^^^^^^^^^^^^^^^
537*4882a593Smuzhiyun
538*4882a593Smuzhiyun	=====      ===================
539*4882a593Smuzhiyun        led=1      enable  LED support
540*4882a593Smuzhiyun        led=0      disable LED support
541*4882a593Smuzhiyun	=====      ===================
542*4882a593Smuzhiyun
543*4882a593Smuzhiyun  Do not enable LED support if your scsi board does not use SDMS BIOS.
544*4882a593Smuzhiyun  (See 'Configuration parameters')
545*4882a593Smuzhiyun
546*4882a593Smuzhiyun10.2.4 Differential mode
547*4882a593Smuzhiyun^^^^^^^^^^^^^^^^^^^^^^^^
548*4882a593Smuzhiyun
549*4882a593Smuzhiyun	======	=================================
550*4882a593Smuzhiyun	diff=0	never set up diff mode
551*4882a593Smuzhiyun        diff=1	set up diff mode if BIOS set it
552*4882a593Smuzhiyun        diff=2	always set up diff mode
553*4882a593Smuzhiyun        diff=3	set diff mode if GPIO3 is not set
554*4882a593Smuzhiyun	======	=================================
555*4882a593Smuzhiyun
556*4882a593Smuzhiyun10.2.5 IRQ mode
557*4882a593Smuzhiyun^^^^^^^^^^^^^^^
558*4882a593Smuzhiyun
559*4882a593Smuzhiyun	======     ================================================
560*4882a593Smuzhiyun        irqm=0     always open drain
561*4882a593Smuzhiyun        irqm=1     same as initial settings (assumed BIOS settings)
562*4882a593Smuzhiyun        irqm=2     always totem pole
563*4882a593Smuzhiyun	======     ================================================
564*4882a593Smuzhiyun
565*4882a593Smuzhiyun10.2.6 Check SCSI BUS
566*4882a593Smuzhiyun^^^^^^^^^^^^^^^^^^^^^
567*4882a593Smuzhiyun
568*4882a593Smuzhiyun        buschk=<option bits>
569*4882a593Smuzhiyun
570*4882a593Smuzhiyun    Available option bits:
571*4882a593Smuzhiyun
572*4882a593Smuzhiyun	===    ================================================
573*4882a593Smuzhiyun        0x0    No check.
574*4882a593Smuzhiyun        0x1    Check and do not attach the controller on error.
575*4882a593Smuzhiyun        0x2    Check and just warn on error.
576*4882a593Smuzhiyun	===    ================================================
577*4882a593Smuzhiyun
578*4882a593Smuzhiyun10.2.7 Suggest a default SCSI id for hosts
579*4882a593Smuzhiyun^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
580*4882a593Smuzhiyun
581*4882a593Smuzhiyun	==========	==========================================
582*4882a593Smuzhiyun        hostid=255	no id suggested.
583*4882a593Smuzhiyun        hostid=#x	(0 < x < 7) x suggested for hosts SCSI id.
584*4882a593Smuzhiyun	==========	==========================================
585*4882a593Smuzhiyun
586*4882a593Smuzhiyun    If a host SCSI id is available from the NVRAM, the driver will ignore
587*4882a593Smuzhiyun    any value suggested as boot option. Otherwise, if a suggested value
588*4882a593Smuzhiyun    different from 255 has been supplied, it will use it. Otherwise, it will
589*4882a593Smuzhiyun    try to deduce the value previously set in the hardware and use value
590*4882a593Smuzhiyun    7 if the hardware value is zero.
591*4882a593Smuzhiyun
592*4882a593Smuzhiyun10.2.8  Verbosity level
593*4882a593Smuzhiyun^^^^^^^^^^^^^^^^^^^^^^^
594*4882a593Smuzhiyun
595*4882a593Smuzhiyun	======     ========
596*4882a593Smuzhiyun        verb=0     minimal
597*4882a593Smuzhiyun        verb=1     normal
598*4882a593Smuzhiyun        verb=2     too much
599*4882a593Smuzhiyun	======     ========
600*4882a593Smuzhiyun
601*4882a593Smuzhiyun10.2.9 Debug mode
602*4882a593Smuzhiyun^^^^^^^^^^^^^^^^^
603*4882a593Smuzhiyun
604*4882a593Smuzhiyun	=========   ====================================
605*4882a593Smuzhiyun        debug=0	    clear debug flags
606*4882a593Smuzhiyun        debug=#x    set debug flags
607*4882a593Smuzhiyun
608*4882a593Smuzhiyun		    #x is an integer value combining the
609*4882a593Smuzhiyun		    following power-of-2 values:
610*4882a593Smuzhiyun
611*4882a593Smuzhiyun		    =============  ======
612*4882a593Smuzhiyun		    DEBUG_ALLOC       0x1
613*4882a593Smuzhiyun		    DEBUG_PHASE       0x2
614*4882a593Smuzhiyun		    DEBUG_POLL        0x4
615*4882a593Smuzhiyun		    DEBUG_QUEUE       0x8
616*4882a593Smuzhiyun		    DEBUG_RESULT     0x10
617*4882a593Smuzhiyun		    DEBUG_SCATTER    0x20
618*4882a593Smuzhiyun		    DEBUG_SCRIPT     0x40
619*4882a593Smuzhiyun		    DEBUG_TINY       0x80
620*4882a593Smuzhiyun		    DEBUG_TIMING    0x100
621*4882a593Smuzhiyun		    DEBUG_NEGO      0x200
622*4882a593Smuzhiyun		    DEBUG_TAGS      0x400
623*4882a593Smuzhiyun		    DEBUG_FREEZE    0x800
624*4882a593Smuzhiyun		    DEBUG_RESTART  0x1000
625*4882a593Smuzhiyun		    =============  ======
626*4882a593Smuzhiyun	=========   ====================================
627*4882a593Smuzhiyun
628*4882a593Smuzhiyun  You can play safely with DEBUG_NEGO. However, some of these flags may
629*4882a593Smuzhiyun  generate bunches of syslog messages.
630*4882a593Smuzhiyun
631*4882a593Smuzhiyun10.2.10 Settle delay
632*4882a593Smuzhiyun^^^^^^^^^^^^^^^^^^^^
633*4882a593Smuzhiyun
634*4882a593Smuzhiyun	========	===================
635*4882a593Smuzhiyun        settle=n	delay for n seconds
636*4882a593Smuzhiyun	========	===================
637*4882a593Smuzhiyun
638*4882a593Smuzhiyun  After a bus reset, the driver will delay for n seconds before talking
639*4882a593Smuzhiyun  to any device on the bus.  The default is 3 seconds and safe mode will
640*4882a593Smuzhiyun  default it to 10.
641*4882a593Smuzhiyun
642*4882a593Smuzhiyun10.2.11 Serial NVRAM
643*4882a593Smuzhiyun^^^^^^^^^^^^^^^^^^^^
644*4882a593Smuzhiyun
645*4882a593Smuzhiyun	.. Note:: option not currently implemented.
646*4882a593Smuzhiyun
647*4882a593Smuzhiyun	=======     =========================================
648*4882a593Smuzhiyun        nvram=n     do not look for serial NVRAM
649*4882a593Smuzhiyun        nvram=y     test controllers for onboard serial NVRAM
650*4882a593Smuzhiyun	=======     =========================================
651*4882a593Smuzhiyun
652*4882a593Smuzhiyun        (alternate binary form)
653*4882a593Smuzhiyun
654*4882a593Smuzhiyun        nvram=<bits options>
655*4882a593Smuzhiyun
656*4882a593Smuzhiyun        ====   =================================================================
657*4882a593Smuzhiyun        0x01   look for NVRAM  (equivalent to nvram=y)
658*4882a593Smuzhiyun        0x02   ignore NVRAM "Synchronous negotiation" parameters for all devices
659*4882a593Smuzhiyun        0x04   ignore NVRAM "Wide negotiation"  parameter for all devices
660*4882a593Smuzhiyun        0x08   ignore NVRAM "Scan at boot time" parameter for all devices
661*4882a593Smuzhiyun        0x80   also attach controllers set to OFF in the NVRAM (sym53c8xx only)
662*4882a593Smuzhiyun        ====   =================================================================
663*4882a593Smuzhiyun
664*4882a593Smuzhiyun10.2.12 Exclude a host from being attached
665*4882a593Smuzhiyun^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
666*4882a593Smuzhiyun
667*4882a593Smuzhiyun        excl=<io_address>,...
668*4882a593Smuzhiyun
669*4882a593Smuzhiyun    Prevent host at a given io address from being attached.
670*4882a593Smuzhiyun    For example 'excl=0xb400,0xc000' indicate to the
671*4882a593Smuzhiyun    driver not to attach hosts at address 0xb400 and 0xc000.
672*4882a593Smuzhiyun
673*4882a593Smuzhiyun10.3 Converting from old style options
674*4882a593Smuzhiyun--------------------------------------
675*4882a593Smuzhiyun
676*4882a593SmuzhiyunPreviously, the sym2 driver accepted arguments of the form::
677*4882a593Smuzhiyun
678*4882a593Smuzhiyun	sym53c8xx=tags:4,sync:10,debug:0x200
679*4882a593Smuzhiyun
680*4882a593SmuzhiyunAs a result of the new module parameters, this is no longer available.
681*4882a593SmuzhiyunMost of the options have remained the same, but tags has become
682*4882a593Smuzhiyuncmd_per_lun to reflect its different purposes.  The sample above would
683*4882a593Smuzhiyunbe specified as::
684*4882a593Smuzhiyun
685*4882a593Smuzhiyun	modprobe sym53c8xx cmd_per_lun=4 sync=10 debug=0x200
686*4882a593Smuzhiyun
687*4882a593Smuzhiyunor on the kernel boot line as::
688*4882a593Smuzhiyun
689*4882a593Smuzhiyun	sym53c8xx.cmd_per_lun=4 sym53c8xx.sync=10 sym53c8xx.debug=0x200
690*4882a593Smuzhiyun
691*4882a593Smuzhiyun10.4 SCSI BUS checking boot option
692*4882a593Smuzhiyun----------------------------------
693*4882a593Smuzhiyun
694*4882a593SmuzhiyunWhen this option is set to a non-zero value, the driver checks SCSI lines
695*4882a593Smuzhiyunlogic state, 100 micro-seconds after having asserted the SCSI RESET line.
696*4882a593SmuzhiyunThe driver just reads SCSI lines and checks all lines read FALSE except RESET.
697*4882a593SmuzhiyunSince SCSI devices shall release the BUS at most 800 nano-seconds after SCSI
698*4882a593SmuzhiyunRESET has been asserted, any signal to TRUE may indicate a SCSI BUS problem.
699*4882a593SmuzhiyunUnfortunately, the following common SCSI BUS problems are not detected:
700*4882a593Smuzhiyun
701*4882a593Smuzhiyun- Only 1 terminator installed.
702*4882a593Smuzhiyun- Misplaced terminators.
703*4882a593Smuzhiyun- Bad quality terminators.
704*4882a593Smuzhiyun
705*4882a593SmuzhiyunOn the other hand, either bad cabling, broken devices, not conformant
706*4882a593Smuzhiyundevices, ... may cause a SCSI signal to be wrong when te driver reads it.
707*4882a593Smuzhiyun
708*4882a593Smuzhiyun15. SCSI problem troubleshooting
709*4882a593Smuzhiyun================================
710*4882a593Smuzhiyun
711*4882a593Smuzhiyun15.1 Problem tracking
712*4882a593Smuzhiyun---------------------
713*4882a593Smuzhiyun
714*4882a593SmuzhiyunMost SCSI problems are due to a non conformant SCSI bus or too buggy
715*4882a593Smuzhiyundevices.  If unfortunately you have SCSI problems, you can check the
716*4882a593Smuzhiyunfollowing things:
717*4882a593Smuzhiyun
718*4882a593Smuzhiyun- SCSI bus cables
719*4882a593Smuzhiyun- terminations at both end of the SCSI chain
720*4882a593Smuzhiyun- linux syslog messages (some of them may help you)
721*4882a593Smuzhiyun
722*4882a593SmuzhiyunIf you do not find the source of problems, you can configure the
723*4882a593Smuzhiyundriver or devices in the NVRAM with minimal features.
724*4882a593Smuzhiyun
725*4882a593Smuzhiyun- only asynchronous data transfers
726*4882a593Smuzhiyun- tagged commands disabled
727*4882a593Smuzhiyun- disconnections not allowed
728*4882a593Smuzhiyun
729*4882a593SmuzhiyunNow, if your SCSI bus is ok, your system has every chance to work
730*4882a593Smuzhiyunwith this safe configuration but performances will not be optimal.
731*4882a593Smuzhiyun
732*4882a593SmuzhiyunIf it still fails, then you can send your problem description to
733*4882a593Smuzhiyunappropriate mailing lists or news-groups.  Send me a copy in order to
734*4882a593Smuzhiyunbe sure I will receive it.  Obviously, a bug in the driver code is
735*4882a593Smuzhiyunpossible.
736*4882a593Smuzhiyun
737*4882a593Smuzhiyun  My current email address: Gerard Roudier <groudier@free.fr>
738*4882a593Smuzhiyun
739*4882a593SmuzhiyunAllowing disconnections is important if you use several devices on
740*4882a593Smuzhiyunyour SCSI bus but often causes problems with buggy devices.
741*4882a593SmuzhiyunSynchronous data transfers increases throughput of fast devices like
742*4882a593Smuzhiyunhard disks.  Good SCSI hard disks with a large cache gain advantage of
743*4882a593Smuzhiyuntagged commands queuing.
744*4882a593Smuzhiyun
745*4882a593Smuzhiyun15.2 Understanding hardware error reports
746*4882a593Smuzhiyun-----------------------------------------
747*4882a593Smuzhiyun
748*4882a593SmuzhiyunWhen the driver detects an unexpected error condition, it may display a
749*4882a593Smuzhiyunmessage of the following pattern::
750*4882a593Smuzhiyun
751*4882a593Smuzhiyun    sym0:1: ERROR (0:48) (1-21-65) (f/95/0) @ (script 7c0:19000000).
752*4882a593Smuzhiyun    sym0: script cmd = 19000000
753*4882a593Smuzhiyun    sym0: regdump: da 10 80 95 47 0f 01 07 75 01 81 21 80 01 09 00.
754*4882a593Smuzhiyun
755*4882a593SmuzhiyunSome fields in such a message may help you understand the cause of the
756*4882a593Smuzhiyunproblem, as follows::
757*4882a593Smuzhiyun
758*4882a593Smuzhiyun    sym0:1: ERROR (0:48) (1-21-65) (f/95/0) @ (script 7c0:19000000).
759*4882a593Smuzhiyun    .....A.........B.C....D.E..F....G.H..I.......J.....K...L.......
760*4882a593Smuzhiyun
761*4882a593SmuzhiyunField A : target number.
762*4882a593Smuzhiyun  SCSI ID of the device the controller was talking with at the moment the
763*4882a593Smuzhiyun  error occurs.
764*4882a593Smuzhiyun
765*4882a593SmuzhiyunField B : DSTAT io register (DMA STATUS)
766*4882a593Smuzhiyun  ========   =============================================================
767*4882a593Smuzhiyun  Bit 0x40   MDPE Master Data Parity Error
768*4882a593Smuzhiyun             Data parity error detected on the PCI BUS.
769*4882a593Smuzhiyun  Bit 0x20   BF   Bus Fault
770*4882a593Smuzhiyun             PCI bus fault condition detected
771*4882a593Smuzhiyun  Bit 0x01   IID  Illegal Instruction Detected
772*4882a593Smuzhiyun             Set by the chip when it detects an Illegal Instruction format
773*4882a593Smuzhiyun             on some condition that makes an instruction illegal.
774*4882a593Smuzhiyun  Bit 0x80   DFE Dma Fifo Empty
775*4882a593Smuzhiyun             Pure status bit that does not indicate an error.
776*4882a593Smuzhiyun  ========   =============================================================
777*4882a593Smuzhiyun
778*4882a593Smuzhiyun  If the reported DSTAT value contains a combination of MDPE (0x40),
779*4882a593Smuzhiyun  BF (0x20), then the cause may be likely due to a PCI BUS problem.
780*4882a593Smuzhiyun
781*4882a593SmuzhiyunField C : SIST io register (SCSI Interrupt Status)
782*4882a593Smuzhiyun  ========   ==================================================================
783*4882a593Smuzhiyun  Bit 0x08   SGE  SCSI GROSS ERROR
784*4882a593Smuzhiyun             Indicates that the chip detected a severe error condition
785*4882a593Smuzhiyun             on the SCSI BUS that prevents the SCSI protocol from functioning
786*4882a593Smuzhiyun             properly.
787*4882a593Smuzhiyun  Bit 0x04   UDC  Unexpected Disconnection
788*4882a593Smuzhiyun             Indicates that the device released the SCSI BUS when the chip
789*4882a593Smuzhiyun             was not expecting this to happen. A device may behave so to
790*4882a593Smuzhiyun             indicate the SCSI initiator that an error condition not reportable              using the SCSI protocol has occurred.
791*4882a593Smuzhiyun  Bit 0x02   RST  SCSI BUS Reset
792*4882a593Smuzhiyun             Generally SCSI targets do not reset the SCSI BUS, although any
793*4882a593Smuzhiyun             device on the BUS can reset it at any time.
794*4882a593Smuzhiyun  Bit 0x01   PAR  Parity
795*4882a593Smuzhiyun             SCSI parity error detected.
796*4882a593Smuzhiyun  ========   ==================================================================
797*4882a593Smuzhiyun
798*4882a593Smuzhiyun  On a faulty SCSI BUS, any error condition among SGE (0x08), UDC (0x04) and
799*4882a593Smuzhiyun  PAR (0x01) may be detected by the chip. If your SCSI system sometimes
800*4882a593Smuzhiyun  encounters such error conditions, especially SCSI GROSS ERROR, then a SCSI
801*4882a593Smuzhiyun  BUS problem is likely the cause of these errors.
802*4882a593Smuzhiyun
803*4882a593SmuzhiyunFor fields D,E,F,G and H, you may look into the sym53c8xx_defs.h file
804*4882a593Smuzhiyunthat contains some minimal comments on IO register bits.
805*4882a593Smuzhiyun
806*4882a593SmuzhiyunField D : SOCL  Scsi Output Control Latch
807*4882a593Smuzhiyun          This register reflects the state of the SCSI control lines the
808*4882a593Smuzhiyun          chip want to drive or compare against.
809*4882a593SmuzhiyunField E : SBCL  Scsi Bus Control Lines
810*4882a593Smuzhiyun          Actual value of control lines on the SCSI BUS.
811*4882a593SmuzhiyunField F : SBDL  Scsi Bus Data Lines
812*4882a593Smuzhiyun          Actual value of data lines on the SCSI BUS.
813*4882a593SmuzhiyunField G : SXFER  SCSI Transfer
814*4882a593Smuzhiyun          Contains the setting of the Synchronous Period for output and
815*4882a593Smuzhiyun          the current Synchronous offset (offset 0 means asynchronous).
816*4882a593SmuzhiyunField H : SCNTL3 Scsi Control Register 3
817*4882a593Smuzhiyun          Contains the setting of timing values for both asynchronous and
818*4882a593Smuzhiyun          synchronous data transfers.
819*4882a593SmuzhiyunField I : SCNTL4 Scsi Control Register 4
820*4882a593Smuzhiyun          Only meaningful for 53C1010 Ultra3 controllers.
821*4882a593Smuzhiyun
822*4882a593SmuzhiyunUnderstanding Fields J, K, L and dumps requires to have good knowledge of
823*4882a593SmuzhiyunSCSI standards, chip cores functionnals and internal driver data structures.
824*4882a593SmuzhiyunYou are not required to decode and understand them, unless you want to help
825*4882a593Smuzhiyunmaintain the driver code.
826*4882a593Smuzhiyun
827*4882a593Smuzhiyun17. Serial NVRAM (added by Richard Waltham: dormouse@farsrobt.demon.co.uk)
828*4882a593Smuzhiyun==========================================================================
829*4882a593Smuzhiyun
830*4882a593Smuzhiyun17.1 Features
831*4882a593Smuzhiyun-------------
832*4882a593Smuzhiyun
833*4882a593SmuzhiyunEnabling serial NVRAM support enables detection of the serial NVRAM included
834*4882a593Smuzhiyunon Symbios and some Symbios compatible host adaptors, and Tekram boards. The
835*4882a593Smuzhiyunserial NVRAM is used by Symbios and Tekram to hold set up parameters for the
836*4882a593Smuzhiyunhost adaptor and its attached drives.
837*4882a593Smuzhiyun
838*4882a593SmuzhiyunThe Symbios NVRAM also holds data on the boot order of host adaptors in a
839*4882a593Smuzhiyunsystem with more than one host adaptor.  This information is no longer used
840*4882a593Smuzhiyunas it's fundamentally incompatible with the hotplug PCI model.
841*4882a593Smuzhiyun
842*4882a593SmuzhiyunTekram boards using Symbios chips, DC390W/F/U, which have NVRAM are detected
843*4882a593Smuzhiyunand this is used to distinguish between Symbios compatible and Tekram host
844*4882a593Smuzhiyunadaptors. This is used to disable the Symbios compatible "diff" setting
845*4882a593Smuzhiyunincorrectly set on Tekram boards if the CONFIG_SCSI_53C8XX_SYMBIOS_COMPAT
846*4882a593Smuzhiyunconfiguration parameter is set enabling both Symbios and Tekram boards to be
847*4882a593Smuzhiyunused together with the Symbios cards using all their features, including
848*4882a593Smuzhiyun"diff" support. ("led pin" support for Symbios compatible cards can remain
849*4882a593Smuzhiyunenabled when using Tekram cards. It does nothing useful for Tekram host
850*4882a593Smuzhiyunadaptors but does not cause problems either.)
851*4882a593Smuzhiyun
852*4882a593SmuzhiyunThe parameters the driver is able to get from the NVRAM depend on the
853*4882a593Smuzhiyundata format used, as follow:
854*4882a593Smuzhiyun
855*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
856*4882a593Smuzhiyun|                               |Tekram format     |Symbios format|
857*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
858*4882a593Smuzhiyun|General and host parameters    |                  |              |
859*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
860*4882a593Smuzhiyun|  * Boot order                 |        N         |       Y      |
861*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
862*4882a593Smuzhiyun|  * Host SCSI ID               |        Y         |       Y      |
863*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
864*4882a593Smuzhiyun|  * SCSI parity checking       |        Y         |       Y      |
865*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
866*4882a593Smuzhiyun|  * Verbose boot messages      |        N         |       Y      |
867*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
868*4882a593Smuzhiyun|SCSI devices parameters                                          |
869*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
870*4882a593Smuzhiyun|  * Synchronous transfer speed |        Y         |       Y      |
871*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
872*4882a593Smuzhiyun|  * Wide 16 / Narrow           |        Y         |       Y      |
873*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
874*4882a593Smuzhiyun|  * Tagged Command Queuing     |        Y         |       Y      |
875*4882a593Smuzhiyun|    enabled                    |                  |              |
876*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
877*4882a593Smuzhiyun|  * Disconnections enabled     |        Y         |       Y      |
878*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
879*4882a593Smuzhiyun|  * Scan at boot time          |        N         |       Y      |
880*4882a593Smuzhiyun+-------------------------------+------------------+--------------+
881*4882a593Smuzhiyun
882*4882a593Smuzhiyun
883*4882a593SmuzhiyunIn order to speed up the system boot, for each device configured without
884*4882a593Smuzhiyunthe "scan at boot time" option, the driver forces an error on the
885*4882a593Smuzhiyunfirst TEST UNIT READY command received for this device.
886*4882a593Smuzhiyun
887*4882a593Smuzhiyun
888*4882a593Smuzhiyun17.2 Symbios NVRAM layout
889*4882a593Smuzhiyun-------------------------
890*4882a593Smuzhiyun
891*4882a593Smuzhiyuntypical data at NVRAM address 0x100 (53c810a NVRAM)::
892*4882a593Smuzhiyun
893*4882a593Smuzhiyun    00 00
894*4882a593Smuzhiyun    64 01
895*4882a593Smuzhiyun    8e 0b
896*4882a593Smuzhiyun
897*4882a593Smuzhiyun    00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
898*4882a593Smuzhiyun
899*4882a593Smuzhiyun    04 00 0f 00 00 10 00 50 00 00 01 00 00 62
900*4882a593Smuzhiyun    04 00 03 00 00 10 00 58 00 00 01 00 00 63
901*4882a593Smuzhiyun    04 00 01 00 00 10 00 48 00 00 01 00 00 61
902*4882a593Smuzhiyun    00 00 00 00 00 00 00 00 00 00 00 00 00 00
903*4882a593Smuzhiyun
904*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
905*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
906*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
907*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
908*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
909*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
910*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
911*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
912*4882a593Smuzhiyun
913*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
914*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
915*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
916*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
917*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
918*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
919*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
920*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
921*4882a593Smuzhiyun
922*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
923*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
924*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
925*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
926*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
927*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
928*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
929*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
930*4882a593Smuzhiyun
931*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
932*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
933*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
934*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
935*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
936*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
937*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
938*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
939*4882a593Smuzhiyun
940*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
941*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
942*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
943*4882a593Smuzhiyun
944*4882a593Smuzhiyun    fe fe
945*4882a593Smuzhiyun    00 00
946*4882a593Smuzhiyun    00 00
947*4882a593Smuzhiyun
948*4882a593SmuzhiyunNVRAM layout details
949*4882a593Smuzhiyun
950*4882a593Smuzhiyun============= =================
951*4882a593SmuzhiyunNVRAM Address
952*4882a593Smuzhiyun============= =================
953*4882a593Smuzhiyun0x000-0x0ff   not used
954*4882a593Smuzhiyun0x100-0x26f   initialised data
955*4882a593Smuzhiyun0x270-0x7ff   not used
956*4882a593Smuzhiyun============= =================
957*4882a593Smuzhiyun
958*4882a593Smuzhiyungeneral layout::
959*4882a593Smuzhiyun
960*4882a593Smuzhiyun        header  -   6 bytes,
961*4882a593Smuzhiyun        data    - 356 bytes (checksum is byte sum of this data)
962*4882a593Smuzhiyun        trailer -   6 bytes
963*4882a593Smuzhiyun                  ---
964*4882a593Smuzhiyun        total     368 bytes
965*4882a593Smuzhiyun
966*4882a593Smuzhiyundata area layout::
967*4882a593Smuzhiyun
968*4882a593Smuzhiyun        controller set up  -  20 bytes
969*4882a593Smuzhiyun        boot configuration -  56 bytes (4x14 bytes)
970*4882a593Smuzhiyun        device set up      - 128 bytes (16x8 bytes)
971*4882a593Smuzhiyun        unused (spare?)    - 152 bytes (19x8 bytes)
972*4882a593Smuzhiyun                             ---
973*4882a593Smuzhiyun        total                356 bytes
974*4882a593Smuzhiyun
975*4882a593Smuzhiyunheader::
976*4882a593Smuzhiyun
977*4882a593Smuzhiyun    00 00   - ?? start marker
978*4882a593Smuzhiyun    64 01   - byte count (lsb/msb excludes header/trailer)
979*4882a593Smuzhiyun    8e 0b   - checksum (lsb/msb excludes header/trailer)
980*4882a593Smuzhiyun
981*4882a593Smuzhiyuncontroller set up::
982*4882a593Smuzhiyun
983*4882a593Smuzhiyun    00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
984*4882a593Smuzhiyun		    |     |           |     |
985*4882a593Smuzhiyun		    |     |           |      -- host ID
986*4882a593Smuzhiyun		    |     |           |
987*4882a593Smuzhiyun		    |     |            --Removable Media Support
988*4882a593Smuzhiyun		    |     |               0x00 = none
989*4882a593Smuzhiyun		    |     |               0x01 = Bootable Device
990*4882a593Smuzhiyun		    |     |               0x02 = All with Media
991*4882a593Smuzhiyun		    |     |
992*4882a593Smuzhiyun		    |      --flag bits 2
993*4882a593Smuzhiyun		    |        0x00000001= scan order hi->low
994*4882a593Smuzhiyun		    |            (default 0x00 - scan low->hi)
995*4882a593Smuzhiyun			--flag bits 1
996*4882a593Smuzhiyun			0x00000001 scam enable
997*4882a593Smuzhiyun			0x00000010 parity enable
998*4882a593Smuzhiyun			0x00000100 verbose boot msgs
999*4882a593Smuzhiyun
1000*4882a593Smuzhiyunremaining bytes unknown - they do not appear to change in my
1001*4882a593Smuzhiyuncurrent set up for any of the controllers.
1002*4882a593Smuzhiyun
1003*4882a593Smuzhiyundefault set up is identical for 53c810a and 53c875 NVRAM
1004*4882a593Smuzhiyun(Removable Media added Symbios BIOS version 4.09)
1005*4882a593Smuzhiyun
1006*4882a593Smuzhiyunboot configuration
1007*4882a593Smuzhiyun
1008*4882a593Smuzhiyunboot order set by order of the devices in this table::
1009*4882a593Smuzhiyun
1010*4882a593Smuzhiyun    04 00 0f 00 00 10 00 50 00 00 01 00 00 62 -- 1st controller
1011*4882a593Smuzhiyun    04 00 03 00 00 10 00 58 00 00 01 00 00 63    2nd controller
1012*4882a593Smuzhiyun    04 00 01 00 00 10 00 48 00 00 01 00 00 61    3rd controller
1013*4882a593Smuzhiyun    00 00 00 00 00 00 00 00 00 00 00 00 00 00    4th controller
1014*4882a593Smuzhiyun	|  |  |  |     |        |     |  |
1015*4882a593Smuzhiyun	|  |  |  |     |        |      ---- PCI io port adr
1016*4882a593Smuzhiyun	|  |  |  |     |         --0x01 init/scan at boot time
1017*4882a593Smuzhiyun	|  |  |  |      --PCI device/function number (0xdddddfff)
1018*4882a593Smuzhiyun	|  |   ----- ?? PCI vendor ID (lsb/msb)
1019*4882a593Smuzhiyun	    ----PCI device ID (lsb/msb)
1020*4882a593Smuzhiyun
1021*4882a593Smuzhiyun?? use of this data is a guess but seems reasonable
1022*4882a593Smuzhiyun
1023*4882a593Smuzhiyunremaining bytes unknown - they do not appear to change in my
1024*4882a593Smuzhiyuncurrent set up
1025*4882a593Smuzhiyun
1026*4882a593Smuzhiyundefault set up is identical for 53c810a and 53c875 NVRAM
1027*4882a593Smuzhiyun
1028*4882a593Smuzhiyundevice set up (up to 16 devices - includes controller)::
1029*4882a593Smuzhiyun
1030*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00 - id 0
1031*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1032*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1033*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1034*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1035*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1036*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1037*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1038*4882a593Smuzhiyun
1039*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1040*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1041*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1042*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1043*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1044*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1045*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00
1046*4882a593Smuzhiyun    0f 00 08 08 64 00 0a 00 - id 15
1047*4882a593Smuzhiyun    |     |  |  |     |  |
1048*4882a593Smuzhiyun    |     |  |  |      ----timeout (lsb/msb)
1049*4882a593Smuzhiyun    |     |  |   --synch period (0x?? 40 Mtrans/sec- fast 40) (probably 0x28)
1050*4882a593Smuzhiyun    |     |  |                  (0x30 20 Mtrans/sec- fast 20)
1051*4882a593Smuzhiyun    |     |  |                  (0x64 10 Mtrans/sec- fast )
1052*4882a593Smuzhiyun    |     |  |                  (0xc8  5 Mtrans/sec)
1053*4882a593Smuzhiyun    |     |  |                  (0x00  asynchronous)
1054*4882a593Smuzhiyun    |     |   -- ?? max sync offset (0x08 in NVRAM on 53c810a)
1055*4882a593Smuzhiyun    |     |                         (0x10 in NVRAM on 53c875)
1056*4882a593Smuzhiyun    |      --device bus width (0x08 narrow)
1057*4882a593Smuzhiyun    |                         (0x10 16 bit wide)
1058*4882a593Smuzhiyun    --flag bits
1059*4882a593Smuzhiyun	0x00000001 - disconnect enabled
1060*4882a593Smuzhiyun	0x00000010 - scan at boot time
1061*4882a593Smuzhiyun	0x00000100 - scan luns
1062*4882a593Smuzhiyun	0x00001000 - queue tags enabled
1063*4882a593Smuzhiyun
1064*4882a593Smuzhiyunremaining bytes unknown - they do not appear to change in my
1065*4882a593Smuzhiyuncurrent set up
1066*4882a593Smuzhiyun
1067*4882a593Smuzhiyun?? use of this data is a guess but seems reasonable
1068*4882a593Smuzhiyun(but it could be max bus width)
1069*4882a593Smuzhiyun
1070*4882a593Smuzhiyundefault set up for 53c810a NVRAM
1071*4882a593Smuzhiyundefault set up for 53c875 NVRAM
1072*4882a593Smuzhiyun
1073*4882a593Smuzhiyun				- bus width     - 0x10
1074*4882a593Smuzhiyun                                - sync offset ? - 0x10
1075*4882a593Smuzhiyun                                - sync period   - 0x30
1076*4882a593Smuzhiyun
1077*4882a593Smuzhiyun?? spare device space (32 bit bus ??)::
1078*4882a593Smuzhiyun
1079*4882a593Smuzhiyun    00 00 00 00 00 00 00 00  (19x8bytes)
1080*4882a593Smuzhiyun    .
1081*4882a593Smuzhiyun    .
1082*4882a593Smuzhiyun    00 00 00 00 00 00 00 00
1083*4882a593Smuzhiyun
1084*4882a593Smuzhiyundefault set up is identical for 53c810a and 53c875 NVRAM
1085*4882a593Smuzhiyun
1086*4882a593Smuzhiyuntrailer::
1087*4882a593Smuzhiyun
1088*4882a593Smuzhiyun    fe fe   - ? end marker ?
1089*4882a593Smuzhiyun    00 00
1090*4882a593Smuzhiyun    00 00
1091*4882a593Smuzhiyun
1092*4882a593Smuzhiyundefault set up is identical for 53c810a and 53c875 NVRAM
1093*4882a593Smuzhiyun
1094*4882a593Smuzhiyun17.3 Tekram NVRAM layout
1095*4882a593Smuzhiyun------------------------
1096*4882a593Smuzhiyun
1097*4882a593Smuzhiyunnvram 64x16 (1024 bit)
1098*4882a593Smuzhiyun
1099*4882a593SmuzhiyunDrive settings::
1100*4882a593Smuzhiyun
1101*4882a593Smuzhiyun    Drive ID 0-15 (addr 0x0yyyy0 = device setup, yyyy = ID)
1102*4882a593Smuzhiyun		(addr 0x0yyyy1 = 0x0000)
1103*4882a593Smuzhiyun
1104*4882a593Smuzhiyun	x x x x  x x x x  x x x x  x x x x
1105*4882a593Smuzhiyun		| | |      | |  | | | |
1106*4882a593Smuzhiyun		| | |      | |  | | |  ----- parity check   0 - off
1107*4882a593Smuzhiyun		| | |      | |  | | |                       1 - on
1108*4882a593Smuzhiyun		| | |      | |  | | |
1109*4882a593Smuzhiyun		| | |      | |  | |  ------- sync neg       0 - off
1110*4882a593Smuzhiyun		| | |      | |  | |                         1 - on
1111*4882a593Smuzhiyun		| | |      | |  | |
1112*4882a593Smuzhiyun		| | |      | |  |  --------- disconnect     0 - off
1113*4882a593Smuzhiyun		| | |      | |  |                           1 - on
1114*4882a593Smuzhiyun		| | |      | |  |
1115*4882a593Smuzhiyun		| | |      | |   ----------- start cmd      0 - off
1116*4882a593Smuzhiyun		| | |      | |                              1 - on
1117*4882a593Smuzhiyun		| | |      | |
1118*4882a593Smuzhiyun		| | |      |  -------------- tagged cmds    0 - off
1119*4882a593Smuzhiyun		| | |      |                                1 - on
1120*4882a593Smuzhiyun		| | |      |
1121*4882a593Smuzhiyun		| | |       ---------------- wide neg       0 - off
1122*4882a593Smuzhiyun		| | |                                       1 - on
1123*4882a593Smuzhiyun		| | |
1124*4882a593Smuzhiyun		    --------------------------- sync rate      0 - 10.0 Mtrans/sec
1125*4882a593Smuzhiyun							    1 -  8.0
1126*4882a593Smuzhiyun							    2 -  6.6
1127*4882a593Smuzhiyun							    3 -  5.7
1128*4882a593Smuzhiyun							    4 -  5.0
1129*4882a593Smuzhiyun							    5 -  4.0
1130*4882a593Smuzhiyun							    6 -  3.0
1131*4882a593Smuzhiyun							    7 -  2.0
1132*4882a593Smuzhiyun							    7 -  2.0
1133*4882a593Smuzhiyun							    8 - 20.0
1134*4882a593Smuzhiyun							    9 - 16.7
1135*4882a593Smuzhiyun							    a - 13.9
1136*4882a593Smuzhiyun							    b - 11.9
1137*4882a593Smuzhiyun
1138*4882a593SmuzhiyunGlobal settings
1139*4882a593Smuzhiyun
1140*4882a593SmuzhiyunHost flags 0 (addr 0x100000, 32)::
1141*4882a593Smuzhiyun
1142*4882a593Smuzhiyun    x x x x  x x x x  x x x x  x x x x
1143*4882a593Smuzhiyun    | | | |  | | | |           | | | |
1144*4882a593Smuzhiyun    | | | |  | | | |            ----------- host ID    0x00 - 0x0f
1145*4882a593Smuzhiyun    | | | |  | | | |
1146*4882a593Smuzhiyun    | | | |  | | |  ----------------------- support for    0 - off
1147*4882a593Smuzhiyun    | | | |  | | |                          > 2 drives     1 - on
1148*4882a593Smuzhiyun    | | | |  | | |
1149*4882a593Smuzhiyun    | | | |  | |  ------------------------- support drives 0 - off
1150*4882a593Smuzhiyun    | | | |  | |                            > 1Gbytes      1 - on
1151*4882a593Smuzhiyun    | | | |  | |
1152*4882a593Smuzhiyun    | | | |  |  --------------------------- bus reset on   0 - off
1153*4882a593Smuzhiyun    | | | |  |                                power on     1 - on
1154*4882a593Smuzhiyun    | | | |  |
1155*4882a593Smuzhiyun    | | | |   ----------------------------- active neg     0 - off
1156*4882a593Smuzhiyun    | | | |                                                1 - on
1157*4882a593Smuzhiyun    | | | |
1158*4882a593Smuzhiyun    | | |  -------------------------------- imm seek       0 - off
1159*4882a593Smuzhiyun    | | |                                                  1 - on
1160*4882a593Smuzhiyun    | | |
1161*4882a593Smuzhiyun    | |  ---------------------------------- scan luns      0 - off
1162*4882a593Smuzhiyun    | |                                                    1 - on
1163*4882a593Smuzhiyun    | |
1164*4882a593Smuzhiyun     -------------------------------------- removable      0 - disable
1165*4882a593Smuzhiyun                                            as BIOS dev    1 - boot device
1166*4882a593Smuzhiyun                                                           2 - all
1167*4882a593Smuzhiyun
1168*4882a593SmuzhiyunHost flags 1 (addr 0x100001, 33)::
1169*4882a593Smuzhiyun
1170*4882a593Smuzhiyun    x x x x  x x x x  x x x x  x x x x
1171*4882a593Smuzhiyun               | | |             | | |
1172*4882a593Smuzhiyun               | | |              --------- boot delay     0 -   3 sec
1173*4882a593Smuzhiyun               | | |                                       1 -   5
1174*4882a593Smuzhiyun               | | |                                       2 -  10
1175*4882a593Smuzhiyun               | | |                                       3 -  20
1176*4882a593Smuzhiyun               | | |                                       4 -  30
1177*4882a593Smuzhiyun               | | |                                       5 -  60
1178*4882a593Smuzhiyun               | | |                                       6 - 120
1179*4882a593Smuzhiyun               | | |
1180*4882a593Smuzhiyun                --------------------------- max tag cmds   0 -  2
1181*4882a593Smuzhiyun                                                           1 -  4
1182*4882a593Smuzhiyun                                                           2 -  8
1183*4882a593Smuzhiyun                                                           3 - 16
1184*4882a593Smuzhiyun                                                           4 - 32
1185*4882a593Smuzhiyun
1186*4882a593SmuzhiyunHost flags 2 (addr 0x100010, 34)::
1187*4882a593Smuzhiyun
1188*4882a593Smuzhiyun    x x x x  x x x x  x x x x  x x x x
1189*4882a593Smuzhiyun                                     |
1190*4882a593Smuzhiyun                                      ----- F2/F6 enable   0 - off ???
1191*4882a593Smuzhiyun                                                           1 - on  ???
1192*4882a593Smuzhiyun
1193*4882a593Smuzhiyunchecksum (addr 0x111111)
1194*4882a593Smuzhiyun
1195*4882a593Smuzhiyunchecksum = 0x1234 - (sum addr 0-63)
1196*4882a593Smuzhiyun
1197*4882a593Smuzhiyun----------------------------------------------------------------------------
1198*4882a593Smuzhiyun
1199*4882a593Smuzhiyundefault nvram data::
1200*4882a593Smuzhiyun
1201*4882a593Smuzhiyun    0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1202*4882a593Smuzhiyun    0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1203*4882a593Smuzhiyun    0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1204*4882a593Smuzhiyun    0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1205*4882a593Smuzhiyun
1206*4882a593Smuzhiyun    0x0f07 0x0400 0x0001 0x0000 0x0000 0x0000 0x0000 0x0000
1207*4882a593Smuzhiyun    0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
1208*4882a593Smuzhiyun    0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
1209*4882a593Smuzhiyun    0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0xfbbc
1210