linux-bk/Documentation/scsi/ncr53c8xx.txt
<<
>>
Prefs
   1The Linux NCR53C8XX/SYM53C8XX drivers README file
   2
   3Written by Gerard Roudier <groudier@free.fr>
   421 Rue Carnot
   595170 DEUIL LA BARRE - FRANCE
   6
   729 May 1999
   8===============================================================================
   9
  101.  Introduction
  112.  Supported chips and SCSI features
  123.  Advantages of the enhanced 896 driver
  13      3.1 Optimized SCSI SCRIPTS
  14      3.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)
  154.  Memory mapped I/O versus normal I/O
  165.  Tagged command queueing
  176.  Parity checking
  187.  Profiling information
  198.  Control commands
  20      8.1  Set minimum synchronous period
  21      8.2  Set wide size
  22      8.3  Set maximum number of concurrent tagged commands
  23      8.4  Set order type for tagged command
  24      8.5  Set debug mode
  25      8.6  Clear profile counters
  26      8.7  Set flag (no_disc)
  27      8.8  Set verbose level
  28      8.9  Reset all logical units of a target
  29      8.10 Abort all tasks of all logical units of a target
  309.  Configuration parameters
  3110. Boot setup commands
  32      10.1 Syntax
  33      10.2 Available arguments
  34             10.2.1  Master parity checking
  35             10.2.2  Scsi parity checking
  36             10.2.3  Scsi disconnections
  37             10.2.4  Special features
  38             10.2.5  Ultra SCSI support
  39             10.2.6  Default number of tagged commands
  40             10.2.7  Default synchronous period factor
  41             10.2.8  Negotiate synchronous with all devices
  42             10.2.9  Verbosity level
  43             10.2.10 Debug mode
  44             10.2.11 Burst max
  45             10.2.12 LED support
  46             10.2.13 Max wide
  47             10.2.14 Differential mode
  48             10.2.15 IRQ mode
  49             10.2.16 Reverse probe
  50             10.2.17 Fix up PCI configuration space
  51             10.2.18 Serial NVRAM
  52             10.2.19 Check SCSI BUS 
  53             10.2.20 Exclude a host from being attached
  54             10.2.21 Suggest a default SCSI id for hosts
  55             10.2.22 Enable use of IMMEDIATE ARBITRATION
  56      10.3 Advised boot setup commands
  57      10.4 PCI configuration fix-up boot option
  58      10.5 Serial NVRAM support boot option
  59      10.6 SCSI BUS checking boot option
  60      10.7 IMMEDIATE ARBITRATION boot option
  6111. Some constants and flags of the ncr53c8xx.h header file
  6212. Installation
  6313. Architecture dependent features
  6414. Known problems
  65      14.1 Tagged commands with Iomega Jaz device
  66      14.2 Device names change when another controller is added
  67      14.3 Using only 8 bit devices with a WIDE SCSI controller.
  68      14.4 Possible data corruption during a Memory Write and Invalidate
  69      14.5 IRQ sharing problems
  7015. SCSI problem troubleshooting
  71      15.1 Problem tracking
  72      15.2 Understanding hardware error reports
  7316. Synchonous transfer negotiation tables
  74      16.1 Synchronous timings for 53C875 and 53C860 Ultra-SCSI controllers
  75      16.2 Synchronous timings for fast SCSI-2 53C8XX controllers
  7617. Serial NVRAM support (by Richard Waltham)
  77      17.1 Features
  78      17.2 Symbios NVRAM layout
  79      17.3 Tekram  NVRAM layout
  8018. Support for Big Endian
  81      18.1 Big Endian CPU
  82      18.2 NCR chip in Big Endian mode of operations
  83
  84===============================================================================
  85
  861. Introduction
  87
  88The initial Linux ncr53c8xx driver has been a port of the ncr driver from 
  89FreeBSD that has been achieved in November 1995 by:
  90          Gerard Roudier              <groudier@free.fr>
  91
  92The original driver has been written for 386bsd and FreeBSD by:
  93          Wolfgang Stanglmeier        <wolf@cologne.de>
  94          Stefan Esser                <se@mi.Uni-Koeln.de>
  95
  96It is now available as a bundle of 2 drivers:
  97
  98- ncr53c8xx generic driver that supports all the SYM53C8XX family including 
  99  the ealiest 810 rev. 1, the latest 896 (2 channel LVD SCSI controller) and
 100  the new 895A (1 channel LVD SCSI controller).
 101- sym53c8xx enhanced driver (a.k.a. 896 drivers) that drops support of oldest 
 102  chips in order to gain advantage of new features, as LOAD/STORE intructions 
 103  available since the 810A and hardware phase mismatch available with the 
 104  896 and the 895A.
 105
 106You can find technical information about the NCR 8xx family in the
 107PCI-HOWTO written by Michael Will and in the SCSI-HOWTO written by
 108Drew Eckhardt.
 109
 110Information about new chips is available at LSILOGIC web server:
 111
 112          http://www.lsilogic.com/
 113
 114SCSI standard documentations are available at SYMBIOS ftp server:
 115
 116          ftp://ftp.symbios.com/
 117
 118Usefull SCSI tools written by Eric Youngdale are available at tsx-11:
 119
 120          ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsiinfo-X.Y.tar.gz
 121          ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsidev-X.Y.tar.gz
 122
 123These tools are not ALPHA but quite clean and work quite well.
 124It is essential you have the 'scsiinfo' package.
 125
 126This short documentation describes the features of the generic and enhanced
 127drivers, configuration parameters and control commands available through 
 128the proc SCSI file system read / write operations.
 129
 130This driver has been tested OK with linux/i386, Linux/Alpha and Linux/PPC.
 131
 132Latest driver version and patches are available at:
 133
 134          ftp://ftp.tux.org/pub/people/gerard-roudier
 135or
 136          ftp://ftp.symbios.com/mirror/ftp.tux.org/pub/tux/roudier/drivers
 137
 138I am not a native speaker of English and there are probably lots of
 139mistakes in this README file. Any help will be welcome.
 140
 141
 1422. Supported chips and SCSI features
 143
 144The following features are supported for all chips:
 145
 146        Synchronous negotiation
 147        Disconnection
 148        Tagged command queuing
 149        SCSI parity checking
 150        Master parity checking
 151
 152"Wide negotiation" is supported for chips that allow it.  The
 153following table shows some characteristics of NCR 8xx family chips 
 154and what drivers support them.
 155
 156                                                  Supported by   Supported by
 157       On board                                   the generic    the enhanced 
 158Chip   SDMS BIOS   Wide   SCSI std.   Max. sync   driver         driver
 159----   ---------   ----   ---------   ----------  ------------   -------------
 160810        N         N      FAST10    10 MB/s        Y             N
 161810A       N         N      FAST10    10 MB/s        Y             Y
 162815        Y         N      FAST10    10 MB/s        Y             N
 163825        Y         Y      FAST10    20 MB/s        Y             N
 164825A       Y         Y      FAST10    20 MB/s        Y             Y
 165860        N         N      FAST20    20 MB/s        Y             Y
 166875        Y         Y      FAST20    40 MB/s        Y             Y
 167876        Y         Y      FAST20    40 MB/s        Y             Y
 168895        Y         Y      FAST40    80 MB/s        Y             Y
 169895A       Y         Y      FAST40    80 MB/s        Y             Y
 170896        Y         Y      FAST40    80 MB/s        Y             Y
 171897        Y         Y      FAST40    80 MB/s        Y             Y
 1721510D      Y         Y      FAST40    80 MB/s        Y             Y
 1731010       Y         Y      FAST80   160 MB/s        N             Y
 1741010_66*   Y         Y      FAST80   160 MB/s        N             Y
 175
 176* Chip supports 33MHz and 66MHz PCI buses.
 177
 178
 179Summary of other supported features:
 180
 181Module:                allow to load the driver
 182Memory mapped I/O:     increases performance
 183Profiling information: read operations from the proc SCSI file system
 184Control commands:      write operations to the proc SCSI file system
 185Debugging information: written to syslog (expert only)
 186Scatter / gather
 187Shared interrupt
 188Boot setup commands
 189Serial NVRAM:          Symbios and Tekram formats
 190
 191
 1923. Advantages of the enhanced 896 driver
 193
 1943.1 Optimized SCSI SCRIPTS.
 195
 196The 810A, 825A, 875, 895, 896 and 895A support new SCSI SCRIPTS instructions 
 197named LOAD and STORE that allow to move up to 1 DWORD from/to an IO register 
 198to/from memory much faster that the MOVE MEMORY instruction that is supported 
 199by the 53c7xx and 53c8xx family.
 200The LOAD/STORE instructions support absolute and DSA relative addressing 
 201modes.  The SCSI SCRIPTS had been entirely rewritten using LOAD/STORE instead 
 202of MOVE MEMORY instructions.
 203
 2043.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)
 205
 206The 896 and the 895A allows handling of the phase mismatch context from 
 207SCRIPTS (avoids the phase mismatch interrupt that stops the SCSI processor 
 208until the C code has saved the context of the transfer).
 209Implementing this without using LOAD/STORE instructions would be painfull 
 210and I did'nt even want to try it.
 211
 212The 896 chip supports 64 bit PCI transactions and addressing, while the 
 213895A supports 32 bit PCI transactions and 64 bit addressing.
 214The SCRIPTS processor of these chips is not true 64 bit, but uses segment 
 215registers for bit 32-63. Another interesting feature is that LOAD/STORE 
 216instructions that address the on-chip RAM (8k) remain internal to the chip.
 217
 218Due to the use of LOAD/STORE SCRIPTS instructions, this driver does not 
 219support the following chips:
 220- SYM53C810 revision < 0x10 (16)
 221- SYM53C815 all revisions
 222- SYM53C825 revision < 0x10 (16)
 223
 2244. Memory mapped I/O versus normal I/O
 225
 226Memory mapped I/O has less latency than normal I/O.  Since
 227linux-1.3.x, memory mapped I/O is used rather than normal I/O.  Memory
 228mapped I/O seems to work fine on most hardware configurations, but
 229some poorly designed motherboards may break this feature.
 230
 231The configuration option CONFIG_SCSI_NCR53C8XX_IOMAPPED forces the
 232driver to use normal I/O in all cases.
 233
 234
 2355. Tagged command queueing
 236
 237Queuing more than 1 command at a time to a device allows it to perform 
 238optimizations based on actual head positions and its mechanical 
 239characteristics. This feature may also reduce average command latency.
 240In order to really gain advantage of this feature, devices must have 
 241a reasonable cache size (No miracle is to be expected for a low-end 
 242hard disk with 128 KB or less).
 243Some kown SCSI devices do not properly support tagged command queuing.
 244Generally, firmware revisions that fix this kind of problems are available 
 245at respective vendor web/ftp sites.
 246All I can say is that the hard disks I use on my machines behave well with 
 247this driver with tagged command queuing enabled:
 248
 249- IBM S12 0662
 250- Conner 1080S
 251- Quantum Atlas I
 252- Quantum Atlas II
 253
 254If your controller has NVRAM, you can configure this feature per target 
 255from the user setup tool. The Tekram Setup program allows to tune the 
 256maximum number of queued commands up to 32. The Symbios Setup only allows 
 257to enable or disable this feature.
 258
 259The maximum number of simultaneous tagged commands queued to a device
 260is currently set to 8 by default.  This value is suitable for most SCSI
 261disks.  With large SCSI disks (>= 2GB, cache >= 512KB, average seek time
 262<= 10 ms), using a larger value may give better performances.
 263
 264The sym53c8xx driver supports up to 255 commands per device, and the 
 265generic ncr53c8xx driver supports up to 64, but using more than 32 is 
 266generally not worth-while, unless you are using a very large disk or disk 
 267array. It is noticeable that most of recent hard disks seem not to accept 
 268more than 64 simultaneous commands. So, using more than 64 queued commands 
 269is probably just resource wasting.
 270
 271If your controller does not have NVRAM or if it is managed by the SDMS 
 272BIOS/SETUP, you can configure tagged queueing feature and device queue 
 273depths from the boot command-line. For example:
 274
 275  ncr53c8xx=tags:4/t2t3q15-t4q7/t1u0q32
 276
 277will set tagged commands queue depths as follow:
 278
 279- target 2  all luns  on controller 0 --> 15
 280- target 3  all luns  on controller 0 --> 15
 281- target 4  all luns  on controller 0 -->  7
 282- target 1  lun 0     on controller 1 --> 32
 283- all other target/lun                -->  4
 284
 285In some special conditions, some SCSI disk firmwares may return a
 286QUEUE FULL status for a SCSI command. This behaviour is managed by the
 287driver using the following heuristic:
 288
 289- Each time a QUEUE FULL status is returned, tagged queue depth is reduced 
 290  to the actual number of disconnected commands. 
 291
 292- Every 1000 successfully completed SCSI commands, if allowed by the
 293  current limit, the maximum number of queueable commands is incremented.
 294
 295Since QUEUE FULL status reception and handling is resource wasting, the 
 296driver notifies by default this problem to user by indicating the actual 
 297number of commands used and their status, as well as its decision on the 
 298device queue depth change.
 299The heuristic used by the driver in handling QUEUE FULL ensures that the 
 300impact on performances is not too bad. You can get rid of the messages by 
 301setting verbose level to zero, as follow:
 302
 3031st method: boot your system using 'ncr53c8xx=verb:0' option.
 3042nd method: apply "setverbose 0" control command to the proc fs entry 
 305            corresponding to your controller after boot-up.
 306
 3076. Parity checking
 308
 309The driver supports SCSI parity checking and PCI bus master parity
 310checking.  These features must be enabled in order to ensure safe data
 311transfers.  However, some flawed devices or mother boards will have
 312problems with parity. You can disable either PCI parity or SCSI parity 
 313checking by entering appropriate options from the boot command line.
 314(See 10: Boot setup commands).
 315
 3167. Profiling information
 317
 318Profiling information is available through the proc SCSI file system.
 319Since gathering profiling information may impact performances, this 
 320feature is disabled by default and requires a compilation configuration 
 321option to be set to Y.
 322
 323The device associated with a host has the following pathname:
 324
 325          /proc/scsi/ncr53c8xx/N     (N=0,1,2 ....)
 326
 327Generally, only 1 board is used on hardware configuration, and that device is:
 328          /proc/scsi/ncr53c8xx/0
 329
 330However, if the driver has been made as module, the number of the
 331hosts is incremented each time the driver is loaded.
 332
 333In order to display profiling information, just enter:
 334
 335         cat /proc/scsi/ncr53c8xx/0
 336
 337and you will get something like the following text:
 338
 339-------------------------------------------------------
 340General information:
 341  Chip NCR53C810, device id 0x1, revision id 0x2
 342  IO port address 0x6000, IRQ number 10
 343  Using memory mapped IO at virtual address 0x282c000
 344  Synchronous transfer period 25, max commands per lun 4
 345Profiling information:
 346  num_trans    = 18014
 347  num_kbytes   = 671314
 348  num_disc     = 25763
 349  num_break    = 1673
 350  num_int      = 1685
 351  num_fly      = 18038
 352  ms_setup     = 4940
 353  ms_data      = 369940
 354  ms_disc      = 183090
 355  ms_post      = 1320
 356-------------------------------------------------------
 357
 358General information is easy to understand. The device ID and the
 359revision ID identify the SCSI chip as follows:
 360
 361Chip    Device id     Revision Id
 362----    ---------     -----------
 363810       0x1            <  0x10
 364810A      0x1            >= 0x10
 365815       0x4
 366825       0x3            <  0x10
 367860       0x6
 368825A      0x3            >= 0x10
 369875       0xf
 370895       0xc
 371
 372The profiling information is updated upon completion of SCSI commands.
 373A data structure is allocated and zeroed when the host adapter is
 374attached. So, if the driver is a module, the profile counters are
 375cleared each time the driver is loaded.  The "clearprof" command
 376allows you to clear these counters at any time.
 377
 378The following counters are available:
 379
 380("num" prefix means "number of",
 381"ms" means milli-seconds)
 382
 383num_trans
 384        Number of completed commands
 385        Example above: 18014 completed commands
 386
 387num_kbytes
 388        Number of kbytes transferred
 389        Example above: 671 MB transferred
 390
 391num_disc
 392        Number of SCSI disconnections
 393        Example above: 25763 SCSI disconnections
 394
 395num_break
 396        number of script interruptions (phase mismatch)
 397        Example above: 1673 script interruptions
 398
 399num_int
 400        Number of interrupts other than "on the fly"
 401        Example above: 1685 interruptions not "on the fly"
 402
 403num_fly
 404        Number of interrupts "on the fly"
 405        Example above: 18038 interruptions "on the fly"
 406
 407ms_setup
 408        Elapsed time for SCSI commands setups
 409        Example above: 4.94 seconds
 410
 411ms_data
 412        Elapsed time for data transfers
 413        Example above: 369.94 seconds spent for data transfer
 414
 415ms_disc
 416        Elapsed time for SCSI disconnections
 417        Example above: 183.09 seconds spent disconnected
 418
 419ms_post
 420        Elapsed time for command post processing
 421        (time from SCSI status get to command completion call)
 422        Example above: 1.32 seconds spent for post processing
 423
 424Due to the 1/100 second tick of the system clock, "ms_post" time may
 425be wrong.
 426
 427In the example above, we got 18038 interrupts "on the fly" and only
 4281673 script breaks generally due to disconnections inside a segment 
 429of the scatter list.
 430
 431
 4328. Control commands
 433
 434Control commands can be sent to the driver with write operations to
 435the proc SCSI file system. The generic command syntax is the
 436following:
 437
 438      echo "<verb> <parameters>" >/proc/scsi/ncr53c8xx/0
 439      (assumes controller number is 0)
 440
 441Using "all" for "<target>" parameter with the commands below will
 442apply to all targets of the SCSI chain (except the controller).
 443
 444Available commands:
 445
 4468.1 Set minimum synchronous period factor
 447
 448    setsync <target> <period factor>
 449
 450    target:    target number
 451    period:    minimum synchronous period.
 452               Maximum speed = 1000/(4*period factor) except for special
 453               cases below.
 454
 455    Specify a period of 255, to force asynchronous transfer mode.
 456
 457      10 means 25 nano-seconds synchronous period
 458      11 means 30 nano-seconds synchronous period
 459      12 means 50 nano-seconds synchronous period
 460
 4618.2 Set wide size
 462
 463    setwide <target> <size>
 464
 465    target:    target number
 466    size:      0=8 bits, 1=16bits
 467
 4688.3 Set maximum number of concurrent tagged commands
 469 
 470    settags <target> <tags>
 471
 472    target:    target number
 473    tags:      number of concurrent tagged commands
 474               must not be greater than SCSI_NCR_MAX_TAGS (default: 8)
 475
 4768.4 Set order type for tagged command
 477
 478    setorder <order>
 479
 480    order:     3 possible values:
 481               simple: use SIMPLE TAG for all operations (read and write)
 482               ordered: use ORDERED TAG for all operations
 483               default: use default tag type,
 484                        SIMPLE  TAG for read  operations
 485                        ORDERED TAG for write operations
 486
 487
 4888.5 Set debug mode
 489
 490    setdebug <list of debug flags>
 491
 492    Available debug flags:
 493        alloc:   print info about memory allocations (ccb, lcb)
 494        queue:   print info about insertions into the command start queue
 495        result:  print sense data on CHECK CONDITION status
 496        scatter: print info about the scatter process
 497        scripts: print info about the script binding process
 498        tiny:    print minimal debugging information
 499        timing:  print timing information of the NCR chip
 500        nego:    print information about SCSI negotiations
 501        phase:   print information on script interruptions
 502
 503    Use "setdebug" with no argument to reset debug flags.
 504
 505
 5068.6 Clear profile counters
 507
 508    clearprof
 509
 510    The profile counters are automatically cleared when the amount of
 511    data transferred reaches 1000 GB in order to avoid overflow.
 512    The "clearprof" command allows you to clear these counters at any time.
 513
 514
 5158.7 Set flag (no_disc)
 516 
 517    setflag <target> <flag>
 518
 519    target:    target number
 520
 521    For the moment, only one flag is available:
 522
 523        no_disc:   not allow target to disconnect.
 524
 525    Do not specify any flag in order to reset the flag. For example:
 526    - setflag 4
 527      will reset no_disc flag for target 4, so will allow it disconnections.
 528    - setflag all
 529      will allow disconnection for all devices on the SCSI bus.
 530
 531
 5328.8 Set verbose level
 533
 534    setverbose #level
 535
 536    The driver default verbose level is 1. This command allows to change 
 537    th driver verbose level after boot-up.
 538
 5398.9 Reset all logical units of a target
 540
 541    resetdev <target>
 542
 543    target:    target number
 544    The driver will try to send a BUS DEVICE RESET message to the target.
 545    (Only supported by the SYM53C8XX driver and provided for test purpose)
 546
 5478.10 Abort all tasks of all logical units of a target
 548
 549    cleardev <target>
 550
 551    target:    target number
 552    The driver will try to send a ABORT message to all the logical units 
 553    of the target.
 554    (Only supported by the SYM53C8XX driver and provided for test purpose)
 555
 556
 5579. Configuration parameters
 558
 559If the firmware of all your devices is perfect enough, all the
 560features supported by the driver can be enabled at start-up.  However,
 561if only one has a flaw for some SCSI feature, you can disable the
 562support by the driver of this feature at linux start-up and enable
 563this feature after boot-up only for devices that support it safely.
 564
 565CONFIG_SCSI_NCR53C8XX_PROFILE_SUPPORT  (default answer: n)
 566    This option must be set for profiling information to be gathered 
 567    and printed out through the proc file system. This features may 
 568    impact performances.
 569
 570CONFIG_SCSI_NCR53C8XX_IOMAPPED       (default answer: n)
 571    Answer "y" if you suspect your mother board to not allow memory mapped I/O.
 572    May slow down performance a little.  This option is required by
 573    Linux/PPC and is used no matter what you select here.  Linux/PPC
 574    suffers no performance loss with this option since all IO is memory
 575    mapped anyway.
 576
 577CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS    (default answer: 8)
 578    Default tagged command queue depth.
 579
 580CONFIG_SCSI_NCR53C8XX_MAX_TAGS         (default answer: 8)
 581    This option allows you to specify the maximum number of tagged commands 
 582    that can be queued to a device. The maximum supported value is 32.
 583
 584CONFIG_SCSI_NCR53C8XX_SYNC            (default answer: 5)
 585    This option allows you to specify the frequency in MHz the driver 
 586    will use at boot time for synchronous data transfer negotiations.
 587    This frequency can be changed later with the "setsync" control command.
 588    0 means "asynchronous data transfers".
 589
 590CONFIG_SCSI_NCR53C8XX_FORCE_SYNC_NEGO (default answer: n)
 591    Force synchronous negotiation for all SCSI-2 devices.
 592    Some SCSI-2 devices do not report this feature in byte 7 of inquiry 
 593    response but do support it properly (TAMARACK scanners for example).
 594
 595CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT   (default and only reasonable answer: n)
 596    If you suspect a device of yours does not properly support disconnections,
 597    you can answer "y". Then, all SCSI devices will never disconnect the bus 
 598    even while performing long SCSI operations.
 599
 600CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
 601    Genuine SYMBIOS boards use GPIO0 in output for controller LED and GPIO3 
 602    bit as a flag indicating singled-ended/differential interface.
 603    If all the boards of your system are genuine SYMBIOS boards or use
 604    BIOS and drivers from SYMBIOS, you would want to enable this option.
 605    This option must NOT be enabled if your system has at least one 53C8XX 
 606    based scsi board with a vendor-specific BIOS.
 607    For example, Tekram DC-390/U, DC-390/W and DC-390/F scsi controllers 
 608    use a vendor-specific BIOS and are known to not use SYMBIOS compatible 
 609    GPIO wiring. So, this option must not be enabled if your system has 
 610    such a board installed.
 611
 612CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
 613    Enable support for reading the serial NVRAM data on Symbios and
 614    some Symbios compatible cards, and Tekram DC390W/U/F cards. Useful for
 615    systems with more than one Symbios compatible controller where at least
 616    one has a serial NVRAM, or for a system with a mixture of Symbios and
 617    Tekram cards. Enables setting the boot order of host adaptors
 618    to something other than the default order or "reverse probe" order. 
 619    Also enables Symbios and Tekram cards to be distinguished so
 620    CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT may be set in a system with a
 621    mixture of Symbios and Tekram cards so the Symbios cards can make use of
 622    the full range of Symbios features, differential, led pin, without
 623    causing problems for the Tekram card(s).
 624
 62510. Boot setup commands
 626
 62710.1 Syntax
 628
 629Setup commands can be passed to the driver either at boot time or as a 
 630string variable using 'insmod'.
 631
 632A boot setup command for the ncr53c8xx (sym53c8xx) driver begins with the 
 633driver name "ncr53c8xx="(sym53c8xx). The kernel syntax parser then expects 
 634an optionnal list of integers separated with comma followed by an optional 
 635list of  comma-separated strings. Example of boot setup command under lilo 
 636prompt:
 637
 638lilo: linux root=/dev/hda2 ncr53c8xx=tags:4,sync:10,debug:0x200
 639
 640- enable tagged commands, up to 4 tagged commands queued.
 641- set synchronous negotiation speed to 10 Mega-transfers / second.
 642- set DEBUG_NEGO flag.
 643
 644Since comma seems not to be allowed when defining a string variable using  
 645'insmod', the driver also accepts <space> as option separator. 
 646The following command will install driver module with the same options as 
 647above.
 648
 649    insmod ncr53c8xx.o ncr53c8xx="tags:4 sync:10 debug:0x200"
 650
 651For the moment, the integer list of arguments is discarded by the driver. 
 652It will be used in the future in order to allow a per controller setup.
 653
 654Each string argument must be specified as "keyword:value". Only lower-case 
 655characters and digits are allowed.
 656
 657In a system that contains multiple 53C8xx adapters insmod will install the 
 658specified driver on each adapter. To exclude a chip use the 'excl' keyword.
 659
 660The sequence of commands, 
 661
 662    insmod sym53c8xx sym53c8xx=excl:0x1400
 663    insmod ncr53c8xx
 664
 665installs the sym53c8xx driver on all adapters except the one at IO port 
 666address 0x1400 and then installs the ncr53c8xx driver to the adapter at IO 
 667port address 0x1400.
 668
 669
 67010.2 Available arguments
 671
 67210.2.1  Master parity checking
 673        mpar:y     enabled
 674        mpar:n     disabled
 675
 67610.2.2  Scsi parity checking
 677        spar:y     enabled
 678        spar:n     disabled
 679
 68010.2.3  Scsi disconnections
 681        disc:y     enabled
 682        disc:n     disabled
 683 
 68410.2.4  Special features
 685   Only apply to 810A, 825A, 860, 875 and 895 controllers.
 686   Have no effect with other ones.
 687        specf:y    (or 1) enabled
 688        specf:n    (or 0) disabled
 689        specf:3           enabled except Memory Write And Invalidate
 690   The default driver setup is 'specf:3'. As a consequence, option 'specf:y' 
 691   must be specified in the boot setup command to enable Memory Write And 
 692   Invalidate.
 693
 69410.2.5  Ultra SCSI support
 695   Only apply to 860, 875, 895, 895a, 896, 1010 and 1010_66 controllers.
 696   Have no effect with other ones.
 697        ultra:n    All ultra speeds enabled
 698        ultra:2    Ultra2 enabled
 699        ultra:1    Ultra enabled
 700        ultra:0    Ultra speeds disabled
 701
 70210.2.6  Default number of tagged commands
 703        tags:0     (or tags:1 ) tagged command queuing disabled
 704        tags:#tags (#tags  > 1) tagged command queuing enabled
 705  #tags will be truncated to the max queued commands configuration parameter.
 706  This option also allows to specify a command queue depth for each device 
 707  that support tagged command queueing.
 708  Example:
 709      ncr53c8xx=tags:10/t2t3q16-t5q24/t1u2q32
 710               will set devices queue depth as follow:
 711      - controller #0 target #2 and target #3                  -> 16 commands,
 712      - controller #0 target #5                                -> 24 commands,
 713      - controller #1 target #1 logical unit #2                -> 32 commands,
 714      - all other logical units (all targets, all controllers) -> 10 commands.
 715
 71610.2.7  Default synchronous period factor
 717        sync:255     disabled (asynchronous transfer mode)
 718        sync:#factor
 719  #factor = 10     Ultra-2 SCSI 40 Mega-transfers / second
 720  #factor = 11     Ultra-2 SCSI 33 Mega-transfers / second
 721  #factor < 25     Ultra   SCSI 20 Mega-transfers / second
 722  #factor < 50     Fast    SCSI-2
 723
 724  In all cases, the driver will use the minimum transfer period supported by 
 725  controllers according to NCR53C8XX chip type.
 726
 72710.2.8  Negotiate synchronous with all devices
 728        (force sync nego)
 729        fsn:y      enabled
 730        fsn:n      disabled
 731
 73210.2.9  Verbosity level
 733        verb:0     minimal
 734        verb:1     normal
 735        verb:2     too much
 736
 73710.2.10 Debug mode
 738        debug:0  clear debug flags
 739        debug:#x   set debug flags
 740  #x is an integer value combining the following power-of-2 values:
 741  DEBUG_ALLOC       0x1
 742  DEBUG_PHASE       0x2
 743  DEBUG_POLL        0x4
 744  DEBUG_QUEUE       0x8
 745  DEBUG_RESULT     0x10
 746  DEBUG_SCATTER    0x20
 747  DEBUG_SCRIPT     0x40
 748  DEBUG_TINY       0x80
 749  DEBUG_TIMING    0x100
 750  DEBUG_NEGO      0x200
 751  DEBUG_TAGS      0x400
 752  DEBUG_FREEZE    0x800
 753  DEBUG_RESTART  0x1000
 754
 755  You can play safely with DEBUG_NEGO. However, some of these flags may 
 756  generate bunches of syslog messages. 
 757
 75810.2.11 Burst max
 759        burst:0    burst disabled
 760        burst:255  get burst length from initial IO register settings.
 761        burst:#x   burst enabled (1<<#x burst transfers max)
 762  #x is an integer value which is log base 2 of the burst transfers max.
 763  The NCR53C875 and NCR53C825A support up to 128 burst transfers (#x = 7).
 764  Other chips only support up to 16 (#x = 4).
 765  This is a maximum value. The driver set the burst length according to chip 
 766  and revision ids. By default the driver uses the maximum value supported 
 767  by the chip.
 768
 76910.2.12 LED support
 770        led:1      enable  LED support
 771        led:0      disable LED support
 772  Donnot enable LED support if your scsi board does not use SDMS BIOS.
 773  (See 'Configuration parameters')
 774
 77510.2.13 Max wide
 776        wide:1      wide scsi enabled
 777        wide:0      wide scsi disabled
 778  Some scsi boards use a 875 (ultra wide) and only supply narrow connectors.
 779  If you have connected a wide device with a 50 pins to 68 pins cable 
 780  converter, any accepted wide negotiation will break further data transfers.
 781  In such a case, using "wide:0" in the bootup command will be helpfull. 
 782
 78310.2.14 Differential mode
 784        diff:0  never set up diff mode
 785        diff:1  set up diff mode if BIOS set it
 786        diff:2  always set up diff mode
 787        diff:3  set diff mode if GPIO3 is not set
 788
 78910.2.15 IRQ mode
 790        irqm:0     always open drain
 791        irqm:1     same as initial settings (assumed BIOS settings)
 792        irqm:2     always totem pole
 793        irqm:0x10  driver will not use SA_SHIRQ flag when requesting irq
 794        irqm:0x20  driver will not use SA_INTERRUPT flag when requesting irq
 795
 796    (Bits 0x10 and 0x20 can be combined with hardware irq mode option)
 797
 79810.2.16 Reverse probe
 799        revprob:n   probe chip ids from the PCI configuration in this order:
 800                    810, 815, 820, 860, 875, 885, 895, 896
 801        revprob:y   probe chip ids in the reverse order.
 802
 80310.2.17 Fix up PCI configuration space
 804        pcifix:<option bits>
 805
 806    Available option bits:
 807        0x0:   No attempt to fix PCI configuration space registers values.
 808        0x1:   Set PCI cache-line size register if not set.
 809        0x2:   Set write and invalidate bit in PCI command register.
 810        0x4:   Increase if necessary PCI latency timer according to burst max.
 811
 812    Use 'pcifix:7' in order to allow the driver to fix up all PCI features.
 813
 81410.2.18 Serial NVRAM
 815        nvram:n     do not look for serial NVRAM
 816        nvram:y     test controllers for onboard serial NVRAM
 817        (alternate binary form)
 818        mvram=<bits options>
 819        0x01   look for NVRAM  (equivalent to nvram=y)
 820        0x02   ignore NVRAM "Synchronous negotiation" parameters for all devices
 821        0x04   ignore NVRAM "Wide negotiation"  parameter for all devices
 822        0x08   ignore NVRAM "Scan at boot time" parameter for all devices
 823        0x80   also attach controllers set to OFF in the NVRAM (sym53c8xx only)
 824
 82510.2.19 Check SCSI BUS 
 826        buschk:<option bits>
 827
 828    Available option bits:
 829        0x0:   No check.
 830        0x1:   Check and do not attach the controller on error.  
 831        0x2:   Check and just warn on error.
 832        0x4:   Disable SCSI bus integrity checking.
 833
 83410.2.20 Exclude a host from being attached
 835        excl=<io_address>
 836
 837    Prevent host at a given io address from being attached.
 838    For example 'ncr53c8xx=excl:0xb400,excl:0xc000' indicate to the 
 839    ncr53c8xx driver not to attach hosts at address 0xb400 and 0xc000.
 840
 84110.2.21 Suggest a default SCSI id for hosts
 842        hostid:255      no id suggested.
 843        hostid:#x   (0 < x < 7) x suggested for hosts SCSI id.
 844
 845    If a host SCSI id is available from the NVRAM, the driver will ignore 
 846    any value suggested as boot option. Otherwise, if a suggested value 
 847    different from 255 has been supplied, it will use it. Otherwise, it will 
 848    try to deduce the value previously set in the hardware and use value 
 849    7 if the hardware value is zero.
 850
 85110.2.22 Enable use of IMMEDIATE ARBITRATION
 852        (only supported by the sym53c8xx driver. See 10.7 for more details)
 853        iarb:0    do not use this feature.
 854        iarb:#x   use this feature according to bit fields as follow:
 855
 856    bit 0 (1) : enable IARB each time the initiator has been reselected 
 857                when it arbitrated for the SCSI BUS.
 858    (#x >> 4) : maximum number of successive settings of IARB if the initiator 
 859                win arbitration and it has other commands to send to a device.
 860
 861Boot fail safe
 862    safe:y      load the following assumed fail safe initial setup
 863
 864  master parity                 disabled                mpar:n
 865  scsi parity                   enabled                 spar:y
 866  disconnections                not allowed             disc:n
 867  special features              disabled                specf:n
 868  ultra scsi                    disabled                ultra:n
 869  force sync negotiation        disabled                fsn:n
 870  reverse probe                 disabled                revprob:n
 871  PCI fix up                    disabled                pcifix:0
 872  serial NVRAM                  enabled                 nvram:y
 873  verbosity level               2                       verb:2
 874  tagged command queuing        disabled                tags:0
 875  synchronous negotiation       disabled                sync:255
 876  debug flags                   none                    debug:0
 877  burst length                  from BIOS settings      burst:255
 878  LED support                   disabled                led:0
 879  wide support                  disabled                wide:0
 880  settle time                   10 seconds              settle:10
 881  differential support          from BIOS settings      diff:1
 882  irq mode                      from BIOS settings      irqm:1
 883  SCSI BUS check                do not attach on error  buschk:1
 884  immediate arbitration         disabled                iarb:0
 885
 88610.3 Advised boot setup commands
 887
 888If the driver has been configured with default options, the equivalent 
 889boot setup is:
 890
 891   ncr53c8xx=mpar:y,spar:y,disc:y,specf:3,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
 892             tags:0,sync:50,debug:0,burst:7,led:0,wide:1,settle:2,diff:0,irqm:0
 893
 894For an installation diskette or a safe but not fast system,
 895boot setup can be:
 896
 897    ncr53c8xx=safe:y,mpar:y,disc:y
 898    ncr53c8xx=safe:y,disc:y
 899    ncr53c8xx=safe:y,mpar:y
 900    ncr53c8xx=safe:y
 901
 902My personnal system works flawlessly with the following equivalent setup:
 903
 904   ncr53c8xx=mpar:y,spar:y,disc:y,specf:1,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
 905             tags:32,sync:12,debug:0,burst:7,led:1,wide:1,settle:2,diff:0,irqm:0
 906
 907The driver prints its actual setup when verbosity level is 2. You can try 
 908"ncr53c8xx=verb:2" to get the "static" setup of the driver, or add "verb:2" 
 909to your boot setup command in order to check the actual setup the driver is 
 910using.
 911
 91210.4 PCI configuration fix-up boot option
 913
 914pcifix:<option bits>
 915
 916Available option bits:
 917    0x1:     Set PCI cache-line size register if not set.
 918    0x2:     Set write and invalidate bit in PCI command register.
 919
 920Use 'pcifix:3' in order to allow the driver to fix both PCI features.
 921
 922These options only apply to new SYMBIOS chips 810A, 825A, 860, 875 
 923and 895 and are only supported for Pentium and 486 class processors.
 924Recent SYMBIOS 53C8XX scsi processors are able to use PCI read multiple 
 925and PCI write and invalidate commands. These features require the 
 926cache line size register to be properly set in the PCI configuration 
 927space of the chips. On the other hand, chips will use PCI write and 
 928invalidate commands only if the corresponding bit is set to 1 in the 
 929PCI command register.
 930
 931Not all PCI bioses set the PCI cache line register and the PCI write and 
 932invalidate bit in the PCI configuration space of 53C8XX chips.
 933Optimized PCI accesses may be broken for some PCI/memory controllers or 
 934make problems with some PCI boards.
 935
 936This fix-up worked flawlessly on my previous system.
 937(MB Triton HX / 53C875 / 53C810A)
 938I use these options at my own risks as you will do if you decide to 
 939use them too.
 940
 941
 94210.5 Serial NVRAM support boot option
 943
 944nvram:n     do not look for serial NVRAM
 945nvram:y     test controllers for onboard serial NVRAM
 946
 947This option can also been entered as an hexadecimal value that allows 
 948to control what information the driver will get from the NVRAM and what 
 949information it will ignore.
 950For details see '17. Serial NVRAM support'.
 951
 952When this option is enabled, the driver tries to detect all boards using 
 953a Serial NVRAM. This memory is used to hold user set up parameters.
 954
 955The parameters the driver is able to get from the NVRAM depend on the 
 956data format used, as follow:
 957
 958                                 Tekram format      Symbios format
 959General and host parameters
 960    Boot order                         N                   Y
 961    Host SCSI ID                       Y                   Y
 962    SCSI parity checking               Y                   Y
 963    Verbose boot messages              N                   Y
 964SCSI devices parameters
 965    Synchronous transfer speed         Y                   Y
 966    Wide 16 / Narrow                   Y                   Y
 967    Tagged Command Queuing enabled     Y                   Y
 968    Disconnections enabled             Y                   Y
 969    Scan at boot time                  N                   Y
 970
 971In order to speed up the system boot, for each device configured without 
 972the "scan at boot time" option, the driver forces an error on the 
 973first TEST UNIT READY command received for this device.
 974
 975Some SDMS BIOS revisions seem to be unable to boot cleanly with very fast 
 976hard disks. In such a situation you cannot configure the NVRAM with 
 977optimized parameters value.
 978
 979The 'nvram' boot option can be entered in hexadecimal form in order 
 980to ignore some options configured in the NVRAM, as follow:
 981
 982mvram=<bits options>
 983      0x01   look for NVRAM  (equivalent to nvram=y)
 984      0x02   ignore NVRAM "Synchronous negotiation" parameters for all devices
 985      0x04   ignore NVRAM "Wide negotiation"  parameter for all devices
 986      0x08   ignore NVRAM "Scan at boot time" parameter for all devices
 987      0x80   also attach controllers set to OFF in the NVRAM (sym53c8xx only)
 988
 989Option 0x80 is only supported by the sym53c8xx driver and is disabled by 
 990default. Result is that, by default (option not set), the sym53c8xx driver 
 991will not attach controllers set to OFF in the NVRAM.
 992
 993The ncr53c8xx always tries to attach all the controllers. Option 0x80 has 
 994not been added to the ncr53c8xx driver, since it has been reported to 
 995confuse users who use this driver since a long time. If you desire a 
 996controller not to be attached by the ncr53c8xx driver at Linux boot, you 
 997must use the 'excl' driver boot option.
 998
 99910.6 SCSI BUS checking boot option.
1000
1001When this option is set to a non-zero value, the driver checks SCSI lines 
1002logic state, 100 micro-seconds after having asserted the SCSI RESET line.
1003The driver just reads SCSI lines and checks all lines read FALSE except RESET.
1004Since SCSI devices shall release the BUS at most 800 nano-seconds after SCSI 
1005RESET has been asserted, any signal to TRUE may indicate a SCSI BUS problem.
1006Unfortunately, the following common SCSI BUS problems are not detected:
1007- Only 1 terminator installed.
1008- Misplaced terminators.
1009- Bad quality terminators.
1010On the other hand, either bad cabling, broken devices, not conformant 
1011devices, ... may cause a SCSI signal to be wrong when te driver reads it.
1012
101310.7 IMMEDIATE ARBITRATION boot option
1014
1015This option is only supported by the SYM53C8XX driver (not by the NCR53C8XX).
1016
1017SYMBIOS 53C8XX chips are able to arbitrate for the SCSI BUS as soon as they 
1018have detected an expected disconnection (BUS FREE PHASE). For this process 
1019to be started, bit 1 of SCNTL1 IO register must be set when the chip is 
1020connected to the SCSI BUS.
1021
1022When this feature has been enabled for the current connection, the chip has 
1023every chance to win arbitration if only devices with lower priority are 
1024competing for the SCSI BUS. By the way, when the chip is using SCSI id 7, 
1025then it will for sure win the next SCSI BUS arbitration.
1026
1027Since, there is no way to know what devices are trying to arbitrate for the 
1028BUS, using this feature can be extremely unfair. So, you are not advised
1029to enable it, or at most enable this feature for the case the chip lost 
1030the previous arbitration (boot option 'iarb:1').
1031
1032This feature has the following advantages:
1033
1034a) Allow the initiator with ID 7 to win arbitration when it wants so.
1035b) Overlap at least 4 micro-seconds of arbitration time with the execution 
1036   of SCRIPTS that deal with the end of the current connection and that 
1037   starts the next job.
1038
1039Hmmm... But (a) may just prevent other devices from reselecting the initiator, 
1040and delay data transfers or status/completions, and (b) may just waste 
1041SCSI BUS bandwidth if the SCRIPTS execution lasts more than 4 micro-seconds.
1042
1043The use of IARB needs the SCSI_NCR_IARB_SUPPORT option to have been defined 
1044at compile time and the 'iarb' boot option to have been set to a non zero 
1045value at boot time. It is not that useful for real work, but can be used 
1046to stress SCSI devices or for some applications that can gain advantage of 
1047it. By the way, if you experience badnesses like 'unexpected disconnections', 
1048'bad reselections', etc... when using IARB on heavy IO load, you should not 
1049be surprised, because force-feeding anything and blocking its arse at the 
1050same time cannot work for a long time. :-))
1051
1052
105311. Some constants and flags of the ncr53c8xx.h header file
1054
1055Some of these are defined from the configuration parameters.  To
1056change other "defines", you must edit the header file.  Do that only
1057if you know what you are doing.
1058
1059SCSI_NCR_SETUP_SPECIAL_FEATURES (default: defined)
1060        If defined, the driver will enable some special features according  
1061        to chip and revision id.
1062        For 810A, 860, 825A, 875 and 895 scsi chips, this option enables 
1063        support of features that reduce load of PCI bus and memory accesses 
1064        during  scsi transfer processing: burst op-code fetch, read multiple, 
1065        read line, prefetch, cache line, write and invalidate, 
1066        burst 128 (875 only), large dma fifo (875 only), offset 16 (875 only).
1067        Can be changed by the following boot setup command:
1068                ncr53c8xx=specf:n
1069
1070SCSI_NCR_IOMAPPED               (default: not defined)
1071        If defined, normal I/O is forced.
1072
1073SCSI_NCR_SHARE_IRQ              (default: defined)
1074        If defined, request shared IRQ.
1075        
1076SCSI_NCR_MAX_TAGS               (default: 8)
1077        Maximum number of simultaneous tagged commands to a device.
1078        Can be changed by "settags <target> <maxtags>"
1079
1080SCSI_NCR_SETUP_DEFAULT_SYNC     (default: 50)
1081        Transfer period factor the driver will use at boot time for synchronous 
1082        negotiation. 0 means asynchronous.
1083        Can be changed by "setsync <target> <period factor>"
1084
1085SCSI_NCR_SETUP_DEFAULT_TAGS     (default: 8)
1086        Default number of simultaneous tagged commands to a device.
1087        < 1 means tagged command queuing disabled at start-up.
1088
1089SCSI_NCR_ALWAYS_SIMPLE_TAG      (default: defined)
1090        Use SIMPLE TAG for read and write commands.
1091        Can be changed by "setorder <ordered|simple|default>"
1092
1093SCSI_NCR_SETUP_DISCONNECTION    (default: defined)
1094        If defined, targets are allowed to disconnect.
1095
1096SCSI_NCR_SETUP_FORCE_SYNC_NEGO  (default: not defined)
1097        If defined, synchronous negotiation is tried for all SCSI-2 devices.
1098        Can be changed by "setsync <target> <period>"
1099
1100SCSI_NCR_SETUP_MASTER_PARITY    (default: defined)
1101        If defined, master parity checking is enabled.
1102
1103SCSI_NCR_SETUP_MASTER_PARITY    (default: defined)
1104        If defined, SCSI parity checking is enabled.
1105
1106SCSI_NCR_PROFILE_SUPPORT        (default: not defined)
1107        If defined, profiling information is gathered.
1108
1109SCSI_NCR_MAX_SCATTER            (default: 128)
1110        Scatter list size of the driver ccb.
1111
1112SCSI_NCR_MAX_TARGET             (default: 16)
1113        Max number of targets per host.
1114
1115SCSI_NCR_MAX_HOST               (default: 2)
1116        Max number of host controllers.
1117
1118SCSI_NCR_SETTLE_TIME            (default: 2)
1119        Number of seconds the driver will wait after reset.
1120
1121SCSI_NCR_TIMEOUT_ALERT          (default: 3)
1122        If a pending command will time out after this amount of seconds,
1123        an ordered tag is used for the next command.
1124        Avoids timeouts for unordered tagged commands.
1125
1126SCSI_NCR_CAN_QUEUE              (default: 7*SCSI_NCR_MAX_TAGS)
1127        Max number of commands that can be queued to a host.
1128
1129SCSI_NCR_CMD_PER_LUN            (default: SCSI_NCR_MAX_TAGS)
1130        Max number of commands queued to a host for a device.
1131
1132SCSI_NCR_SG_TABLESIZE           (default: SCSI_NCR_MAX_SCATTER-1)
1133        Max size of the Linux scatter/gather list.
1134
1135SCSI_NCR_MAX_LUN        (default: 8)
1136        Max number of LUNs per target.
1137
1138
113912. Installation
1140
1141This driver is part of the linux kernel distribution.
1142Driver files are located in the sub-directory "drivers/scsi" of the 
1143kernel source tree.
1144
1145Driver files:
1146
1147        README.ncr53c8xx        : this file
1148        ChangeLog.ncr53c8xx     : change log
1149        ncr53c8xx.h             : definitions
1150        ncr53c8xx.c             : the driver code
1151
1152New driver versions are made available separately in order to allow testing 
1153changes and new features prior to including them into the linux kernel 
1154distribution. The following URL provides informations on latest avalaible 
1155patches: 
1156
1157      ftp://ftp.tux.org/pub/people/gerard-roudier/README
1158
1159
116013. Architecture dependent features.
1161
1162<Not yet written>
1163
1164
116514. Known problems
1166
116714.1 Tagged commands with Iomega Jaz device
1168
1169I have not tried this device, however it has been reported to me the
1170following: This device is capable of Tagged command queuing. However
1171while spinning up, it rejects Tagged commands. This behaviour is
1172conforms to 6.8.2 of SCSI-2 specifications. The current behaviour of
1173the driver in that situation is not satisfying. So do not enable
1174Tagged command queuing for devices that are able to spin down.  The
1175other problem that may appear is timeouts. The only way to avoid
1176timeouts seems to edit linux/drivers/scsi/sd.c and to increase the
1177current timeout values.
1178
117914.2 Device names change when another controller is added.
1180
1181When you add a new NCR53C8XX chip based controller to a system that already 
1182has one or more controllers of this family, it may happen that the order 
1183the driver registers them to the kernel causes problems due to device 
1184name changes.
1185When at least one controller uses NvRAM, SDMS BIOS version 4 allows you to 
1186define the order the BIOS will scan the scsi boards. The driver attaches 
1187controllers according to BIOS information if NvRAM detect option is set.
1188
1189If your controllers do not have NvRAM, you can:
1190
1191- Ask the driver to probe chip ids in reverse order from the boot command
1192  line: ncr53c8xx=revprob:y
1193- Make appropriate changes in the fstab.
1194- Use the 'scsidev' tool from Eric Youngdale.
1195
119614.3 Using only 8 bit devices with a WIDE SCSI controller.
1197
1198When only 8 bit NARROW devices are connected to a 16 bit WIDE SCSI controller, 
1199you must ensure that lines of the wide part of the SCSI BUS are pulled-up.
1200This can be achieved by ENABLING the WIDE TERMINATOR portion of the SCSI 
1201controller card.
1202The TYAN 1365 documentation revision 1.2 is not correct about such settings.
1203(page 10, figure 3.3).
1204
120514.4 Possible data corruption during a Memory Write and Invalidate
1206
1207This problem is described in SYMBIOS DEL 397, Part Number 69-039241, ITEM 4.
1208
1209In some complex situations, 53C875 chips revision <= 3 may start a PCI 
1210Write and Invalidate Command at a not cache-line-aligned 4 DWORDS boundary.
1211This is only possible when Cache Line Size is 8 DWORDS or greater.
1212Pentium systems use a 8 DWORDS cache line size and so are concerned by 
1213this chip bug, unlike i486 systems that use a 4 DWORDS cache line size.
1214
1215When this situation occurs, the chip may complete the Write and Invalidate 
1216command after having only filled part of the last cache line involved in 
1217the transfer, leaving to data corruption the remainder of this cache line.
1218
1219Not using Write And Invalidate obviously gets rid of this chip bug, and so 
1220it is now the default setting of the driver.
1221However, for people like me who want to enable this feature, I have added 
1222part of a work-around suggested by SYMBIOS. This work-around resets the 
1223addressing logic when the DATA IN phase is entered and so prevents the bug 
1224from being triggered for the first SCSI MOVE of the phase. This work-around 
1225should be enough according to the following:
1226
1227The only driver internal data structure that is greater than 8 DWORDS  and 
1228that is moved by the SCRIPTS processor is the 'CCB header' that contains 
1229the context of the SCSI transfer. This data structure is aligned on 8 DWORDS 
1230boundary (Pentium Cache Line Size), and so is immune to this chip bug, at 
1231least on Pentium systems.
1232But the conditions of this bug can be met when a SCSI read command is 
1233performed using a buffer that is 4 DWORDS but not cache-line aligned.
1234This cannot happen under Linux when scatter/gather lists are used since 
1235they only refer to system buffers that are well aligned. So, a work around 
1236may only be needed under Linux when a scatter/gather list is not used and 
1237when the SCSI DATA IN phase is reentered after a phase mismatch.
1238
123914.5 IRQ sharing problems
1240
1241When an IRQ is shared by devices that are handled by different drivers, it 
1242may happen that one driver complains about the request of the IRQ having 
1243failed. Inder Linux-2.0, this may be due to one driver having requested the 
1244IRQ using the SA_INTERRUPT flag but some other having requested the same IRQ 
1245without this flag. Under both Linux-2.0 and linux-2.2, this may be caused by 
1246one driver not having requested the IRQ with the SA_SHIRQ flag.
1247
1248By default, the ncr53c8xx and sym53c8xx drivers request IRQs with both the 
1249SA_INTERRUPT and the SA_SHIRQ flag under Linux-2.0 and with only the SA_SHIRQ 
1250flag under Linux-2.2.
1251
1252Under Linux-2.0, you can disable use of SA_INTERRUPT flag from the boot 
1253command line by using the following option:
1254
1255     ncr53c8xx=irqm:0x20   (for the generic ncr53c8xx driver)
1256     sym53c8xx=irqm:0x20   (for the sym53c8xx driver)
1257
1258If this does not fix the problem, then you may want to check how all other 
1259drivers are requesting the IRQ and report the problem. Note that if at least 
1260a single driver does not request the IRQ with the SA_SHIRQ flag (share IRQ), 
1261then the request of the IRQ obviously will not succeed for all the drivers.
1262
126315. SCSI problem troubleshooting
1264
126515.1 Problem tracking
1266
1267Most SCSI problems are due to a non conformant SCSI bus or to buggy
1268devices.  If infortunately you have SCSI problems, you can check the
1269following things:
1270
1271- SCSI bus cables
1272- terminations at both end of the SCSI chain
1273- linux syslog messages (some of them may help you)
1274
1275If you do not find the source of problems, you can configure the
1276driver with no features enabled.
1277
1278- only asynchronous data transfers
1279- tagged commands disabled
1280- disconnections not allowed
1281
1282Now, if your SCSI bus is ok, your system have every chance to work
1283with this safe configuration but performances will not be optimal.
1284
1285If it still fails, then you can send your problem description to
1286appropriate mailing lists or news-groups.  Send me a copy in order to
1287be sure I will receive it.  Obviously, a bug in the driver code is
1288possible.
1289
1290     My email address: Gerard Roudier <groudier@free.fr>
1291
1292Allowing disconnections is important if you use several devices on
1293your SCSI bus but often causes problems with buggy devices.
1294Synchronous data transfers increases throughput of fast devices like
1295hard disks.  Good SCSI hard disks with a large cache gain advantage of
1296tagged commands queuing.
1297
1298Try to enable one feature at a time with control commands.  For example:
1299
1300- echo "setsync all 25" >/proc/scsi/ncr53c8xx/0
1301  Will enable fast synchronous data transfer negotiation for all targets.
1302
1303- echo "setflag 3" >/proc/scsi/ncr53c8xx/0
1304  Will reset flags (no_disc) for target 3, and so will allow it to disconnect 
1305  the SCSI Bus.
1306
1307- echo "settags 3 8" >/proc/scsi/ncr53c8xx/0
1308  Will enable tagged command queuing for target 3 if that device supports it.
1309
1310Once you have found the device and the feature that cause problems, just 
1311disable that feature for that device.
1312
131315.2 Understanding hardware error reports
1314
1315When the driver detects an unexpected error condition, it may display a 
1316message of the following pattern.
1317
1318sym53c876-0:1: ERROR (0:48) (1-21-65) (f/95) @ (script 7c0:19000000).
1319sym53c876-0: script cmd = 19000000
1320sym53c876-0: regdump: da 10 80 95 47 0f 01 07 75 01 81 21 80 01 09 00.
1321
1322Some fields in such a message may help you understand the cause of the 
1323problem, as follows:
1324
1325sym53c876-0:1: ERROR (0:48) (1-21-65) (f/95) @ (script 7c0:19000000).
1326............A.........B.C....D.E..F....G.H.......I.....J...K.......
1327
1328Field A : target number.
1329  SCSI ID of the device the controller was talking with at the moment the 
1330  error occurs.
1331
1332Field B : DSTAT io register (DMA STATUS)
1333  Bit 0x40 : MDPE Master Data Parity Error
1334             Data parity error detected on the PCI BUS.
1335  Bit 0x20 : BF   Bus Fault
1336             PCI bus fault condition detected
1337  Bit 0x01 : IID  Illegal Instruction Detected
1338             Set by the chip when it detects an Illegal Instruction format 
1339             on some condition that makes an instruction illegal.
1340  Bit 0x80 : DFE Dma Fifo Empty
1341             Pure status bit that does not indicate an error.
1342  If the reported DSTAT value contains a combination of MDPE (0x40), 
1343  BF (0x20), then the cause may be likely due to a PCI BUS problem.
1344
1345Field C : SIST io register (SCSI Interrupt Status)
1346  Bit 0x08 : SGE  SCSI GROSS ERROR
1347             Indicates that the chip detected a severe error condition 
1348             on the SCSI BUS that prevents the SCSI protocol from functioning
1349             properly.
1350  Bit 0x04 : UDC  Unexpected Disconnection
1351             Indicates that the device released the SCSI BUS when the chip 
1352             was not expecting this to happen. A device may behave so to 
1353             indicate the SCSI initiator that an error condition not reportable              using the SCSI protocol has occurred.
1354  Bit 0x02 : RST  SCSI BUS Reset
1355             Generally SCSI targets do not reset the SCSI BUS, although any 
1356             device on the BUS can reset it at any time.
1357  Bit 0x01 : PAR  Parity
1358             SCSI parity error detected.
1359  On a faulty SCSI BUS, any error condition among SGE (0x08), UDC (0x04) and 
1360  PAR (0x01) may be detected by the chip. If your SCSI system sometimes 
1361  encounters such error conditions, especially SCSI GROSS ERROR, then a SCSI 
1362  BUS problem is likely the cause of these errors.
1363
1364For fields D,E,F,G and H, you may look into the sym53c8xx_defs.h file 
1365that contains some minimal comments on IO register bits.
1366Field D : SOCL  Scsi Output Control Latch
1367          This register reflects the state of the SCSI control lines the 
1368          chip want to drive or compare against.
1369Field E : SBCL  Scsi Bus Control Lines
1370          Actual value of control lines on the SCSI BUS.
1371Field F : SBDL  Scsi Bus Data Lines
1372          Actual value of data lines on the SCSI BUS.
1373Field G : SXFER  SCSI Transfer
1374          Contains the setting of the Synchronous Period for output and 
1375          the current Synchronous offset (offset 0 means asynchronous).
1376Field H : SCNTL3 Scsi Control Register 3
1377          Contains the setting of timing values for both asynchronous and 
1378          synchronous data transfers. 
1379
1380Understanding Fields I, J, K and dumps requires to have good knowledge of 
1381SCSI standards, chip cores functionnals and internal driver data structures.
1382You are not required to decode and understand them, unless you want to help 
1383maintain the driver code.
1384
138516. Synchonous transfer negotiation tables
1386
1387Tables below have been created by calling the routine the driver uses
1388for synchronisation negotiation timing calculation and chip setting.
1389The first table corresponds to Ultra chips 53875 and 53C860 with 80 MHz 
1390clock and 5 clock divisors.
1391The second one has been calculated by setting the scsi clock to 40 Mhz 
1392and using 4 clock divisors and so applies to all NCR53C8XX chips in fast 
1393SCSI-2 mode.
1394
1395Periods are in nano-seconds and speeds are in Mega-transfers per second.
13961 Mega-transfers/second means 1 MB/s with 8 bits SCSI and 2 MB/s with 
1397Wide16 SCSI.
1398
139916.1 Synchronous timings for 53C895, 53C875 and 53C860 SCSI controllers
1400
1401 ----------------------------------------------
1402 Negotiated                     NCR settings
1403 Factor   Period   Speed        Period   Speed
1404 ------   ------   ------       ------   ------
1405 10       25       40.000       25       40.000   (53C895 only)
1406 11       30.2     33.112       31.25    32.000   (53C895 only)
1407 12       50       20.000       50       20.000
1408 13       52       19.230       62       16.000
1409 14       56       17.857       62       16.000
1410 15       60       16.666       62       16.000
1411 16       64       15.625       75       13.333
1412 17       68       14.705       75       13.333
1413 18       72       13.888       75       13.333
1414 19       76       13.157       87       11.428
1415 20       80       12.500       87       11.428
1416 21       84       11.904       87       11.428
1417 22       88       11.363       93       10.666
1418 23       92       10.869       93       10.666
1419 24       96       10.416      100       10.000
1420 25      100       10.000      100       10.000
1421 26      104        9.615      112        8.888
1422 27      108        9.259      112        8.888
1423 28      112        8.928      112        8.888
1424 29      116        8.620      125        8.000
1425 30      120        8.333      125        8.000
1426 31      124        8.064      125        8.000
1427 32      128        7.812      131        7.619
1428 33      132        7.575      150        6.666
1429 34      136        7.352      150        6.666
1430 35      140        7.142      150        6.666
1431 36      144        6.944      150        6.666
1432 37      148        6.756      150        6.666
1433 38      152        6.578      175        5.714
1434 39      156        6.410      175        5.714
1435 40      160        6.250      175        5.714
1436 41      164        6.097      175        5.714
1437 42      168        5.952      175        5.714
1438 43      172        5.813      175        5.714
1439 44      176        5.681      187        5.333
1440 45      180        5.555      187        5.333
1441 46      184        5.434      187        5.333
1442 47      188        5.319      200        5.000
1443 48      192        5.208      200        5.000
1444 49      196        5.102      200        5.000
1445
1446
144716.2 Synchronous timings for fast SCSI-2 53C8XX controllers
1448
1449 ----------------------------------------------
1450 Negotiated                     NCR settings
1451 Factor   Period   Speed        Period   Speed
1452 ------   ------   ------       ------   ------
1453 25      100       10.000      100       10.000
1454 26      104        9.615      125        8.000
1455 27      108        9.259      125        8.000
1456 28      112        8.928      125        8.000
1457 29      116        8.620      125        8.000
1458 30      120        8.333      125        8.000
1459 31      124        8.064      125        8.000
1460 32      128        7.812      131        7.619
1461 33      132        7.575      150        6.666
1462 34      136        7.352      150        6.666
1463 35      140        7.142      150        6.666
1464 36      144        6.944      150        6.666
1465 37      148        6.756      150        6.666
1466 38      152        6.578      175        5.714
1467 39      156        6.410      175        5.714
1468 40      160        6.250      175        5.714
1469 41      164        6.097      175        5.714
1470 42      168        5.952      175        5.714
1471 43      172        5.813      175        5.714
1472 44      176        5.681      187        5.333
1473 45      180        5.555      187        5.333
1474 46      184        5.434      187        5.333
1475 47      188        5.319      200        5.000
1476 48      192        5.208      200        5.000
1477 49      196        5.102      200        5.000
1478
1479
148017. Serial NVRAM (added by Richard Waltham: dormouse@farsrobt.demon.co.uk)
1481
148217.1 Features
1483
1484Enabling serial NVRAM support enables detection of the serial NVRAM included
1485on Symbios and some Symbios compatible host adaptors, and Tekram boards. The 
1486serial NVRAM is used by Symbios and Tekram to hold set up parameters for the 
1487host adaptor and it's attached drives.
1488
1489The Symbios NVRAM also holds data on the boot order of host adaptors in a
1490system with more than one host adaptor. This enables the order of scanning
1491the cards for drives to be changed from the default used during host adaptor
1492detection.
1493
1494This can be done to a limited extent at the moment using "reverse probe" but
1495this only changes the order of detection of different types of cards. The
1496NVRAM boot order settings can do this as well as change the order the same
1497types of cards are scanned in, something "reverse probe" cannot do.
1498
1499Tekram boards using Symbios chips, DC390W/F/U, which have NVRAM are detected
1500and this is used to distinguish between Symbios compatible and Tekram host 
1501adaptors. This is used to disable the Symbios compatible "diff" setting
1502incorrectly set on Tekram boards if the CONFIG_SCSI_53C8XX_SYMBIOS_COMPAT 
1503configuration parameter is set enabling both Symbios and Tekram boards to be 
1504used together with the Symbios cards using all their features, including
1505"diff" support. ("led pin" support for Symbios compatible cards can remain
1506enabled when using Tekram cards. It does nothing useful for Tekram host
1507adaptors but does not cause problems either.)
1508
1509
151017.2 Symbios NVRAM layout
1511
1512typical data at NVRAM address 0x100 (53c810a NVRAM)
1513-----------------------------------------------------------
151400 00
151564 01
15168e 0b
1517
151800 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00 
1519
152004 00 0f 00 00 10 00 50 00 00 01 00 00 62 
152104 00 03 00 00 10 00 58 00 00 01 00 00 63 
152204 00 01 00 00 10 00 48 00 00 01 00 00 61 
152300 00 00 00 00 00 00 00 00 00 00 00 00 00 
1524
15250f 00 08 08 64 00 0a 00
15260f 00 08 08 64 00 0a 00 
15270f 00 08 08 64 00 0a 00 
15280f 00 08 08 64 00 0a 00 
15290f 00 08 08 64 00 0a 00 
15300f 00 08 08 64 00 0a 00 
15310f 00 08 08 64 00 0a 00 
15320f 00 08 08 64 00 0a 00 
1533
15340f 00 08 08 64 00 0a 00 
15350f 00 08 08 64 00 0a 00 
15360f 00 08 08 64 00 0a 00 
15370f 00 08 08 64 00 0a 00 
15380f 00 08 08 64 00 0a 00 
15390f 00 08 08 64 00 0a 00 
15400f 00 08 08 64 00 0a 00 
15410f 00 08 08 64 00 0a 00 
1542
154300 00 00 00 00 00 00 00 
154400 00 00 00 00 00 00 00 
154500 00 00 00 00 00 00 00 
154600 00 00 00 00 00 00 00 
154700 00 00 00 00 00 00 00 
154800 00 00 00 00 00 00 00 
154900 00 00 00 00 00 00 00 
155000 00 00 00 00 00 00 00 
1551
155200 00 00 00 00 00 00 00 
155300 00 00 00 00 00 00 00 
155400 00 00 00 00 00 00 00 
155500 00 00 00 00 00 00 00 
155600 00 00 00 00 00 00 00 
155700 00 00 00 00 00 00 00 
155800 00 00 00 00 00 00 00 
155900 00 00 00 00 00 00 00 
1560
156100 00 00 00 00 00 00 00 
156200 00 00 00 00 00 00 00 
156300 00 00 00 00 00 00 00 
1564
1565fe fe
156600 00
156700 00
1568-----------------------------------------------------------
1569NVRAM layout details
1570
1571NVRAM Address 0x000-0x0ff not used
1572              0x100-0x26f initialised data
1573              0x270-0x7ff not used
1574
1575general layout
1576
1577        header  -   6 bytes,
1578        data    - 356 bytes (checksum is byte sum of this data)
1579        trailer -   6 bytes
1580                  ---
1581        total     368 bytes
1582
1583data area layout
1584
1585        controller set up  -  20 bytes
1586        boot configuration -  56 bytes (4x14 bytes)
1587        device set up      - 128 bytes (16x8 bytes)
1588        unused (spare?)    - 152 bytes (19x8 bytes)
1589                             ---
1590        total                356 bytes
1591
1592-----------------------------------------------------------
1593header
1594
159500 00   - ?? start marker
159664 01   - byte count (lsb/msb excludes header/trailer)
15978e 0b   - checksum (lsb/msb excludes header/trailer)
1598-----------------------------------------------------------
1599controller set up
1600
160100 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
1602                   |     |           |     |
1603                   |     |           |      -- host ID
1604                   |     |           |
1605                   |     |            --Removable Media Support
1606                   |     |               0x00 = none
1607                   |     |               0x01 = Bootable Device
1608                   |     |               0x02 = All with Media
1609                   |     |
1610                   |      --flag bits 2
1611                   |        0x00000001= scan order hi->low
1612                   |            (default 0x00 - scan low->hi)
1613                    --flag bits 1
1614                       0x00000001 scam enable
1615                       0x00000010 parity enable
1616                       0x00000100 verbose boot msgs
1617
1618remaining bytes unknown - they do not appear to change in my
1619current set up for any of the controllers.
1620
1621default set up is identical for 53c810a and 53c875 NVRAM
1622(Removable Media added Symbios BIOS version 4.09)
1623-----------------------------------------------------------
1624boot configuration
1625
1626boot order set by order of the devices in this table
1627
162804 00 0f 00 00 10 00 50 00 00 01 00 00 62 -- 1st controller
162904 00 03 00 00 10 00 58 00 00 01 00 00 63    2nd controller
163004 00 01 00 00 10 00 48 00 00 01 00 00 61    3rd controller
163100 00 00 00 00 00 00 00 00 00 00 00 00 00    4th controller
1632       |  |  |  |     |        |     |  |
1633       |  |  |  |     |        |      ---- PCI io port adr
1634       |  |  |  |     |         --0x01 init/scan at boot time
1635       |  |  |  |      --PCI device/function number (0xdddddfff)
1636       |  |   ----- ?? PCI vendor ID (lsb/msb)
1637        ----PCI device ID (lsb/msb)
1638
1639?? use of this data is a guess but seems reasonable
1640
1641remaining bytes unknown - they do not appear to change in my
1642current set up
1643
1644default set up is identical for 53c810a and 53c875 NVRAM
1645-----------------------------------------------------------
1646device set up (up to 16 devices - includes controller)
1647
16480f 00 08 08 64 00 0a 00 - id 0
16490f 00 08 08 64 00 0a 00 
16500f 00 08 08 64 00 0a 00 
16510f 00 08 08 64 00 0a 00 
16520f 00 08 08 64 00 0a 00 
16530f 00 08 08 64 00 0a 00 
16540f 00 08 08 64 00 0a 00 
16550f 00 08 08 64 00 0a 00 
1656
16570f 00 08 08 64 00 0a 00 
16580f 00 08 08 64 00 0a 00 
16590f 00 08 08 64 00 0a 00 
16600f 00 08 08 64 00 0a 00 
16610f 00 08 08 64 00 0a 00 
16620f 00 08 08 64 00 0a 00 
16630f 00 08 08 64 00 0a 00 
16640f 00 08 08 64 00 0a 00 - id 15
1665 |     |  |  |     |  |
1666 |     |  |  |      ----timeout (lsb/msb)
1667 |     |  |   --synch period (0x?? 40 Mtrans/sec- fast 40) (probably 0x28)
1668 |     |  |                  (0x30 20 Mtrans/sec- fast 20)
1669 |     |  |                  (0x64 10 Mtrans/sec- fast )
1670 |     |  |                  (0xc8  5 Mtrans/sec)
1671 |     |  |                  (0x00  asynchronous)
1672 |     |   -- ?? max sync offset (0x08 in NVRAM on 53c810a) 
1673 |     |                         (0x10 in NVRAM on 53c875)
1674 |      --device bus width (0x08 narrow)
1675 |                         (0x10 16 bit wide)
1676  --flag bits
1677    0x00000001 - disconnect enabled
1678    0x00000010 - scan at boot time
1679    0x00000100 - scan luns
1680    0x00001000 - queue tags enabled
1681
1682remaining bytes unknown - they do not appear to change in my
1683current set up
1684
1685?? use of this data is a guess but seems reasonable 
1686(but it could be max bus width)
1687
1688default set up for 53c810a NVRAM
1689default set up for 53c875 NVRAM - bus width     - 0x10
1690                                - sync offset ? - 0x10
1691                                - sync period   - 0x30
1692-----------------------------------------------------------
1693?? spare device space (32 bit bus ??)
1694
169500 00 00 00 00 00 00 00  (19x8bytes)
1696.
1697.
169800 00 00 00 00 00 00 00
1699
1700default set up is identical for 53c810a and 53c875 NVRAM
1701-----------------------------------------------------------
1702trailer
1703
1704fe fe   - ? end marker ?
170500 00
170600 00
1707
1708default set up is identical for 53c810a and 53c875 NVRAM
1709-----------------------------------------------------------
1710
1711
1712
171317.3 Tekram NVRAM layout
1714
1715nvram 64x16 (1024 bit)
1716
1717Drive settings
1718
1719Drive ID 0-15 (addr 0x0yyyy0 = device setup, yyyy = ID)
1720              (addr 0x0yyyy1 = 0x0000)
1721
1722    x x x x  x x x x  x x x x  x x x x
1723               | | |      | |  | | | |
1724               | | |      | |  | | |  ----- parity check   0 - off
1725               | | |      | |  | | |                       1 - on
1726               | | |      | |  | | |
1727               | | |      | |  | |  ------- sync neg       0 - off
1728               | | |      | |  | |                         1 - on
1729               | | |      | |  | |
1730               | | |      | |  |  --------- disconnect     0 - off
1731               | | |      | |  |                           1 - on
1732               | | |      | |  |
1733               | | |      | |   ----------- start cmd      0 - off
1734               | | |      | |                              1 - on
1735               | | |      | |
1736               | | |      |  -------------- tagged cmds    0 - off
1737               | | |      |                                1 - on
1738               | | |      | 
1739               | | |       ---------------- wide neg       0 - off
1740               | | |                                       1 - on
1741               | | |
1742                --------------------------- sync rate      0 - 10.0 Mtrans/sec
1743                                                           1 -  8.0
1744                                                           2 -  6.6
1745                                                           3 -  5.7
1746                                                           4 -  5.0
1747                                                           5 -  4.0
1748                                                           6 -  3.0
1749                                                           7 -  2.0
1750                                                           7 -  2.0
1751                                                           8 - 20.0
1752                                                           9 - 16.7
1753                                                           a - 13.9
1754                                                           b - 11.9
1755
1756Global settings
1757
1758Host flags 0 (addr 0x100000, 32) 
1759
1760    x x x x  x x x x  x x x x  x x x x
1761    | | | |  | | | |           | | | |
1762    | | | |  | | | |            ----------- host ID    0x00 - 0x0f
1763    | | | |  | | | |
1764    | | | |  | | |  ----------------------- support for    0 - off
1765    | | | |  | | |                          > 2 drives     1 - on
1766    | | | |  | | | 
1767    | | | |  | |  ------------------------- support drives 0 - off
1768    | | | |  | |                            > 1Gbytes      1 - on
1769    | | | |  | |
1770    | | | |  |  --------------------------- bus reset on   0 - off
1771    | | | |  |                                power on     1 - on
1772    | | | |  |
1773    | | | |   ----------------------------- active neg     0 - off
1774    | | | |                                                1 - on
1775    | | | |
1776    | | |  -------------------------------- imm seek       0 - off
1777    | | |                                                  1 - on
1778    | | |
1779    | |  ---------------------------------- scan luns      0 - off
1780    | |                                                    1 - on
1781    | |
1782     -------------------------------------- removable      0 - disable
1783                                            as BIOS dev    1 - boot device
1784                                                           2 - all
1785
1786Host flags 1 (addr 0x100001, 33)
1787
1788    x x x x  x x x x  x x x x  x x x x
1789               | | |             | | | 
1790               | | |              --------- boot delay     0 -   3 sec
1791               | | |                                       1 -   5
1792               | | |                                       2 -  10
1793               | | |                                       3 -  20
1794               | | |                                       4 -  30
1795               | | |                                       5 -  60
1796               | | |                                       6 - 120
1797               | | |
1798                --------------------------- max tag cmds   0 -  2
1799                                                           1 -  4
1800                                                           2 -  8
1801                                                           3 - 16
1802                                                           4 - 32
1803
1804Host flags 2 (addr 0x100010, 34)
1805
1806    x x x x  x x x x  x x x x  x x x x
1807                                     |
1808                                      ----- F2/F6 enable   0 - off ???
1809                                                           1 - on  ???
1810
1811checksum (addr 0x111111)
1812
1813checksum = 0x1234 - (sum addr 0-63)
1814
1815----------------------------------------------------------------------------
1816
1817default nvram data:
1818
18190x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
18200x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
18210x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
18220x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 
1823
18240x0f07 0x0400 0x0001 0x0000 0x0000 0x0000 0x0000 0x0000
18250x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
18260x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
18270x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0xfbbc
1828
1829
183018. Support for Big Endian
1831
1832The PCI local bus has been primarily designed for x86 architecture.
1833As a consequence, PCI devices generally expect DWORDS using little endian 
1834byte ordering.
1835
183618.1 Big Endian CPU
1837
1838In order to support NCR chips on a Big Endian architecture the driver has to 
1839perform byte reordering each time it is needed. This feature has been 
1840added to the driver by Cort <cort@cs.nmt.edu> and is available in driver 
1841version 2.5 and later ones. For the moment Big Endian support has only 
1842been tested on Linux/PPC (PowerPC).
1843
184418.2 NCR chip in Big Endian mode of operations
1845
1846It can be read in SYMBIOS documentation that some chips support a special 
1847Big Endian mode, on paper: 53C815, 53C825A, 53C875, 53C875N, 53C895.
1848This mode of operations is not software-selectable, but needs pin named 
1849BigLit to be pulled-up. Using this mode, most of byte reorderings should 
1850be avoided when the driver is running on a Big Endian CPU.
1851Driver version 2.5 is also, in theory, ready for this feature.
1852
1853===============================================================================
1854End of NCR53C8XX driver README file
1855
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.