blob: d28186553fb05e834a52ba5a23ea7530b1465d6e [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001The 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
Matt LaPlante53cb4722006-10-03 22:55:17 +020070The history of this driver can be summarized as follows:
Linus Torvalds1da177e2005-04-16 15:20:36 -070071
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).
Matt LaPlante19f59462009-04-27 15:06:31 +0200209Some known old SCSI devices do not properly support tagged command queuing.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700210Generally, 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
Sylvestre Ledruf65e51d2011-04-04 15:04:46 -0700288This driver does not provide profiling information as did its predecessors.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700289This 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
Mauro Carvalho Chehab8c27ceff32016-10-18 10:12:27 -0200430parameters to modprobe, as described in Documentation/admin-guide/kernel-parameters.rst
Linus Torvalds1da177e2005-04-16 15:20:36 -0700431
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
Matthew Wilcoxa44131b2007-10-05 15:55:08 -040045210.2.2 Burst max
Linus Torvalds1da177e2005-04-16 15:20:36 -0700453 burst=0 burst disabled
454 burst=255 get burst length from initial IO register settings.
455 burst=#x burst enabled (1<<#x burst transfers max)
456 #x is an integer value which is log base 2 of the burst transfers max.
457 By default the driver uses the maximum value supported by the chip.
458
Matthew Wilcoxa44131b2007-10-05 15:55:08 -040045910.2.3 LED support
Linus Torvalds1da177e2005-04-16 15:20:36 -0700460 led=1 enable LED support
461 led=0 disable LED support
462 Do not enable LED support if your scsi board does not use SDMS BIOS.
463 (See 'Configuration parameters')
464
46510.2.4 Differential mode
466 diff=0 never set up diff mode
467 diff=1 set up diff mode if BIOS set it
468 diff=2 always set up diff mode
469 diff=3 set diff mode if GPIO3 is not set
470
47110.2.5 IRQ mode
472 irqm=0 always open drain
473 irqm=1 same as initial settings (assumed BIOS settings)
474 irqm=2 always totem pole
475
47610.2.6 Check SCSI BUS
477 buschk=<option bits>
478
479 Available option bits:
480 0x0: No check.
481 0x1: Check and do not attach the controller on error.
482 0x2: Check and just warn on error.
483
48410.2.7 Suggest a default SCSI id for hosts
485 hostid=255 no id suggested.
486 hostid=#x (0 < x < 7) x suggested for hosts SCSI id.
487
488 If a host SCSI id is available from the NVRAM, the driver will ignore
489 any value suggested as boot option. Otherwise, if a suggested value
490 different from 255 has been supplied, it will use it. Otherwise, it will
491 try to deduce the value previously set in the hardware and use value
492 7 if the hardware value is zero.
493
49410.2.8 Verbosity level
495 verb=0 minimal
496 verb=1 normal
497 verb=2 too much
498
49910.2.9 Debug mode
500 debug=0 clear debug flags
501 debug=#x set debug flags
502 #x is an integer value combining the following power-of-2 values:
503 DEBUG_ALLOC 0x1
504 DEBUG_PHASE 0x2
505 DEBUG_POLL 0x4
506 DEBUG_QUEUE 0x8
507 DEBUG_RESULT 0x10
508 DEBUG_SCATTER 0x20
509 DEBUG_SCRIPT 0x40
510 DEBUG_TINY 0x80
511 DEBUG_TIMING 0x100
512 DEBUG_NEGO 0x200
513 DEBUG_TAGS 0x400
514 DEBUG_FREEZE 0x800
515 DEBUG_RESTART 0x1000
516
517 You can play safely with DEBUG_NEGO. However, some of these flags may
518 generate bunches of syslog messages.
519
52010.2.10 Settle delay
521 settle=n delay for n seconds
522
523 After a bus reset, the driver will delay for n seconds before talking
524 to any device on the bus. The default is 3 seconds and safe mode will
525 default it to 10.
526
52710.2.11 Serial NVRAM
528 NB: option not currently implemented.
529 nvram=n do not look for serial NVRAM
530 nvram=y test controllers for onboard serial NVRAM
531 (alternate binary form)
532 nvram=<bits options>
533 0x01 look for NVRAM (equivalent to nvram=y)
534 0x02 ignore NVRAM "Synchronous negotiation" parameters for all devices
535 0x04 ignore NVRAM "Wide negotiation" parameter for all devices
536 0x08 ignore NVRAM "Scan at boot time" parameter for all devices
537 0x80 also attach controllers set to OFF in the NVRAM (sym53c8xx only)
538
53910.2.12 Exclude a host from being attached
540 excl=<io_address>,...
541
542 Prevent host at a given io address from being attached.
543 For example 'excl=0xb400,0xc000' indicate to the
544 driver not to attach hosts at address 0xb400 and 0xc000.
545
54610.3 Converting from old style options
547
548Previously, the sym2 driver accepted arguments of the form
549 sym53c8xx=tags:4,sync:10,debug:0x200
550
551As a result of the new module parameters, this is no longer available.
Matthew Wilcoxa44131b2007-10-05 15:55:08 -0400552Most of the options have remained the same, but tags has become
553cmd_per_lun to reflect its different purposes. The sample above would
554be specified as:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700555 modprobe sym53c8xx cmd_per_lun=4 sync=10 debug=0x200
556
557or on the kernel boot line as:
558 sym53c8xx.cmd_per_lun=4 sym53c8xx.sync=10 sym53c8xx.debug=0x200
559
56010.4 SCSI BUS checking boot option.
561
562When this option is set to a non-zero value, the driver checks SCSI lines
563logic state, 100 micro-seconds after having asserted the SCSI RESET line.
564The driver just reads SCSI lines and checks all lines read FALSE except RESET.
565Since SCSI devices shall release the BUS at most 800 nano-seconds after SCSI
566RESET has been asserted, any signal to TRUE may indicate a SCSI BUS problem.
567Unfortunately, the following common SCSI BUS problems are not detected:
568- Only 1 terminator installed.
569- Misplaced terminators.
570- Bad quality terminators.
571On the other hand, either bad cabling, broken devices, not conformant
572devices, ... may cause a SCSI signal to be wrong when te driver reads it.
573
57415. SCSI problem troubleshooting
575
57615.1 Problem tracking
577
578Most SCSI problems are due to a non conformant SCSI bus or too buggy
Matt LaPlantea982ac02007-05-09 07:35:06 +0200579devices. If unfortunately you have SCSI problems, you can check the
Linus Torvalds1da177e2005-04-16 15:20:36 -0700580following things:
581
582- SCSI bus cables
583- terminations at both end of the SCSI chain
584- linux syslog messages (some of them may help you)
585
586If you do not find the source of problems, you can configure the
587driver or devices in the NVRAM with minimal features.
588
589- only asynchronous data transfers
590- tagged commands disabled
591- disconnections not allowed
592
593Now, if your SCSI bus is ok, your system has every chance to work
594with this safe configuration but performances will not be optimal.
595
596If it still fails, then you can send your problem description to
597appropriate mailing lists or news-groups. Send me a copy in order to
598be sure I will receive it. Obviously, a bug in the driver code is
599possible.
600
Matt LaPlante5d3f0832006-11-30 05:21:10 +0100601 My current email address: Gerard Roudier <groudier@free.fr>
Linus Torvalds1da177e2005-04-16 15:20:36 -0700602
603Allowing disconnections is important if you use several devices on
604your SCSI bus but often causes problems with buggy devices.
605Synchronous data transfers increases throughput of fast devices like
606hard disks. Good SCSI hard disks with a large cache gain advantage of
607tagged commands queuing.
608
60915.2 Understanding hardware error reports
610
611When the driver detects an unexpected error condition, it may display a
612message of the following pattern.
613
614sym0:1: ERROR (0:48) (1-21-65) (f/95/0) @ (script 7c0:19000000).
615sym0: script cmd = 19000000
616sym0: regdump: da 10 80 95 47 0f 01 07 75 01 81 21 80 01 09 00.
617
618Some fields in such a message may help you understand the cause of the
619problem, as follows:
620
621sym0:1: ERROR (0:48) (1-21-65) (f/95/0) @ (script 7c0:19000000).
622.....A.........B.C....D.E..F....G.H..I.......J.....K...L.......
623
624Field A : target number.
625 SCSI ID of the device the controller was talking with at the moment the
626 error occurs.
627
628Field B : DSTAT io register (DMA STATUS)
629 Bit 0x40 : MDPE Master Data Parity Error
630 Data parity error detected on the PCI BUS.
631 Bit 0x20 : BF Bus Fault
632 PCI bus fault condition detected
633 Bit 0x01 : IID Illegal Instruction Detected
634 Set by the chip when it detects an Illegal Instruction format
635 on some condition that makes an instruction illegal.
636 Bit 0x80 : DFE Dma Fifo Empty
637 Pure status bit that does not indicate an error.
638 If the reported DSTAT value contains a combination of MDPE (0x40),
639 BF (0x20), then the cause may be likely due to a PCI BUS problem.
640
641Field C : SIST io register (SCSI Interrupt Status)
642 Bit 0x08 : SGE SCSI GROSS ERROR
643 Indicates that the chip detected a severe error condition
644 on the SCSI BUS that prevents the SCSI protocol from functioning
645 properly.
646 Bit 0x04 : UDC Unexpected Disconnection
647 Indicates that the device released the SCSI BUS when the chip
648 was not expecting this to happen. A device may behave so to
649 indicate the SCSI initiator that an error condition not reportable using the SCSI protocol has occurred.
650 Bit 0x02 : RST SCSI BUS Reset
651 Generally SCSI targets do not reset the SCSI BUS, although any
652 device on the BUS can reset it at any time.
653 Bit 0x01 : PAR Parity
654 SCSI parity error detected.
655 On a faulty SCSI BUS, any error condition among SGE (0x08), UDC (0x04) and
656 PAR (0x01) may be detected by the chip. If your SCSI system sometimes
657 encounters such error conditions, especially SCSI GROSS ERROR, then a SCSI
658 BUS problem is likely the cause of these errors.
659
660For fields D,E,F,G and H, you may look into the sym53c8xx_defs.h file
661that contains some minimal comments on IO register bits.
662Field D : SOCL Scsi Output Control Latch
663 This register reflects the state of the SCSI control lines the
664 chip want to drive or compare against.
665Field E : SBCL Scsi Bus Control Lines
666 Actual value of control lines on the SCSI BUS.
667Field F : SBDL Scsi Bus Data Lines
668 Actual value of data lines on the SCSI BUS.
669Field G : SXFER SCSI Transfer
670 Contains the setting of the Synchronous Period for output and
671 the current Synchronous offset (offset 0 means asynchronous).
672Field H : SCNTL3 Scsi Control Register 3
673 Contains the setting of timing values for both asynchronous and
674 synchronous data transfers.
675Field I : SCNTL4 Scsi Control Register 4
Matt LaPlante2fe0ae72006-10-03 22:50:39 +0200676 Only meaningful for 53C1010 Ultra3 controllers.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700677
678Understanding Fields J, K, L and dumps requires to have good knowledge of
679SCSI standards, chip cores functionnals and internal driver data structures.
680You are not required to decode and understand them, unless you want to help
681maintain the driver code.
682
68317. Serial NVRAM (added by Richard Waltham: dormouse@farsrobt.demon.co.uk)
684
68517.1 Features
686
687Enabling serial NVRAM support enables detection of the serial NVRAM included
688on Symbios and some Symbios compatible host adaptors, and Tekram boards. The
689serial NVRAM is used by Symbios and Tekram to hold set up parameters for the
Francis Galieguea33f3222010-04-23 00:08:02 +0200690host adaptor and its attached drives.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700691
692The Symbios NVRAM also holds data on the boot order of host adaptors in a
693system with more than one host adaptor. This information is no longer used
694as it's fundamentally incompatible with the hotplug PCI model.
695
696Tekram boards using Symbios chips, DC390W/F/U, which have NVRAM are detected
697and this is used to distinguish between Symbios compatible and Tekram host
698adaptors. This is used to disable the Symbios compatible "diff" setting
699incorrectly set on Tekram boards if the CONFIG_SCSI_53C8XX_SYMBIOS_COMPAT
700configuration parameter is set enabling both Symbios and Tekram boards to be
701used together with the Symbios cards using all their features, including
702"diff" support. ("led pin" support for Symbios compatible cards can remain
703enabled when using Tekram cards. It does nothing useful for Tekram host
704adaptors but does not cause problems either.)
705
706The parameters the driver is able to get from the NVRAM depend on the
707data format used, as follow:
708
709 Tekram format Symbios format
710General and host parameters
711 Boot order N Y
712 Host SCSI ID Y Y
713 SCSI parity checking Y Y
714 Verbose boot messages N Y
715SCSI devices parameters
716 Synchronous transfer speed Y Y
717 Wide 16 / Narrow Y Y
718 Tagged Command Queuing enabled Y Y
719 Disconnections enabled Y Y
720 Scan at boot time N Y
721
722In order to speed up the system boot, for each device configured without
723the "scan at boot time" option, the driver forces an error on the
724first TEST UNIT READY command received for this device.
725
726
72717.2 Symbios NVRAM layout
728
729typical data at NVRAM address 0x100 (53c810a NVRAM)
730-----------------------------------------------------------
73100 00
73264 01
7338e 0b
734
73500 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
736
73704 00 0f 00 00 10 00 50 00 00 01 00 00 62
73804 00 03 00 00 10 00 58 00 00 01 00 00 63
73904 00 01 00 00 10 00 48 00 00 01 00 00 61
74000 00 00 00 00 00 00 00 00 00 00 00 00 00
741
7420f 00 08 08 64 00 0a 00
7430f 00 08 08 64 00 0a 00
7440f 00 08 08 64 00 0a 00
7450f 00 08 08 64 00 0a 00
7460f 00 08 08 64 00 0a 00
7470f 00 08 08 64 00 0a 00
7480f 00 08 08 64 00 0a 00
7490f 00 08 08 64 00 0a 00
750
7510f 00 08 08 64 00 0a 00
7520f 00 08 08 64 00 0a 00
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
759
76000 00 00 00 00 00 00 00
76100 00 00 00 00 00 00 00
76200 00 00 00 00 00 00 00
76300 00 00 00 00 00 00 00
76400 00 00 00 00 00 00 00
76500 00 00 00 00 00 00 00
76600 00 00 00 00 00 00 00
76700 00 00 00 00 00 00 00
768
76900 00 00 00 00 00 00 00
77000 00 00 00 00 00 00 00
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
777
77800 00 00 00 00 00 00 00
77900 00 00 00 00 00 00 00
78000 00 00 00 00 00 00 00
781
782fe fe
78300 00
78400 00
785-----------------------------------------------------------
786NVRAM layout details
787
788NVRAM Address 0x000-0x0ff not used
789 0x100-0x26f initialised data
790 0x270-0x7ff not used
791
792general layout
793
794 header - 6 bytes,
795 data - 356 bytes (checksum is byte sum of this data)
796 trailer - 6 bytes
797 ---
798 total 368 bytes
799
800data area layout
801
802 controller set up - 20 bytes
803 boot configuration - 56 bytes (4x14 bytes)
804 device set up - 128 bytes (16x8 bytes)
805 unused (spare?) - 152 bytes (19x8 bytes)
806 ---
807 total 356 bytes
808
809-----------------------------------------------------------
810header
811
81200 00 - ?? start marker
81364 01 - byte count (lsb/msb excludes header/trailer)
8148e 0b - checksum (lsb/msb excludes header/trailer)
815-----------------------------------------------------------
816controller set up
817
81800 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
819 | | | |
820 | | | -- host ID
821 | | |
822 | | --Removable Media Support
823 | | 0x00 = none
824 | | 0x01 = Bootable Device
825 | | 0x02 = All with Media
826 | |
827 | --flag bits 2
828 | 0x00000001= scan order hi->low
829 | (default 0x00 - scan low->hi)
830 --flag bits 1
831 0x00000001 scam enable
832 0x00000010 parity enable
833 0x00000100 verbose boot msgs
834
835remaining bytes unknown - they do not appear to change in my
836current set up for any of the controllers.
837
838default set up is identical for 53c810a and 53c875 NVRAM
839(Removable Media added Symbios BIOS version 4.09)
840-----------------------------------------------------------
841boot configuration
842
843boot order set by order of the devices in this table
844
84504 00 0f 00 00 10 00 50 00 00 01 00 00 62 -- 1st controller
84604 00 03 00 00 10 00 58 00 00 01 00 00 63 2nd controller
84704 00 01 00 00 10 00 48 00 00 01 00 00 61 3rd controller
84800 00 00 00 00 00 00 00 00 00 00 00 00 00 4th controller
849 | | | | | | | |
850 | | | | | | ---- PCI io port adr
851 | | | | | --0x01 init/scan at boot time
852 | | | | --PCI device/function number (0xdddddfff)
853 | | ----- ?? PCI vendor ID (lsb/msb)
854 ----PCI device ID (lsb/msb)
855
856?? use of this data is a guess but seems reasonable
857
858remaining bytes unknown - they do not appear to change in my
859current set up
860
861default set up is identical for 53c810a and 53c875 NVRAM
862-----------------------------------------------------------
863device set up (up to 16 devices - includes controller)
864
8650f 00 08 08 64 00 0a 00 - id 0
8660f 00 08 08 64 00 0a 00
8670f 00 08 08 64 00 0a 00
8680f 00 08 08 64 00 0a 00
8690f 00 08 08 64 00 0a 00
8700f 00 08 08 64 00 0a 00
8710f 00 08 08 64 00 0a 00
8720f 00 08 08 64 00 0a 00
873
8740f 00 08 08 64 00 0a 00
8750f 00 08 08 64 00 0a 00
8760f 00 08 08 64 00 0a 00
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 - id 15
882 | | | | | |
883 | | | | ----timeout (lsb/msb)
884 | | | --synch period (0x?? 40 Mtrans/sec- fast 40) (probably 0x28)
885 | | | (0x30 20 Mtrans/sec- fast 20)
886 | | | (0x64 10 Mtrans/sec- fast )
887 | | | (0xc8 5 Mtrans/sec)
888 | | | (0x00 asynchronous)
889 | | -- ?? max sync offset (0x08 in NVRAM on 53c810a)
890 | | (0x10 in NVRAM on 53c875)
891 | --device bus width (0x08 narrow)
892 | (0x10 16 bit wide)
893 --flag bits
894 0x00000001 - disconnect enabled
895 0x00000010 - scan at boot time
896 0x00000100 - scan luns
897 0x00001000 - queue tags enabled
898
899remaining bytes unknown - they do not appear to change in my
900current set up
901
902?? use of this data is a guess but seems reasonable
903(but it could be max bus width)
904
905default set up for 53c810a NVRAM
906default set up for 53c875 NVRAM - bus width - 0x10
907 - sync offset ? - 0x10
908 - sync period - 0x30
909-----------------------------------------------------------
910?? spare device space (32 bit bus ??)
911
91200 00 00 00 00 00 00 00 (19x8bytes)
913.
914.
91500 00 00 00 00 00 00 00
916
917default set up is identical for 53c810a and 53c875 NVRAM
918-----------------------------------------------------------
919trailer
920
921fe fe - ? end marker ?
92200 00
92300 00
924
925default set up is identical for 53c810a and 53c875 NVRAM
926-----------------------------------------------------------
927
928
929
93017.3 Tekram NVRAM layout
931
932nvram 64x16 (1024 bit)
933
934Drive settings
935
936Drive ID 0-15 (addr 0x0yyyy0 = device setup, yyyy = ID)
937 (addr 0x0yyyy1 = 0x0000)
938
939 x x x x x x x x x x x x x x x x
940 | | | | | | | | |
941 | | | | | | | | ----- parity check 0 - off
942 | | | | | | | | 1 - on
943 | | | | | | | |
944 | | | | | | | ------- sync neg 0 - off
945 | | | | | | | 1 - on
946 | | | | | | |
947 | | | | | | --------- disconnect 0 - off
948 | | | | | | 1 - on
949 | | | | | |
950 | | | | | ----------- start cmd 0 - off
951 | | | | | 1 - on
952 | | | | |
953 | | | | -------------- tagged cmds 0 - off
954 | | | | 1 - on
955 | | | |
956 | | | ---------------- wide neg 0 - off
957 | | | 1 - on
958 | | |
959 --------------------------- sync rate 0 - 10.0 Mtrans/sec
960 1 - 8.0
961 2 - 6.6
962 3 - 5.7
963 4 - 5.0
964 5 - 4.0
965 6 - 3.0
966 7 - 2.0
967 7 - 2.0
968 8 - 20.0
969 9 - 16.7
970 a - 13.9
971 b - 11.9
972
973Global settings
974
975Host flags 0 (addr 0x100000, 32)
976
977 x x x x x x x x x x x x x x x x
978 | | | | | | | | | | | |
979 | | | | | | | | ----------- host ID 0x00 - 0x0f
980 | | | | | | | |
981 | | | | | | | ----------------------- support for 0 - off
982 | | | | | | | > 2 drives 1 - on
983 | | | | | | |
984 | | | | | | ------------------------- support drives 0 - off
985 | | | | | | > 1Gbytes 1 - on
986 | | | | | |
987 | | | | | --------------------------- bus reset on 0 - off
988 | | | | | power on 1 - on
989 | | | | |
990 | | | | ----------------------------- active neg 0 - off
991 | | | | 1 - on
992 | | | |
993 | | | -------------------------------- imm seek 0 - off
994 | | | 1 - on
995 | | |
996 | | ---------------------------------- scan luns 0 - off
997 | | 1 - on
998 | |
999 -------------------------------------- removable 0 - disable
1000 as BIOS dev 1 - boot device
1001 2 - all
1002
1003Host flags 1 (addr 0x100001, 33)
1004
1005 x x x x x x x x x x x x x x x x
1006 | | | | | |
1007 | | | --------- boot delay 0 - 3 sec
1008 | | | 1 - 5
1009 | | | 2 - 10
1010 | | | 3 - 20
1011 | | | 4 - 30
1012 | | | 5 - 60
1013 | | | 6 - 120
1014 | | |
1015 --------------------------- max tag cmds 0 - 2
1016 1 - 4
1017 2 - 8
1018 3 - 16
1019 4 - 32
1020
1021Host flags 2 (addr 0x100010, 34)
1022
1023 x x x x x x x x x x x x x x x x
1024 |
1025 ----- F2/F6 enable 0 - off ???
1026 1 - on ???
1027
1028checksum (addr 0x111111)
1029
1030checksum = 0x1234 - (sum addr 0-63)
1031
1032----------------------------------------------------------------------------
1033
1034default nvram data:
1035
10360x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
10370x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
10380x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
10390x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1040
10410x0f07 0x0400 0x0001 0x0000 0x0000 0x0000 0x0000 0x0000
10420x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
10430x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
10440x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0xfbbc
1045
1046
1047===============================================================================
1048End of Linux SYM-2 driver documentation file