brintos

brintos / linux-shallow public Read only

0
0
Text · 82.4 KiB · fd8d26d Raw
2170 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3===========================4NCR53C8XX/SYM53C8XX drivers5===========================6 7Written by Gerard Roudier <groudier@free.fr>8 921 Rue Carnot10 1195170 DEUIL LA BARRE - FRANCE12 1329 May 199914 15.. Contents:16 17   1.  Introduction18   2.  Supported chips and SCSI features19   3.  Advantages of the enhanced 896 driver20         3.1 Optimized SCSI SCRIPTS21         3.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)22   4.  Memory mapped I/O versus normal I/O23   5.  Tagged command queueing24   6.  Parity checking25   7.  Profiling information26   8.  Control commands27         8.1  Set minimum synchronous period28         8.2  Set wide size29         8.3  Set maximum number of concurrent tagged commands30         8.4  Set order type for tagged command31         8.5  Set debug mode32         8.6  Clear profile counters33         8.7  Set flag (no_disc)34         8.8  Set verbose level35         8.9  Reset all logical units of a target36         8.10 Abort all tasks of all logical units of a target37   9.  Configuration parameters38   10. Boot setup commands39         10.1 Syntax40         10.2 Available arguments41                10.2.1  Master parity checking42                10.2.2  Scsi parity checking43                10.2.3  Scsi disconnections44                10.2.4  Special features45                10.2.5  Ultra SCSI support46                10.2.6  Default number of tagged commands47                10.2.7  Default synchronous period factor48                10.2.8  Negotiate synchronous with all devices49                10.2.9  Verbosity level50                10.2.10 Debug mode51                10.2.11 Burst max52                10.2.12 LED support53                10.2.13 Max wide54                10.2.14 Differential mode55                10.2.15 IRQ mode56                10.2.16 Reverse probe57                10.2.17 Fix up PCI configuration space58                10.2.18 Serial NVRAM59                10.2.19 Check SCSI BUS60                10.2.20 Exclude a host from being attached61                10.2.21 Suggest a default SCSI id for hosts62                10.2.22 Enable use of IMMEDIATE ARBITRATION63         10.3 Advised boot setup commands64         10.4 PCI configuration fix-up boot option65         10.5 Serial NVRAM support boot option66         10.6 SCSI BUS checking boot option67         10.7 IMMEDIATE ARBITRATION boot option68   11. Some constants and flags of the ncr53c8xx.h header file69   12. Installation70   13. Architecture dependent features71   14. Known problems72         14.1 Tagged commands with Iomega Jaz device73         14.2 Device names change when another controller is added74         14.3 Using only 8 bit devices with a WIDE SCSI controller.75         14.4 Possible data corruption during a Memory Write and Invalidate76         14.5 IRQ sharing problems77   15. SCSI problem troubleshooting78         15.1 Problem tracking79         15.2 Understanding hardware error reports80   16. Synchronous transfer negotiation tables81         16.1 Synchronous timings for 53C875 and 53C860 Ultra-SCSI controllers82         16.2 Synchronous timings for fast SCSI-2 53C8XX controllers83   17. Serial NVRAM support (by Richard Waltham)84         17.1 Features85         17.2 Symbios NVRAM layout86         17.3 Tekram  NVRAM layout87   18. Support for Big Endian88         18.1 Big Endian CPU89         18.2 NCR chip in Big Endian mode of operations90 911. Introduction92===============93 94The initial Linux ncr53c8xx driver has been a port of the ncr driver from95FreeBSD that has been achieved in November 1995 by:96 97	- Gerard Roudier              <groudier@free.fr>98 99The original driver has been written for 386bsd and FreeBSD by:100 101        - Wolfgang Stanglmeier        <wolf@cologne.de>102        - Stefan Esser                <se@mi.Uni-Koeln.de>103 104It is now available as a bundle of 2 drivers:105 106- ncr53c8xx generic driver that supports all the SYM53C8XX family including107  the earliest 810 rev. 1, the latest 896 (2 channel LVD SCSI controller) and108  the new 895A (1 channel LVD SCSI controller).109- sym53c8xx enhanced driver (a.k.a. 896 drivers) that drops support of oldest110  chips in order to gain advantage of new features, as LOAD/STORE instructions111  available since the 810A and hardware phase mismatch available with the112  896 and the 895A.113 114You can find technical information about the NCR 8xx family in the115PCI-HOWTO written by Michael Will and in the SCSI-HOWTO written by116Drew Eckhardt.117 118Information about new chips is available at LSILOGIC web server:119 120          - http://www.lsilogic.com/121 122SCSI standard documentations are available at SYMBIOS ftp server:123 124          - ftp://ftp.symbios.com/125 126Useful SCSI tools written by Eric Youngdale are available at tsx-11:127 128          - ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsiinfo-X.Y.tar.gz129          - ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsidev-X.Y.tar.gz130 131These tools are not ALPHA but quite clean and work quite well.132It is essential you have the 'scsiinfo' package.133 134This short documentation describes the features of the generic and enhanced135drivers, configuration parameters and control commands available through136the proc SCSI file system read / write operations.137 138This driver has been tested OK with linux/i386, Linux/Alpha and Linux/PPC.139 140Latest driver version and patches are available at:141 142          - ftp://ftp.tux.org/pub/people/gerard-roudier143 144or145 146          - ftp://ftp.symbios.com/mirror/ftp.tux.org/pub/tux/roudier/drivers147 148I am not a native speaker of English and there are probably lots of149mistakes in this README file. Any help will be welcome.150 151 1522. Supported chips and SCSI features153====================================154 155The following features are supported for all chips:156 157	- Synchronous negotiation158	- Disconnection159	- Tagged command queuing160	- SCSI parity checking161	- Master parity checking162 163"Wide negotiation" is supported for chips that allow it.  The164following table shows some characteristics of NCR 8xx family chips165and what drivers support them.166 167+--------+-----------+-----+-----------+------------+------------+------------+168|        |           |     |           |            |Supported by|Supported by|169|        |On board   |     |           |            |the generic |the enhanced|170|Chip    |SDMS BIOS  |Wide |SCSI std.  | Max. sync  |driver      |driver      |171+--------+-----------+-----+-----------+------------+------------+------------+172|810     |  N        | N   |  FAST10   | 10 MB/s    |    Y       |    N       |173+--------+-----------+-----+-----------+------------+------------+------------+174|810A    |  N        | N   |  FAST10   | 10 MB/s    |    Y       |    Y       |175+--------+-----------+-----+-----------+------------+------------+------------+176|815     |  Y        | N   |  FAST10   | 10 MB/s    |    Y       |    N       |177+--------+-----------+-----+-----------+------------+------------+------------+178|825     |  Y        | Y   |  FAST10   | 20 MB/s    |    Y       |    N       |179+--------+-----------+-----+-----------+------------+------------+------------+180|825A    |  Y        | Y   |  FAST10   | 20 MB/s    |    Y       |    Y       |181+--------+-----------+-----+-----------+------------+------------+------------+182|860     |  N        | N   |  FAST20   | 20 MB/s    |    Y       |    Y       |183+--------+-----------+-----+-----------+------------+------------+------------+184|875     |  Y        | Y   |  FAST20   | 40 MB/s    |    Y       |    Y       |185+--------+-----------+-----+-----------+------------+------------+------------+186|876     |  Y        | Y   |  FAST20   | 40 MB/s    |    Y       |    Y       |187+--------+-----------+-----+-----------+------------+------------+------------+188|895     |  Y        | Y   |  FAST40   | 80 MB/s    |    Y       |    Y       |189+--------+-----------+-----+-----------+------------+------------+------------+190|895A    |  Y        | Y   |  FAST40   | 80 MB/s    |    Y       |    Y       |191+--------+-----------+-----+-----------+------------+------------+------------+192|896     |  Y        | Y   |  FAST40   | 80 MB/s    |    Y       |    Y       |193+--------+-----------+-----+-----------+------------+------------+------------+194|897     |  Y        | Y   |  FAST40   | 80 MB/s    |    Y       |    Y       |195+--------+-----------+-----+-----------+------------+------------+------------+196|1510D   |  Y        | Y   |  FAST40   | 80 MB/s    |    Y       |    Y       |197+--------+-----------+-----+-----------+------------+------------+------------+198|1010    |  Y        | Y   |  FAST80   |160 MB/s    |    N       |    Y       |199+--------+-----------+-----+-----------+------------+------------+------------+200|1010_66 |  Y        | Y   |  FAST80   |160 MB/s    |    N       |    Y       |201|[1]_    |           |     |           |            |            |            |202+--------+-----------+-----+-----------+------------+------------+------------+203 204.. [1] Chip supports 33MHz and 66MHz PCI buses.205 206 207Summary of other supported features:208 209:Module:                allow to load the driver210:Memory mapped I/O:     increases performance211:Profiling information: read operations from the proc SCSI file system212:Control commands:      write operations to the proc SCSI file system213:Debugging information: written to syslog (expert only)214:Serial NVRAM:          Symbios and Tekram formats215 216- Scatter / gather217- Shared interrupt218- Boot setup commands219 220 2213. Advantages of the enhanced 896 driver222========================================223 2243.1 Optimized SCSI SCRIPTS225--------------------------226 227The 810A, 825A, 875, 895, 896 and 895A support new SCSI SCRIPTS instructions228named LOAD and STORE that allow to move up to 1 DWORD from/to an IO register229to/from memory much faster that the MOVE MEMORY instruction that is supported230by the 53c7xx and 53c8xx family.231The LOAD/STORE instructions support absolute and DSA relative addressing232modes.  The SCSI SCRIPTS had been entirely rewritten using LOAD/STORE instead233of MOVE MEMORY instructions.234 2353.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)236-----------------------------------------------------------------------237 238The 896 and the 895A allows handling of the phase mismatch context from239SCRIPTS (avoids the phase mismatch interrupt that stops the SCSI processor240until the C code has saved the context of the transfer).241Implementing this without using LOAD/STORE instructions would be painful242and I didn't even want to try it.243 244The 896 chip supports 64 bit PCI transactions and addressing, while the245895A supports 32 bit PCI transactions and 64 bit addressing.246The SCRIPTS processor of these chips is not true 64 bit, but uses segment247registers for bit 32-63. Another interesting feature is that LOAD/STORE248instructions that address the on-chip RAM (8k) remain internal to the chip.249 250Due to the use of LOAD/STORE SCRIPTS instructions, this driver does not251support the following chips:252 253- SYM53C810 revision < 0x10 (16)254- SYM53C815 all revisions255- SYM53C825 revision < 0x10 (16)256 2574. Memory mapped I/O versus normal I/O258======================================259 260Memory mapped I/O has less latency than normal I/O.  Since261linux-1.3.x, memory mapped I/O is used rather than normal I/O.  Memory262mapped I/O seems to work fine on most hardware configurations, but263some poorly designed motherboards may break this feature.264 265The configuration option CONFIG_SCSI_NCR53C8XX_IOMAPPED forces the266driver to use normal I/O in all cases.267 268 2695. Tagged command queueing270==========================271 272Queuing more than 1 command at a time to a device allows it to perform273optimizations based on actual head positions and its mechanical274characteristics. This feature may also reduce average command latency.275In order to really gain advantage of this feature, devices must have276a reasonable cache size (No miracle is to be expected for a low-end277hard disk with 128 KB or less).278Some known SCSI devices do not properly support tagged command queuing.279Generally, firmware revisions that fix this kind of problems are available280at respective vendor web/ftp sites.281All I can say is that the hard disks I use on my machines behave well with282this driver with tagged command queuing enabled:283 284- IBM S12 0662285- Conner 1080S286- Quantum Atlas I287- Quantum Atlas II288 289If your controller has NVRAM, you can configure this feature per target290from the user setup tool. The Tekram Setup program allows to tune the291maximum number of queued commands up to 32. The Symbios Setup only allows292to enable or disable this feature.293 294The maximum number of simultaneous tagged commands queued to a device295is currently set to 8 by default.  This value is suitable for most SCSI296disks.  With large SCSI disks (>= 2GB, cache >= 512KB, average seek time297<= 10 ms), using a larger value may give better performances.298 299The sym53c8xx driver supports up to 255 commands per device, and the300generic ncr53c8xx driver supports up to 64, but using more than 32 is301generally not worth-while, unless you are using a very large disk or disk302array. It is noticeable that most of recent hard disks seem not to accept303more than 64 simultaneous commands. So, using more than 64 queued commands304is probably just resource wasting.305 306If your controller does not have NVRAM or if it is managed by the SDMS307BIOS/SETUP, you can configure tagged queueing feature and device queue308depths from the boot command-line. For example::309 310  ncr53c8xx=tags:4/t2t3q15-t4q7/t1u0q32311 312will set tagged commands queue depths as follow:313 314- target 2  all luns  on controller 0 --> 15315- target 3  all luns  on controller 0 --> 15316- target 4  all luns  on controller 0 -->  7317- target 1  lun 0     on controller 1 --> 32318- all other target/lun                -->  4319 320In some special conditions, some SCSI disk firmwares may return a321QUEUE FULL status for a SCSI command. This behaviour is managed by the322driver using the following heuristic:323 324- Each time a QUEUE FULL status is returned, tagged queue depth is reduced325  to the actual number of disconnected commands.326 327- Every 1000 successfully completed SCSI commands, if allowed by the328  current limit, the maximum number of queueable commands is incremented.329 330Since QUEUE FULL status reception and handling is resource wasting, the331driver notifies by default this problem to user by indicating the actual332number of commands used and their status, as well as its decision on the333device queue depth change.334The heuristic used by the driver in handling QUEUE FULL ensures that the335impact on performances is not too bad. You can get rid of the messages by336setting verbose level to zero, as follow:337 3381st method:339	    boot your system using 'ncr53c8xx=verb:0' option.340 3412nd method:342	    apply "setverbose 0" control command to the proc fs entry343            corresponding to your controller after boot-up.344 3456. Parity checking346==================347 348The driver supports SCSI parity checking and PCI bus master parity349checking.  These features must be enabled in order to ensure safe data350transfers.  However, some flawed devices or mother boards will have351problems with parity. You can disable either PCI parity or SCSI parity352checking by entering appropriate options from the boot command line.353(See 10: Boot setup commands).354 3557. Profiling information356========================357 358Profiling information is available through the proc SCSI file system.359Since gathering profiling information may impact performances, this360feature is disabled by default and requires a compilation configuration361option to be set to Y.362 363The device associated with a host has the following pathname::364 365          /proc/scsi/ncr53c8xx/N     (N=0,1,2 ....)366 367Generally, only 1 board is used on hardware configuration, and that device is::368 369          /proc/scsi/ncr53c8xx/0370 371However, if the driver has been made as module, the number of the372hosts is incremented each time the driver is loaded.373 374In order to display profiling information, just enter::375 376         cat /proc/scsi/ncr53c8xx/0377 378and you will get something like the following text::379 380    General information:381    Chip NCR53C810, device id 0x1, revision id 0x2382    IO port address 0x6000, IRQ number 10383    Using memory mapped IO at virtual address 0x282c000384    Synchronous transfer period 25, max commands per lun 4385    Profiling information:386    num_trans    = 18014387    num_kbytes   = 671314388    num_disc     = 25763389    num_break    = 1673390    num_int      = 1685391    num_fly      = 18038392    ms_setup     = 4940393    ms_data      = 369940394    ms_disc      = 183090395    ms_post      = 1320396 397General information is easy to understand. The device ID and the398revision ID identify the SCSI chip as follows:399 400======= ============= ===========401Chip    Device id     Revision Id402======= ============= ===========403810       0x1            <  0x10404810A      0x1            >= 0x10405815       0x4406825       0x3            <  0x10407860       0x6408825A      0x3            >= 0x10409875       0xf410895       0xc411======= ============= ===========412 413The profiling information is updated upon completion of SCSI commands.414A data structure is allocated and zeroed when the host adapter is415attached. So, if the driver is a module, the profile counters are416cleared each time the driver is loaded.  The "clearprof" command417allows you to clear these counters at any time.418 419The following counters are available:420 421("num" prefix means "number of",422"ms" means milli-seconds)423 424num_trans425	Number of completed commands426	Example above: 18014 completed commands427 428num_kbytes429	Number of kbytes transferred430	Example above: 671 MB transferred431 432num_disc433	Number of SCSI disconnections434	Example above: 25763 SCSI disconnections435 436num_break437	number of script interruptions (phase mismatch)438	Example above: 1673 script interruptions439 440num_int441	Number of interrupts other than "on the fly"442	Example above: 1685 interruptions not "on the fly"443 444num_fly445	Number of interrupts "on the fly"446	Example above: 18038 interruptions "on the fly"447 448ms_setup449	Elapsed time for SCSI commands setups450	Example above: 4.94 seconds451 452ms_data453	Elapsed time for data transfers454	Example above: 369.94 seconds spent for data transfer455 456ms_disc457	Elapsed time for SCSI disconnections458	Example above: 183.09 seconds spent disconnected459 460ms_post461	Elapsed time for command post processing462	(time from SCSI status get to command completion call)463	Example above: 1.32 seconds spent for post processing464 465Due to the 1/100 second tick of the system clock, "ms_post" time may466be wrong.467 468In the example above, we got 18038 interrupts "on the fly" and only4691673 script breaks generally due to disconnections inside a segment470of the scatter list.471 472 4738. Control commands474===================475 476Control commands can be sent to the driver with write operations to477the proc SCSI file system. The generic command syntax is the478following::479 480      echo "<verb> <parameters>" >/proc/scsi/ncr53c8xx/0481      (assumes controller number is 0)482 483Using "all" for "<target>" parameter with the commands below will484apply to all targets of the SCSI chain (except the controller).485 486Available commands:487 4888.1 Set minimum synchronous period factor489-----------------------------------------490 491    setsync <target> <period factor>492 493    :target:   target number494    :period:   minimum synchronous period.495               Maximum speed = 1000/(4*period factor) except for special496               cases below.497 498    Specify a period of 255, to force asynchronous transfer mode.499 500      - 10 means 25 nano-seconds synchronous period501      - 11 means 30 nano-seconds synchronous period502      - 12 means 50 nano-seconds synchronous period503 5048.2 Set wide size505-----------------506 507    setwide <target> <size>508 509    :target:   target number510    :size:     0=8 bits, 1=16bits511 5128.3 Set maximum number of concurrent tagged commands513----------------------------------------------------514 515    settags <target> <tags>516 517    :target:   target number518    :tags:     number of concurrent tagged commands519               must not be greater than SCSI_NCR_MAX_TAGS (default: 8)520 5218.4 Set order type for tagged command522-------------------------------------523 524    setorder <order>525 526    :order:    3 possible values:527 528               simple:529			use SIMPLE TAG for all operations (read and write)530 531               ordered:532			use ORDERED TAG for all operations533 534               default:535			use default tag type,536                        SIMPLE  TAG for read  operations537                        ORDERED TAG for write operations538 539 5408.5 Set debug mode541------------------542 543    setdebug <list of debug flags>544 545    Available debug flags:546 547	======== ========================================================548        alloc    print info about memory allocations (ccb, lcb)549        queue    print info about insertions into the command start queue550        result   print sense data on CHECK CONDITION status551        scatter  print info about the scatter process552        scripts  print info about the script binding process553	tiny     print minimal debugging information554	timing   print timing information of the NCR chip555	nego     print information about SCSI negotiations556	phase    print information on script interruptions557	======== ========================================================558 559    Use "setdebug" with no argument to reset debug flags.560 561 5628.6 Clear profile counters563--------------------------564 565    clearprof566 567    The profile counters are automatically cleared when the amount of568    data transferred reaches 1000 GB in order to avoid overflow.569    The "clearprof" command allows you to clear these counters at any time.570 571 5728.7 Set flag (no_disc)573----------------------574 575    setflag <target> <flag>576 577    target:    target number578 579    For the moment, only one flag is available:580 581        no_disc:   not allow target to disconnect.582 583    Do not specify any flag in order to reset the flag. For example:584 585    setflag 4586      will reset no_disc flag for target 4, so will allow it disconnections.587 588    setflag all589      will allow disconnection for all devices on the SCSI bus.590 591 5928.8 Set verbose level593---------------------594 595    setverbose #level596 597    The driver default verbose level is 1. This command allows to change598    th driver verbose level after boot-up.599 6008.9 Reset all logical units of a target601---------------------------------------602 603    resetdev <target>604 605    :target:   target number606 607    The driver will try to send a BUS DEVICE RESET message to the target.608    (Only supported by the SYM53C8XX driver and provided for test purpose)609 6108.10 Abort all tasks of all logical units of a target611-----------------------------------------------------612 613    cleardev <target>614 615    :target:   target number616 617    The driver will try to send a ABORT message to all the logical units618    of the target.619 620    (Only supported by the SYM53C8XX driver and provided for test purpose)621 622 6239. Configuration parameters624===========================625 626If the firmware of all your devices is perfect enough, all the627features supported by the driver can be enabled at start-up.  However,628if only one has a flaw for some SCSI feature, you can disable the629support by the driver of this feature at linux start-up and enable630this feature after boot-up only for devices that support it safely.631 632CONFIG_SCSI_NCR53C8XX_IOMAPPED       (default answer: n)633    Answer "y" if you suspect your mother board to not allow memory mapped I/O.634 635    May slow down performance a little.  This option is required by636    Linux/PPC and is used no matter what you select here.  Linux/PPC637    suffers no performance loss with this option since all IO is memory638    mapped anyway.639 640CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS    (default answer: 8)641    Default tagged command queue depth.642 643CONFIG_SCSI_NCR53C8XX_MAX_TAGS         (default answer: 8)644    This option allows you to specify the maximum number of tagged commands645    that can be queued to a device. The maximum supported value is 32.646 647CONFIG_SCSI_NCR53C8XX_SYNC            (default answer: 5)648    This option allows you to specify the frequency in MHz the driver649    will use at boot time for synchronous data transfer negotiations.650    This frequency can be changed later with the "setsync" control command.651    0 means "asynchronous data transfers".652 653CONFIG_SCSI_NCR53C8XX_FORCE_SYNC_NEGO (default answer: n)654    Force synchronous negotiation for all SCSI-2 devices.655 656    Some SCSI-2 devices do not report this feature in byte 7 of inquiry657    response but do support it properly (TAMARACK scanners for example).658 659CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT   (default and only reasonable answer: n)660    If you suspect a device of yours does not properly support disconnections,661    you can answer "y". Then, all SCSI devices will never disconnect the bus662    even while performing long SCSI operations.663 664CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT665    Genuine SYMBIOS boards use GPIO0 in output for controller LED and GPIO3666    bit as a flag indicating singled-ended/differential interface.667    If all the boards of your system are genuine SYMBIOS boards or use668    BIOS and drivers from SYMBIOS, you would want to enable this option.669 670    This option must NOT be enabled if your system has at least one 53C8XX671    based scsi board with a vendor-specific BIOS.672    For example, Tekram DC-390/U, DC-390/W and DC-390/F scsi controllers673    use a vendor-specific BIOS and are known to not use SYMBIOS compatible674    GPIO wiring. So, this option must not be enabled if your system has675    such a board installed.676 677CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT678    Enable support for reading the serial NVRAM data on Symbios and679    some Symbios compatible cards, and Tekram DC390W/U/F cards. Useful for680    systems with more than one Symbios compatible controller where at least681    one has a serial NVRAM, or for a system with a mixture of Symbios and682    Tekram cards. Enables setting the boot order of host adaptors683    to something other than the default order or "reverse probe" order.684    Also enables Symbios and Tekram cards to be distinguished so685    CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT may be set in a system with a686    mixture of Symbios and Tekram cards so the Symbios cards can make use of687    the full range of Symbios features, differential, led pin, without688    causing problems for the Tekram card(s).689 69010. Boot setup commands691=======================692 69310.1 Syntax694-----------695 696Setup commands can be passed to the driver either at boot time or as a697string variable using 'insmod'.698 699A boot setup command for the ncr53c8xx (sym53c8xx) driver begins with the700driver name "ncr53c8xx="(sym53c8xx). The kernel syntax parser then expects701an optional list of integers separated with comma followed by an optional702list of comma-separated strings. Example of boot setup command under lilo703prompt::704 705    lilo: linux root=/dev/hda2 ncr53c8xx=tags:4,sync:10,debug:0x200706 707- enable tagged commands, up to 4 tagged commands queued.708- set synchronous negotiation speed to 10 Mega-transfers / second.709- set DEBUG_NEGO flag.710 711Since comma seems not to be allowed when defining a string variable using712'insmod', the driver also accepts <space> as option separator.713The following command will install driver module with the same options as714above::715 716    insmod ncr53c8xx.o ncr53c8xx="tags:4 sync:10 debug:0x200"717 718For the moment, the integer list of arguments is discarded by the driver.719It will be used in the future in order to allow a per controller setup.720 721Each string argument must be specified as "keyword:value". Only lower-case722characters and digits are allowed.723 724In a system that contains multiple 53C8xx adapters insmod will install the725specified driver on each adapter. To exclude a chip use the 'excl' keyword.726 727The sequence of commands::728 729    insmod sym53c8xx sym53c8xx=excl:0x1400730    insmod ncr53c8xx731 732installs the sym53c8xx driver on all adapters except the one at IO port733address 0x1400 and then installs the ncr53c8xx driver to the adapter at IO734port address 0x1400.735 736 73710.2 Available arguments738------------------------739 74010.2.1  Master parity checking741^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^742 743	======     ========744        mpar:y     enabled745        mpar:n     disabled746	======     ========747 74810.2.2  Scsi parity checking749^^^^^^^^^^^^^^^^^^^^^^^^^^^^750 751	======     ========752        spar:y     enabled753        spar:n     disabled754	======     ========755 75610.2.3  Scsi disconnections757^^^^^^^^^^^^^^^^^^^^^^^^^^^758 759	======     ========760        disc:y     enabled761        disc:n     disabled762	======     ========763 76410.2.4  Special features765^^^^^^^^^^^^^^^^^^^^^^^^766 767   Only apply to 810A, 825A, 860, 875 and 895 controllers.768   Have no effect with other ones.769 770	=======    =================================================771        specf:y    (or 1) enabled772        specf:n    (or 0) disabled773        specf:3           enabled except Memory Write And Invalidate774	=======    =================================================775 776   The default driver setup is 'specf:3'. As a consequence, option 'specf:y'777   must be specified in the boot setup command to enable Memory Write And778   Invalidate.779 78010.2.5  Ultra SCSI support781^^^^^^^^^^^^^^^^^^^^^^^^^^782 783   Only apply to 860, 875, 895, 895a, 896, 1010 and 1010_66 controllers.784   Have no effect with other ones.785 786	=======    ========================787        ultra:n    All ultra speeds enabled788        ultra:2    Ultra2 enabled789        ultra:1    Ultra enabled790        ultra:0    Ultra speeds disabled791	=======    ========================792 79310.2.6  Default number of tagged commands794^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^795 796	======================= ===============================797        tags:0     (or tags:1 ) tagged command queuing disabled798        tags:#tags (#tags  > 1) tagged command queuing enabled799	======================= ===============================800 801  #tags will be truncated to the max queued commands configuration parameter.802  This option also allows to specify a command queue depth for each device803  that support tagged command queueing.804 805  Example::806 807      ncr53c8xx=tags:10/t2t3q16-t5q24/t1u2q32808 809  will set devices queue depth as follow:810 811      - controller #0 target #2 and target #3                  -> 16 commands,812      - controller #0 target #5                                -> 24 commands,813      - controller #1 target #1 logical unit #2                -> 32 commands,814      - all other logical units (all targets, all controllers) -> 10 commands.815 81610.2.7  Default synchronous period factor817^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^818 819============ ========================================================820sync:255     disabled (asynchronous transfer mode)821sync:#factor822	     ============     =======================================823	     #factor = 10     Ultra-2 SCSI 40 Mega-transfers / second824	     #factor = 11     Ultra-2 SCSI 33 Mega-transfers / second825	     #factor < 25     Ultra   SCSI 20 Mega-transfers / second826	     #factor < 50     Fast    SCSI-2827	     ============     =======================================828============ ========================================================829 830  In all cases, the driver will use the minimum transfer period supported by831  controllers according to NCR53C8XX chip type.832 83310.2.8  Negotiate synchronous with all devices834^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^835        (force sync nego)836 837        =====      =========838        fsn:y      enabled839        fsn:n      disabled840        =====      =========841 84210.2.9  Verbosity level843^^^^^^^^^^^^^^^^^^^^^^^844 845        ======     =========846        verb:0     minimal847        verb:1     normal848        verb:2     too much849        ======     =========850 85110.2.10 Debug mode852^^^^^^^^^^^^^^^^^^853 854========   ==================================================================855debug:0    clear debug flags856debug:#x   set debug flags857 858	    #x is an integer value combining the following power-of-2 values:859 860	    =============  ======861	    DEBUG_ALLOC       0x1862	    DEBUG_PHASE       0x2863	    DEBUG_POLL        0x4864	    DEBUG_QUEUE       0x8865	    DEBUG_RESULT     0x10866	    DEBUG_SCATTER    0x20867	    DEBUG_SCRIPT     0x40868	    DEBUG_TINY       0x80869	    DEBUG_TIMING    0x100870	    DEBUG_NEGO      0x200871	    DEBUG_TAGS      0x400872	    DEBUG_FREEZE    0x800873	    DEBUG_RESTART  0x1000874	    =============  ======875========   ==================================================================876 877  You can play safely with DEBUG_NEGO. However, some of these flags may878  generate bunches of syslog messages.879 88010.2.11 Burst max881^^^^^^^^^^^^^^^^^882 883=========  ==================================================================884burst:0    burst disabled885burst:255  get burst length from initial IO register settings.886burst:#x   burst enabled (1<<#x burst transfers max)887 888	   #x is an integer value which is log base 2 of the burst transfers889	   max.890 891	   The NCR53C875 and NCR53C825A support up to 128 burst transfers892	   (#x = 7).893 894	   Other chips only support up to 16 (#x = 4).895 896	   This is a maximum value. The driver set the burst length according897	   to chip and revision ids. By default the driver uses the maximum898	   value supported by the chip.899=========  ==================================================================900 90110.2.12 LED support902^^^^^^^^^^^^^^^^^^^903 904        =====      ===================905        led:1      enable  LED support906        led:0      disable LED support907        =====      ===================908 909  Do not enable LED support if your scsi board does not use SDMS BIOS.910  (See 'Configuration parameters')911 91210.2.13 Max wide913^^^^^^^^^^^^^^^^914 915        ======     ===================916        wide:1      wide scsi enabled917        wide:0      wide scsi disabled918        ======     ===================919 920  Some scsi boards use a 875 (ultra wide) and only supply narrow connectors.921  If you have connected a wide device with a 50 pins to 68 pins cable922  converter, any accepted wide negotiation will break further data transfers.923  In such a case, using "wide:0" in the bootup command will be helpful.924 92510.2.14 Differential mode926^^^^^^^^^^^^^^^^^^^^^^^^^927 928	======	=================================929        diff:0	never set up diff mode930        diff:1	set up diff mode if BIOS set it931        diff:2	always set up diff mode932        diff:3	set diff mode if GPIO3 is not set933	======	=================================934 93510.2.15 IRQ mode936^^^^^^^^^^^^^^^^937 938	=========  ========================================================939        irqm:0     always open drain940        irqm:1     same as initial settings (assumed BIOS settings)941        irqm:2     always totem pole942        irqm:0x10  driver will not use IRQF_SHARED flag when requesting irq943	=========  ========================================================944 945    (Bits 0x10 and 0x20 can be combined with hardware irq mode option)946 94710.2.16 Reverse probe948^^^^^^^^^^^^^^^^^^^^^949 950	=========   ========================================================951        revprob:n   probe chip ids from the PCI configuration in this order:952                    810, 815, 820, 860, 875, 885, 895, 896953        revprob:y   probe chip ids in the reverse order.954	=========   ========================================================955 95610.2.17 Fix up PCI configuration space957^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^958        pcifix:<option bits>959 960    Available option bits:961 962	===    ===============================================================963        0x0    No attempt to fix PCI configuration space registers values.964        0x1    Set PCI cache-line size register if not set.965        0x2    Set write and invalidate bit in PCI command register.966        0x4    Increase if necessary PCI latency timer according to burst max.967	===    ===============================================================968 969    Use 'pcifix:7' in order to allow the driver to fix up all PCI features.970 97110.2.18 Serial NVRAM972^^^^^^^^^^^^^^^^^^^^973 974	=======     =========================================975        nvram:n     do not look for serial NVRAM976        nvram:y     test controllers for onboard serial NVRAM977	=======     =========================================978 979        (alternate binary form)980        mvram=<bits options>981 982        ====   =================================================================983        0x01   look for NVRAM  (equivalent to nvram=y)984        0x02   ignore NVRAM "Synchronous negotiation" parameters for all devices985        0x04   ignore NVRAM "Wide negotiation"  parameter for all devices986        0x08   ignore NVRAM "Scan at boot time" parameter for all devices987        0x80   also attach controllers set to OFF in the NVRAM (sym53c8xx only)988        ====   =================================================================989 99010.2.19 Check SCSI BUS991^^^^^^^^^^^^^^^^^^^^^^992 993        buschk:<option bits>994 995    Available option bits:996 997        ====   ================================================998        0x0:   No check.999        0x1:   Check and do not attach the controller on error.1000        0x2:   Check and just warn on error.1001        0x4:   Disable SCSI bus integrity checking.1002        ====   ================================================1003 100410.2.20 Exclude a host from being attached1005^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^1006 1007        excl=<io_address>1008 1009    Prevent host at a given io address from being attached.1010    For example 'ncr53c8xx=excl:0xb400,excl:0xc000' indicate to the1011    ncr53c8xx driver not to attach hosts at address 0xb400 and 0xc000.1012 101310.2.21 Suggest a default SCSI id for hosts1014^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^1015 1016	==========	==========================================1017        hostid:255	no id suggested.1018        hostid:#x	(0 < x < 7) x suggested for hosts SCSI id.1019	==========	==========================================1020 1021    If a host SCSI id is available from the NVRAM, the driver will ignore1022    any value suggested as boot option. Otherwise, if a suggested value1023    different from 255 has been supplied, it will use it. Otherwise, it will1024    try to deduce the value previously set in the hardware and use value1025    7 if the hardware value is zero.1026 102710.2.22 Enable use of IMMEDIATE ARBITRATION1028^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^1029 1030        (only supported by the sym53c8xx driver. See 10.7 for more details)1031 1032=======   =================================================================1033iarb:0    do not use this feature.1034iarb:#x   use this feature according to bit fields as follow:1035 1036	  ========= =======================================================1037	  bit 0 (1) enable IARB each time the initiator has been reselected1038		    when it arbitrated for the SCSI BUS.1039	  (#x >> 4) maximum number of successive settings of IARB if the1040		    initiator win arbitration and it has other commands1041		    to send to a device.1042	  ========= =======================================================1043=======   =================================================================1044 1045Boot fail safe1046    safe:y	load the following assumed fail safe initial setup1047 1048  ========================	======================	==========1049  master parity			disabled		mpar:n1050  scsi parity			enabled			spar:y1051  disconnections		not allowed		disc:n1052  special features		disabled		specf:n1053  ultra scsi			disabled		ultra:n1054  force sync negotiation	disabled		fsn:n1055  reverse probe			disabled		revprob:n1056  PCI fix up                    disabled                pcifix:01057  serial NVRAM                  enabled                 nvram:y1058  verbosity level		2			verb:21059  tagged command queuing	disabled		tags:01060  synchronous negotiation	disabled		sync:2551061  debug flags			none			debug:01062  burst length			from BIOS settings	burst:2551063  LED support			disabled		led:01064  wide support			disabled		wide:01065  settle time			10 seconds		settle:101066  differential support		from BIOS settings	diff:11067  irq mode			from BIOS settings	irqm:11068  SCSI BUS check		do not attach on error	buschk:11069  immediate arbitration		disabled		iarb:01070  ========================	======================	==========1071 107210.3 Advised boot setup commands1073^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^1074 1075If the driver has been configured with default options, the equivalent1076boot setup is::1077 1078   ncr53c8xx=mpar:y,spar:y,disc:y,specf:3,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\1079             tags:0,sync:50,debug:0,burst:7,led:0,wide:1,settle:2,diff:0,irqm:01080 1081For an installation diskette or a safe but not fast system,1082boot setup can be::1083 1084    ncr53c8xx=safe:y,mpar:y,disc:y1085    ncr53c8xx=safe:y,disc:y1086    ncr53c8xx=safe:y,mpar:y1087    ncr53c8xx=safe:y1088 1089My personal system works flawlessly with the following equivalent setup::1090 1091   ncr53c8xx=mpar:y,spar:y,disc:y,specf:1,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\1092             tags:32,sync:12,debug:0,burst:7,led:1,wide:1,settle:2,diff:0,irqm:01093 1094The driver prints its actual setup when verbosity level is 2. You can try1095"ncr53c8xx=verb:2" to get the "static" setup of the driver, or add "verb:2"1096to your boot setup command in order to check the actual setup the driver is1097using.1098 109910.4 PCI configuration fix-up boot option1100-----------------------------------------1101 1102pcifix:<option bits>1103 1104Available option bits:1105 1106    ===      =====================================================1107    0x1      Set PCI cache-line size register if not set.1108    0x2      Set write and invalidate bit in PCI command register.1109    ===      =====================================================1110 1111Use 'pcifix:3' in order to allow the driver to fix both PCI features.1112 1113These options only apply to new SYMBIOS chips 810A, 825A, 860, 8751114and 895 and are only supported for Pentium and 486 class processors.1115Recent SYMBIOS 53C8XX scsi processors are able to use PCI read multiple1116and PCI write and invalidate commands. These features require the1117cache line size register to be properly set in the PCI configuration1118space of the chips. On the other hand, chips will use PCI write and1119invalidate commands only if the corresponding bit is set to 1 in the1120PCI command register.1121 1122Not all PCI bioses set the PCI cache line register and the PCI write and1123invalidate bit in the PCI configuration space of 53C8XX chips.1124Optimized PCI accesses may be broken for some PCI/memory controllers or1125make problems with some PCI boards.1126 1127This fix-up worked flawlessly on my previous system.1128(MB Triton HX / 53C875 / 53C810A)1129I use these options at my own risks as you will do if you decide to1130use them too.1131 1132 113310.5 Serial NVRAM support boot option1134-------------------------------------1135 1136=======     =========================================1137nvram:n     do not look for serial NVRAM1138nvram:y     test controllers for onboard serial NVRAM1139=======     =========================================1140 1141This option can also been entered as an hexadecimal value that allows1142to control what information the driver will get from the NVRAM and what1143information it will ignore.1144For details see '17. Serial NVRAM support'.1145 1146When this option is enabled, the driver tries to detect all boards using1147a Serial NVRAM. This memory is used to hold user set up parameters.1148 1149The parameters the driver is able to get from the NVRAM depend on the1150data format used, as follow:1151 1152+-------------------------------+------------------+--------------+1153|                               |Tekram format     |Symbios format|1154+-------------------------------+------------------+--------------+1155|General and host parameters    |                  |              |1156+-------------------------------+------------------+--------------+1157|  * Boot order                 |        N         |       Y      |1158+-------------------------------+------------------+--------------+1159|  * Host SCSI ID               |        Y         |       Y      |1160+-------------------------------+------------------+--------------+1161|  * SCSI parity checking       |        Y         |       Y      |1162+-------------------------------+------------------+--------------+1163|  * Verbose boot messages      |        N         |       Y      |1164+-------------------------------+------------------+--------------+1165|SCSI devices parameters                                          |1166+-------------------------------+------------------+--------------+1167|  * Synchronous transfer speed |        Y         |       Y      |1168+-------------------------------+------------------+--------------+1169|  * Wide 16 / Narrow           |        Y         |       Y      |1170+-------------------------------+------------------+--------------+1171|  * Tagged Command Queuing     |        Y         |       Y      |1172|    enabled                    |                  |              |1173+-------------------------------+------------------+--------------+1174|  * Disconnections enabled     |        Y         |       Y      |1175+-------------------------------+------------------+--------------+1176|  * Scan at boot time          |        N         |       Y      |1177+-------------------------------+------------------+--------------+1178 1179In order to speed up the system boot, for each device configured without1180the "scan at boot time" option, the driver forces an error on the1181first TEST UNIT READY command received for this device.1182 1183Some SDMS BIOS revisions seem to be unable to boot cleanly with very fast1184hard disks. In such a situation you cannot configure the NVRAM with1185optimized parameters value.1186 1187The 'nvram' boot option can be entered in hexadecimal form in order1188to ignore some options configured in the NVRAM, as follow:1189 1190mvram=<bits options>1191 1192      ====   =================================================================1193      0x01   look for NVRAM  (equivalent to nvram=y)1194      0x02   ignore NVRAM "Synchronous negotiation" parameters for all devices1195      0x04   ignore NVRAM "Wide negotiation"  parameter for all devices1196      0x08   ignore NVRAM "Scan at boot time" parameter for all devices1197      0x80   also attach controllers set to OFF in the NVRAM (sym53c8xx only)1198      ====   =================================================================1199 1200Option 0x80 is only supported by the sym53c8xx driver and is disabled by1201default. Result is that, by default (option not set), the sym53c8xx driver1202will not attach controllers set to OFF in the NVRAM.1203 1204The ncr53c8xx always tries to attach all the controllers. Option 0x80 has1205not been added to the ncr53c8xx driver, since it has been reported to1206confuse users who use this driver since a long time. If you desire a1207controller not to be attached by the ncr53c8xx driver at Linux boot, you1208must use the 'excl' driver boot option.1209 121010.6 SCSI BUS checking boot option.1211^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^1212 1213When this option is set to a non-zero value, the driver checks SCSI lines1214logic state, 100 micro-seconds after having asserted the SCSI RESET line.1215The driver just reads SCSI lines and checks all lines read FALSE except RESET.1216Since SCSI devices shall release the BUS at most 800 nano-seconds after SCSI1217RESET has been asserted, any signal to TRUE may indicate a SCSI BUS problem.1218Unfortunately, the following common SCSI BUS problems are not detected:1219 1220- Only 1 terminator installed.1221- Misplaced terminators.1222- Bad quality terminators.1223 1224On the other hand, either bad cabling, broken devices, not conformant1225devices, ... may cause a SCSI signal to be wrong when the driver reads it.1226 122710.7 IMMEDIATE ARBITRATION boot option1228^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^1229 1230This option is only supported by the SYM53C8XX driver (not by the NCR53C8XX).1231 1232SYMBIOS 53C8XX chips are able to arbitrate for the SCSI BUS as soon as they1233have detected an expected disconnection (BUS FREE PHASE). For this process1234to be started, bit 1 of SCNTL1 IO register must be set when the chip is1235connected to the SCSI BUS.1236 1237When this feature has been enabled for the current connection, the chip has1238every chance to win arbitration if only devices with lower priority are1239competing for the SCSI BUS. By the way, when the chip is using SCSI id 7,1240then it will for sure win the next SCSI BUS arbitration.1241 1242Since, there is no way to know what devices are trying to arbitrate for the1243BUS, using this feature can be extremely unfair. So, you are not advised1244to enable it, or at most enable this feature for the case the chip lost1245the previous arbitration (boot option 'iarb:1').1246 1247This feature has the following advantages:1248 1249a) Allow the initiator with ID 7 to win arbitration when it wants so.1250b) Overlap at least 4 micro-seconds of arbitration time with the execution1251   of SCRIPTS that deal with the end of the current connection and that1252   starts the next job.1253 1254Hmmm... But (a) may just prevent other devices from reselecting the initiator,1255and delay data transfers or status/completions, and (b) may just waste1256SCSI BUS bandwidth if the SCRIPTS execution lasts more than 4 micro-seconds.1257 1258The use of IARB needs the SCSI_NCR_IARB_SUPPORT option to have been defined1259at compile time and the 'iarb' boot option to have been set to a non zero1260value at boot time. It is not that useful for real work, but can be used1261to stress SCSI devices or for some applications that can gain advantage of1262it. By the way, if you experience badnesses like 'unexpected disconnections',1263'bad reselections', etc... when using IARB on heavy IO load, you should not1264be surprised, because force-feeding anything and blocking its arse at the1265same time cannot work for a long time. :-))1266 1267 126811. Some constants and flags of the ncr53c8xx.h header file1269===========================================================1270 1271Some of these are defined from the configuration parameters.  To1272change other "defines", you must edit the header file.  Do that only1273if you know what you are doing.1274 1275SCSI_NCR_SETUP_SPECIAL_FEATURES	(default: defined)1276	If defined, the driver will enable some special features according1277	to chip and revision id.1278 1279        For 810A, 860, 825A, 875 and 895 scsi chips, this option enables1280	support of features that reduce load of PCI bus and memory accesses1281	during  scsi transfer processing: burst op-code fetch, read multiple,1282        read line, prefetch, cache line, write and invalidate,1283        burst 128 (875 only), large dma fifo (875 only), offset 16 (875 only).1284	Can be changed by the following boot setup command::1285 1286		ncr53c8xx=specf:n1287 1288SCSI_NCR_IOMAPPED		(default: not defined)1289	If defined, normal I/O is forced.1290 1291SCSI_NCR_SHARE_IRQ		(default: defined)1292	If defined, request shared IRQ.1293 1294SCSI_NCR_MAX_TAGS		(default: 8)1295	Maximum number of simultaneous tagged commands to a device.1296 1297	Can be changed by "settags <target> <maxtags>"1298 1299SCSI_NCR_SETUP_DEFAULT_SYNC     (default: 50)1300	Transfer period factor the driver will use at boot time for synchronous1301	negotiation. 0 means asynchronous.1302 1303	Can be changed by "setsync <target> <period factor>"1304 1305SCSI_NCR_SETUP_DEFAULT_TAGS     (default: 8)1306	Default number of simultaneous tagged commands to a device.1307 1308	< 1 means tagged command queuing disabled at start-up.1309 1310SCSI_NCR_ALWAYS_SIMPLE_TAG	(default: defined)1311	Use SIMPLE TAG for read and write commands.1312 1313	Can be changed by "setorder <ordered|simple|default>"1314 1315SCSI_NCR_SETUP_DISCONNECTION	(default: defined)1316	If defined, targets are allowed to disconnect.1317 1318SCSI_NCR_SETUP_FORCE_SYNC_NEGO	(default: not defined)1319	If defined, synchronous negotiation is tried for all SCSI-2 devices.1320 1321	Can be changed by "setsync <target> <period>"1322 1323SCSI_NCR_SETUP_MASTER_PARITY	(default: defined)1324	If defined, master parity checking is enabled.1325 1326SCSI_NCR_SETUP_SCSI_PARITY	(default: defined)1327	If defined, SCSI parity checking is enabled.1328 1329SCSI_NCR_PROFILE_SUPPORT	(default: not defined)1330	If defined, profiling information is gathered.1331 1332SCSI_NCR_MAX_SCATTER		(default: 128)1333	Scatter list size of the driver ccb.1334 1335SCSI_NCR_MAX_TARGET		(default: 16)1336	Max number of targets per host.1337 1338SCSI_NCR_MAX_HOST		(default: 2)1339	Max number of host controllers.1340 1341SCSI_NCR_SETTLE_TIME		(default: 2)1342	Number of seconds the driver will wait after reset.1343 1344SCSI_NCR_TIMEOUT_ALERT		(default: 3)1345	If a pending command will time out after this amount of seconds,1346	an ordered tag is used for the next command.1347 1348	Avoids timeouts for unordered tagged commands.1349 1350SCSI_NCR_CAN_QUEUE		(default: 7*SCSI_NCR_MAX_TAGS)1351	Max number of commands that can be queued to a host.1352 1353SCSI_NCR_CMD_PER_LUN		(default: SCSI_NCR_MAX_TAGS)1354	Max number of commands queued to a host for a device.1355 1356SCSI_NCR_SG_TABLESIZE		(default: SCSI_NCR_MAX_SCATTER-1)1357	Max size of the Linux scatter/gather list.1358 1359SCSI_NCR_MAX_LUN	(default: 8)1360	Max number of LUNs per target.1361 1362 136312. Installation1364================1365 1366This driver is part of the linux kernel distribution.1367Driver files are located in the sub-directory "drivers/scsi" of the1368kernel source tree.1369 1370Driver files::1371 1372	README.ncr53c8xx	: this file1373	ChangeLog.ncr53c8xx	: change log1374	ncr53c8xx.h		: definitions1375	ncr53c8xx.c		: the driver code1376 1377New driver versions are made available separately in order to allow testing1378changes and new features prior to including them into the linux kernel1379distribution. The following URL provides information on latest available1380patches:1381 1382      ftp://ftp.tux.org/pub/people/gerard-roudier/README1383 1384 138513. Architecture dependent features1386===================================1387 1388<Not yet written>1389 1390 139114. Known problems1392==================1393 139414.1 Tagged commands with Iomega Jaz device1395-------------------------------------------1396 1397I have not tried this device, however it has been reported to me the1398following: This device is capable of Tagged command queuing. However1399while spinning up, it rejects Tagged commands. This behaviour is1400conforms to 6.8.2 of SCSI-2 specifications. The current behaviour of1401the driver in that situation is not satisfying. So do not enable1402Tagged command queuing for devices that are able to spin down.  The1403other problem that may appear is timeouts. The only way to avoid1404timeouts seems to edit linux/drivers/scsi/sd.c and to increase the1405current timeout values.1406 140714.2 Device names change when another controller is added1408---------------------------------------------------------1409 1410When you add a new NCR53C8XX chip based controller to a system that already1411has one or more controllers of this family, it may happen that the order1412the driver registers them to the kernel causes problems due to device1413name changes.1414When at least one controller uses NvRAM, SDMS BIOS version 4 allows you to1415define the order the BIOS will scan the scsi boards. The driver attaches1416controllers according to BIOS information if NvRAM detect option is set.1417 1418If your controllers do not have NvRAM, you can:1419 1420- Ask the driver to probe chip ids in reverse order from the boot command1421  line: ncr53c8xx=revprob:y1422- Make appropriate changes in the fstab.1423- Use the 'scsidev' tool from Eric Youngdale.1424 142514.3 Using only 8 bit devices with a WIDE SCSI controller1426---------------------------------------------------------1427 1428When only 8 bit NARROW devices are connected to a 16 bit WIDE SCSI controller,1429you must ensure that lines of the wide part of the SCSI BUS are pulled-up.1430This can be achieved by ENABLING the WIDE TERMINATOR portion of the SCSI1431controller card.1432 1433The TYAN 1365 documentation revision 1.2 is not correct about such settings.1434(page 10, figure 3.3).1435 143614.4 Possible data corruption during a Memory Write and Invalidate1437------------------------------------------------------------------1438 1439This problem is described in SYMBIOS DEL 397, Part Number 69-039241, ITEM 4.1440 1441In some complex situations, 53C875 chips revision <= 3 may start a PCI1442Write and Invalidate Command at a not cache-line-aligned 4 DWORDS boundary.1443This is only possible when Cache Line Size is 8 DWORDS or greater.1444Pentium systems use a 8 DWORDS cache line size and so are concerned by1445this chip bug, unlike i486 systems that use a 4 DWORDS cache line size.1446 1447When this situation occurs, the chip may complete the Write and Invalidate1448command after having only filled part of the last cache line involved in1449the transfer, leaving to data corruption the remainder of this cache line.1450 1451Not using Write And Invalidate obviously gets rid of this chip bug, and so1452it is now the default setting of the driver.1453However, for people like me who want to enable this feature, I have added1454part of a work-around suggested by SYMBIOS. This work-around resets the1455addressing logic when the DATA IN phase is entered and so prevents the bug1456from being triggered for the first SCSI MOVE of the phase. This work-around1457should be enough according to the following:1458 1459The only driver internal data structure that is greater than 8 DWORDS  and1460that is moved by the SCRIPTS processor is the 'CCB header' that contains1461the context of the SCSI transfer. This data structure is aligned on 8 DWORDS1462boundary (Pentium Cache Line Size), and so is immune to this chip bug, at1463least on Pentium systems.1464 1465But the conditions of this bug can be met when a SCSI read command is1466performed using a buffer that is 4 DWORDS but not cache-line aligned.1467This cannot happen under Linux when scatter/gather lists are used since1468they only refer to system buffers that are well aligned. So, a work around1469may only be needed under Linux when a scatter/gather list is not used and1470when the SCSI DATA IN phase is reentered after a phase mismatch.1471 147215. SCSI problem troubleshooting1473================================1474 147515.1 Problem tracking1476---------------------1477 1478Most SCSI problems are due to a non conformant SCSI bus or to buggy1479devices.  If unfortunately you have SCSI problems, you can check the1480following things:1481 1482- SCSI bus cables1483- terminations at both end of the SCSI chain1484- linux syslog messages (some of them may help you)1485 1486If you do not find the source of problems, you can configure the1487driver with no features enabled.1488 1489- only asynchronous data transfers1490- tagged commands disabled1491- disconnections not allowed1492 1493Now, if your SCSI bus is ok, your system have every chance to work1494with this safe configuration but performances will not be optimal.1495 1496If it still fails, then you can send your problem description to1497appropriate mailing lists or news-groups.  Send me a copy in order to1498be sure I will receive it.  Obviously, a bug in the driver code is1499possible.1500 1501     My email address: Gerard Roudier <groudier@free.fr>1502 1503Allowing disconnections is important if you use several devices on1504your SCSI bus but often causes problems with buggy devices.1505Synchronous data transfers increases throughput of fast devices like1506hard disks.  Good SCSI hard disks with a large cache gain advantage of1507tagged commands queuing.1508 1509Try to enable one feature at a time with control commands.  For example:1510 1511::1512 1513    echo "setsync all 25" >/proc/scsi/ncr53c8xx/01514 1515Will enable fast synchronous data transfer negotiation for all targets.1516 1517::1518 1519    echo "setflag 3" >/proc/scsi/ncr53c8xx/01520 1521Will reset flags (no_disc) for target 3, and so will allow it to disconnect1522the SCSI Bus.1523 1524::1525 1526    echo "settags 3 8" >/proc/scsi/ncr53c8xx/01527 1528Will enable tagged command queuing for target 3 if that device supports it.1529 1530Once you have found the device and the feature that cause problems, just1531disable that feature for that device.1532 153315.2 Understanding hardware error reports1534-----------------------------------------1535 1536When the driver detects an unexpected error condition, it may display a1537message of the following pattern::1538 1539    sym53c876-0:1: ERROR (0:48) (1-21-65) (f/95) @ (script 7c0:19000000).1540    sym53c876-0: script cmd = 190000001541    sym53c876-0: regdump: da 10 80 95 47 0f 01 07 75 01 81 21 80 01 09 00.1542 1543Some fields in such a message may help you understand the cause of the1544problem, as follows::1545 1546    sym53c876-0:1: ERROR (0:48) (1-21-65) (f/95) @ (script 7c0:19000000).1547    ............A.........B.C....D.E..F....G.H.......I.....J...K.......1548 1549Field A : target number.1550  SCSI ID of the device the controller was talking with at the moment the1551  error occurs.1552 1553Field B : DSTAT io register (DMA STATUS)1554  ========   =============================================================1555  Bit 0x40   MDPE Master Data Parity Error1556             Data parity error detected on the PCI BUS.1557  Bit 0x20   BF   Bus Fault1558             PCI bus fault condition detected1559  Bit 0x01   IID  Illegal Instruction Detected1560             Set by the chip when it detects an Illegal Instruction format1561             on some condition that makes an instruction illegal.1562  Bit 0x80   DFE Dma Fifo Empty1563             Pure status bit that does not indicate an error.1564  ========   =============================================================1565 1566  If the reported DSTAT value contains a combination of MDPE (0x40),1567  BF (0x20), then the cause may be likely due to a PCI BUS problem.1568 1569Field C : SIST io register (SCSI Interrupt Status)1570  ========   ==================================================================1571  Bit 0x08   SGE  SCSI GROSS ERROR1572             Indicates that the chip detected a severe error condition1573             on the SCSI BUS that prevents the SCSI protocol from functioning1574             properly.1575  Bit 0x04   UDC  Unexpected Disconnection1576             Indicates that the device released the SCSI BUS when the chip1577             was not expecting this to happen. A device may behave so to1578             indicate the SCSI initiator that an error condition not reportable1579             using the SCSI protocol has occurred.1580  Bit 0x02   RST  SCSI BUS Reset1581             Generally SCSI targets do not reset the SCSI BUS, although any1582             device on the BUS can reset it at any time.1583  Bit 0x01   PAR  Parity1584             SCSI parity error detected.1585  ========   ==================================================================1586 1587  On a faulty SCSI BUS, any error condition among SGE (0x08), UDC (0x04) and1588  PAR (0x01) may be detected by the chip. If your SCSI system sometimes1589  encounters such error conditions, especially SCSI GROSS ERROR, then a SCSI1590  BUS problem is likely the cause of these errors.1591 1592For fields D,E,F,G and H, you may look into the sym53c8xx_defs.h file1593that contains some minimal comments on IO register bits.1594 1595Field D : SOCL  Scsi Output Control Latch1596          This register reflects the state of the SCSI control lines the1597          chip want to drive or compare against.1598 1599Field E : SBCL  Scsi Bus Control Lines1600          Actual value of control lines on the SCSI BUS.1601 1602Field F : SBDL  Scsi Bus Data Lines1603          Actual value of data lines on the SCSI BUS.1604 1605Field G : SXFER  SCSI Transfer1606          Contains the setting of the Synchronous Period for output and1607          the current Synchronous offset (offset 0 means asynchronous).1608 1609Field H : SCNTL3 Scsi Control Register 31610          Contains the setting of timing values for both asynchronous and1611          synchronous data transfers.1612 1613Understanding Fields I, J, K and dumps requires to have good knowledge of1614SCSI standards, chip cores functionnals and internal driver data structures.1615You are not required to decode and understand them, unless you want to help1616maintain the driver code.1617 161816. Synchronous transfer negotiation tables1619===========================================1620 1621Tables below have been created by calling the routine the driver uses1622for synchronisation negotiation timing calculation and chip setting.1623The first table corresponds to Ultra chips 53875 and 53C860 with 80 MHz1624clock and 5 clock divisors.1625The second one has been calculated by setting the scsi clock to 40 Mhz1626and using 4 clock divisors and so applies to all NCR53C8XX chips in fast1627SCSI-2 mode.1628 1629Periods are in nano-seconds and speeds are in Mega-transfers per second.16301 Mega-transfers/second means 1 MB/s with 8 bits SCSI and 2 MB/s with1631Wide16 SCSI.1632 163316.1 Synchronous timings for 53C895, 53C875 and 53C860 SCSI controllers1634 1635+-----------------------------+--------+-------+--------------+1636|Negotiated                   |NCR settings    |              |1637+-------+--------+------------+--------+-------+              |1638|Factor |Period  |Speed       |Period  |Speed  |              |1639+-------+--------+------------+--------+-------+--------------+1640|10     | 25     |40.000      | 25     |40.000 | (53C895 only)|1641+-------+--------+------------+--------+-------+--------------+1642|11     | 30.2   |33.112      | 31.25  |32.000 | (53C895 only)|1643+-------+--------+------------+--------+-------+--------------+1644|12     | 50     |20.000      | 50     |20.000 |              |1645+-------+--------+------------+--------+-------+--------------+1646|13     | 52     |19.230      | 62     |16.000 |              |1647+-------+--------+------------+--------+-------+--------------+1648|14     | 56     |17.857      | 62     |16.000 |              |1649+-------+--------+------------+--------+-------+--------------+1650|15     | 60     |16.666      | 62     |16.000 |              |1651+-------+--------+------------+--------+-------+--------------+1652|16     | 64     |15.625      | 75     |13.333 |              |1653+-------+--------+------------+--------+-------+--------------+1654|17     | 68     |14.705      | 75     |13.333 |              |1655+-------+--------+------------+--------+-------+--------------+1656|18     | 72     |13.888      | 75     |13.333 |              |1657+-------+--------+------------+--------+-------+--------------+1658|19     | 76     |13.157      | 87     |11.428 |              |1659+-------+--------+------------+--------+-------+--------------+1660|20     | 80     |12.500      | 87     |11.428 |              |1661+-------+--------+------------+--------+-------+--------------+1662|21     | 84     |11.904      | 87     |11.428 |              |1663+-------+--------+------------+--------+-------+--------------+1664|22     | 88     |11.363      | 93     |10.666 |              |1665+-------+--------+------------+--------+-------+--------------+1666|23     | 92     |10.869      | 93     |10.666 |              |1667+-------+--------+------------+--------+-------+--------------+1668|24     | 96     |10.416      |100     |10.000 |              |1669+-------+--------+------------+--------+-------+--------------+1670|25     |100     |10.000      |100     |10.000 |              |1671+-------+--------+------------+--------+-------+--------------+1672|26     |104     | 9.615      |112     | 8.888 |              |1673+-------+--------+------------+--------+-------+--------------+1674|27     |108     | 9.259      |112     | 8.888 |              |1675+-------+--------+------------+--------+-------+--------------+1676|28     |112     | 8.928      |112     | 8.888 |              |1677+-------+--------+------------+--------+-------+--------------+1678|29     |116     | 8.620      |125     | 8.000 |              |1679+-------+--------+------------+--------+-------+--------------+1680|30     |120     | 8.333      |125     | 8.000 |              |1681+-------+--------+------------+--------+-------+--------------+1682|31     |124     | 8.064      |125     | 8.000 |              |1683+-------+--------+------------+--------+-------+--------------+1684|32     |128     | 7.812      |131     | 7.619 |              |1685+-------+--------+------------+--------+-------+--------------+1686|33     |132     | 7.575      |150     | 6.666 |              |1687+-------+--------+------------+--------+-------+--------------+1688|34     |136     | 7.352      |150     | 6.666 |              |1689+-------+--------+------------+--------+-------+--------------+1690|35     |140     | 7.142      |150     | 6.666 |              |1691+-------+--------+------------+--------+-------+--------------+1692|36     |144     | 6.944      |150     | 6.666 |              |1693+-------+--------+------------+--------+-------+--------------+1694|37     |148     | 6.756      |150     | 6.666 |              |1695+-------+--------+------------+--------+-------+--------------+1696|38     |152     | 6.578      |175     | 5.714 |              |1697+-------+--------+------------+--------+-------+--------------+1698|39     |156     | 6.410      |175     | 5.714 |              |1699+-------+--------+------------+--------+-------+--------------+1700|40     |160     | 6.250      |175     | 5.714 |              |1701+-------+--------+------------+--------+-------+--------------+1702|41     |164     | 6.097      |175     | 5.714 |              |1703+-------+--------+------------+--------+-------+--------------+1704|42     |168     | 5.952      |175     | 5.714 |              |1705+-------+--------+------------+--------+-------+--------------+1706|43     |172     | 5.813      |175     | 5.714 |              |1707+-------+--------+------------+--------+-------+--------------+1708|44     |176     | 5.681      |187     | 5.333 |              |1709+-------+--------+------------+--------+-------+--------------+1710|45     |180     | 5.555      |187     | 5.333 |              |1711+-------+--------+------------+--------+-------+--------------+1712|46     |184     | 5.434      |187     | 5.333 |              |1713+-------+--------+------------+--------+-------+--------------+1714|47     |188     | 5.319      |200     | 5.000 |              |1715+-------+--------+------------+--------+-------+--------------+1716|48     |192     | 5.208      |200     | 5.000 |              |1717+-------+--------+------------+--------+-------+--------------+1718|49     |196     | 5.102      |200     | 5.000 |              |1719+-------+--------+------------+--------+-------+--------------+1720 172116.2 Synchronous timings for fast SCSI-2 53C8XX controllers1722 1723+-----------------------------+----------------+1724|Negotiated                   |NCR settings    |1725+-------+--------+------------+--------+-------+1726|Factor |Period  |Speed       |Period  |Speed  |1727+-------+--------+------------+--------+-------+1728|25     |100     |10.000      |100     |10.000 |1729+-------+--------+------------+--------+-------+1730|26     |104     |9.615       |125     | 8.000 |1731+-------+--------+------------+--------+-------+1732|27     |108     |9.259       |125     | 8.000 |1733+-------+--------+------------+--------+-------+1734|28     |112     |8.928       |125     | 8.000 |1735+-------+--------+------------+--------+-------+1736|29     |116     |8.620       |125     | 8.000 |1737+-------+--------+------------+--------+-------+1738|30     |120     |8.333       |125     | 8.000 |1739+-------+--------+------------+--------+-------+1740|31     |124     |8.064       |125     | 8.000 |1741+-------+--------+------------+--------+-------+1742|32     |128     |7.812       |131     | 7.619 |1743+-------+--------+------------+--------+-------+1744|33     |132     |7.575       |150     | 6.666 |1745+-------+--------+------------+--------+-------+1746|34     |136     |7.352       |150     | 6.666 |1747+-------+--------+------------+--------+-------+1748|35     |140     |7.142       |150     | 6.666 |1749+-------+--------+------------+--------+-------+1750|36     |144     |6.944       |150     | 6.666 |1751+-------+--------+------------+--------+-------+1752|37     |148     |6.756       |150     | 6.666 |1753+-------+--------+------------+--------+-------+1754|38     |152     |6.578       |175     | 5.714 |1755+-------+--------+------------+--------+-------+1756|39     |156     |6.410       |175     | 5.714 |1757+-------+--------+------------+--------+-------+1758|40     |160     |6.250       |175     | 5.714 |1759+-------+--------+------------+--------+-------+1760|41     |164     |6.097       |175     | 5.714 |1761+-------+--------+------------+--------+-------+1762|42     |168     |5.952       |175     | 5.714 |1763+-------+--------+------------+--------+-------+1764|43     |172     |5.813       |175     | 5.714 |1765+-------+--------+------------+--------+-------+1766|44     |176     |5.681       |187     | 5.333 |1767+-------+--------+------------+--------+-------+1768|45     |180     |5.555       |187     | 5.333 |1769+-------+--------+------------+--------+-------+1770|46     |184     |5.434       |187     | 5.333 |1771+-------+--------+------------+--------+-------+1772|47     |188     |5.319       |200     | 5.000 |1773+-------+--------+------------+--------+-------+1774|48     |192     |5.208       |200     | 5.000 |1775+-------+--------+------------+--------+-------+1776|49     |196     |5.102       |200     | 5.000 |1777+-------+--------+------------+--------+-------+1778 1779 178017. Serial NVRAM1781================1782 1783(added by Richard Waltham: dormouse@farsrobt.demon.co.uk)1784 178517.1 Features1786-------------1787 1788Enabling serial NVRAM support enables detection of the serial NVRAM included1789on Symbios and some Symbios compatible host adaptors, and Tekram boards. The1790serial NVRAM is used by Symbios and Tekram to hold set up parameters for the1791host adaptor and its attached drives.1792 1793The Symbios NVRAM also holds data on the boot order of host adaptors in a1794system with more than one host adaptor. This enables the order of scanning1795the cards for drives to be changed from the default used during host adaptor1796detection.1797 1798This can be done to a limited extent at the moment using "reverse probe" but1799this only changes the order of detection of different types of cards. The1800NVRAM boot order settings can do this as well as change the order the same1801types of cards are scanned in, something "reverse probe" cannot do.1802 1803Tekram boards using Symbios chips, DC390W/F/U, which have NVRAM are detected1804and this is used to distinguish between Symbios compatible and Tekram host1805adaptors. This is used to disable the Symbios compatible "diff" setting1806incorrectly set on Tekram boards if the CONFIG_SCSI_53C8XX_SYMBIOS_COMPAT1807configuration parameter is set enabling both Symbios and Tekram boards to be1808used together with the Symbios cards using all their features, including1809"diff" support. ("led pin" support for Symbios compatible cards can remain1810enabled when using Tekram cards. It does nothing useful for Tekram host1811adaptors but does not cause problems either.)1812 1813 181417.2 Symbios NVRAM layout1815-------------------------1816 1817typical data at NVRAM address 0x100 (53c810a NVRAM)::1818 1819    00 001820    64 011821    8e 0b1822 1823    00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 001824 1825    04 00 0f 00 00 10 00 50 00 00 01 00 00 621826    04 00 03 00 00 10 00 58 00 00 01 00 00 631827    04 00 01 00 00 10 00 48 00 00 01 00 00 611828    00 00 00 00 00 00 00 00 00 00 00 00 00 001829 1830    0f 00 08 08 64 00 0a 001831    0f 00 08 08 64 00 0a 001832    0f 00 08 08 64 00 0a 001833    0f 00 08 08 64 00 0a 001834    0f 00 08 08 64 00 0a 001835    0f 00 08 08 64 00 0a 001836    0f 00 08 08 64 00 0a 001837    0f 00 08 08 64 00 0a 001838 1839    0f 00 08 08 64 00 0a 001840    0f 00 08 08 64 00 0a 001841    0f 00 08 08 64 00 0a 001842    0f 00 08 08 64 00 0a 001843    0f 00 08 08 64 00 0a 001844    0f 00 08 08 64 00 0a 001845    0f 00 08 08 64 00 0a 001846    0f 00 08 08 64 00 0a 001847 1848    00 00 00 00 00 00 00 001849    00 00 00 00 00 00 00 001850    00 00 00 00 00 00 00 001851    00 00 00 00 00 00 00 001852    00 00 00 00 00 00 00 001853    00 00 00 00 00 00 00 001854    00 00 00 00 00 00 00 001855    00 00 00 00 00 00 00 001856 1857    00 00 00 00 00 00 00 001858    00 00 00 00 00 00 00 001859    00 00 00 00 00 00 00 001860    00 00 00 00 00 00 00 001861    00 00 00 00 00 00 00 001862    00 00 00 00 00 00 00 001863    00 00 00 00 00 00 00 001864    00 00 00 00 00 00 00 001865 1866    00 00 00 00 00 00 00 001867    00 00 00 00 00 00 00 001868    00 00 00 00 00 00 00 001869 1870    fe fe1871    00 001872    00 001873 1874NVRAM layout details1875 1876=============  ================1877NVRAM Address1878=============  ================18790x000-0x0ff    not used18800x100-0x26f    initialised data18810x270-0x7ff    not used1882=============  ================1883 1884general layout::1885 1886        header  -   6 bytes,1887        data    - 356 bytes (checksum is byte sum of this data)1888        trailer -   6 bytes1889                  ---1890        total     368 bytes1891 1892data area layout::1893 1894        controller set up  -  20 bytes1895        boot configuration -  56 bytes (4x14 bytes)1896        device set up      - 128 bytes (16x8 bytes)1897        unused (spare?)    - 152 bytes (19x8 bytes)1898                             ---1899        total                356 bytes1900 1901header::1902 1903    00 00   - ?? start marker1904    64 01   - byte count (lsb/msb excludes header/trailer)1905    8e 0b   - checksum (lsb/msb excludes header/trailer)1906 1907controller set up::1908 1909    00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 001910		    |     |           |     |1911		    |     |           |      -- host ID1912		    |     |           |1913		    |     |            --Removable Media Support1914		    |     |               0x00 = none1915		    |     |               0x01 = Bootable Device1916		    |     |               0x02 = All with Media1917		    |     |1918		    |      --flag bits 21919		    |        0x00000001= scan order hi->low1920		    |            (default 0x00 - scan low->hi)1921			--flag bits 11922			0x00000001 scam enable1923			0x00000010 parity enable1924			0x00000100 verbose boot msgs1925 1926remaining bytes unknown - they do not appear to change in my1927current set up for any of the controllers.1928 1929default set up is identical for 53c810a and 53c875 NVRAM1930(Removable Media added Symbios BIOS version 4.09)1931 1932boot configuration1933 1934boot order set by order of the devices in this table::1935 1936    04 00 0f 00 00 10 00 50 00 00 01 00 00 62 -- 1st controller1937    04 00 03 00 00 10 00 58 00 00 01 00 00 63    2nd controller1938    04 00 01 00 00 10 00 48 00 00 01 00 00 61    3rd controller1939    00 00 00 00 00 00 00 00 00 00 00 00 00 00    4th controller1940	|  |  |  |     |        |     |  |1941	|  |  |  |     |        |      ---- PCI io port adr1942	|  |  |  |     |         --0x01 init/scan at boot time1943	|  |  |  |      --PCI device/function number (0xdddddfff)1944	|  |   ----- ?? PCI vendor ID (lsb/msb)1945	    ----PCI device ID (lsb/msb)1946 1947    ?? use of this data is a guess but seems reasonable1948 1949remaining bytes unknown - they do not appear to change in my1950current set up1951 1952default set up is identical for 53c810a and 53c875 NVRAM1953--------------------------------------------------------1954 1955device set up (up to 16 devices - includes controller)::1956 1957    0f 00 08 08 64 00 0a 00 - id 01958    0f 00 08 08 64 00 0a 001959    0f 00 08 08 64 00 0a 001960    0f 00 08 08 64 00 0a 001961    0f 00 08 08 64 00 0a 001962    0f 00 08 08 64 00 0a 001963    0f 00 08 08 64 00 0a 001964    0f 00 08 08 64 00 0a 001965 1966    0f 00 08 08 64 00 0a 001967    0f 00 08 08 64 00 0a 001968    0f 00 08 08 64 00 0a 001969    0f 00 08 08 64 00 0a 001970    0f 00 08 08 64 00 0a 001971    0f 00 08 08 64 00 0a 001972    0f 00 08 08 64 00 0a 001973    0f 00 08 08 64 00 0a 00 - id 151974    |     |  |  |     |  |1975    |     |  |  |      ----timeout (lsb/msb)1976    |     |  |   --synch period (0x?? 40 Mtrans/sec- fast 40) (probably 0x28)1977    |     |  |                  (0x30 20 Mtrans/sec- fast 20)1978    |     |  |                  (0x64 10 Mtrans/sec- fast )1979    |     |  |                  (0xc8  5 Mtrans/sec)1980    |     |  |                  (0x00  asynchronous)1981    |     |   -- ?? max sync offset (0x08 in NVRAM on 53c810a)1982    |     |                         (0x10 in NVRAM on 53c875)1983    |      --device bus width (0x08 narrow)1984    |                         (0x10 16 bit wide)1985    --flag bits1986	0x00000001 - disconnect enabled1987	0x00000010 - scan at boot time1988	0x00000100 - scan luns1989	0x00001000 - queue tags enabled1990 1991remaining bytes unknown - they do not appear to change in my1992current set up1993 1994?? use of this data is a guess but seems reasonable1995(but it could be max bus width)1996 1997default set up for 53c810a NVRAM1998default set up for 53c875 NVRAM1999 2000				- bus width     - 0x102001                                - sync offset ? - 0x102002                                - sync period   - 0x302003 2004?? spare device space (32 bit bus ??)2005 2006::2007 2008    00 00 00 00 00 00 00 00  (19x8bytes)2009    .2010    .2011    00 00 00 00 00 00 00 002012 2013default set up is identical for 53c810a and 53c875 NVRAM2014--------------------------------------------------------2015 2016trailer::2017 2018    fe fe   - ? end marker ?2019    00 002020    00 002021 2022default set up is identical for 53c810a and 53c875 NVRAM2023-----------------------------------------------------------2024 2025 2026 202717.3 Tekram NVRAM layout2028------------------------2029 2030nvram 64x16 (1024 bit)2031 2032Drive settings::2033 2034    Drive ID 0-15 (addr 0x0yyyy0 = device setup, yyyy = ID)2035		(addr 0x0yyyy1 = 0x0000)2036 2037	x x x x  x x x x  x x x x  x x x x2038		| | |      | |  | | | |2039		| | |      | |  | | |  ----- parity check   0 - off2040		| | |      | |  | | |                       1 - on2041		| | |      | |  | | |2042		| | |      | |  | |  ------- sync neg       0 - off2043		| | |      | |  | |                         1 - on2044		| | |      | |  | |2045		| | |      | |  |  --------- disconnect     0 - off2046		| | |      | |  |                           1 - on2047		| | |      | |  |2048		| | |      | |   ----------- start cmd      0 - off2049		| | |      | |                              1 - on2050		| | |      | |2051		| | |      |  -------------- tagged cmds    0 - off2052		| | |      |                                1 - on2053		| | |      |2054		| | |       ---------------- wide neg       0 - off2055		| | |                                       1 - on2056		| | |2057		    --------------------------- sync rate      0 - 10.0 Mtrans/sec2058							    1 -  8.02059							    2 -  6.62060							    3 -  5.72061							    4 -  5.02062							    5 -  4.02063							    6 -  3.02064							    7 -  2.02065							    7 -  2.02066							    8 - 20.02067							    9 - 16.72068							    a - 13.92069							    b - 11.92070 2071Global settings2072 2073Host flags 0 (addr 0x100000, 32)::2074 2075    x x x x  x x x x  x x x x  x x x x2076    | | | |  | | | |           | | | |2077    | | | |  | | | |            ----------- host ID    0x00 - 0x0f2078    | | | |  | | | |2079    | | | |  | | |  ----------------------- support for    0 - off2080    | | | |  | | |                          > 2 drives     1 - on2081    | | | |  | | |2082    | | | |  | |  ------------------------- support drives 0 - off2083    | | | |  | |                            > 1Gbytes      1 - on2084    | | | |  | |2085    | | | |  |  --------------------------- bus reset on   0 - off2086    | | | |  |                                power on     1 - on2087    | | | |  |2088    | | | |   ----------------------------- active neg     0 - off2089    | | | |                                                1 - on2090    | | | |2091    | | |  -------------------------------- imm seek       0 - off2092    | | |                                                  1 - on2093    | | |2094    | |  ---------------------------------- scan luns      0 - off2095    | |                                                    1 - on2096    | |2097     -------------------------------------- removable      0 - disable2098                                            as BIOS dev    1 - boot device2099                                                           2 - all2100 2101Host flags 1 (addr 0x100001, 33)::2102 2103    x x x x  x x x x  x x x x  x x x x2104               | | |             | | |2105               | | |              --------- boot delay     0 -   3 sec2106               | | |                                       1 -   52107               | | |                                       2 -  102108               | | |                                       3 -  202109               | | |                                       4 -  302110               | | |                                       5 -  602111               | | |                                       6 - 1202112               | | |2113                --------------------------- max tag cmds   0 -  22114                                                           1 -  42115                                                           2 -  82116                                                           3 - 162117                                                           4 - 322118 2119Host flags 2 (addr 0x100010, 34)::2120 2121    x x x x  x x x x  x x x x  x x x x2122                                     |2123                                      ----- F2/F6 enable   0 - off ???2124                                                           1 - on  ???2125 2126checksum (addr 0x111111)2127 2128checksum = 0x1234 - (sum addr 0-63)2129 2130----------------------------------------------------------------------------2131 2132default nvram data::2133 2134    0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x00002135    0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x00002136    0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x00002137    0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x00002138 2139    0x0f07 0x0400 0x0001 0x0000 0x0000 0x0000 0x0000 0x00002140    0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x00002141    0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x00002142    0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0xfbbc2143 2144 214518. Support for Big Endian2146==========================2147 2148The PCI local bus has been primarily designed for x86 architecture.2149As a consequence, PCI devices generally expect DWORDS using little endian2150byte ordering.2151 215218.1 Big Endian CPU2153-------------------2154 2155In order to support NCR chips on a Big Endian architecture the driver has to2156perform byte reordering each time it is needed. This feature has been2157added to the driver by Cort <cort@cs.nmt.edu> and is available in driver2158version 2.5 and later ones. For the moment Big Endian support has only2159been tested on Linux/PPC (PowerPC).2160 216118.2 NCR chip in Big Endian mode of operations2162----------------------------------------------2163 2164It can be read in SYMBIOS documentation that some chips support a special2165Big Endian mode, on paper: 53C815, 53C825A, 53C875, 53C875N, 53C895.2166This mode of operations is not software-selectable, but needs pin named2167BigLit to be pulled-up. Using this mode, most of byte reorderings should2168be avoided when the driver is running on a Big Endian CPU.2169Driver version 2.5 is also, in theory, ready for this feature.2170