sym53c8xx_2.rst 44 KB

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