OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [drivers/] [scsi/] [README.ncr53c8xx] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1626 jcastillo
The Linux NCR53C8XX driver README file
2
 
3
Written by Gerard Roudier 
4
21 Rue Carnot
5
95170 DEUIL LA BARRE - FRANCE
6
 
7
13 December 1998
8
===============================================================================
9
 
10
1.  Introduction
11
2.  Supported chips and SCSI features
12
3.  Summary of other supported features
13
4.  Memory mapped I/O versus normal I/O
14
5.  Tagged command queueing
15
6.  Parity checking
16
7.  Profiling information
17
8.  Control commands
18
      8.1  Set minimum synchronous period
19
      8.2  Set wide size
20
      8.3  Set maximum number of concurrent tagged commands
21
      8.4  Set order type for tagged command
22
      8.5  Set debug mode
23
      8.6  Clear profile counters
24
      8.7  Set flag (no_disc)
25
      8.8  Set verbose level
26
9.  Configuration parameters
27
10. Boot setup commands
28
      10.1 Syntax
29
      10.2 Available arguments
30
      10.3 Advised boot setup commands
31
      10.4 PCI configuration fix-up boot option
32
      10.5 Serial NVRAM support boot option
33
      10.6 SCSI BUS checking boot option
34
11. Some constants and flags of the ncr53c8xx.h header file
35
12. Installation
36
13. Architecture dependant features
37
14. Known problems
38
      14.1 Tagged commands with Iomega Jaz device
39
      14.2 Device names change when another controller is added
40
      14.3 Using only 8 bit devices with a WIDE SCSI controller.
41
      14.4 Possible data corruption during a Memory Write and Invalidate
42
15. SCSI problem troubleshooting
43
16. Synchonous transfer negotiation tables
44
      16.1 Synchronous timings for 53C875 and 53C860 Ultra-SCSI controllers
45
      16.2 Synchronous timings for fast SCSI-2 53C8XX controllers
46
17. Serial NVRAM support (by Richard Waltham)
47
      17.1 Features
48
      17.2 Symbios NVRAM layout
49
      17.3 Tekram  NVRAM layout
50
18. Support for Big Endian
51
      18.1 Big Endian CPU
52
      18.2 NCR chip in Big Endian mode of operations
53
 
54
===============================================================================
55
 
56
1. Introduction
57
 
58
This driver has been ported from FreeBSD to Linux and is currently
59
maintained by:
60
          Gerard Roudier              
61
 
62
The original driver has been written for 386bsd and FreeBSD by:
63
          Wolfgang Stanglmeier        
64
          Stefan Esser                
65
 
66
You can find technical information about the NCR 8xx family in the
67
PCI-HOWTO written by Michael Will and in the SCSI-HOWTO written by
68
Drew Eckhardt.
69
 
70
Information about new chips is available at SYMBIOS web server:
71
 
72
          http://www.symbios.com/
73
 
74
SCSI standard documentations are available at SYMBIOS ftp server:
75
 
76
          ftp://ftp.symbios.com/
77
 
78
Usefull SCSI tools written by Eric Youngdale are available at tsx-11:
79
 
80
          ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsiinfo-X.Y.tar.gz
81
          ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsidev-X.Y.tar.gz
82
 
83
These tools are not ALPHA but quite clean and work quite well.
84
It is essential you have the 'scsiinfo' package.
85
 
86
This short documentation only describes the features of the NCR53C8XX
87
driver, configuration parameters and control commands available
88
through the proc SCSI file system read / write operations.
89
 
90
This driver has been tested OK with linux/i386, Linux/Alpha and Linux/PPC.
91
 
92
Latest driver version and patches are available at:
93
 
94
          ftp://ftp.tux.org/pub/people/gerard-roudier
95
 
96
I am not a native speaker of English and there are probably lots of
97
mistakes in this README file. Any help will be welcome.
98
 
99
 
100
2. Supported chips and SCSI features
101
 
102
The following features are supported for all chips:
103
 
104
        Synchronous negotiation
105
        Disconnection
106
        Tagged command queuing
107
        SCSI parity checking
108
        Master parity checking
109
 
110
"Wide negotiation" is supported for chips that allow it.  The
111
following table shows some characteristics of NCR 8xx family chips:
112
 
113
       On board                                  Supported by
114
Chip   SDMS BIOS   Wide   SCSI std.   Max. sync   the driver
115
----   ---------   ----   ---------   ----------  ------------
116
810        N         N      FAST10    10 MB/s        Y
117
810A       N         N      FAST10    10 MB/s        Y(2)
118
815        Y         N      FAST10    10 MB/s        Y
119
825        Y         Y      FAST10    20 MB/s        Y
120
825A       Y         Y      FAST10    20 MB/s        Y(2)
121
860        N         N      FAST20    20 MB/s        Y(2)
122
875        Y         Y      FAST20    40 MB/s        Y(2)
123
876        Y         Y      FAST20    40 MB/s        Y(2)
124
895        Y         Y      FAST40    80 MB/s        Y(2)
125
896        Y         Y      FAST40    80 MB/s        Y(1)
126
 
127
(1) The ncr53c8xx driver does not support the following features of
128
    the 896:
129
    - Hardware phase mismatch.
130
    - 8k on-chip RAM.
131
    If you have a 896 chip, you may want to use the enhanced sym53c8xx
132
    driver that supports all the features of the 896.
133
    The sym53c8xx driver is available at the following URL:
134
 
135
             ftp://ftp.tux.org/pub/roudier/896/
136
 
137
(2) Chip also supported by the sym53c8xx enhanced driver.
138
 
139
 
140
3. Summary of other supported features.
141
 
142
        Module:                allow to load the driver
143
        Memory mapped I/O:     increases performance
144
        Profiling information: read operations from the proc SCSI file system
145
        Control commands:      write operations to the proc SCSI file system
146
        Debugging information: written to syslog (expert only)
147
        Scatter / gather
148
        Shared interrupt
149
        Boot setup commands
150
        Serial NVRAM:          Symbios and Tekram formats
151
 
152
 
153
4. Memory mapped I/O versus normal I/O
154
 
155
Memory mapped I/O has less latency than normal I/O.  Since
156
linux-1.3.x, memory mapped I/O is used rather than normal I/O.  Memory
157
mapped I/O seems to work fine on most hardware configurations, but
158
some poorly designed motherboards may break this feature.
159
 
160
The configuration option CONFIG_SCSI_NCR53C8XX_IOMAPPED forces the
161
driver to use normal I/O in all cases.
162
 
163
 
164
5. Tagged command queueing
165
 
166
Queuing more than 1 command at a time to a device allows it to perform
167
optimizations based on actual head positions and its mechanical
168
characteristics. This feature may also reduce average command latency.
169
In order to really gain advantage of this feature, devices must have
170
a reasonnable cache size (No miracle is to be expected for a low-end
171
hard disk with 128 KB or less).
172
Some kown SCSI devices do not properly support tagged command queuing.
173
Generally, firmware revisions that fix this kind of problems are available
174
at respective vendor web/ftp sites.
175
All I can say is that the hard disks I use on my machines behave well with
176
this driver with tagged command queuing enabled:
177
 
178
- IBM S12 0662
179
- Conner 1080S
180
- Quantum Atlas I
181
- Quantum Atlas II
182
 
183
If your controller has NVRAM, you can configure this feature per target
184
from the user setup tool. The Tekram Setup program allows to tune the
185
maximum number of queued commands up to 32. The Symbios Setup only allows
186
to enable or disable this feature.
187
 
188
The maximum number of simultaneous tagged commands queued to a device
189
is currently set to 8 by default.  This value is suitable for most SCSI
190
disks.  With large SCSI disks (>= 2GB, cache >= 512KB, average seek time
191
<= 10 ms), using a larger value may give better performances.
192
The driver supports up to 64 commands per device, but using more than
193
32 is generally not worth it, unless you are using a very large disk
194
or disk array.
195
 
196
If your controller does not have NVRAM or if it is managed by the SDMS
197
BIOS/SETUP, you can configure tagged queueing feature and device queue
198
depths from the boot command-line. For example:
199
 
200
  ncr53c8xx=tags:4/t2t3q15-t4q7/t1u0q32
201
 
202
will set tagged commands queue depths as follow:
203
 
204
- target 2  all luns  on controller 0 --> 15
205
- target 3  all luns  on controller 0 --> 15
206
- target 4  all luns  on controller 0 -->  7
207
- target 1  lun 0     on controller 1 --> 32
208
- all other target/lun                -->  4
209
 
210
In some special conditions, some SCSI disk firmwares may return a
211
QUEUE FULL status for a SCSI command. This behaviour is managed by the
212
driver using the following heuristic:
213
 
214
- Each time a QUEUE FULL status is returned, tagged queue depth is reduced
215
  to the actual number of disconnected commands.
216
 
217
- Every 1000 successfully completed SCSI commands, if allowed by the
218
  current limit, the maximum number of queueable commands is incremented.
219
 
220
Since QUEUE FULL status reception and handling is resource wasting, the
221
driver notifies by default this problem to user by indicating the actual
222
number of commands used and their status, as well as its decision on the
223
device queue depth change.
224
The heuristic used by the driver in handling QUEUE FULL ensures that the
225
impact on performances is not too bad. You can get rid of the messages by
226
setting verbose level to zero, as follow:
227
 
228
1st method: boot your system using 'ncr53c8xx=verb:0' option.
229
2nd method: apply "setverbose 0" control command to the proc fs entry
230
            corresponding to your controller after boot-up.
231
 
232
6. Parity checking
233
 
234
The driver supports SCSI parity checking and PCI bus master parity
235
checking.  These features must be enabled in order to ensure safe data
236
transfers.  However, some flawed devices or mother boards will have
237
problems with parity. You can disable either PCI parity or SCSI parity
238
checking by entering appropriate options from the boot command line.
239
(See 10: Boot setup commands).
240
 
241
7. Profiling information
242
 
243
Profiling information is available through the proc SCSI file system.
244
Since gathering profiling information may impact performances, this
245
feature is disabled by default and requires a compilation configuration
246
option to be set to Y.
247
 
248
The device associated with a host has the following pathname:
249
 
250
          /proc/scsi/ncr53c8xx/N     (N=0,1,2 ....)
251
 
252
Generally, only 1 board is used on hardware configuration, and that device is:
253
          /proc/scsi/ncr53c8xx/0
254
 
255
However, if the driver has been made as module, the number of the
256
hosts is incremented each time the driver is loaded.
257
 
258
In order to display profiling information, just enter:
259
 
260
         cat /proc/scsi/ncr53c8xx/0
261
 
262
and you will get something like the following text:
263
 
264
-------------------------------------------------------
265
General information:
266
  Chip NCR53C810, device id 0x1, revision id 0x2
267
  IO port address 0x6000, IRQ number 10
268
  Using memory mapped IO at virtual address 0x282c000
269
  Synchronous transfer period 25, max commands per lun 4
270
Profiling information:
271
  num_trans    = 18014
272
  num_kbytes   = 671314
273
  num_disc     = 25763
274
  num_break    = 1673
275
  num_int      = 1685
276
  num_fly      = 18038
277
  ms_setup     = 4940
278
  ms_data      = 369940
279
  ms_disc      = 183090
280
  ms_post      = 1320
281
-------------------------------------------------------
282
 
283
General information is easy to understand. The device ID and the
284
revision ID identify the SCSI chip as follows:
285
 
286
Chip    Device id     Revision Id
287
----    ---------     -----------
288
810       0x1            <  0x10
289
810A      0x1            >= 0x10
290
815       0x4
291
825       0x3            <  0x10
292
860       0x6
293
825A      0x3            >= 0x10
294
875       0xf
295
895       0xc
296
 
297
The profiling information is updated upon completion of SCSI commands.
298
A data structure is allocated and zeroed when the host adapter is
299
attached. So, if the driver is a module, the profile counters are
300
cleared each time the driver is loaded.  The "clearprof" command
301
allows you to clear these counters at any time.
302
 
303
The following counters are available:
304
 
305
("num" prefix means "number of",
306
"ms" means milli-seconds)
307
 
308
num_trans
309
        Number of completed commands
310
        Example above: 18014 completed commands
311
 
312
num_kbytes
313
        Number of kbytes transferred
314
        Example above: 671 MB transferred
315
 
316
num_disc
317
        Number of SCSI disconnections
318
        Example above: 25763 SCSI disconnections
319
 
320
num_break
321
        number of script interruptions (phase mismatch)
322
        Example above: 1673 script interruptions
323
 
324
num_int
325
        Number of interrupts other than "on the fly"
326
        Example above: 1685 interruptions not "on the fly"
327
 
328
num_fly
329
        Number of interrupts "on the fly"
330
        Example above: 18038 interruptions "on the fly"
331
 
332
ms_setup
333
        Elapsed time for SCSI commands setups
334
        Example above: 4.94 seconds
335
 
336
ms_data
337
        Elapsed time for data transfers
338
        Example above: 369.94 seconds spent for data transfer
339
 
340
ms_disc
341
        Elapsed time for SCSI disconnections
342
        Example above: 183.09 seconds spent disconnected
343
 
344
ms_post
345
        Elapsed time for command post processing
346
        (time from SCSI status get to command completion call)
347
        Example above: 1.32 seconds spent for post processing
348
 
349
Due to the 1/100 second tick of the system clock, "ms_post" time may
350
be wrong.
351
 
352
In the example above, we got 18038 interrupts "on the fly" and only
353
1673 script breaks generally due to disconnections inside a segment
354
of the scatter list.
355
 
356
 
357
8. Control commands
358
 
359
Control commands can be sent to the driver with write operations to
360
the proc SCSI file system. The generic command syntax is the
361
following:
362
 
363
      echo " " >/proc/scsi/ncr53c8xx/0
364
      (assumes controller number is 0)
365
 
366
Using "all" for "" parameter with the commands below will
367
apply to all targets of the SCSI chain (except the controller).
368
 
369
Available commands:
370
 
371
8.1 Set minimum synchronous period factor
372
 
373
    setsync  
374
 
375
    target:    target number
376
    period:    minimum synchronous period.
377
               Maximum speed = 1000/(4*period factor) except for special
378
               cases below.
379
 
380
    Specify a period of 255, to force asynchronous transfer mode.
381
 
382
      10 means 25 nano-seconds synchronous period
383
      11 means 30 nano-seconds synchronous period
384
      12 means 50 nano-seconds synchronous period
385
 
386
8.2 Set wide size
387
 
388
    setwide  
389
 
390
    target:    target number
391
    size:      0=8 bits, 1=16bits
392
 
393
8.3 Set maximum number of concurrent tagged commands
394
 
395
    settags  
396
 
397
    target:    target number
398
    tags:      number of concurrent tagged commands
399
               must not be greater than SCSI_NCR_MAX_TAGS (default: 8)
400
 
401
8.4 Set order type for tagged command
402
 
403
    setorder 
404
 
405
    order:     3 possible values:
406
               simple: use SIMPLE TAG for all operations (read and write)
407
               ordered: use ORDERED TAG for all operations
408
               default: use default tag type,
409
                        SIMPLE  TAG for read  operations
410
                        ORDERED TAG for write operations
411
 
412
 
413
8.5 Set debug mode
414
 
415
    setdebug 
416
 
417
    Available debug flags:
418
        alloc:   print info about memory allocations (ccb, lcb)
419
        queue:   print info about insertions into the command start queue
420
        result:  print sense data on CHECK CONDITION status
421
        scatter: print info about the scatter process
422
        scripts: print info about the script binding process
423
        tiny:    print minimal debugging information
424
        timing:  print timing information of the NCR chip
425
        nego:    print information about SCSI negotiations
426
        phase:   print information on script interruptions
427
 
428
    Use "setdebug" with no argument to reset debug flags.
429
 
430
 
431
8.6 Clear profile counters
432
 
433
    clearprof
434
 
435
    The profile counters are automatically cleared when the amount of
436
    data transfered reaches 1000 GB in order to avoid overflow.
437
    The "clearprof" command allows you to clear these counters at any time.
438
 
439
 
440
8.7 Set flag (no_disc)
441
 
442
    setflag  
443
 
444
    target:    target number
445
 
446
    For the moment, only one flag is available:
447
 
448
        no_disc:   not allow target to disconnect.
449
 
450
    Do not specify any flag in order to reset the flag. For example:
451
    - setflag 4
452
      will reset no_disc flag for target 4, so will allow it disconnections.
453
    - setflag all
454
      will allow disconnection for all devices on the SCSI bus.
455
 
456
 
457
8.8 Set verbose level
458
 
459
    setverbose #level
460
 
461
    The driver default verbose level is 1. This command allows to change
462
    th driver verbose level after boot-up.
463
 
464
9. Configuration parameters
465
 
466
If the firmware of all your devices is perfect enough, all the
467
features supported by the driver can be enabled at start-up.  However,
468
if only one has a flaw for some SCSI feature, you can disable the
469
support by the driver of this feature at linux start-up and enable
470
this feature after boot-up only for devices that support it safely.
471
 
472
CONFIG_SCSI_NCR53C8XX_PROFILE_SUPPORT  (default answer: n)
473
    This option must be set for profiling information to be gathered
474
    and printed out through the proc file system. This features may
475
    impact performances.
476
 
477
CONFIG_SCSI_NCR53C8XX_IOMAPPED       (default answer: n)
478
    Answer "y" if you suspect your mother board to not allow memory mapped I/O.
479
    May slow down performance a little.  This option is required by
480
    Linux/PPC and is used no matter what you select here.  Linux/PPC
481
    suffers no performance loss with this option since all IO is memory
482
    mapped anyway.
483
 
484
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS    (default answer: 8)
485
    Default tagged command queue depth.
486
 
487
CONFIG_SCSI_NCR53C8XX_MAX_TAGS         (default answer: 8)
488
    This option allows you to specify the maximum number of tagged commands
489
    that can be queued to a device. The maximum supported value is 64.
490
 
491
CONFIG_SCSI_NCR53C8XX_SYNC            (default answer: 5)
492
    This option allows you to specify the frequency in MHz the driver
493
    will use at boot time for synchronous data transfer negotiations.
494
    This frequency can be changed later with the "setsync" control command.
495
 
496
 
497
CONFIG_SCSI_NCR53C8XX_FORCE_SYNC_NEGO (default answer: n)
498
    Force synchronous negotiation for all SCSI-2 devices.
499
    Some SCSI-2 devices do not report this feature in byte 7 of inquiry
500
    response but do support it properly (TAMARACK scanners for example).
501
 
502
CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT   (default and only reasonnable answer: n)
503
    If you suspect a device of yours does not properly support disconnections,
504
    you can answer "y". Then, all SCSI devices will never disconnect the bus
505
    even while performing long SCSI operations.
506
 
507
CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
508
    Genuine SYMBIOS boards use GPIO0 in output for controller LED and GPIO3
509
    bit as a flag indicating singled-ended/differential interface.
510
    If all the boards of your system are genuine SYMBIOS boards or use
511
    BIOS and drivers from SYMBIOS, you would want to enable this option.
512
    This option must NOT be enabled if your system has at least one 53C8XX
513
    based scsi board with a vendor-specific BIOS.
514
    For example, Tekram DC-390/U, DC-390/W and DC-390/F scsi controllers
515
    use a vendor-specific BIOS and are known to not use SYMBIOS compatible
516
    GPIO wiring. So, this option must not be enabled if your system has
517
    such a board installed.
518
 
519
CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
520
    Enable support for reading the serial NVRAM data on Symbios and
521
    some Symbios compatible cards, and Tekram DC390W/U/F cards. Useful for
522
    systems with more than one Symbios compatible controller where at least
523
    one has a serial NVRAM, or for a system with a mixture of Symbios and
524
    Tekram cards. Enables setting the boot order of host adaptors
525
    to something other than the default order or "reverse probe" order.
526
    Also enables Symbios and Tekram cards to be distinguished so
527
    CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT may be set in a system with a
528
    mixture of Symbios and Tekram cards so the Symbios cards can make use of
529
    the full range of Symbios features, differential, led pin, without
530
    causing problems for the Tekram card(s).
531
 
532
10. Boot setup commands
533
 
534
10.1 Syntax
535
 
536
Setup commands can be passed to the driver either at boot time or as a
537
string variable using 'insmod'.
538
 
539
A boot setup command for the ncr53c8xx driver begins with the driver name
540
"ncr53c8xx=". The kernel syntax parser then expects an optionnal list of
541
integers separated with comma followed by an optionnal list of  comma-
542
separated strings. Example of boot setup command under lilo prompt:
543
 
544
lilo: linux root=/dev/hda2 ncr53c8xx=tags:4,sync:10,debug:0x200
545
 
546
- enable tagged commands, up to 4 tagged commands queued.
547
- set synchronous negotiation speed to 10 Mega-transfers / second.
548
- set DEBUG_NEGO flag.
549
 
550
Since comma seems not to be allowed when defining a string variable using
551
'insmod', the driver also accepts  as option separator.
552
The following command will install driver module with the same options as
553
above.
554
 
555
insmod ncr53c8xx.o ncr53c8xx="tags:4 sync:10 debug:0x200"
556
 
557
For the moment, the integer list of arguments is discarded by the driver.
558
It will be used in the future in order to allow a per controller setup.
559
 
560
Each string argument must be specified as "keyword:value". Only lower-case
561
characters and digits are allowed.
562
 
563
10.2 Available arguments
564
 
565
Master parity checking
566
      mpar:y     enabled
567
      mpar:n     disabled
568
 
569
Scsi parity checking
570
      spar:y     enabled
571
      spar:n     disabled
572
 
573
Scsi disconnections
574
      disc:y     enabled
575
      disc:n     disabled
576
 
577
Special features
578
   Only apply to 810A, 825A, 860, 875 and 895 controllers.
579
   Have no effect with other ones.
580
      specf:y    (or 1) enabled
581
      specf:n    (or 0) disabled
582
      specf:3           enabled except Memory Write And Invalidate
583
   The default driver setup is 'specf:3'. As a consequence, option 'specf:y'
584
   must be specified in the boot setup command to enable Memory Write And
585
   Invalidate.
586
 
587
Ultra SCSI support
588
   Only apply to 860, 875 and 895 controllers.
589
   Have no effect with other ones.
590
      ultra:2    Ultra2 enabled
591
      ultra:1    Ultra enabled
592
      ultra:n    disabled
593
 
594
Default number of tagged commands
595
      tags:0     (or tags:1 ) tagged command queuing disabled
596
      tags:#tags (#tags  > 1) tagged command queuing enabled
597
  #tags will be truncated to the max queued commands configuration parameter.
598
  This option also allows to specify a command queue depth for each device
599
  that support tagged command queueing.
600
  Example:
601
      ncr53c8xx=tags:10/t2t3q16-t5q24/t1u2q32
602
               will set devices queue depth as follow:
603
      - controller #0 target #2 and target #3                  -> 16 commands,
604
      - controller #0 target #5                                -> 24 commands,
605
      - controller #1 target #1 logical unit #2                -> 32 commands,
606
      - all other logical units (all targets, all controllers) -> 10 commands.
607
 
608
Default synchronous period factor
609
      sync:255     disabled (asynchronous transfer mode)
610
      sync:#factor
611
  #factor = 10     Ultra-2 SCSI 40 Mega-transfers / second
612
  #factor = 11     Ultra-2 SCSI 33 Mega-transfers / second
613
  #factor < 25     Ultra   SCSI 20 Mega-transfers / second
614
  #factor < 50     Fast    SCSI-2
615
 
616
  In all cases, the driver will use the minimum transfer period supported by
617
  controllers according to NCR53C8XX chip type.
618
 
619
Negotiate synchronous with all devices
620
  (force sync nego)
621
      fsn:y      enabled
622
      fsn:n      disabled
623
 
624
Verbosity level
625
      verb:0     minimal
626
      verb:1     normal
627
      verb:2     too much
628
 
629
Debug mode
630
      debug:0    clear debug flags
631
      debug:#x   set debug flags
632
  #x is an integer value combining the following power-of-2 values:
633
  DEBUG_ALLOC       0x1
634
  DEBUG_PHASE       0x2
635
  DEBUG_POLL        0x4
636
  DEBUG_QUEUE       0x8
637
  DEBUG_RESULT     0x10
638
  DEBUG_SCATTER    0x20
639
  DEBUG_SCRIPT     0x40
640
  DEBUG_TINY       0x80
641
  DEBUG_TIMING    0x100
642
  DEBUG_NEGO      0x200
643
  DEBUG_TAGS      0x400
644
  DEBUG_FREEZE    0x800
645
  DEBUG_RESTART  0x1000
646
 
647
  You can play safely with DEBUG_NEGO. However, some of these flags may
648
  generate bunches of syslog messages.
649
 
650
Burst max
651
      burst:0    burst disabled
652
      burst:255  get burst length from initial IO register settings.
653
      burst:#x   burst enabled (1<<#x burst transfers max)
654
  #x is an integer value which is log base 2 of the burst transfers max.
655
  The NCR53C875 and NCR53C825A support up to 128 burst transfers (#x = 7).
656
  Other chips only support up to 16 (#x = 4).
657
  This is a maximum value. The driver set the burst length according to chip
658
  and revision ids. By default the driver uses the maximum value supported
659
  by the chip.
660
 
661
LED support
662
     led:1      enable  LED support
663
     led:0      disable LED support
664
  Donnot enable LED support if your scsi board does not use SDMS BIOS.
665
  (See 'Configuration parameters')
666
 
667
Max wide
668
    wide:1      wide scsi enabled
669
    wide:0      wide scsi disabled
670
  Some scsi boards use a 875 (ultra wide) and only supply narrow connectors.
671
  If you have connected a wide device with a 50 pins to 68 pins cable
672
  converter, any accepted wide negotiation will break further data transfers.
673
  In such a case, using "wide:0" in the bootup command will be helpfull.
674
 
675
Differential mode
676
    diff:0      never set up diff mode
677
    diff:1      set up diff mode if BIOS set it
678
    diff:2      always set up diff mode
679
    diff:3      set diff mode if GPIO3 is not set
680
 
681
IRQ mode
682
    irqm:0      always open drain
683
    irqm:1      same as initial settings (assumed BIOS settings)
684
    irqm:2      always totem pole
685
 
686
Reverse probe
687
    revprob:n   probe chip ids from the PCI configuration in this order:
688
                810, 815, 820, 860, 875, 885, 895, 896
689
    revprob:y   probe chip ids in the reverse order.
690
 
691
Fix up PCI configuration space
692
    pcifix:
693
 
694
    Available option bits:
695
        0x0:   No attempt to fix PCI configuration space registers values.
696
        0x1:   Set PCI cache-line size register if not set.
697
        0x2:   Set write and invalidate bit in PCI command register.
698
        0x4:   Increase if necessary PCI latency timer according to burst max.
699
 
700
    Use 'pcifix:7' in order to allow the driver to fix up all PCI features.
701
 
702
Serial NVRAM
703
    nvram:n     do not look for serial NVRAM
704
    nvram:y     test controllers for onboard serial NVRAM
705
 
706
Check SCSI BUS
707
    buschk:
708
 
709
    Available option bits:
710
        0x0:   No check.
711
        0x1:   Check and donnot attach the controller on error.
712
        0x2:   Check and just warn on error.
713
 
714
Boot fail safe
715
    safe:y      load the following assumed fail safe initial setup
716
 
717
  master parity                 disabled                mpar:n
718
  scsi parity                   enabled                 spar:y
719
  disconnections                not allowed             disc:n
720
  special features              disabled                specf:n
721
  ultra scsi                    disabled                ultra:n
722
  force sync negotiation        disabled                fsn:n
723
  reverse probe                 disabled                revprob:n
724
  PCI fix up                    disabled                pcifix:0
725
  serial NVRAM                  enabled                 nvram:y
726
  verbosity level               2                       verb:2
727
  tagged command queuing        disabled                tags:0
728
  synchronous negotiation       disabled                sync:255
729
  debug flags                   none                    debug:0
730
  burst length                  from BIOS settings      burst:255
731
  LED support                   disabled                led:0
732
  wide support                  disabled                wide:0
733
  settle time                   10 seconds              settle:10
734
  differential support          from BIOS settings      diff:1
735
  irq mode                      from BIOS settings      irqm:1
736
  SCSI BUS check                donnot attach on error  buschk:1
737
 
738
10.3 Advised boot setup commands
739
 
740
If the driver has been configured with default options, the equivalent
741
boot setup is:
742
 
743
   ncr53c8xx=mpar:y,spar:y,disc:y,specf:3,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
744
             tags:0,sync:50,debug:0,burst:7,led:0,wide:1,settle:2,diff:0,irqm:0
745
 
746
For an installation diskette or a safe but not fast system,
747
boot setup can be:
748
 
749
    ncr53c8xx=safe:y,mpar:y,disc:y
750
    ncr53c8xx=safe:y,disc:y
751
    ncr53c8xx=safe:y,mpar:y
752
    ncr53c8xx=safe:y
753
 
754
My personnal system works flawlessly with the following equivalent setup:
755
 
756
   ncr53c8xx=mpar:y,spar:y,disc:y,specf:1,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
757
             tags:32,sync:12,debug:0,burst:7,led:1,wide:1,settle:2,diff:0,irqm:0
758
 
759
The driver prints its actual setup when verbosity level is 2. You can try
760
"ncr53c8xx=verb:2" to get the "static" setup of the driver, or add "verb:2"
761
to your boot setup command in order to check the actual setup the driver is
762
using.
763
 
764
10.4 PCI configuration fix-up boot option
765
 
766
pcifix:
767
 
768
Available option bits:
769
    0x1:     Set PCI cache-line size register if not set.
770
    0x2:     Set write and invalidate bit in PCI command register.
771
 
772
Use 'pcifix:3' in order to allow the driver to fix both PCI features.
773
 
774
These options only apply to new SYMBIOS chips 810A, 825A, 860, 875
775
and 895 and are only supported for Pentium and 486 class processors.
776
Recent SYMBIOS 53C8XX scsi processors are able to use PCI read multiple
777
and PCI write and invalidate commands. These features require the
778
cache line size register to be properly set in the PCI configuration
779
space of the chips. On the other hand, chips will use PCI write and
780
invalidate commands only if the corresponding bit is set to 1 in the
781
PCI command register.
782
 
783
Not all PCI bioses set the PCI cache line register and the PCI write and
784
invalidate bit in the PCI configuration space of 53C8XX chips.
785
Optimized PCI accesses may be broken for some PCI/memory controllers or
786
make problems with some PCI boards.
787
 
788
This fix-up worked flawlessly on my previous system.
789
(MB Triton HX / 53C875 / 53C810A)
790
I use these options at my own risks as you will do if you decide to
791
use them too.
792
 
793
 
794
10.5 Serial NVRAM support boot option
795
 
796
nvram:n     do not look for serial NVRAM
797
nvram:y     test controllers for onboard serial NVRAM
798
 
799
This option is described below (see 17. Serial NVRAM support).
800
When this option is enabled, the driver tries to detect all boards using
801
a Serial NVRAM. This memory is used to hold user set up parameters.
802
 
803
The parameters the driver is able to get from the NVRAM depend on the
804
data format used, as follow:
805
 
806
                                 Tekram format      Symbios format
807
General and host parameters
808
    Boot order                         N                   Y
809
    Host SCSI ID                       Y                   Y
810
    SCSI parity checking               Y                   Y
811
    Verbose boot messages              N                   Y
812
SCSI devices parameters
813
    Synchronous transfer speed         Y                   Y
814
    Wide 16 / Narrow                   Y                   Y
815
    Tagged Command Queuing enabled     Y                   Y
816
    Disconnections enabled             Y                   Y
817
    Scan at boot time                  N                   Y
818
 
819
In order to speed up the system boot, for each device configured without
820
the "scan at boot time" option, the driver forces an error on the
821
first TEST UNIT READY command received for this device.
822
 
823
Some SDMS BIOS revisions seem to be unable to boot cleanly with very fast
824
hard disks. In such a situation you cannot configure the NVRAM with
825
optimized parameters value.
826
 
827
The 'nvram' boot option can be entered in hexadecimal form in order
828
to ignore some options configured in the NVRAM, as follow:
829
 
830
mvram=
831
      0x01   look for NVRAM  (equivalent to nvram=y)
832
      0x02   ignore NVRAM "Synchronous negotiation" parameters for all devices
833
      0x04   ignore NVRAM "Wide negotiation"  parameter for all devices
834
      0x08   ignore NVRAM "Scan at boot time" parameter for all devices
835
 
836
My Atlas Wide only boots cleanly in 8 bits asynchronous data transfer
837
mode. However, it works flawlessly at 20 MB/second with the driver.
838
Using "nvram=0x7" allows me to boot in 8 bits/async and to let the driver
839
use its setup for synchronous and wide negotiations.
840
 
841
 
842
10.6 SCSI BUS checking boot option.
843
 
844
When this option is set to a non-zero value, the driver checks SCSI lines
845
logic state, 100 micro-seconds after having asserted the SCSI RESET line.
846
The driver just reads SCSI lines and checks all lines read FALSE except RESET.
847
Since SCSI devices shall release the BUS at most 800 nano-seconds after SCSI
848
RESET has been asserted, any signal to TRUE may indicate a SCSI BUS problem.
849
Unfortunately, the following common SCSI BUS problems are not detected:
850
- Only 1 terminator installed.
851
- Misplaced terminators.
852
- Bad quality terminators.
853
On the other hand, either bad cabling, broken devices, not conformant
854
devices, ... may cause a SCSI signal to be wrong when te driver reads it.
855
 
856
 
857
11. Some constants and flags of the ncr53c8xx.h header file
858
 
859
Some of these are defined from the configuration parameters.  To
860
change other "defines", you must edit the header file.  Do that only
861
if you know what you are doing.
862
 
863
SCSI_NCR_SETUP_SPECIAL_FEATURES (default: defined)
864
        If defined, the driver will enable some special features according
865
        to chip and revision id.
866
        For 810A, 860, 825A, 875 and 895 scsi chips, this option enables
867
        support of features that reduce load of PCI bus and memory accesses
868
        during  scsi transfer processing: burst op-code fetch, read multiple,
869
        read line, prefetch, cache line, write and invalidate,
870
        burst 128 (875 only), large dma fifo (875 only), offset 16 (875 only).
871
        Can be changed by the following boot setup command:
872
                ncr53c8xx=specf:n
873
 
874
SCSI_NCR_IOMAPPED               (default: not defined)
875
        If defined, normal I/O is forced.
876
 
877
SCSI_NCR_SHARE_IRQ              (default: defined)
878
        If defined, request shared IRQ.
879
 
880
SCSI_NCR_MAX_TAGS               (default: 8)
881
        Maximum number of simultaneous tagged commands to a device.
882
        Can be changed by "settags  "
883
 
884
SCSI_NCR_SETUP_DEFAULT_SYNC     (default: 50)
885
        Transfer period factor the driver will use at boot time for synchronous
886
        negotiation. 0 means asynchronous.
887
        Can be changed by "setsync  "
888
 
889
SCSI_NCR_SETUP_DEFAULT_TAGS     (default: 8)
890
        Default number of simultaneous tagged commands to a device.
891
        < 1 means tagged command queuing disabled at start-up.
892
 
893
SCSI_NCR_ALWAYS_SIMPLE_TAG      (default: defined)
894
        Use SIMPLE TAG for read and write commands.
895
        Can be changed by "setorder "
896
 
897
SCSI_NCR_SETUP_DISCONNECTION    (default: defined)
898
        If defined, targets are allowed to disconnect.
899
 
900
SCSI_NCR_SETUP_FORCE_SYNC_NEGO  (default: not defined)
901
        If defined, synchronous negotiation is tried for all SCSI-2 devices.
902
        Can be changed by "setsync  "
903
 
904
SCSI_NCR_SETUP_MASTER_PARITY    (default: defined)
905
        If defined, master parity checking is enabled.
906
 
907
SCSI_NCR_SETUP_MASTER_PARITY    (default: defined)
908
        If defined, SCSI parity checking is enabled.
909
 
910
SCSI_NCR_PROFILE_SUPPORT        (default: not defined)
911
        If defined, profiling information is gathered.
912
 
913
SCSI_NCR_MAX_SCATTER            (default: 128)
914
        Scatter list size of the driver ccb.
915
 
916
SCSI_NCR_MAX_TARGET             (default: 16)
917
        Max number of targets per host.
918
 
919
SCSI_NCR_MAX_HOST               (default: 2)
920
        Max number of host controllers.
921
 
922
SCSI_NCR_SETTLE_TIME            (default: 2)
923
        Number of seconds the driver will wait after reset.
924
 
925
SCSI_NCR_TIMEOUT_ALERT          (default: 3)
926
        If a pending command will time out after this amount of seconds,
927
        an ordered tag is used for the next command.
928
        Avoids timeouts for unordered tagged commands.
929
 
930
SCSI_NCR_CAN_QUEUE              (default: 7*SCSI_NCR_MAX_TAGS)
931
        Max number of commands that can be queued to a host.
932
 
933
SCSI_NCR_CMD_PER_LUN            (default: SCSI_NCR_MAX_TAGS)
934
        Max number of commands queued to a host for a device.
935
 
936
SCSI_NCR_SG_TABLESIZE           (default: SCSI_NCR_MAX_SCATTER-1)
937
        Max size of the Linux scatter/gather list.
938
 
939
SCSI_NCR_MAX_LUN        (default: 8)
940
        Max number of LUNs per target.
941
 
942
 
943
12. Installation
944
 
945
This driver is part of the linux kernel distribution.
946
Driver files are located in the sub-directory "drivers/scsi" of the
947
kernel source tree.
948
 
949
Driver files:
950
 
951
        README.ncr53c8xx        : this file
952
        ChangeLog.ncr53c8xx     : change log
953
        ncr53c8xx.h             : definitions
954
        ncr53c8xx.c             : the driver code
955
 
956
New driver versions are made available separately in order to allow testing
957
changes and new features prior to including them into the linux kernel
958
distribution. The following URL provides informations on latest avalaible
959
patches:
960
 
961
      ftp://ftp.tux.org/pub/people/gerard-roudier/README
962
 
963
 
964
13. Architecture dependant features.
965
 
966
967
 
968
 
969
14. Known problems
970
 
971
14.1 Tagged commands with Iomega Jaz device
972
 
973
I have not tried this device, however it has been reported to me the
974
following: This device is capable of Tagged command queuing. However
975
while spinning up, it rejects Tagged commands. This behaviour is
976
conforms to 6.8.2 of SCSI-2 specifications. The current behaviour of
977
the driver in that situation is not satisfying. So do not enable
978
Tagged command queuing for devices that are able to spin down.  The
979
other problem that may appear is timeouts. The only way to avoid
980
timeouts seems to edit linux/drivers/scsi/sd.c and to increase the
981
current timeout values.
982
 
983
14.2 Device names change when another controller is added.
984
 
985
When you add a new NCR53C8XX chip based controller to a system that already
986
has one or more controllers of this family, it may happen that the order
987
the driver registers them to the kernel causes problems due to device
988
name changes.
989
When at least one controller uses NvRAM, SDMS BIOS version 4 allows you to
990
define the order the BIOS will scan the scsi boards. The driver attaches
991
controllers according to BIOS information if NvRAM detect option is set.
992
 
993
If your controllers do not have NvRAM, you can:
994
 
995
- Ask the driver to probe chip ids in reverse order from the boot command
996
  line: ncr53c8xx=revprob:y
997
- Make appropriate changes in the fstab.
998
- Use the 'scsidev' tool from Eric Youngdale.
999
 
1000
14.3 Using only 8 bit devices with a WIDE SCSI controller.
1001
 
1002
When only 8 bit NARROW devices are connected to a 16 bit WIDE SCSI controller,
1003
you must ensure that lines of the wide part of the SCSI BUS are pulled-up.
1004
This can be achieved by ENABLING the WIDE TERMINATOR portion of the SCSI
1005
controller card.
1006
The TYAN 1365 documentation revision 1.2 is not correct about such settings.
1007
(page 10, figure 3.3).
1008
 
1009
14.4 Possible data corruption during a Memory Write and Invalidate
1010
 
1011
This problem is described in SYMBIOS DEL 397, Part Number 69-039241, ITEM 4.
1012
 
1013
In some complex situations, 53C875 chips revision <= 3 may start a PCI
1014
Write and Invalidate Command at a not cache-line-aligned 4 DWORDS boundary.
1015
This is only possible when Cache Line Size is 8 DWORDS or greater.
1016
Pentium systems use a 8 DWORDS cache line size and so are concerned by
1017
this chip bug, unlike i486 systems that use a 4 DWORDS cache line size.
1018
 
1019
When this situation occurs, the chip may complete the Write and Invalidate
1020
command after having only filled part of the last cache line involved in
1021
the transfer, leaving to data corruption the remainder of this cache line.
1022
 
1023
Not using Write And Invalidate obviously gets rid of this chip bug, and so
1024
it is now the default setting of the driver.
1025
However, for people like me who want to enable this feature, I have added
1026
part of a work-around suggested by SYMBIOS. This work-around resets the
1027
addressing logic when the DATA IN phase is entered and so prevents the bug
1028
from being triggered for the first SCSI MOVE of the phase. This work-around
1029
should be enough according to the following:
1030
 
1031
The only driver internal data structure that is greater than 8 DWORDS  and
1032
that is moved by the SCRIPTS processor is the 'CCB header' that contains
1033
the context of the SCSI transfer. This data structure is aligned on 8 DWORDS
1034
boundary (Pentium Cache Line Size), and so is immune to this chip bug, at
1035
least on Pentium systems.
1036
But the conditions of this bug can be met when a SCSI read command is
1037
performed using a buffer that is 4 DWORDS but not cache-line aligned.
1038
This cannot happen under Linux when scatter/gather lists are used since
1039
they only refer to system buffers that are well aligned. So, a work around
1040
may only be needed under Linux when a scatter/gather list is not used and
1041
when the SCSI DATA IN phase is reentered after a phase mismatch.
1042
 
1043
 
1044
15. SCSI problem troubleshooting
1045
 
1046
Most SCSI problems are due to a non conformant SCSI bus or to buggy
1047
devices.  If infortunately you have SCSI problems, you can check the
1048
following things:
1049
 
1050
- SCSI bus cables
1051
- terminations at both end of the SCSI chain
1052
- linux syslog messages (some of them may help you)
1053
 
1054
If you donnot find the source of problems, you can configure the
1055
driver with no features enabled.
1056
 
1057
- only asynchronous data transfers
1058
- tagged commands disabled
1059
- disconnections not allowed
1060
 
1061
Now, if your SCSI bus is ok, your system have every chance to work
1062
with this safe configuration but performances will not be optimal.
1063
 
1064
If it still fails, then you can send your problem description to
1065
appropriate mailing lists or news-groups.  Send me a copy in order to
1066
be sure I will receive it.  Obviously, a bug in the driver code is
1067
possible.
1068
 
1069
     My email address: Gerard Roudier 
1070
 
1071
Allowing disconnections is important if you use several devices on
1072
your SCSI bus but often causes problems with buggy devices.
1073
Synchronous data transfers increases throughput of fast devices like
1074
hard disks.  Good SCSI hard disks with a large cache gain advantage of
1075
tagged commands queuing.
1076
 
1077
Try to enable one feature at a time with control commands.  For example:
1078
 
1079
- echo "setsync all 25" >/proc/scsi/ncr53c8xx/0
1080
  Will enable fast synchronous data transfer negotiation for all targets.
1081
 
1082
- echo "setflag 3" >/proc/scsi/ncr53c8xx/0
1083
  Will reset flags (no_disc) for target 3, and so will allow it to disconnect
1084
  the SCSI Bus.
1085
 
1086
- echo "settags 3 8" >/proc/scsi/ncr53c8xx/0
1087
  Will enable tagged command queuing for target 3 if that device supports it.
1088
 
1089
Once you have found the device and the feature that cause problems, just
1090
disable that feature for that device.
1091
 
1092
 
1093
16. Synchonous transfer negotiation tables
1094
 
1095
Tables below have been created by calling the routine the driver uses
1096
for synchronisation negotiation timing calculation and chip setting.
1097
The first table corresponds to Ultra chips 53875 and 53C860 with 80 MHz
1098
clock and 5 clock divisors.
1099
The second one has been calculated by setting the scsi clock to 40 Mhz
1100
and using 4 clock divisors and so applies to all NCR53C8XX chips in fast
1101
SCSI-2 mode.
1102
 
1103
Periods are in nano-seconds and speeds are in Mega-transfers per second.
1104
1 Mega-transfers/second means 1 MB/s with 8 bits SCSI and 2 MB/s with
1105
Wide16 SCSI.
1106
 
1107
16.1 Synchronous timings for 53C895, 53C875 and 53C860 SCSI controllers
1108
 
1109
 ----------------------------------------------
1110
 Negotiated                     NCR settings
1111
 Factor   Period   Speed        Period   Speed
1112
 ------   ------   ------       ------   ------
1113
 10       25       40.000       25       40.000   (53C895 only)
1114
 11       30.2     33.112       31.25    32.000   (53C895 only)
1115
 12       50       20.000       50       20.000
1116
 13       52       19.230       62       16.000
1117
 14       56       17.857       62       16.000
1118
 15       60       16.666       62       16.000
1119
 16       64       15.625       75       13.333
1120
 17       68       14.705       75       13.333
1121
 18       72       13.888       75       13.333
1122
 19       76       13.157       87       11.428
1123
 20       80       12.500       87       11.428
1124
 21       84       11.904       87       11.428
1125
 22       88       11.363       93       10.666
1126
 23       92       10.869       93       10.666
1127
 24       96       10.416      100       10.000
1128
 25      100       10.000      100       10.000
1129
 26      104        9.615      112        8.888
1130
 27      108        9.259      112        8.888
1131
 28      112        8.928      112        8.888
1132
 29      116        8.620      125        8.000
1133
 30      120        8.333      125        8.000
1134
 31      124        8.064      125        8.000
1135
 32      128        7.812      131        7.619
1136
 33      132        7.575      150        6.666
1137
 34      136        7.352      150        6.666
1138
 35      140        7.142      150        6.666
1139
 36      144        6.944      150        6.666
1140
 37      148        6.756      150        6.666
1141
 38      152        6.578      175        5.714
1142
 39      156        6.410      175        5.714
1143
 40      160        6.250      175        5.714
1144
 41      164        6.097      175        5.714
1145
 42      168        5.952      175        5.714
1146
 43      172        5.813      175        5.714
1147
 44      176        5.681      187        5.333
1148
 45      180        5.555      187        5.333
1149
 46      184        5.434      187        5.333
1150
 47      188        5.319      200        5.000
1151
 48      192        5.208      200        5.000
1152
 49      196        5.102      200        5.000
1153
 
1154
 
1155
16.2 Synchronous timings for fast SCSI-2 53C8XX controllers
1156
 
1157
 ----------------------------------------------
1158
 Negotiated                     NCR settings
1159
 Factor   Period   Speed        Period   Speed
1160
 ------   ------   ------       ------   ------
1161
 25      100       10.000      100       10.000
1162
 26      104        9.615      125        8.000
1163
 27      108        9.259      125        8.000
1164
 28      112        8.928      125        8.000
1165
 29      116        8.620      125        8.000
1166
 30      120        8.333      125        8.000
1167
 31      124        8.064      125        8.000
1168
 32      128        7.812      131        7.619
1169
 33      132        7.575      150        6.666
1170
 34      136        7.352      150        6.666
1171
 35      140        7.142      150        6.666
1172
 36      144        6.944      150        6.666
1173
 37      148        6.756      150        6.666
1174
 38      152        6.578      175        5.714
1175
 39      156        6.410      175        5.714
1176
 40      160        6.250      175        5.714
1177
 41      164        6.097      175        5.714
1178
 42      168        5.952      175        5.714
1179
 43      172        5.813      175        5.714
1180
 44      176        5.681      187        5.333
1181
 45      180        5.555      187        5.333
1182
 46      184        5.434      187        5.333
1183
 47      188        5.319      200        5.000
1184
 48      192        5.208      200        5.000
1185
 49      196        5.102      200        5.000
1186
 
1187
 
1188
17. Serial NVRAM (added by Richard Waltham: dormouse@farsrobt.demon.co.uk)
1189
 
1190
17.1 Features
1191
 
1192
Enabling serial NVRAM support enables detection of the serial NVRAM included
1193
on Symbios and some Symbios compatible host adaptors, and Tekram boards. The
1194
serial NVRAM is used by Symbios and Tekram to hold set up parameters for the
1195
host adaptor and it's attached drives.
1196
 
1197
The Symbios NVRAM also holds data on the boot order of host adaptors in a
1198
system with more than one host adaptor. This enables the order of scanning
1199
the cards for drives to be changed from the default used during host adaptor
1200
detection.
1201
 
1202
This can be done to a limited extent at the moment using "reverse probe" but
1203
this only changes the order of detection of different types of cards. The
1204
NVRAM boot order settings can do this as well as change the order the same
1205
types of cards are scanned in, something "reverse probe" cannot do.
1206
 
1207
Tekram boards using Symbios chips, DC390W/F/U, which have NVRAM are detected
1208
and this is used to distinguish between Symbios compatible and Tekram host
1209
adaptors. This is used to disable the Symbios compatible "diff" setting
1210
incorrectly set on Tekram boards if the CONFIG_SCSI_53C8XX_SYMBIOS_COMPAT
1211
configuration parameter is set enabling both Symbios and Tekram boards to be
1212
used together with the Symbios cards using all their features, including
1213
"diff" support. ("led pin" support for Symbios compatible cards can remain
1214
enabled when using Tekram cards. It does nothing useful for Tekram host
1215
adaptors but does not cause problems either.)
1216
 
1217
 
1218
17.2 Symbios NVRAM layout
1219
 
1220
typical data at NVRAM address 0x100 (53c810a NVRAM)
1221
-----------------------------------------------------------
1222
00 00
1223
64 01
1224
8e 0b
1225
 
1226
00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
1227
 
1228
04 00 0f 00 00 10 00 50 00 00 01 00 00 62
1229
04 00 03 00 00 10 00 58 00 00 01 00 00 63
1230
04 00 01 00 00 10 00 48 00 00 01 00 00 61
1231
00 00 00 00 00 00 00 00 00 00 00 00 00 00
1232
 
1233
0f 00 08 08 64 00 0a 00
1234
0f 00 08 08 64 00 0a 00
1235
0f 00 08 08 64 00 0a 00
1236
0f 00 08 08 64 00 0a 00
1237
0f 00 08 08 64 00 0a 00
1238
0f 00 08 08 64 00 0a 00
1239
0f 00 08 08 64 00 0a 00
1240
0f 00 08 08 64 00 0a 00
1241
 
1242
0f 00 08 08 64 00 0a 00
1243
0f 00 08 08 64 00 0a 00
1244
0f 00 08 08 64 00 0a 00
1245
0f 00 08 08 64 00 0a 00
1246
0f 00 08 08 64 00 0a 00
1247
0f 00 08 08 64 00 0a 00
1248
0f 00 08 08 64 00 0a 00
1249
0f 00 08 08 64 00 0a 00
1250
 
1251
00 00 00 00 00 00 00 00
1252
00 00 00 00 00 00 00 00
1253
00 00 00 00 00 00 00 00
1254
00 00 00 00 00 00 00 00
1255
00 00 00 00 00 00 00 00
1256
00 00 00 00 00 00 00 00
1257
00 00 00 00 00 00 00 00
1258
00 00 00 00 00 00 00 00
1259
 
1260
00 00 00 00 00 00 00 00
1261
00 00 00 00 00 00 00 00
1262
00 00 00 00 00 00 00 00
1263
00 00 00 00 00 00 00 00
1264
00 00 00 00 00 00 00 00
1265
00 00 00 00 00 00 00 00
1266
00 00 00 00 00 00 00 00
1267
00 00 00 00 00 00 00 00
1268
 
1269
00 00 00 00 00 00 00 00
1270
00 00 00 00 00 00 00 00
1271
00 00 00 00 00 00 00 00
1272
 
1273
fe fe
1274
00 00
1275
00 00
1276
-----------------------------------------------------------
1277
NVRAM layout details
1278
 
1279
NVRAM Address 0x000-0x0ff not used
1280
              0x100-0x26f initialised data
1281
              0x270-0x7ff not used
1282
 
1283
general layout
1284
 
1285
        header  -   6 bytes,
1286
        data    - 356 bytes (checksum is byte sum of this data)
1287
        trailer -   6 bytes
1288
                  ---
1289
        total     368 bytes
1290
 
1291
data area layout
1292
 
1293
        controller set up  -  20 bytes
1294
        boot configuration -  56 bytes (4x14 bytes)
1295
        device set up      - 128 bytes (16x8 bytes)
1296
        unused (spare?)    - 152 bytes (19x8 bytes)
1297
                             ---
1298
        total                356 bytes
1299
 
1300
-----------------------------------------------------------
1301
header
1302
 
1303
00 00   - ?? start marker
1304
64 01   - byte count (lsb/msb excludes header/trailer)
1305
8e 0b   - checksum (lsb/msb excludes header/trailer)
1306
-----------------------------------------------------------
1307
controller set up
1308
 
1309
00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
1310
                   |     |           |     |
1311
                   |     |           |      -- host ID
1312
                   |     |           |
1313
                   |     |            --Removable Media Support
1314
                   |     |               0x00 = none
1315
                   |     |               0x01 = Bootable Device
1316
                   |     |               0x02 = All with Media
1317
                   |     |
1318
                   |      --flag bits 2
1319
                   |        0x00000001= scan order hi->low
1320
                   |            (default 0x00 - scan low->hi)
1321
                    --flag bits 1
1322
                       0x00000001 scam enable
1323
                       0x00000010 parity enable
1324
                       0x00000100 verbose boot msgs
1325
 
1326
remaining bytes unknown - they do not appear to change in my
1327
current set up for any of the controllers.
1328
 
1329
default set up is identical for 53c810a and 53c875 NVRAM
1330
(Removable Media added Symbios BIOS version 4.09)
1331
-----------------------------------------------------------
1332
boot configuration
1333
 
1334
boot order set by order of the devices in this table
1335
 
1336
04 00 0f 00 00 10 00 50 00 00 01 00 00 62 -- 1st controller
1337
04 00 03 00 00 10 00 58 00 00 01 00 00 63    2nd controller
1338
04 00 01 00 00 10 00 48 00 00 01 00 00 61    3rd controller
1339
00 00 00 00 00 00 00 00 00 00 00 00 00 00    4th controller
1340
       |  |  |  |     |        |     |  |
1341
       |  |  |  |     |        |      ---- PCI io port adr
1342
       |  |  |  |     |         --0x01 init/scan at boot time
1343
       |  |  |  |      --PCI device/function number (0xdddddfff)
1344
       |  |   ----- ?? PCI vendor ID (lsb/msb)
1345
        ----PCI device ID (lsb/msb)
1346
 
1347
?? use of this data is a guess but seems reasonable
1348
 
1349
remaining bytes unknown - they do not appear to change in my
1350
current set up
1351
 
1352
default set up is identical for 53c810a and 53c875 NVRAM
1353
-----------------------------------------------------------
1354
device set up (up to 16 devices - includes controller)
1355
 
1356
0f 00 08 08 64 00 0a 00 - id 0
1357
0f 00 08 08 64 00 0a 00
1358
0f 00 08 08 64 00 0a 00
1359
0f 00 08 08 64 00 0a 00
1360
0f 00 08 08 64 00 0a 00
1361
0f 00 08 08 64 00 0a 00
1362
0f 00 08 08 64 00 0a 00
1363
0f 00 08 08 64 00 0a 00
1364
 
1365
0f 00 08 08 64 00 0a 00
1366
0f 00 08 08 64 00 0a 00
1367
0f 00 08 08 64 00 0a 00
1368
0f 00 08 08 64 00 0a 00
1369
0f 00 08 08 64 00 0a 00
1370
0f 00 08 08 64 00 0a 00
1371
0f 00 08 08 64 00 0a 00
1372
0f 00 08 08 64 00 0a 00 - id 15
1373
 |     |  |  |     |  |
1374
 |     |  |  |      ----timeout (lsb/msb)
1375
 |     |  |   --synch period (0x?? 40 Mtrans/sec- fast 40) (probably 0x28)
1376
 |     |  |                  (0x30 20 Mtrans/sec- fast 20)
1377
 |     |  |                  (0x64 10 Mtrans/sec- fast )
1378
 |     |  |                  (0xc8  5 Mtrans/sec)
1379
 |     |  |                  (0x00  asynchronous)
1380
 |     |   -- ?? max sync offset (0x08 in NVRAM on 53c810a)
1381
 |     |                         (0x10 in NVRAM on 53c875)
1382
 |      --device bus width (0x08 narrow)
1383
 |                         (0x10 16 bit wide)
1384
  --flag bits
1385
    0x00000001 - disconnect enabled
1386
    0x00000010 - scan at boot time
1387
    0x00000100 - scan luns
1388
    0x00001000 - queue tags enabled
1389
 
1390
remaining bytes unknown - they do not appear to change in my
1391
current set up
1392
 
1393
?? use of this data is a guess but seems reasonable
1394
(but it could be max bus width)
1395
 
1396
default set up for 53c810a NVRAM
1397
default set up for 53c875 NVRAM - bus width     - 0x10
1398
                                - sync offset ? - 0x10
1399
                                - sync period   - 0x30
1400
-----------------------------------------------------------
1401
?? spare device space (32 bit bus ??)
1402
 
1403
00 00 00 00 00 00 00 00  (19x8bytes)
1404
.
1405
.
1406
00 00 00 00 00 00 00 00
1407
 
1408
default set up is identical for 53c810a and 53c875 NVRAM
1409
-----------------------------------------------------------
1410
trailer
1411
 
1412
fe fe   - ? end marker ?
1413
00 00
1414
00 00
1415
 
1416
default set up is identical for 53c810a and 53c875 NVRAM
1417
-----------------------------------------------------------
1418
 
1419
 
1420
 
1421
17.3 Tekram NVRAM layout
1422
 
1423
nvram 64x16 (1024 bit)
1424
 
1425
Drive settings
1426
 
1427
Drive ID 0-15 (addr 0x0yyyy0 = device setup, yyyy = ID)
1428
              (addr 0x0yyyy1 = 0x0000)
1429
 
1430
    x x x x  x x x x  x x x x  x x x x
1431
               | | |      | |  | | | |
1432
               | | |      | |  | | |  ----- parity check   0 - off
1433
               | | |      | |  | | |                       1 - on
1434
               | | |      | |  | | |
1435
               | | |      | |  | |  ------- sync neg       0 - off
1436
               | | |      | |  | |                         1 - on
1437
               | | |      | |  | |
1438
               | | |      | |  |  --------- disconnect     0 - off
1439
               | | |      | |  |                           1 - on
1440
               | | |      | |  |
1441
               | | |      | |   ----------- start cmd      0 - off
1442
               | | |      | |                              1 - on
1443
               | | |      | |
1444
               | | |      |  -------------- tagged cmds    0 - off
1445
               | | |      |                                1 - on
1446
               | | |      |
1447
               | | |       ---------------- wide neg       0 - off
1448
               | | |                                       1 - on
1449
               | | |
1450
                --------------------------- sync rate      0 - 10.0 Mtrans/sec
1451
                                                           1 -  8.0
1452
                                                           2 -  6.6
1453
                                                           3 -  5.7
1454
                                                           4 -  5.0
1455
                                                           5 -  4.0
1456
                                                           6 -  3.0
1457
                                                           7 -  2.0
1458
                                                           7 -  2.0
1459
                                                           8 - 20.0
1460
                                                           9 - 16.7
1461
                                                           a - 13.9
1462
                                                           b - 11.9
1463
 
1464
Global settings
1465
 
1466
Host flags 0 (addr 0x100000, 32)
1467
 
1468
    x x x x  x x x x  x x x x  x x x x
1469
    | | | |  | | | |           | | | |
1470
    | | | |  | | | |            ----------- host ID    0x00 - 0x0f
1471
    | | | |  | | | |
1472
    | | | |  | | |  ----------------------- support for    0 - off
1473
    | | | |  | | |                          > 2 drives     1 - on
1474
    | | | |  | | |
1475
    | | | |  | |  ------------------------- support drives 0 - off
1476
    | | | |  | |                            > 1Gbytes      1 - on
1477
    | | | |  | |
1478
    | | | |  |  --------------------------- bus reset on   0 - off
1479
    | | | |  |                                power on     1 - on
1480
    | | | |  |
1481
    | | | |   ----------------------------- active neg     0 - off
1482
    | | | |                                                1 - on
1483
    | | | |
1484
    | | |  -------------------------------- imm seek       0 - off
1485
    | | |                                                  1 - on
1486
    | | |
1487
    | |  ---------------------------------- scan luns      0 - off
1488
    | |                                                    1 - on
1489
    | |
1490
     -------------------------------------- removable      0 - disable
1491
                                            as BIOS dev    1 - boot device
1492
                                                           2 - all
1493
 
1494
Host flags 1 (addr 0x100001, 33)
1495
 
1496
    x x x x  x x x x  x x x x  x x x x
1497
               | | |             | | |
1498
               | | |              --------- boot delay     0 -   3 sec
1499
               | | |                                       1 -   5
1500
               | | |                                       2 -  10
1501
               | | |                                       3 -  20
1502
               | | |                                       4 -  30
1503
               | | |                                       5 -  60
1504
               | | |                                       6 - 120
1505
               | | |
1506
                --------------------------- max tag cmds   0 -  2
1507
                                                           1 -  4
1508
                                                           2 -  8
1509
                                                           3 - 16
1510
                                                           4 - 32
1511
 
1512
Host flags 2 (addr 0x100010, 34)
1513
 
1514
    x x x x  x x x x  x x x x  x x x x
1515
                                     |
1516
                                      ----- F2/F6 enable   0 - off ???
1517
                                                           1 - on  ???
1518
 
1519
checksum (addr 0x111111)
1520
 
1521
checksum = 0x1234 - (sum addr 0-63)
1522
 
1523
----------------------------------------------------------------------------
1524
 
1525
default nvram data:
1526
 
1527
0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1528
0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1529
0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1530
0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1531
 
1532
0x0f07 0x0400 0x0001 0x0000 0x0000 0x0000 0x0000 0x0000
1533
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
1534
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
1535
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0xfbbc
1536
 
1537
 
1538
18. Support for Big Endian
1539
 
1540
The PCI local bus has been primarily designed for x86 architecture.
1541
As a consequence, PCI devices generally expect DWORDS using little endian
1542
byte ordering.
1543
 
1544
18.1 Big Endian CPU
1545
 
1546
In order to support NCR chips on a Big Endian architecture the driver has to
1547
perform byte reordering each time it is needed. This feature has been
1548
added to the driver by Cort  and is available in driver
1549
version 2.5 and later ones. For the moment Big Endian support has only
1550
been tested on Linux/PPC (PowerPC).
1551
 
1552
18.2 NCR chip in Big Endian mode of operations
1553
 
1554
It can be read in SYMBIOS documentation that some chips support a special
1555
Big Endian mode, on paper: 53C815, 53C825A, 53C875, 53C875N, 53C895.
1556
This mode of operations is not software-selectable, but needs pin named
1557
BigLit to be pulled-up. Using this mode, most of byte reorderings should
1558
be avoided when the driver is running on a Big Endian CPU.
1559
Driver version 2.5 is also, in theory, ready for this feature.
1560
 
1561
===============================================================================
1562
End of NCR53C8XX driver README file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.