Documentation.txt
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:44k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. The Linux SYM-2 driver documentation file
  2. Written by Gerard Roudier <groudier@free.fr>
  3. 21 Rue Carnot
  4. 95170 DEUIL LA BARRE - FRANCE
  5. Decembre 28 2000
  6. ===============================================================================
  7. 1.  Introduction
  8. 2.  Supported chips and SCSI features
  9. 3.  Advantages of this driver for newer chips.
  10.       3.1 Optimized SCSI SCRIPTS
  11.       3.2 New features appeared with the SYM53C896
  12. 4.  Memory mapped I/O versus normal I/O
  13. 5.  Tagged command queueing
  14. 6.  Parity checking
  15. 7.  Profiling information
  16. 8.  Control commands
  17.       8.1  Set minimum synchronous period
  18.       8.2  Set wide size
  19.       8.3  Set maximum number of concurrent tagged commands
  20.       8.4  Set debug mode
  21.       8.5  Set flag (no_disc)
  22.       8.6  Set verbose level
  23.       8.7  Reset all logical units of a target
  24.       8.8  Abort all tasks of all logical units of a target
  25. 9.  Configuration parameters
  26. 10. Boot setup commands
  27.       10.1 Syntax
  28.       10.2 Available arguments
  29.              10.2.1  Master parity checking
  30.              10.2.2  Scsi parity checking
  31.              10.2.3  Default number of tagged commands
  32.              10.2.4  Default synchronous period factor
  33.              10.2.5  Verbosity level
  34.              10.2.6  Debug mode
  35.              10.2.7  Burst max
  36.              10.2.8  LED support
  37.              10.2.9  Max wide
  38.              10.2.10 Differential mode
  39.              10.2.11 IRQ mode
  40.              10.2.12 Reverse probe
  41.              10.2.13 Fix up PCI configuration space
  42.              10.2.14 Serial NVRAM
  43.              10.2.15 Check SCSI BUS 
  44.              10.2.16 Exclude a host from being attached
  45.              10.2.17 Suggest a default SCSI id for hosts
  46.       10.3 PCI configuration fix-up boot option
  47.       10.4 Serial NVRAM support boot option
  48.       10.5 SCSI BUS checking boot option
  49. 11. SCSI problem troubleshooting
  50.       15.1 Problem tracking
  51.       15.2 Understanding hardware error reports
  52. 12. Serial NVRAM support (by Richard Waltham)
  53.       17.1 Features
  54.       17.2 Symbios NVRAM layout
  55.       17.3 Tekram  NVRAM layout
  56. ===============================================================================
  57. 1. Introduction
  58. This driver supports the whole SYM53C8XX family of PCI-SCSI controllers.
  59. It also support the subset of LSI53C10XX PCI-SCSI controllers that are based 
  60. on the SYM53C8XX SCRIPTS language.
  61. It replaces the sym53c8xx+ncr53c8xx driver bundle and shares its core code 
  62. with the FreeBSD SYM-2 driver. The `glue' that allows this driver to work 
  63. under Linux is contained in 2 files named sym_glue.h and sym_glue.c.
  64. Other drivers files are intended not to depend on the Operating System 
  65. on which the driver is used.
  66. The history of this driver can be summerized as follows:
  67. 1993: ncr driver written for 386bsd and FreeBSD by:
  68.           Wolfgang Stanglmeier        <wolf@cologne.de>
  69.           Stefan Esser                <se@mi.Uni-Koeln.de>
  70. 1996: port of the ncr driver to Linux-1.2.13 and rename it ncr53c8xx.
  71.           Gerard Roudier
  72. 1998: new sym53c8xx driver for Linux based on LOAD/STORE instruction and that 
  73.       adds full support for the 896 but drops support for early NCR devices.
  74.           Gerard Roudier
  75. 1999: port of the sym53c8xx driver to FreeBSD and support for the LSI53C1010 
  76.       33 MHz and 66MHz Ultra-3 controllers. The new driver is named `sym'.
  77.           Gerard Roudier
  78. 2000: Add support for early NCR devices to FreeBSD `sym' driver.
  79.       Break the driver into several sources and separate the OS glue 
  80.       code from the core code that can be shared among different O/Ses.
  81.       Write a glue code for Linux.
  82.           Gerard Roudier
  83. This README file addresses the Linux version of the driver. Under FreeBSD, 
  84. the driver documentation is the sym.8 man page.
  85. Information about new chips is available at LSILOGIC web server:
  86.           http://www.lsilogic.com/
  87. SCSI standard documentations are available at T10 site:
  88.           http://www.t10.org/
  89. Useful SCSI tools written by Eric Youngdale are part of most Linux 
  90. distributions:
  91.    scsiinfo:    command line tool
  92.    scsi-config: TCL/Tk tool using scsiinfo
  93. 2. Supported chips and SCSI features
  94. The following features are supported for all chips:
  95. Synchronous negotiation
  96. Disconnection
  97. Tagged command queuing
  98. SCSI parity checking
  99. PCI Master parity checking
  100. Other features depends on chip capabilities.
  101. The driver notably uses optimized SCRIPTS for devices that support 
  102. LOAD/STORE and handles PHASE MISMATCH from SCRIPTS for devices that 
  103. support the corresponding feature.
  104. The following table shows some characteristics of the chip family.
  105.        On board                                   LOAD/STORE   HARDWARE
  106. Chip   SDMS BIOS   Wide   SCSI std.   Max. sync   SCRIPTS      PHASE MISMATCH
  107. ----   ---------   ----   ---------   ----------  ----------   --------------
  108. 810        N         N      FAST10    10 MB/s        N             N
  109. 810A       N         N      FAST10    10 MB/s        Y             N
  110. 815        Y         N      FAST10    10 MB/s        N             N
  111. 825        Y         Y      FAST10    20 MB/s        N             N
  112. 825A       Y         Y      FAST10    20 MB/s        Y             N
  113. 860        N         N      FAST20    20 MB/s        Y             N
  114. 875        Y         Y      FAST20    40 MB/s        Y             N
  115. 875A       Y         Y      FAST20    40 MB/s        Y             Y
  116. 876        Y         Y      FAST20    40 MB/s        Y             N
  117. 895        Y         Y      FAST40    80 MB/s        Y             N
  118. 895A       Y         Y      FAST40    80 MB/s        Y             Y
  119. 896        Y         Y      FAST40    80 MB/s        Y             Y
  120. 897        Y         Y      FAST40    80 MB/s        Y             Y
  121. 1510D      Y         Y      FAST40    80 MB/s        Y             Y
  122. 1010       Y         Y      FAST80   160 MB/s        Y             Y
  123. 1010_66*   Y         Y      FAST80   160 MB/s        Y             Y
  124. * Chip supports 33MHz and 66MHz PCI bus clock.
  125. Summary of other supported features:
  126. Module:                allow to load the driver
  127. Memory mapped I/O:     increases performance
  128. Control commands:      write operations to the proc SCSI file system
  129. Debugging information: written to syslog (expert only)
  130. Scatter / gather
  131. Shared interrupt
  132. Boot setup commands
  133. Serial NVRAM:          Symbios and Tekram formats
  134. 3. Advantages of this driver for newer chips.
  135. 3.1 Optimized SCSI SCRIPTS.
  136. All chips except the 810, 815 and 825, support new SCSI SCRIPTS instructions 
  137. named LOAD and STORE that allow to move up to 1 DWORD from/to an IO register 
  138. to/from memory much faster that the MOVE MEMORY instruction that is supported 
  139. by the 53c7xx and 53c8xx family.
  140. The LOAD/STORE instructions support absolute and DSA relative addressing 
  141. modes. The SCSI SCRIPTS had been entirely rewritten using LOAD/STORE instead 
  142. of MOVE MEMORY instructions.
  143. Due to the lack of LOAD/STORE SCRIPTS instructions by earlier chips, this 
  144. driver also incorporates a different SCRIPTS set based on MEMORY MOVE, in 
  145. order to provide support for the entire SYM53C8XX chips family.
  146. 3.2 New features appeared with the SYM53C896
  147. Newer chips (see above) allows handling of the phase mismatch context from 
  148. SCRIPTS (avoids the phase mismatch interrupt that stops the SCSI processor 
  149. until the C code has saved the context of the transfer).
  150. The 896 and 1010 chips support 64 bit PCI transactions and addressing, 
  151. while the 895A supports 32 bit PCI transactions and 64 bit addressing.
  152. The SCRIPTS processor of these chips is not true 64 bit, but uses segment 
  153. registers for bit 32-63. Another interesting feature is that LOAD/STORE 
  154. instructions that address the on-chip RAM (8k) remain internal to the chip.
  155. 4. Memory mapped I/O versus normal I/O
  156. Memory mapped I/O has less latency than normal I/O and is the recommended 
  157. way for doing IO with PCI devices. Memory mapped I/O seems to work fine on 
  158. most hardware configurations, but some poorly designed chipsets may break 
  159. this feature. A configuration option is provided for normal I/O to be 
  160. used but the driver defaults to MMIO.
  161. 5. Tagged command queueing
  162. Queuing more than 1 command at a time to a device allows it to perform 
  163. optimizations based on actual head positions and its mechanical 
  164. characteristics. This feature may also reduce average command latency.
  165. In order to really gain advantage of this feature, devices must have 
  166. a reasonnable cache size (No miracle is to be expected for a low-end 
  167. hard disk with 128 KB or less).
  168. Some kown old SCSI devices do not properly support tagged command queuing.
  169. Generally, firmware revisions that fix this kind of problems are available 
  170. at respective vendor web/ftp sites.
  171. All I can say is that I never have had problem with tagged queuing using 
  172. this driver and its predecessors. Hard disks that behaved correctly for 
  173. me using tagged commands are the following:
  174. - IBM S12 0662
  175. - Conner 1080S
  176. - Quantum Atlas I
  177. - Quantum Atlas II
  178. - Seagate Cheetah I
  179. - Quantum Viking II
  180. - IBM DRVS
  181. - Quantum Atlas IV
  182. - Seagate Cheetah II
  183. If your controller has NVRAM, you can configure this feature per target 
  184. from the user setup tool. The Tekram Setup program allows to tune the 
  185. maximum number of queued commands up to 32. The Symbios Setup only allows 
  186. to enable or disable this feature.
  187. The maximum number of simultaneous tagged commands queued to a device
  188. is currently set to 16 by default.  This value is suitable for most SCSI
  189. disks.  With large SCSI disks (>= 2GB, cache >= 512KB, average seek time
  190. <= 10 ms), using a larger value may give better performances.
  191. This driver supports up to 255 commands per device, and but using more than 
  192. 64 is generally not worth-while, unless you are using a very large disk or 
  193. disk arrays. It is noticeable that most of recent hard disks seem not to 
  194. accept more than 64 simultaneous commands. So, using more than 64 queued 
  195. commands is probably just resource wasting.
  196. If your controller does not have NVRAM or if it is managed by the SDMS 
  197. BIOS/SETUP, you can configure tagged queueing feature and device queue 
  198. depths from the boot command-line. For example:
  199.   sym53c8xx=tags:4/t2t3q15-t4q7/t1u0q32
  200. will set tagged commands queue depths as follow:
  201. - target 2  all luns  on controller 0 --> 15
  202. - target 3  all luns  on controller 0 --> 15
  203. - target 4  all luns  on controller 0 -->  7
  204. - target 1  lun 0     on controller 1 --> 32
  205. - all other target/lun                -->  4
  206. In some special conditions, some SCSI disk firmwares may return a
  207. QUEUE FULL status for a SCSI command. This behaviour is managed by the
  208. driver using the following heuristic:
  209. - Each time a QUEUE FULL status is returned, tagged queue depth is reduced 
  210.   to the actual number of disconnected commands. 
  211. - Every 200 successfully completed SCSI commands, if allowed by the
  212.   current limit, the maximum number of queueable commands is incremented.
  213. Since QUEUE FULL status reception and handling is resource wasting, the 
  214. driver notifies by default this problem to user by indicating the actual 
  215. number of commands used and their status, as well as its decision on the 
  216. device queue depth change.
  217. The heuristic used by the driver in handling QUEUE FULL ensures that the 
  218. impact on performances is not too bad. You can get rid of the messages by 
  219. setting verbose level to zero, as follow:
  220. 1st method: boot your system using 'sym53c8xx=verb:0' option.
  221. 2nd method: apply "setverbose 0" control command to the proc fs entry 
  222.             corresponding to your controller after boot-up.
  223. 6. Parity checking
  224. The driver supports SCSI parity checking and PCI bus master parity
  225. checking. These features must be enabled in order to ensure safe data
  226. transfers. However, some flawed devices or mother boards will have
  227. problems with parity. You can disable either PCI parity or SCSI parity 
  228. checking by entering appropriate options from the boot command line.
  229. (See 10: Boot setup commands).
  230. 7. Profiling information
  231. This driver does not provide profiling informations as did its predecessors.
  232. This feature was not this useful and added complexity to the code. 
  233. As the driver code got more complex, I have decided to remove everything 
  234. that didn't seem actually useful.
  235. 8. Control commands
  236. Control commands can be sent to the driver with write operations to
  237. the proc SCSI file system. The generic command syntax is the
  238. following:
  239.       echo "<verb> <parameters>" >/proc/scsi/sym53c8xx/0
  240.       (assumes controller number is 0)
  241. Using "all" for "<target>" parameter with the commands below will
  242. apply to all targets of the SCSI chain (except the controller).
  243. Available commands:
  244. 8.1 Set minimum synchronous period factor
  245.     setsync <target> <period factor>
  246.     target:    target number
  247.     period:    minimum synchronous period.
  248.                Maximum speed = 1000/(4*period factor) except for special
  249.                cases below.
  250.     Specify a period of 0, to force asynchronous transfer mode.
  251.        9 means 12.5 nano-seconds synchronous period
  252.       10 means 25 nano-seconds synchronous period
  253.       11 means 30 nano-seconds synchronous period
  254.       12 means 50 nano-seconds synchronous period
  255. 8.2 Set wide size
  256.     setwide <target> <size>
  257.     target:    target number
  258.     size:      0=8 bits, 1=16bits
  259. 8.3 Set maximum number of concurrent tagged commands
  260.  
  261.     settags <target> <tags>
  262.     target:    target number
  263.     tags:      number of concurrent tagged commands
  264.                must not be greater than configured (default: 16)
  265. 8.4 Set debug mode
  266.     setdebug <list of debug flags>
  267.     Available debug flags:
  268.         alloc:   print info about memory allocations (ccb, lcb)
  269.         queue:   print info about insertions into the command start queue
  270.         result:  print sense data on CHECK CONDITION status
  271.         scatter: print info about the scatter process
  272.         scripts: print info about the script binding process
  273. tiny:    print minimal debugging information
  274. timing:  print timing information of the NCR chip
  275. nego:    print information about SCSI negotiations
  276. phase:   print information on script interruptions
  277.     Use "setdebug" with no argument to reset debug flags.
  278. 8.5 Set flag (no_disc)
  279.  
  280.     setflag <target> <flag>
  281.     target:    target number
  282.     For the moment, only one flag is available:
  283.         no_disc:   not allow target to disconnect.
  284.     Do not specify any flag in order to reset the flag. For example:
  285.     - setflag 4
  286.       will reset no_disc flag for target 4, so will allow it disconnections.
  287.     - setflag all
  288.       will allow disconnection for all devices on the SCSI bus.
  289. 8.6 Set verbose level
  290.     setverbose #level
  291.     The driver default verbose level is 1. This command allows to change 
  292.     th driver verbose level after boot-up.
  293. 8.7 Reset all logical units of a target
  294.     resetdev <target>
  295.     target:    target number
  296.     The driver will try to send a BUS DEVICE RESET message to the target.
  297. 8.8 Abort all tasks of all logical units of a target
  298.     cleardev <target>
  299.     target:    target number
  300.     The driver will try to send a ABORT message to all the logical units 
  301.     of the target.
  302. 9. Configuration parameters
  303. Under kernel configuration tools (make menuconfig, for example), it is 
  304. possible to change some default driver configuration parameters.
  305. If the firmware of all your devices is perfect enough, all the
  306. features supported by the driver can be enabled at start-up. However,
  307. if only one has a flaw for some SCSI feature, you can disable the
  308. support by the driver of this feature at linux start-up and enable
  309. this feature after boot-up only for devices that support it safely.
  310. Configuration parameters:
  311. Use normal IO                         (default answer: n)
  312.     Answer "y" if you suspect your mother board to not allow memory mapped I/O.
  313.     May slow down performance a little.
  314. Default tagged command queue depth    (default answer: 16)
  315.     Entering 0 defaults to tagged commands not being used.
  316.     This parameter can be specified from the boot command line.
  317. Maximum number of queued commands     (default answer: 32)
  318.     This option allows you to specify the maximum number of tagged commands 
  319.     that can be queued to a device. The maximum supported value is 255.
  320. Synchronous transfers frequency       (default answer: 80)
  321.     This option allows you to specify the frequency in MHz the driver 
  322.     will use at boot time for synchronous data transfer negotiations.
  323.     0 means "asynchronous data transfers".
  324. 10. Boot setup commands
  325. 10.1 Syntax
  326. Setup commands can be passed to the driver either at boot time or as a 
  327. string variable using 'insmod'.
  328. A boot setup command for this driver begins with the driver name "sym53c8xx=".
  329. The kernel syntax parser then expects an optionnal list of integers separated 
  330. with comma followed by an optional list of  comma-separated strings.
  331. Example of boot setup command under lilo prompt:
  332. lilo: linux root=/dev/sda2 sym53c8xx=tags:4,sync:10,debug:0x200
  333. - enable tagged commands, up to 4 tagged commands queued.
  334. - set synchronous negotiation speed to 10 Mega-transfers / second.
  335. - set DEBUG_NEGO flag.
  336. Since comma seems not to be allowed when defining a string variable using  
  337. 'insmod', the driver also accepts <space> as option separator. 
  338. The following command will install driver module with the same options as 
  339. above.
  340.     insmod sym53c8xx.o sym53c8xx="tags:4 sync:10 debug:0x200"
  341. The integer list of arguments is discarded by the driver. 
  342. Each string argument must be specified as "keyword:value". Only lower-case 
  343. characters and digits are allowed.
  344. 10.2 Available arguments
  345. 10.2.1  Master parity checking
  346.         mpar:y     enabled
  347.         mpar:n     disabled
  348. 10.2.2  Scsi parity checking
  349.         spar:y     enabled
  350.         spar:n     disabled
  351. 10.2.3  Default number of tagged commands
  352.         tags:0     (or tags:1 ) tagged command queuing disabled
  353.         tags:#tags (#tags  > 1) tagged command queuing enabled
  354.   #tags will be truncated to the max queued commands configuration parameter.
  355.   This option also allows to specify a command queue depth for each device 
  356.   that support tagged command queueing.
  357.   Example:
  358.       sym53c8xx=tags:10/t2t3q16-t5q24/t1u2q32
  359.                will set devices queue depth as follow:
  360.       - controller #0 target #2 and target #3                  -> 16 commands,
  361.       - controller #0 target #5                                -> 24 commands,
  362.       - controller #1 target #1 logical unit #2                -> 32 commands,
  363.       - all other logical units (all targets, all controllers) -> 10 commands.
  364. 10.2.4  Default synchronous period factor
  365.         sync:255     disabled (asynchronous transfer mode)
  366.         sync:#factor
  367.   #factor =  9     Ultra-3 SCSI 80 Mega-transfers / second (Wide only)
  368.   #factor = 10     Ultra-2 SCSI 40 Mega-transfers / second
  369.   #factor = 11     Ultra-2 SCSI 33 Mega-transfers / second
  370.   #factor < 25     Ultra   SCSI 20 Mega-transfers / second
  371.   #factor < 50     Fast    SCSI-2
  372.   In all cases, the driver will use the minimum transfer period supported by 
  373.   controllers according to SYM53C8XX chip type.
  374. 10.2.5  Verbosity level
  375.         verb:0     minimal
  376.         verb:1     normal
  377.         verb:2     too much
  378. 10.2.6 Debug mode
  379.         debug:0  clear debug flags
  380.         debug:#x   set debug flags
  381.   #x is an integer value combining the following power-of-2 values:
  382.   DEBUG_ALLOC       0x1
  383.   DEBUG_PHASE       0x2
  384.   DEBUG_POLL        0x4
  385.   DEBUG_QUEUE       0x8
  386.   DEBUG_RESULT     0x10
  387.   DEBUG_SCATTER    0x20
  388.   DEBUG_SCRIPT     0x40
  389.   DEBUG_TINY       0x80
  390.   DEBUG_TIMING    0x100
  391.   DEBUG_NEGO      0x200
  392.   DEBUG_TAGS      0x400
  393.   DEBUG_FREEZE    0x800
  394.   DEBUG_RESTART  0x1000
  395.   You can play safely with DEBUG_NEGO. However, some of these flags may 
  396.   generate bunches of syslog messages. 
  397. 10.2.7 Burst max
  398.         burst:0    burst disabled
  399.         burst:255  get burst length from initial IO register settings.
  400.         burst:#x   burst enabled (1<<#x burst transfers max)
  401.   #x is an integer value which is log base 2 of the burst transfers max.
  402.   By default the driver uses the maximum value supported by the chip.
  403. 10.2.8 LED support
  404.         led:1      enable  LED support
  405.         led:0      disable LED support
  406.   Donnot enable LED support if your scsi board does not use SDMS BIOS.
  407.   (See 'Configuration parameters')
  408. 10.2.9 Max wide
  409.         wide:1      wide scsi enabled
  410.         wide:0      wide scsi disabled
  411.   Some scsi boards use a 875 (ultra wide) and only supply narrow connectors.
  412.   If you have connected a wide device with a 50 pins to 68 pins cable 
  413.   converter, any accepted wide negotiation will break further data transfers.
  414.   In such a case, using "wide:0" in the bootup command will be helpfull. 
  415. 10.2.10 Differential mode
  416.         diff:0 never set up diff mode
  417.         diff:1 set up diff mode if BIOS set it
  418.         diff:2 always set up diff mode
  419.         diff:3 set diff mode if GPIO3 is not set
  420. 10.2.11 IRQ mode
  421.         irqm:0     always open drain
  422.         irqm:1     same as initial settings (assumed BIOS settings)
  423.         irqm:2     always totem pole
  424. 10.2.12 Reverse probe
  425.         revprob:n   probe chip ids from the PCI configuration in this order:
  426.                     810, 815, 825, 860, 875, 885, 875A, 895, 896, 895A,
  427.                     1510D, 1010-33, 1010-66.
  428.         revprob:y   probe chip ids in the reverse order.
  429. 10.2.13 Fix up PCI configuration space
  430.         pcifix:<option bits>
  431.     Available option bits:
  432.         0x0:   No attempt to fix PCI configuration space registers values.
  433.         0x1:   Set PCI cache-line size register if not set.
  434.         0x2:   Set write and invalidate bit in PCI command register.
  435. 10.2.14 Serial NVRAM
  436.         nvram:n     do not look for serial NVRAM
  437.         nvram:y     test controllers for onboard serial NVRAM
  438.         (alternate binary form)
  439.         mvram=<bits options>
  440.         0x01   look for NVRAM  (equivalent to nvram=y)
  441.         0x02   ignore NVRAM "Synchronous negotiation" parameters for all devices
  442.         0x04   ignore NVRAM "Wide negotiation"  parameter for all devices
  443.         0x08   ignore NVRAM "Scan at boot time" parameter for all devices
  444.         0x80   also attach controllers set to OFF in the NVRAM (sym53c8xx only)
  445. 10.2.15 Check SCSI BUS 
  446.         buschk:<option bits>
  447.     Available option bits:
  448.         0x0:   No check.
  449.         0x1:   Check and donnot attach the controller on error.  
  450.         0x2:   Check and just warn on error.
  451. 10.2.16 Exclude a host from being attached
  452.         excl=<io_address>
  453.     Prevent host at a given io address from being attached.
  454.     For example 'sym53c8xx=excl:0xb400,excl:0xc000' indicate to the 
  455.     driver not to attach hosts at address 0xb400 and 0xc000.
  456. 10.2.17 Suggest a default SCSI id for hosts
  457.         hostid:255 no id suggested.
  458.         hostid:#x   (0 < x < 7) x suggested for hosts SCSI id.
  459.     If a host SCSI id is available from the NVRAM, the driver will ignore 
  460.     any value suggested as boot option. Otherwise, if a suggested value 
  461.     different from 255 has been supplied, it will use it. Otherwise, it will 
  462.     try to deduce the value previously set in the hardware and use value 
  463.     7 if the hardware value is zero.
  464. 10.3 PCI configuration fix-up boot option
  465. pcifix:<option bits>
  466. Available option bits:
  467.     0x1:     Set PCI cache-line size register if not set.
  468.     0x2:     Set write and invalidate bit in PCI command register.
  469. Use 'pcifix:3' in order to allow the driver to fix both PCI features.
  470. Recent SYMBIOS 53C8XX scsi processors are able to use PCI read multiple 
  471. and PCI write and invalidate commands. These features require the 
  472. cache line size register to be properly set in the PCI configuration 
  473. space of the chips. On the other hand, chips will use PCI write and 
  474. invalidate commands only if the corresponding bit is set to 1 in the 
  475. PCI command register.
  476. Not all PCI bioses set the PCI cache line register and the PCI write and 
  477. invalidate bit in the PCI configuration space of 53C8XX chips.
  478. Optimized PCI accesses may be broken for some PCI/memory controllers or 
  479. make problems with some PCI boards.
  480. 10.4 Serial NVRAM support boot option
  481. nvram:n     do not look for serial NVRAM
  482. nvram:y     test controllers for onboard serial NVRAM
  483. This option can also been entered as an hexadecimal value that allows 
  484. to control what information the driver will get from the NVRAM and what 
  485. information it will ignore.
  486. For details see '17. Serial NVRAM support'.
  487. When this option is enabled, the driver tries to detect all boards using 
  488. a Serial NVRAM. This memory is used to hold user set up parameters.
  489. The parameters the driver is able to get from the NVRAM depend on the 
  490. data format used, as follow:
  491.                                  Tekram format      Symbios format
  492. General and host parameters
  493.     Boot order                         N                   Y
  494.     Host SCSI ID                       Y                   Y
  495.     SCSI parity checking               Y                   Y
  496.     Verbose boot messages              N                   Y
  497. SCSI devices parameters
  498.     Synchronous transfer speed         Y                   Y
  499.     Wide 16 / Narrow                   Y                   Y
  500.     Tagged Command Queuing enabled     Y                   Y
  501.     Disconnections enabled             Y                   Y
  502.     Scan at boot time                  N                   Y
  503. In order to speed up the system boot, for each device configured without 
  504. the "scan at boot time" option, the driver forces an error on the 
  505. first TEST UNIT READY command received for this device.
  506. Some SDMS BIOS revisions seem to be unable to boot cleanly with very fast 
  507. hard disks. In such a situation you cannot configure the NVRAM with 
  508. optimized parameters value.
  509. The 'nvram' boot option can be entered in hexadecimal form in order 
  510. to ignore some options configured in the NVRAM, as follow:
  511. mvram=<bits options>
  512.       0x01   look for NVRAM  (equivalent to nvram=y)
  513.       0x02   ignore NVRAM "Synchronous negotiation" parameters for all devices
  514.       0x04   ignore NVRAM "Wide negotiation"  parameter for all devices
  515.       0x08   ignore NVRAM "Scan at boot time" parameter for all devices
  516.       0x80   also attach controllers set to OFF in the NVRAM (sym53c8xx only)
  517. Option 0x80 is disabled by default.
  518. Result is that, by default (option not set), the sym53c8xx driver will not 
  519. attach controllers set to OFF in the NVRAM.
  520. 10.5 SCSI BUS checking boot option.
  521. When this option is set to a non-zero value, the driver checks SCSI lines 
  522. logic state, 100 micro-seconds after having asserted the SCSI RESET line.
  523. The driver just reads SCSI lines and checks all lines read FALSE except RESET.
  524. Since SCSI devices shall release the BUS at most 800 nano-seconds after SCSI 
  525. RESET has been asserted, any signal to TRUE may indicate a SCSI BUS problem.
  526. Unfortunately, the following common SCSI BUS problems are not detected:
  527. - Only 1 terminator installed.
  528. - Misplaced terminators.
  529. - Bad quality terminators.
  530. On the other hand, either bad cabling, broken devices, not conformant 
  531. devices, ... may cause a SCSI signal to be wrong when te driver reads it.
  532. 15. SCSI problem troubleshooting
  533. 15.1 Problem tracking
  534. Most SCSI problems are due to a non conformant SCSI bus or too buggy
  535. devices.  If infortunately you have SCSI problems, you can check the
  536. following things:
  537. - SCSI bus cables
  538. - terminations at both end of the SCSI chain
  539. - linux syslog messages (some of them may help you)
  540. If you donnot find the source of problems, you can configure the
  541. driver or devices in the NVRAM with minimal features.
  542. - only asynchronous data transfers
  543. - tagged commands disabled
  544. - disconnections not allowed
  545. Now, if your SCSI bus is ok, your system has every chance to work
  546. with this safe configuration but performances will not be optimal.
  547. If it still fails, then you can send your problem description to
  548. appropriate mailing lists or news-groups.  Send me a copy in order to
  549. be sure I will receive it.  Obviously, a bug in the driver code is
  550. possible.
  551.   My cyrrent email address: Gerard Roudier <groudier@free.fr>
  552. Allowing disconnections is important if you use several devices on
  553. your SCSI bus but often causes problems with buggy devices.
  554. Synchronous data transfers increases throughput of fast devices like
  555. hard disks.  Good SCSI hard disks with a large cache gain advantage of
  556. tagged commands queuing.
  557. 15.2 Understanding hardware error reports
  558. When the driver detects an unexpected error condition, it may display a 
  559. message of the following pattern.
  560. sym0:1: ERROR (0:48) (1-21-65) (f/95/0) @ (script 7c0:19000000).
  561. sym0: script cmd = 19000000
  562. sym0: regdump: da 10 80 95 47 0f 01 07 75 01 81 21 80 01 09 00.
  563. Some fields in such a message may help you understand the cause of the 
  564. problem, as follows:
  565. sym0:1: ERROR (0:48) (1-21-65) (f/95/0) @ (script 7c0:19000000).
  566. .....A.........B.C....D.E..F....G.H..I.......J.....K...L.......
  567. Field A : target number.
  568.   SCSI ID of the device the controller was talking with at the moment the 
  569.   error occurs.
  570. Field B : DSTAT io register (DMA STATUS)
  571.   Bit 0x40 : MDPE Master Data Parity Error
  572.              Data parity error detected on the PCI BUS.
  573.   Bit 0x20 : BF   Bus Fault
  574.              PCI bus fault condition detected
  575.   Bit 0x01 : IID  Illegal Instruction Detected
  576.              Set by the chip when it detects an Illegal Instruction format 
  577.              on some condition that makes an instruction illegal.
  578.   Bit 0x80 : DFE Dma Fifo Empty
  579.              Pure status bit that does not indicate an error.
  580.   If the reported DSTAT value contains a combination of MDPE (0x40), 
  581.   BF (0x20), then the cause may be likely due to a PCI BUS problem.
  582. Field C : SIST io register (SCSI Interrupt Status)
  583.   Bit 0x08 : SGE  SCSI GROSS ERROR
  584.              Indicates that the chip detected a severe error condition 
  585.              on the SCSI BUS that prevents the SCSI protocol from functionning
  586.              properly.
  587.   Bit 0x04 : UDC  Undexpected Disconnection
  588.              Indicates that the device released the SCSI BUS when the chip 
  589.              was not expecting this to happen. A device may behave so to 
  590.              indicate the SCSI initiator that an error condition not reportable              using the SCSI protocol has occured.
  591.   Bit 0x02 : RST  SCSI BUS Reset
  592.              Generally SCSI targets donnot reset the SCSI BUS, although any 
  593.              device on the BUS can reset it at any time.
  594.   Bit 0x01 : PAR  Parity
  595.              SCSI parity error detected.
  596.   On a faulty SCSI BUS, any error condition among SGE (0x08), UDC (0x04) and 
  597.   PAR (0x01) may be detected by the chip. If your SCSI system sometimes 
  598.   encounters such error conditions, especially SCSI GROSS ERROR, then a SCSI 
  599.   BUS problem is likely the cause of these errors.
  600. For fields D,E,F,G and H, you may look into the sym53c8xx_defs.h file 
  601. that contains some minimal comments on IO register bits.
  602. Field D : SOCL  Scsi Output Control Latch
  603.           This register reflects the state of the SCSI control lines the 
  604.           chip want to drive or compare against.
  605. Field E : SBCL  Scsi Bus Control Lines
  606.           Actual value of control lines on the SCSI BUS.
  607. Field F : SBDL  Scsi Bus Data Lines
  608.           Actual value of data lines on the SCSI BUS.
  609. Field G : SXFER  SCSI Transfer
  610.           Contains the setting of the Synchronous Period for output and 
  611.           the current Synchronous offset (offset 0 means asynchronous).
  612. Field H : SCNTL3 Scsi Control Register 3
  613.           Contains the setting of timing values for both asynchronous and 
  614.           synchronous data transfers. 
  615. Field I : SCNTL4 Scsi Control Register 4
  616.           Only meaninful for 53C1010 Ultra3 controllers.
  617. Understanding Fields J, K, L and dumps requires to have good knowledge of 
  618. SCSI standards, chip cores functionnals and internal driver data structures.
  619. You are not required to decode and understand them, unless you want to help 
  620. maintain the driver code.
  621. 17. Serial NVRAM (added by Richard Waltham: dormouse@farsrobt.demon.co.uk)
  622. 17.1 Features
  623. Enabling serial NVRAM support enables detection of the serial NVRAM included
  624. on Symbios and some Symbios compatible host adaptors, and Tekram boards. The 
  625. serial NVRAM is used by Symbios and Tekram to hold set up parameters for the 
  626. host adaptor and it's attached drives.
  627. The Symbios NVRAM also holds data on the boot order of host adaptors in a
  628. system with more than one host adaptor. This enables the order of scanning
  629. the cards for drives to be changed from the default used during host adaptor
  630. detection.
  631. This can be done to a limited extent at the moment using "reverse probe" but
  632. this only changes the order of detection of different types of cards. The
  633. NVRAM boot order settings can do this as well as change the order the same
  634. types of cards are scanned in, something "reverse probe" cannot do.
  635. Tekram boards using Symbios chips, DC390W/F/U, which have NVRAM are detected
  636. and this is used to distinguish between Symbios compatible and Tekram host 
  637. adaptors. This is used to disable the Symbios compatible "diff" setting
  638. incorrectly set on Tekram boards if the CONFIG_SCSI_53C8XX_SYMBIOS_COMPAT 
  639. configuration parameter is set enabling both Symbios and Tekram boards to be 
  640. used together with the Symbios cards using all their features, including
  641. "diff" support. ("led pin" support for Symbios compatible cards can remain
  642. enabled when using Tekram cards. It does nothing useful for Tekram host
  643. adaptors but does not cause problems either.)
  644. 17.2 Symbios NVRAM layout
  645. typical data at NVRAM address 0x100 (53c810a NVRAM)
  646. -----------------------------------------------------------
  647. 00 00
  648. 64 01
  649. 8e 0b
  650. 00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00 
  651. 04 00 0f 00 00 10 00 50 00 00 01 00 00 62 
  652. 04 00 03 00 00 10 00 58 00 00 01 00 00 63 
  653. 04 00 01 00 00 10 00 48 00 00 01 00 00 61 
  654. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
  655. 0f 00 08 08 64 00 0a 00
  656. 0f 00 08 08 64 00 0a 00 
  657. 0f 00 08 08 64 00 0a 00 
  658. 0f 00 08 08 64 00 0a 00 
  659. 0f 00 08 08 64 00 0a 00 
  660. 0f 00 08 08 64 00 0a 00 
  661. 0f 00 08 08 64 00 0a 00 
  662. 0f 00 08 08 64 00 0a 00 
  663. 0f 00 08 08 64 00 0a 00 
  664. 0f 00 08 08 64 00 0a 00 
  665. 0f 00 08 08 64 00 0a 00 
  666. 0f 00 08 08 64 00 0a 00 
  667. 0f 00 08 08 64 00 0a 00 
  668. 0f 00 08 08 64 00 0a 00 
  669. 0f 00 08 08 64 00 0a 00 
  670. 0f 00 08 08 64 00 0a 00 
  671. 00 00 00 00 00 00 00 00 
  672. 00 00 00 00 00 00 00 00 
  673. 00 00 00 00 00 00 00 00 
  674. 00 00 00 00 00 00 00 00 
  675. 00 00 00 00 00 00 00 00 
  676. 00 00 00 00 00 00 00 00 
  677. 00 00 00 00 00 00 00 00 
  678. 00 00 00 00 00 00 00 00 
  679. 00 00 00 00 00 00 00 00 
  680. 00 00 00 00 00 00 00 00 
  681. 00 00 00 00 00 00 00 00 
  682. 00 00 00 00 00 00 00 00 
  683. 00 00 00 00 00 00 00 00 
  684. 00 00 00 00 00 00 00 00 
  685. 00 00 00 00 00 00 00 00 
  686. 00 00 00 00 00 00 00 00 
  687. 00 00 00 00 00 00 00 00 
  688. 00 00 00 00 00 00 00 00 
  689. 00 00 00 00 00 00 00 00 
  690. fe fe
  691. 00 00
  692. 00 00
  693. -----------------------------------------------------------
  694. NVRAM layout details
  695. NVRAM Address 0x000-0x0ff not used
  696.               0x100-0x26f initialised data
  697.               0x270-0x7ff not used
  698. general layout
  699.         header  -   6 bytes,
  700.         data    - 356 bytes (checksum is byte sum of this data)
  701.         trailer -   6 bytes
  702.                   ---
  703.         total     368 bytes
  704. data area layout
  705.         controller set up  -  20 bytes
  706.         boot configuration -  56 bytes (4x14 bytes)
  707.         device set up      - 128 bytes (16x8 bytes)
  708.         unused (spare?)    - 152 bytes (19x8 bytes)
  709.                              ---
  710.         total                356 bytes
  711. -----------------------------------------------------------
  712. header
  713. 00 00   - ?? start marker
  714. 64 01   - byte count (lsb/msb excludes header/trailer)
  715. 8e 0b   - checksum (lsb/msb excludes header/trailer)
  716. -----------------------------------------------------------
  717. controller set up
  718. 00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
  719.                    |     |           |     |
  720.                    |     |           |      -- host ID
  721.                    |     |           |
  722.                    |     |            --Removable Media Support
  723.                    |     |               0x00 = none
  724.                    |     |               0x01 = Bootable Device
  725.                    |     |               0x02 = All with Media
  726.                    |     |
  727.                    |      --flag bits 2
  728.                    |        0x00000001= scan order hi->low
  729.                    |            (default 0x00 - scan low->hi)
  730.                     --flag bits 1
  731.                        0x00000001 scam enable
  732.                        0x00000010 parity enable
  733.                        0x00000100 verbose boot msgs
  734. remaining bytes unknown - they do not appear to change in my
  735. current set up for any of the controllers.
  736. default set up is identical for 53c810a and 53c875 NVRAM
  737. (Removable Media added Symbios BIOS version 4.09)
  738. -----------------------------------------------------------
  739. boot configuration
  740. boot order set by order of the devices in this table
  741. 04 00 0f 00 00 10 00 50 00 00 01 00 00 62 -- 1st controller
  742. 04 00 03 00 00 10 00 58 00 00 01 00 00 63    2nd controller
  743. 04 00 01 00 00 10 00 48 00 00 01 00 00 61    3rd controller
  744. 00 00 00 00 00 00 00 00 00 00 00 00 00 00    4th controller
  745.        |  |  |  |     |        |     |  |
  746.        |  |  |  |     |        |      ---- PCI io port adr
  747.        |  |  |  |     |         --0x01 init/scan at boot time
  748.        |  |  |  |      --PCI device/function number (0xdddddfff)
  749.        |  |   ----- ?? PCI vendor ID (lsb/msb)
  750.         ----PCI device ID (lsb/msb)
  751. ?? use of this data is a guess but seems reasonable
  752. remaining bytes unknown - they do not appear to change in my
  753. current set up
  754. default set up is identical for 53c810a and 53c875 NVRAM
  755. -----------------------------------------------------------
  756. device set up (up to 16 devices - includes controller)
  757. 0f 00 08 08 64 00 0a 00 - id 0
  758. 0f 00 08 08 64 00 0a 00 
  759. 0f 00 08 08 64 00 0a 00 
  760. 0f 00 08 08 64 00 0a 00 
  761. 0f 00 08 08 64 00 0a 00 
  762. 0f 00 08 08 64 00 0a 00 
  763. 0f 00 08 08 64 00 0a 00 
  764. 0f 00 08 08 64 00 0a 00 
  765. 0f 00 08 08 64 00 0a 00 
  766. 0f 00 08 08 64 00 0a 00 
  767. 0f 00 08 08 64 00 0a 00 
  768. 0f 00 08 08 64 00 0a 00 
  769. 0f 00 08 08 64 00 0a 00 
  770. 0f 00 08 08 64 00 0a 00 
  771. 0f 00 08 08 64 00 0a 00 
  772. 0f 00 08 08 64 00 0a 00 - id 15
  773.  |     |  |  |     |  |
  774.  |     |  |  |      ----timeout (lsb/msb)
  775.  |     |  |   --synch period (0x?? 40 Mtrans/sec- fast 40) (probably 0x28)
  776.  |     |  |                  (0x30 20 Mtrans/sec- fast 20)
  777.  |     |  |                  (0x64 10 Mtrans/sec- fast )
  778.  |     |  |                  (0xc8  5 Mtrans/sec)
  779.  |     |  |                  (0x00  asynchronous)
  780.  |     |   -- ?? max sync offset (0x08 in NVRAM on 53c810a) 
  781.  |     |                         (0x10 in NVRAM on 53c875)
  782.  |      --device bus width (0x08 narrow)
  783.  |                         (0x10 16 bit wide)
  784.   --flag bits
  785.     0x00000001 - disconnect enabled
  786.     0x00000010 - scan at boot time
  787.     0x00000100 - scan luns
  788.     0x00001000 - queue tags enabled
  789. remaining bytes unknown - they do not appear to change in my
  790. current set up
  791. ?? use of this data is a guess but seems reasonable 
  792. (but it could be max bus width)
  793. default set up for 53c810a NVRAM
  794. default set up for 53c875 NVRAM - bus width     - 0x10
  795.                                 - sync offset ? - 0x10
  796.                                 - sync period   - 0x30
  797. -----------------------------------------------------------
  798. ?? spare device space (32 bit bus ??)
  799. 00 00 00 00 00 00 00 00  (19x8bytes)
  800. .
  801. .
  802. 00 00 00 00 00 00 00 00
  803. default set up is identical for 53c810a and 53c875 NVRAM
  804. -----------------------------------------------------------
  805. trailer
  806. fe fe   - ? end marker ?
  807. 00 00
  808. 00 00
  809. default set up is identical for 53c810a and 53c875 NVRAM
  810. -----------------------------------------------------------
  811. 17.3 Tekram NVRAM layout
  812. nvram 64x16 (1024 bit)
  813. Drive settings
  814. Drive ID 0-15 (addr 0x0yyyy0 = device setup, yyyy = ID)
  815.               (addr 0x0yyyy1 = 0x0000)
  816.     x x x x  x x x x  x x x x  x x x x
  817.                | | |      | |  | | | |
  818.                | | |      | |  | | |  ----- parity check   0 - off
  819.                | | |      | |  | | |                       1 - on
  820.                | | |      | |  | | |
  821.                | | |      | |  | |  ------- sync neg       0 - off
  822.                | | |      | |  | |                         1 - on
  823.                | | |      | |  | |
  824.                | | |      | |  |  --------- disconnect     0 - off
  825.                | | |      | |  |                           1 - on
  826.                | | |      | |  |
  827.                | | |      | |   ----------- start cmd      0 - off
  828.                | | |      | |                              1 - on
  829.                | | |      | |
  830.                | | |      |  -------------- tagged cmds    0 - off
  831.                | | |      |                                1 - on
  832.                | | |      | 
  833.                | | |       ---------------- wide neg       0 - off
  834.                | | |                                       1 - on
  835.                | | |
  836.                 --------------------------- sync rate      0 - 10.0 Mtrans/sec
  837.                                                            1 -  8.0
  838.                                                            2 -  6.6
  839.                                                            3 -  5.7
  840.                                                            4 -  5.0
  841.                                                            5 -  4.0
  842.                                                            6 -  3.0
  843.                                                            7 -  2.0
  844.                                                            7 -  2.0
  845.                                                            8 - 20.0
  846.                                                            9 - 16.7
  847.                                                            a - 13.9
  848.                                                            b - 11.9
  849. Global settings
  850. Host flags 0 (addr 0x100000, 32) 
  851.     x x x x  x x x x  x x x x  x x x x
  852.     | | | |  | | | |           | | | |
  853.     | | | |  | | | |            ----------- host ID    0x00 - 0x0f
  854.     | | | |  | | | |
  855.     | | | |  | | |  ----------------------- support for    0 - off
  856.     | | | |  | | |                          > 2 drives     1 - on
  857.     | | | |  | | | 
  858.     | | | |  | |  ------------------------- support drives 0 - off
  859.     | | | |  | |                            > 1Gbytes      1 - on
  860.     | | | |  | |
  861.     | | | |  |  --------------------------- bus reset on   0 - off
  862.     | | | |  |                                power on     1 - on
  863.     | | | |  |
  864.     | | | |   ----------------------------- active neg     0 - off
  865.     | | | |                                                1 - on
  866.     | | | |
  867.     | | |  -------------------------------- imm seek       0 - off
  868.     | | |                                                  1 - on
  869.     | | |
  870.     | |  ---------------------------------- scan luns      0 - off
  871.     | |                                                    1 - on
  872.     | |
  873.      -------------------------------------- removable      0 - disable
  874.                                             as BIOS dev    1 - boot device
  875.                                                            2 - all
  876. Host flags 1 (addr 0x100001, 33)
  877.     x x x x  x x x x  x x x x  x x x x
  878.                | | |             | | | 
  879.                | | |              --------- boot delay     0 -   3 sec
  880.                | | |                                       1 -   5
  881.                | | |                                       2 -  10
  882.                | | |                                       3 -  20
  883.                | | |                                       4 -  30
  884.                | | |                                       5 -  60
  885.                | | |                                       6 - 120
  886.                | | |
  887.                 --------------------------- max tag cmds   0 -  2
  888.                                                            1 -  4
  889.                                                            2 -  8
  890.                                                            3 - 16
  891.                                                            4 - 32
  892. Host flags 2 (addr 0x100010, 34)
  893.     x x x x  x x x x  x x x x  x x x x
  894.                                      |
  895.                                       ----- F2/F6 enable   0 - off ???
  896.                                                            1 - on  ???
  897. checksum (addr 0x111111)
  898. checksum = 0x1234 - (sum addr 0-63)
  899. ----------------------------------------------------------------------------
  900. default nvram data:
  901. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
  902. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
  903. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
  904. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 
  905. 0x0f07 0x0400 0x0001 0x0000 0x0000 0x0000 0x0000 0x0000
  906. 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
  907. 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
  908. 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0xfbbc
  909. ===============================================================================
  910. End of Linux SYM-2 driver documentation file