sym53c8xx_2.txt 40 KB

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